mbox series

[RESEND,v21,00/21] Add RX archtecture support

Message ID 20190618143923.53838-1-ysato@users.sourceforge.jp
Headers show
Series Add RX archtecture support | expand

Message

Yoshinori Sato June 18, 2019, 2:39 p.m. UTC
Hello.
This patch series is added Renesas RX target emulation.

Chanegs for v20.
Reorderd patches.
Squashed v19 changes.

Changes for v19.
Follow tcg changes.
Cleanup cpu.c.
simplify rx_cpu_class_by_name and rx_load_image move to rx-virt.

My git repository is bellow.
git://git.pf.osdn.net/gitroot/y/ys/ysato/qemu.git tags/rx-20190618

Testing binaries bellow.
u-boot
Download - https://osdn.net/users/ysato/pf/qemu/dl/u-boot.bin.gz

starting
$ gzip -d u-boot.bin.gz
$ qemu-system-rx -bios u-boot.bin

linux and pico-root (only sash)
Download - https://osdn.net/users/ysato/pf/qemu/dl/zImage (kernel)
           https://osdn.net/users/ysato/pf/qemu/dl/rx-qemu.dtb (DeviceTree)

starting
$ qemu-system-rx -kernel zImage -dtb rx-qemu.dtb -append "earlycon"

Philippe Mathieu-Daudé (3):
  hw/registerfields.h: Add 8bit and 16bit register macros
  hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core
  BootLinuxConsoleTest: Test the RX-Virt machine

Richard Henderson (7):
  target/rx: Disassemble rx_index_addr into a string
  target/rx: Replace operand with prt_ldmi in disassembler
  target/rx: Use prt_ldmi for XCHG_mr disassembly
  target/rx: Emit all disassembly in one prt()
  target/rx: Collect all bytes during disassembly
  target/rx: Dump bytes for each insn during disassembly
  hw/rx: Honor -accel qtest

Yoshinori Sato (11):
  MAINTAINERS: Add RX
  qemu/bitops.h: Add extract8 and extract16
  target/rx: TCG translation
  target/rx: TCG helper
  target/rx: CPU definition
  target/rx: RX disassembler
  hw/intc: RX62N interrupt controller (ICUa)
  hw/timer: RX62N internal timer modules
  hw/char: RX62N serial communication interface (SCI)
  hw/rx: RX Target hardware definition
  Add rx-softmmu

 configure                              |    8 +
 default-configs/rx-softmmu.mak         |    3 +
 qapi/common.json                       |    3 +-
 include/disas/dis-asm.h                |    5 +
 include/exec/poison.h                  |    1 +
 include/hw/char/renesas_sci.h          |   45 +
 include/hw/intc/rx_icu.h               |   56 +
 include/hw/registerfields.h            |   32 +-
 include/hw/rx/rx.h                     |    7 +
 include/hw/rx/rx62n.h                  |   91 ++
 include/hw/timer/renesas_cmt.h         |   38 +
 include/hw/timer/renesas_tmr.h         |   53 +
 include/qemu/bitops.h                  |   38 +
 include/sysemu/arch_init.h             |    1 +
 target/rx/cpu-param.h                  |   31 +
 target/rx/cpu-qom.h                    |   42 +
 target/rx/cpu.h                        |  182 +++
 target/rx/helper.h                     |   31 +
 arch_init.c                            |    2 +
 hw/char/renesas_sci.c                  |  340 +++++
 hw/intc/rx_icu.c                       |  376 +++++
 hw/rx/rx-virt.c                        |  135 ++
 hw/rx/rx62n.c                          |  246 ++++
 hw/timer/renesas_cmt.c                 |  275 ++++
 hw/timer/renesas_tmr.c                 |  455 ++++++
 target/rx/cpu.c                        |  217 +++
 target/rx/disas.c                      | 1446 +++++++++++++++++++
 target/rx/gdbstub.c                    |  112 ++
 target/rx/helper.c                     |  148 ++
 target/rx/monitor.c                    |   38 +
 target/rx/op_helper.c                  |  470 ++++++
 target/rx/translate.c                  | 2432 ++++++++++++++++++++++++++++++++
 tests/machine-none-test.c              |    1 +
 MAINTAINERS                            |   19 +
 hw/Kconfig                             |    1 +
 hw/char/Kconfig                        |    3 +
 hw/char/Makefile.objs                  |    1 +
 hw/intc/Kconfig                        |    3 +
 hw/intc/Makefile.objs                  |    1 +
 hw/rx/Kconfig                          |   14 +
 hw/rx/Makefile.objs                    |    2 +
 hw/timer/Kconfig                       |    6 +
 hw/timer/Makefile.objs                 |    3 +
 target/rx/Makefile.objs                |   12 +
 target/rx/insns.decode                 |  621 ++++++++
 tests/acceptance/boot_linux_console.py |   46 +
 46 files changed, 8090 insertions(+), 2 deletions(-)
 create mode 100644 default-configs/rx-softmmu.mak
 create mode 100644 include/hw/char/renesas_sci.h
 create mode 100644 include/hw/intc/rx_icu.h
 create mode 100644 include/hw/rx/rx.h
 create mode 100644 include/hw/rx/rx62n.h
 create mode 100644 include/hw/timer/renesas_cmt.h
 create mode 100644 include/hw/timer/renesas_tmr.h
 create mode 100644 target/rx/cpu-param.h
 create mode 100644 target/rx/cpu-qom.h
 create mode 100644 target/rx/cpu.h
 create mode 100644 target/rx/helper.h
 create mode 100644 hw/char/renesas_sci.c
 create mode 100644 hw/intc/rx_icu.c
 create mode 100644 hw/rx/rx-virt.c
 create mode 100644 hw/rx/rx62n.c
 create mode 100644 hw/timer/renesas_cmt.c
 create mode 100644 hw/timer/renesas_tmr.c
 create mode 100644 target/rx/cpu.c
 create mode 100644 target/rx/disas.c
 create mode 100644 target/rx/gdbstub.c
 create mode 100644 target/rx/helper.c
 create mode 100644 target/rx/monitor.c
 create mode 100644 target/rx/op_helper.c
 create mode 100644 target/rx/translate.c
 create mode 100644 hw/rx/Kconfig
 create mode 100644 hw/rx/Makefile.objs
 create mode 100644 target/rx/Makefile.objs
 create mode 100644 target/rx/insns.decode

