Skip to content

target/rx: add RXv2/RXv3 CPU support and RX peripherals

Sayyad Mahammad Umar qemu-arm qemu-devel 2 versions – New

Get series with b4
b4 am [email protected] change-id 20260913-umar-rx-series-0bfbbfe6b074

Versions newest first

  1. v2 Latest31 patches 0 repliesNew
  2. v12 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- Split the two large patches into 31 patches: one per instruction
group and one per device.
- Wire every new device into meson.build and Kconfig and enable it
in configs/devices/rx-softmmu/default.mak; in v1 the device code
was not part of the build at all.
- Drop the unrelated TCGv/gdb accessor renames so each patch only
touches its own subject.
- Every patch builds independently (ninja qemu-system-rx).
- Link to v1: https://lore.kernel.org/qemu-devel/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/31target/rx: add RXv2/RXv3 CPU modelstarget/rx/cpu-qom.h target/rx/cpu.c target/rx/cpu.h +1 more+65 -00 replies
2/31target/rx: add EXTB exception vector base registertarget/rx/cpu.c target/rx/cpu.h target/rx/helper.c +1 more+12 -30 replies
3/31target/rx: drop plugin interrupt callbackstarget/rx/helper.c+24 -290 replies
4/31target/rx: add RXv3 DPFPU architecture statetarget/rx/cpu.c target/rx/cpu.h target/rx/translate.c+115 -00 replies
5/31target/rx: add FTOU and UTOF (RXv2)target/rx/disas.c target/rx/helper.h target/rx/insns.decode +2 more+73 -30 replies
6/31target/rx: add DPFPU arithmetic instructionstarget/rx/disas.c target/rx/helper.h target/rx/insns.decode +2 more+288 -00 replies
7/31target/rx: add DPFPU unary operationstarget/rx/disas.c target/rx/helper.h target/rx/insns.decode +2 more+137 -00 replies
8/31target/rx: add DPFPU conversions DTOI, DTOU and DTOFtarget/rx/disas.c target/rx/helper.h target/rx/insns.decode +2 more+111 -00 replies
9/31target/rx: add DPFPU conversions ITOD, UTOD and FTODtarget/rx/disas.c target/rx/helper.h target/rx/insns.decode +2 more+94 -00 replies
10/31target/rx: add DPUSHM and DPOPMtarget/rx/disas.c target/rx/insns.decode target/rx/translate.c+113 -00 replies
11/31target/rx: add RXv3 DMOV half transferstarget/rx/disas.c target/rx/insns.decode target/rx/translate.c+118 -00 replies
12/31target/rx: add DPFPU control register transferstarget/rx/disas.c target/rx/helper.h target/rx/insns.decode +2 more+95 -00 replies
13/31target/rx: add RXv3 DMOV immediate formstarget/rx/disas.c target/rx/insns.decode target/rx/translate.c+64 -10 replies
14/31target/rx: add RXv3 DMOV.D memory formstarget/rx/disas.c target/rx/insns.decode target/rx/translate.c+117 -00 replies
15/31target/rx: add RXv3 BFMOV and BFMOVZtarget/rx/disas.c target/rx/insns.decode target/rx/translate.c+93 -00 replies
16/31target/rx: add RXv3 register bank SAVE and RSTRtarget/rx/cpu.h target/rx/disas.c target/rx/helper.h +3 more+162 -00 replies
17/31target/rx: add RXv3 three-operand XORtarget/rx/disas.c target/rx/insns.decode target/rx/translate.c+20 -00 replies
18/31target/rx: add RXv2 accumulator context save/restoretarget/rx/cpu.h target/rx/disas.c target/rx/insns.decode +1 more+116 -00 replies
19/31hw/timer: add Renesas RX MTU3MAINTAINERS configs/devices/rx-softmmu/default.mak hw/timer/Kconfig +3 more+588 -00 replies
20/31hw/gpio: add Renesas RX GPIO and MPCMAINTAINERS configs/devices/rx-softmmu/default.mak hw/gpio/Kconfig +3 more+327 -00 replies
21/31hw/dma: add Renesas RX DMACMAINTAINERS configs/devices/rx-softmmu/default.mak hw/dma/Kconfig +3 more+382 -10 replies
22/31hw/dma: add Renesas RX DTCMAINTAINERS configs/devices/rx-softmmu/default.mak hw/dma/Kconfig +3 more+218 -00 replies
23/31hw/adc: add Renesas RX S12ADMAINTAINERS configs/devices/rx-softmmu/default.mak hw/adc/Kconfig +3 more+392 -00 replies
24/31hw/ssi: add Renesas RX RSPIMAINTAINERS configs/devices/rx-softmmu/default.mak hw/ssi/Kconfig +3 more+388 -00 replies
25/31hw/rtc: add Renesas RX RTCMAINTAINERS configs/devices/rx-softmmu/default.mak hw/rtc/Kconfig +3 more+389 -00 replies
26/31hw/misc: add Renesas RX CRC calculatorMAINTAINERS configs/devices/rx-softmmu/default.mak hw/misc/Kconfig +3 more+256 -00 replies
27/31hw/misc: add Renesas RX ROM cache control registersMAINTAINERS configs/devices/rx-softmmu/default.mak hw/misc/Kconfig +3 more+176 -00 replies
28/31hw/misc: add Renesas RX flash control unitMAINTAINERS configs/devices/rx-softmmu/default.mak hw/misc/Kconfig +3 more+1183 -00 replies
29/31hw/misc: add RX65N clock generation circuitMAINTAINERS configs/devices/rx-softmmu/default.mak hw/misc/Kconfig +3 more+234 -00 replies
30/31hw/net: add Renesas RX ETHERC and EDMACMAINTAINERS configs/devices/rx-softmmu/default.mak hw/net/Kconfig +3 more+1071 -00 replies
31/31hw/watchdog: add Renesas RX WDT and IWDTMAINTAINERS configs/devices/rx-softmmu/default.mak hw/watchdog/Kconfig +3 more+248 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/31] target/rx: add RXv2/RXv3 CPU support and RX peripherals

