Skip to content

Commit d88d5a3

Browse files
committed
Merge remote-tracking branch 'remotes/philmd-gitlab/tags/renesas-hw-20200622' into staging
Renesas hardware patches - Add a common entry for Renesas hardware in MAINTAINERS - Trivial SH4 cleanups - Add RX GDB simulator from Yoshinori Sato The Renesas RX target emulation was added in commit c8c35e5, these patches complete the target by adding the hardware emulation. Tests included: $ avocado --show=app,console run -t arch:rx tests/acceptance/ Fetching asset from tests/acceptance/machine_rx_gdbsim.py:RxGdbSimMachine.test_uboot Fetching asset from tests/acceptance/machine_rx_gdbsim.py:RxGdbSimMachine.test_linux_sash (1/2) tests/acceptance/machine_rx_gdbsim.py:RxGdbSimMachine.test_uboot: console: U-Boot 2016.05-rc3-23705-ga1ef3c71cb-dirty (Feb 05 2019 - 21:56:06 +0900) PASS (0.26 s) (2/2) tests/acceptance/machine_rx_gdbsim.py:RxGdbSimMachine.test_linux_sash: console: Linux version 4.19.0+ (yo-satoh@yo-satoh-debian) (gcc version 9.0.0 20181105 (experimental) (GCC)) qemu#137 Wed Feb 20 23:20:02 JST 2019 console: Built 1 zonelists, mobility grouping on. Total pages: 8128 console: Kernel command line: console: Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) console: Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) console: Memory: 14648K/32768K available (871K kernel code, 95K rwdata, 140K rodata, 96K init, 175K bss, 18120K reserved, 0K cma-reserved) console: NR_IRQS: 256 console: rx-cmt: used for periodic clock events console: clocksource: rx-tpu: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1274173631191 ns console: 96.00 BogoMIPS (lpj=480000) console: pid_max: default: 4096 minimum: 301 console: Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) console: Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) console: clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns console: clocksource: Switched to clocksource rx-tpu console: workingset: timestamp_bits=30 max_order=12 bucket_order=0 console: SuperH (H)SCI(F) driver initialized console: 88240.serial: ttySC0 at MMIO 0x88240 (irq = 215, base_baud = 0) is a sci console: console [ttySC0] enabled console: 88248.serial: ttySC1 at MMIO 0x88248 (irq = 219, base_baud = 0) is a sci console: random: get_random_bytes called from 0x01002e48 with crng_init=0 console: Freeing unused kernel memory: 96K console: This architecture does not have kernel memory protection. console: Run /sbin/init as init process console: Run /etc/init as init process console: Run /bin/init as init process console: Run /bin/sh as init process console: Sash command shell (version 1.1.1) console: /> printenv console: HOME=/ console: TERM=linux PASS (0.73 s) RESULTS : PASS 2 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0 JOB TIME : 1.47 s CI results: . https://cirrus-ci.com/build/6140199509950464 . https://travis-ci.org/github/philmd/qemu/builds/700954881 . https://app.shippable.com/github/philmd/qemu/runs/812/summary/console # gpg: Signature made Mon 22 Jun 2020 19:52:09 BST # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <[email protected]>" [full] # Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE * remotes/philmd-gitlab/tags/renesas-hw-20200622: docs: Document the RX target BootLinuxConsoleTest: Test the RX GDB simulator hw/rx: Add RX GDB simulator hw/rx: Register R5F562N7 and R5F562N8 MCUs hw/rx: Honor -accel qtest hw/rx: RX62N microcontroller (MCU) hw/char: RX62N serial communication interface (SCI) hw/timer: RX62N compare match timer (CMT) hw/timer: RX62N 8-Bit timer (TMR) hw/intc: RX62N interrupt controller (ICUa) hw/timer/sh_timer: Remove unused 'qemu/timer.h' include hw/sh4: Extract timer definitions to 'hw/timer/tmu012.h' hw/sh4: Use MemoryRegion typedef MAINTAINERS: Add an entry for common Renesas peripherals MAINTAINERS: Cover sh_intc files in the R2D/Shix machine sections Signed-off-by: Peter Maydell <[email protected]>
2 parents 61fee7f + 4adbfa4 commit d88d5a3

29 files changed

+2520
-13
lines changed

MAINTAINERS

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1256,6 +1256,15 @@ F: include/hw/riscv/opentitan.h
12561256
F: include/hw/char/ibex_uart.h
12571257
F: include/hw/intc/ibex_plic.h
12581258

