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

Sayyad Mahammad Umar posted 31 patches 4 weeks ago
Failed in applying to current master (apply log)
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(-)
[PATCH v2 00/31] target/rx: add RXv2/RXv3 CPU support and RX peripherals
Posted by Sayyad Mahammad Umar 4 weeks ago
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. 

Signed-off-by: Sayyad Mahammad Umar <contact@sayyadumar.com>
---
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/20260913-umar-rx-series-v1-0-5a5841a5d1e9@sayyadumar.com

To: qemu-devel@nongnu.org
Cc: Yoshinori Sato <yoshinori.sato@nifty.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Alistair Francis <alistair@alistair23.me>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org
Cc: Jason Wang <jasowangio@gmail.com>

---
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,
--  
Sayyad Mahammad Umar <contact@sayyadumar.com>