This series extends the RX target with RXv2 and RXv3 CPU support and adds the common RX65N/RX72M peripherals, forming the foundation for the RX65N, RX651 and RX72M machine models.

Patches 1-3 add the CPU models and small changes to existing code:
the EXTB exception vector base and the interrupt dispatch cleanup. Patches 4-18 add the new instructions in small groups: the RXv2 unsigned FPU conversions and accumulator moves, and the RXv3 DPFPU, the DMOV extensions, BFMOV, SAVE/RSTR register banks and the three-operand XOR.

Patches 19-31 add the peripherals, one device per patch, each wired into meson and Kconfig and enabled in the rx-softmmu default config so the series is compile-tested at every step. A follow-up series will add the machine models that instantiate them.

The next patch series will include the board models for rsk-rx65n-2mb, rsk-rx72m and rx660-tb evaluation boards. The changes in this patch series are already tested with the real example project firmware from Renesas compiled with CC-RX V3.08.

---
Changes in v2:
- Split the two large patches into 31 patches: one per instruction
group and one per device.
- Wire every new device into meson.build and Kconfig and enable it
in configs/devices/rx-softmmu/default.mak; in v1 the device code
was not part of the build at all.
- Drop the unrelated TCGv/gdb accessor renames so each patch only
touches its own subject.
- Every patch builds independently (ninja qemu-system-rx).
- Link to v1: https://lore.kernel.org/qemu-devel/[email protected]

To: [email protected]
Cc: Yoshinori Sato <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Alistair Francis <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: [email protected]
Cc: Jason Wang <[email protected]>