Comments

no-reply@patchew.org June 18, 2019, 4:39 p.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20190618143923.53838-1-ysato@users.sourceforge.jp/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [PATCH RESEND v21 00/21]  Add RX archtecture support
Type: series
Message-id: 20190618143923.53838-1-ysato@users.sourceforge.jp

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

From https://github.com/patchew-project/qemu
   34bea4edb9..33d6099906  master     -> master
From https://github.com/patchew-project/qemu
 * [new tag]               patchew/20190618143923.53838-1-ysato@users.sourceforge.jp -> patchew/20190618143923.53838-1-ysato@users.sourceforge.jp
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
Switched to a new branch 'test'
5d62ef962a BootLinuxConsoleTest: Test the RX-Virt machine
9d17094d81 Add rx-softmmu
a14412155d hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core
09e5efee5b hw/rx: Honor -accel qtest
bf9fa4e3ab hw/rx: RX Target hardware definition
f695d86e47 hw/char: RX62N serial communication interface (SCI)
6cd2f26fa4 hw/timer: RX62N internal timer modules
7b152289f3 hw/intc: RX62N interrupt controller (ICUa)
de21df2c62 target/rx: Dump bytes for each insn during disassembly
49914423c8 target/rx: Collect all bytes during disassembly
519b2aaf90 target/rx: Emit all disassembly in one prt()
e17524e8d0 target/rx: Use prt_ldmi for XCHG_mr disassembly
850bff8b4a target/rx: Replace operand with prt_ldmi in disassembler
b5b096b382 target/rx: Disassemble rx_index_addr into a string
2389c3160d target/rx: RX disassembler
7c7864379e target/rx: CPU definition
81f1c7ceb0 target/rx: TCG helper
96065ad5fe target/rx: TCG translation
11cc429e75 hw/registerfields.h: Add 8bit and 16bit register macros
4225a75d72 qemu/bitops.h: Add extract8 and extract16
87f394a3f2 MAINTAINERS: Add RX