1259+
RX Machines
1260+
-----------
1261+
rx-gdbsim
1262+
M: Yoshinori Sato <[email protected]>
1263+
S: Maintained
1264+
F: docs/system/target-rx.rst
1265+
F: hw/rx/rx-gdbsim.c
1266+
F: tests/acceptance/machine_rx_gdbsim.py
1267+
12591268
SH4 Machines
12601269
------------
12611270
R2D
@@ -1264,13 +1273,15 @@ R: Magnus Damm <[email protected]>
12641273
S: Maintained
12651274
F: hw/sh4/r2d.c
12661275
F: hw/intc/sh_intc.c
1267-
F: hw/timer/sh_timer.c
1276+
F: include/hw/sh4/sh_intc.h
12681277

12691278
Shix
12701279
M: Yoshinori Sato <[email protected]>
12711280
R: Magnus Damm <[email protected]>
12721281
S: Odd Fixes
12731282
F: hw/sh4/shix.c
1283+
F: hw/intc/sh_intc.c
1284+
F: include/hw/sh4/sh_intc.h
12741285

12751286
SPARC Machines
12761287
--------------
@@ -1965,6 +1976,26 @@ F: hw/*/*xive*
19651976
F: include/hw/*/*xive*
19661977
F: docs/*/*xive*
19671978

1979+
Renesas peripherals
1980+
M: Yoshinori Sato <[email protected]>
1981+
R: Magnus Damm <[email protected]>
1982+
S: Maintained
1983+
F: hw/char/renesas_sci.c
1984+
F: hw/char/sh_serial.c
1985+
F: hw/timer/renesas_*.c
1986+
F: hw/timer/sh_timer.c
1987+
F: include/hw/char/renesas_sci.h
1988+
F: include/hw/sh4/sh.h
1989+
F: include/hw/timer/renesas_*.h
1990+
1991+
Renesas RX peripherals
1992+
M: Yoshinori Sato <[email protected]>
1993+
S: Maintained
1994+
F: hw/intc/rx_icu.c
1995+
F: hw/rx/
1996+
F: include/hw/intc/rx_icu.h
1997+
F: include/hw/rx/
1998+
19681999
Subsystems
19692000
----------
19702001
Audio

default-configs/rx-softmmu.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Default configuration for rx-softmmu
22

3+
CONFIG_RX_GDBSIM=y

docs/system/target-rx.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.. _RX-System-emulator:
2+
3+
RX System emulator
4+
--------------------
5+
6+
Use the executable ``qemu-system-rx`` to simulate RX target (GDB simulator).
7+
This target emulated following devices.
8+
9+
- R5F562N8 MCU
10+
11+
- On-chip memory (ROM 512KB, RAM 96KB)
12+
- Interrupt Control Unit (ICUa)
13+
- 8Bit Timer x 1CH (TMR0,1)
14+
- Compare Match Timer x 2CH (CMT0,1)
15+
- Serial Communication Interface x 1CH (SCI0)
16+
17+
- External memory 16MByte
18+
19+
Example of ``qemu-system-rx`` usage for RX is shown below:
20+
21+
Download ``<u-boot_image_file>`` from
22+
https://osdn.net/users/ysato/pf/qemu/dl/u-boot.bin.gz
23+
24+
Start emulation of rx-virt::
25+
qemu-system-rx -M gdbsim-r5f562n8 -bios <u-boot_image_file>
26+
27+
Download ``kernel_image_file`` from
28+
https://osdn.net/users/ysato/pf/qemu/dl/zImage
29+
30+
Download ``device_tree_blob`` from
31+
https://osdn.net/users/ysato/pf/qemu/dl/rx-virt.dtb
32+
33+
Start emulation of rx-virt::
34+
qemu-system-rx -M gdbsim-r5f562n8 \
35+
-kernel <kernel_image_file> -dtb <device_tree_blob> \
36+
-append "earlycon"

docs/system/targets.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ Contents:
1818
target-m68k
1919
target-xtensa
2020
target-s390x
21+
target-rx

hw/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ source nios2/Kconfig
5555
source openrisc/Kconfig
5656
source ppc/Kconfig
5757
source riscv/Kconfig
58+
source rx/Kconfig
5859
source s390x/Kconfig
5960
source sh4/Kconfig
6061
source sparc/Kconfig

hw/char/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@ config SCLPCONSOLE
4646

4747
config TERMINAL3270
4848
bool
49+
50+
config RENESAS_SCI
51+
bool

hw/char/Makefile.objs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ common-obj-$(CONFIG_SH4) += sh_serial.o
2121
common-obj-$(CONFIG_DIGIC) += digic-uart.o
2222
common-obj-$(CONFIG_STM32F2XX_USART) += stm32f2xx_usart.o
2323
common-obj-$(CONFIG_RASPI) += bcm2835_aux.o
24+
common-obj-$(CONFIG_RENESAS_SCI) += renesas_sci.o
2425

2526
common-obj-$(CONFIG_CMSDK_APB_UART) += cmsdk-apb-uart.o
2627
common-obj-$(CONFIG_ETRAXFS) += etraxfs_ser.o

0 commit comments

Comments
 (0)