---
Sayyad Mahammad Umar (31):
target/rx: add RXv2/RXv3 CPU models target/rx: add EXTB exception vector base register target/rx: drop plugin interrupt callbacks target/rx: add RXv3 DPFPU architecture state target/rx: add FTOU and UTOF (RXv2) target/rx: add DPFPU arithmetic instructions target/rx: add DPFPU unary operations target/rx: add DPFPU conversions DTOI, DTOU and DTOF target/rx: add DPFPU conversions ITOD, UTOD and FTOD target/rx: add DPUSHM and DPOPM
target/rx: add RXv3 DMOV half transfers target/rx: add DPFPU control register transfers target/rx: add RXv3 DMOV immediate forms target/rx: add RXv3 DMOV.D memory forms target/rx: add RXv3 BFMOV and BFMOVZ target/rx: add RXv3 register bank SAVE and RSTR target/rx: add RXv3 three-operand XOR target/rx: add RXv2 accumulator context save/restore hw/timer: add Renesas RX MTU3
hw/gpio: add Renesas RX GPIO and MPC hw/dma: add Renesas RX DMAC
hw/dma: add Renesas RX DTC
hw/adc: add Renesas RX S12AD
hw/ssi: add Renesas RX RSPI
hw/rtc: add Renesas RX RTC
hw/misc: add Renesas RX CRC calculator hw/misc: add Renesas RX ROM cache control registers hw/misc: add Renesas RX flash control unit hw/misc: add RX65N clock generation circuit hw/net: add Renesas RX ETHERC and EDMAC hw/watchdog: add Renesas RX WDT and IWDT

 MAINTAINERS                            |  26 +
 configs/devices/rx-softmmu/default.mak |  13 +
 hw/adc/Kconfig                         |   3 +
 hw/adc/meson.build                     |   1 +
 hw/adc/renesas_s12ad.c                 | 324 +++++++++++
 hw/dma/Kconfig                         |   8 +-
 hw/dma/meson.build                     |   2 +
 hw/dma/renesas_rx_dmac.c               | 317 +++++++++++
 hw/dma/renesas_rx_dtc.c                | 169 ++++++
 hw/gpio/Kconfig                        |   3 +
 hw/gpio/meson.build                    |   1 +
 hw/gpio/renesas_rx_gpio.c              | 256 +++++++++
 hw/misc/Kconfig                        |  12 +
 hw/misc/meson.build                    |   4 +
 hw/misc/renesas_rx_crc.c               | 219 ++++++++
 hw/misc/renesas_rx_fcu.c               | 985 +++++++++++++++++++++++++++++++++
 hw/misc/renesas_rx_romcache.c          | 139 +++++
 hw/misc/rx65n_sysclk.c                 | 190 +++++++
 hw/net/Kconfig                         |   3 +
 hw/net/meson.build                     |   1 +
 hw/net/renesas_etherc.c                | 955 ++++++++++++++++++++++++++++++++
 hw/rtc/Kconfig                         |   3 +
 hw/rtc/meson.build                     |   1 +
 hw/rtc/renesas_rx_rtc.c                | 330 +++++++++++
 hw/ssi/Kconfig                         |   4 +
 hw/ssi/meson.build                     |   1 +
 hw/ssi/renesas_rspi.c                  | 319 +++++++++++
 hw/timer/Kconfig                       |   2 +
 hw/timer/meson.build                   |   1 +
 hw/timer/renesas_mtu3.c                | 509 +++++++++++++++++
 hw/watchdog/Kconfig                    |   3 +
 hw/watchdog/meson.build                |   1 +
 hw/watchdog/renesas_rx_wdt.c           | 193 +++++++
 include/hw/adc/renesas_s12ad.h         |  61 ++
 include/hw/dma/renesas_rx_dmac.h       |  57 ++
 include/hw/dma/renesas_rx_dtc.h        |  42 ++
 include/hw/gpio/renesas_rx_gpio.h      |  64 +++
 include/hw/misc/renesas_rx_crc.h       |  30 +
 include/hw/misc/renesas_rx_fcu.h       | 191 +++++++
 include/hw/misc/renesas_rx_romcache.h  |  30 +
 include/hw/misc/rx65n_sysclk.h         |  37 ++
 include/hw/net/renesas_etherc.h        | 109 ++++
 include/hw/rtc/renesas_rx_rtc.h        |  52 ++
 include/hw/ssi/renesas_rspi.h          |  61 ++
 include/hw/timer/renesas_mtu3.h        |  73 +++
 include/hw/watchdog/renesas_rx_wdt.h   |  48 ++
 target/rx/cpu-qom.h                    |   2 +
 target/rx/cpu.c                        |  55 ++
 target/rx/cpu.h                        | 122 ++++
 target/rx/disas.c                      | 367 ++++++++++++
 target/rx/helper.c                     |  55 +-
 target/rx/helper.h                     |  22 +
 target/rx/insns.decode                 | 125 ++++-
 target/rx/op_helper.c                  | 357 ++++++++++++
 target/rx/translate.c                  | 748 ++++++++++++++++++++++++-
 55 files changed, 7669 insertions(+), 37 deletions(-)

---
base-commit: d73149283205645625bfa9fe029cfb68e4c4a9ae
change-id: 20260913-umar-rx-series-0bfbbfe6b074

Best regards,

Signature · 1 line
Sayyad Mahammad Umar <[email protected]>