=== OUTPUT BEGIN ===
1/21 Checking commit 87f394a3f2c5 (MAINTAINERS: Add RX)
2/21 Checking commit 4225a75d721a (qemu/bitops.h: Add extract8 and extract16)
3/21 Checking commit 11cc429e7582 (hw/registerfields.h: Add 8bit and 16bit register macros)
Use of uninitialized value within @rawlines in concatenation (.) or string at ./scripts/checkpatch.pl line 2467.
ERROR: Macros with multiple statements should be enclosed in a do - while loop
#27: FILE: include/hw/registerfields.h:25:
+#define REG8(reg, addr)                                                  \
+    enum { A_ ## reg = (addr) };                                          \
+    enum { R_ ## reg = (addr) };

ERROR: Macros with multiple statements should be enclosed in a do - while loop
#31: FILE: include/hw/registerfields.h:29:
+#define REG16(reg, addr)                                                  \
+    enum { A_ ## reg = (addr) };                                          \
+    enum { R_ ## reg = (addr) / 2 };

total: 2 errors, 0 warnings, 56 lines checked

Patch 3/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

4/21 Checking commit 96065ad5fee9 (target/rx: TCG translation)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#20: 
new file mode 100644

total: 0 errors, 1 warnings, 3065 lines checked

Patch 4/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
5/21 Checking commit 81f1c7ceb0e8 (target/rx: TCG helper)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#25: 
new file mode 100644

total: 0 errors, 1 warnings, 649 lines checked

Patch 5/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
6/21 Checking commit 7c7864379e0f (target/rx: CPU definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#29: 
new file mode 100644

total: 0 errors, 1 warnings, 622 lines checked

Patch 6/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
7/21 Checking commit 2389c3160d56 (target/rx: RX disassembler)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#38: 
new file mode 100644

total: 0 errors, 1 warnings, 1497 lines checked

Patch 7/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/21 Checking commit b5b096b38224 (target/rx: Disassemble rx_index_addr into a string)
9/21 Checking commit 850bff8b4a0c (target/rx: Replace operand with prt_ldmi in disassembler)
10/21 Checking commit e17524e8d01d (target/rx: Use prt_ldmi for XCHG_mr disassembly)
11/21 Checking commit 519b2aaf90d0 (target/rx: Emit all disassembly in one prt())
12/21 Checking commit 49914423c8c0 (target/rx: Collect all bytes during disassembly)
13/21 Checking commit de21df2c62e7 (target/rx: Dump bytes for each insn during disassembly)
14/21 Checking commit 7b152289f320 (hw/intc: RX62N interrupt controller (ICUa))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#40: 
new file mode 100644

total: 0 errors, 1 warnings, 442 lines checked

Patch 14/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
15/21 Checking commit 6cd2f26fa4d4 (hw/timer: RX62N internal timer modules)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#50: 
new file mode 100644

total: 0 errors, 1 warnings, 839 lines checked

Patch 15/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/21 Checking commit f695d86e4759 (hw/char: RX62N serial communication interface (SCI))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#43: 
new file mode 100644

total: 0 errors, 1 warnings, 398 lines checked

Patch 16/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
17/21 Checking commit bf9fa4e3ab2d (hw/rx: RX Target hardware definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#26: 
new file mode 100644

total: 0 errors, 1 warnings, 479 lines checked

Patch 17/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
18/21 Checking commit 09e5efee5b56 (hw/rx: Honor -accel qtest)
19/21 Checking commit a14412155d42 (hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core)
20/21 Checking commit 9d17094d812e (Add rx-softmmu)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#61: 
new file mode 100644

total: 0 errors, 1 warnings, 73 lines checked

Patch 20/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
21/21 Checking commit 5d62ef962a3a (BootLinuxConsoleTest: Test the RX-Virt machine)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20190618143923.53838-1-ysato@users.sourceforge.jp/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
no-reply@patchew.org June 18, 2019, 6 p.m. UTC | #2
Patchew URL: https://patchew.org/QEMU/20190618143923.53838-1-ysato@users.sourceforge.jp/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [PATCH RESEND v21 00/21]  Add RX archtecture support
Type: series
Message-id: 20190618143923.53838-1-ysato@users.sourceforge.jp

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

From https://github.com/patchew-project/qemu
 t [tag update]            patchew/20190618143923.53838-1-ysato@users.sourceforge.jp -> patchew/20190618143923.53838-1-ysato@users.sourceforge.jp
Switched to a new branch 'test'
1b70a2c5e3 BootLinuxConsoleTest: Test the RX-Virt machine
b1b44ed680 Add rx-softmmu
f313ac351c hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core
57763b04f4 hw/rx: Honor -accel qtest
bf58fbd6c2 hw/rx: RX Target hardware definition
ece27860fa hw/char: RX62N serial communication interface (SCI)
ed845484f2 hw/timer: RX62N internal timer modules
e70e0f1b45 hw/intc: RX62N interrupt controller (ICUa)
31a1706ee1 target/rx: Dump bytes for each insn during disassembly
f8f829a583 target/rx: Collect all bytes during disassembly
007f80fb96 target/rx: Emit all disassembly in one prt()
49aa581505 target/rx: Use prt_ldmi for XCHG_mr disassembly
32047e7e71 target/rx: Replace operand with prt_ldmi in disassembler
21717d9d51 target/rx: Disassemble rx_index_addr into a string
d8ae8a9439 target/rx: RX disassembler
b0c9d476a0 target/rx: CPU definition
3b5f51618c target/rx: TCG helper
0672f653d3 target/rx: TCG translation
98019e980a hw/registerfields.h: Add 8bit and 16bit register macros
79c6710c70 qemu/bitops.h: Add extract8 and extract16
e6d4fac88d MAINTAINERS: Add RX

=== OUTPUT BEGIN ===
1/21 Checking commit e6d4fac88d91 (MAINTAINERS: Add RX)
2/21 Checking commit 79c6710c70ee (qemu/bitops.h: Add extract8 and extract16)
3/21 Checking commit 98019e980a8f (hw/registerfields.h: Add 8bit and 16bit register macros)
Use of uninitialized value within @rawlines in concatenation (.) or string at ./scripts/checkpatch.pl line 2467.
ERROR: Macros with multiple statements should be enclosed in a do - while loop
#27: FILE: include/hw/registerfields.h:25:
+#define REG8(reg, addr)                                                  \
+    enum { A_ ## reg = (addr) };                                          \
+    enum { R_ ## reg = (addr) };

ERROR: Macros with multiple statements should be enclosed in a do - while loop
#31: FILE: include/hw/registerfields.h:29:
+#define REG16(reg, addr)                                                  \
+    enum { A_ ## reg = (addr) };                                          \
+    enum { R_ ## reg = (addr) / 2 };

total: 2 errors, 0 warnings, 56 lines checked

Patch 3/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

4/21 Checking commit 0672f653d3a0 (target/rx: TCG translation)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#20: 
new file mode 100644

total: 0 errors, 1 warnings, 3065 lines checked

Patch 4/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
5/21 Checking commit 3b5f51618ca8 (target/rx: TCG helper)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#25: 
new file mode 100644

total: 0 errors, 1 warnings, 649 lines checked

Patch 5/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
6/21 Checking commit b0c9d476a072 (target/rx: CPU definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#29: 
new file mode 100644

total: 0 errors, 1 warnings, 622 lines checked

Patch 6/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
7/21 Checking commit d8ae8a94394b (target/rx: RX disassembler)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#38: 
new file mode 100644

total: 0 errors, 1 warnings, 1497 lines checked

Patch 7/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/21 Checking commit 21717d9d5167 (target/rx: Disassemble rx_index_addr into a string)
9/21 Checking commit 32047e7e716d (target/rx: Replace operand with prt_ldmi in disassembler)
10/21 Checking commit 49aa581505c6 (target/rx: Use prt_ldmi for XCHG_mr disassembly)
11/21 Checking commit 007f80fb96a8 (target/rx: Emit all disassembly in one prt())
12/21 Checking commit f8f829a58306 (target/rx: Collect all bytes during disassembly)
13/21 Checking commit 31a1706ee141 (target/rx: Dump bytes for each insn during disassembly)
14/21 Checking commit e70e0f1b4562 (hw/intc: RX62N interrupt controller (ICUa))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#40: 
new file mode 100644

total: 0 errors, 1 warnings, 442 lines checked

Patch 14/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
15/21 Checking commit ed845484f284 (hw/timer: RX62N internal timer modules)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#50: 
new file mode 100644

total: 0 errors, 1 warnings, 839 lines checked

Patch 15/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/21 Checking commit ece27860fa34 (hw/char: RX62N serial communication interface (SCI))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#43: 
new file mode 100644

total: 0 errors, 1 warnings, 398 lines checked

Patch 16/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
17/21 Checking commit bf58fbd6c21c (hw/rx: RX Target hardware definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#26: 
new file mode 100644

total: 0 errors, 1 warnings, 479 lines checked

Patch 17/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
18/21 Checking commit 57763b04f473 (hw/rx: Honor -accel qtest)
19/21 Checking commit f313ac351c3b (hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core)
20/21 Checking commit b1b44ed68088 (Add rx-softmmu)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#61: 
new file mode 100644

total: 0 errors, 1 warnings, 73 lines checked

Patch 20/21 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
21/21 Checking commit 1b70a2c5e3bf (BootLinuxConsoleTest: Test the RX-Virt machine)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20190618143923.53838-1-ysato@users.sourceforge.jp/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com