hw: Renesas patches (SH4 and RX)
cover hw: Renesas patches (SH4 and RX)
Hi Richard, Yoshinori,
This is a merger of the latest SH4 patches (add a common entry for Renesas hardware in MAINTAINERS, an acceptance test from Thomas), and Yoshinori's v32 [*] of the RX machine.
Call this release, or merge, candidate 1.
[*] https://www.mail-archive.com/[email protected]/msg682290.html
---
Richard,
A few months ago, I volunteered to integrate the RX port posted last year on the list, to help you ease the burden of your heavy workload.
As it took a long time, at some point I suggested doing the integration in two parts, first the architecture part (target/ directory), then the hardware (hw/ directory). You disagreed, arguing that this approach could be dangerous, as we don’t want to maintain a partly integrated port. In hindsight I learned the hard way that you were right!
When I decided to send the architectural part first, I made the commitment to you to finish the full integration before the following release. The second part has been a painful experience.
With this series, I have now fulfilled this commitment. I don't plan to continue working on the RX port.
Thank you for your support during this experiment, I learned a lot, and I’d be grateful to work with you again in the future in other parts of the project.
---
Yoshinori,
I appreciated integrating your work, which is of very good quality overall. Despite the numerous iterations you had to go through, the outcome has proven worthwhile.
Working with you has been a great experience.
I volunteered to help maintain the RX hardware in my leisure time. Such hobby projects are supposed to be fun, and not have the same level of pressure as paid work.
Sadly, my experience trying to get your work merged has not been fun:
too much aggressive criticism, and constant demands for more work. The pressure has become too great for what is, essentially, unpaid work.
---
Missing review: patches 2 and 12
- 02/15 MAINTAINERS: Add an entry for common Renesas peripherals
- 12/15 hw/rx: Register R5F562N7 and R5F562N8 MCUs
Changes since v32:
- Rebased on DeviceReset API change
- Renamed CPU -> MCU
- Renamed device -> microcontroller
- Rebased on device_class_set_parent_realize API change
- Split timer patch in two distincts: CMT and TMR
- Rebased on ramdev API change
- Use TYPE_RX62N_CPU definition
- Use RX62N_NR_TMR/CMT/SCI definitions
- Replace obsolete set_machine() by machine tag
- Split rx-virt patch in two distinct, MCU first, machine next
- Renamed machined as gdbsim
- Make TYPE_RX62N_MCU an abstract class,
add TYPE_R5F562N7_MCU and TYPE_R5F562N8_MCU models
- Rename the machine gdbsim-r5f562n8, also add the gdbsim-r5f562n7
- Filled various VMStateField for migration
- Rebase on qdev/sysbus API change
CI:
https://travis-ci.org/github/philmd/qemu/builds/698974425
Philippe Mathieu-Daudé (7):
MAINTAINERS: Cover sh_intc files in the R2D/Shix machine sections
MAINTAINERS: Add an entry for common Renesas peripherals hw/sh4: Use MemoryRegion typedef
hw/sh4: Extract timer definitions to 'hw/timer/tmu012.h' hw/timer/sh_timer: Remove unused 'qemu/timer.h' include hw/rx: Register R5F562N7 and R5F562N8 MCUs
BootLinuxConsoleTest: Test the RX GDB simulator
Richard Henderson (1):
hw/rx: Honor -accel qtest
Yoshinori Sato (7):
hw/intc: RX62N interrupt controller (ICUa) hw/timer: RX62N 8-Bit timer (TMR)
hw/timer: RX62N compare match timer (CMT) hw/char: RX62N serial communication interface (SCI) hw/rx: RX62N microcontroller (MCU)
hw/rx: Add RX GDB simulator
docs: Document the RX target
docs/system/target-rx.rst | 36 ++ docs/system/targets.rst | 1 + default-configs/rx-softmmu.mak | 1 + include/hw/char/renesas_sci.h | 51 +++ include/hw/intc/rx_icu.h | 76 ++++ include/hw/rx/rx62n.h | 78 +++++ include/hw/sh4/sh.h | 12 +- include/hw/timer/renesas_cmt.h | 40 +++ include/hw/timer/renesas_tmr.h | 55 +++ include/hw/timer/tmu012.h | 23 ++ hw/char/renesas_sci.c | 350 +++++++++++++++++++ hw/intc/rx_icu.c | 397 +++++++++++++++++++++ hw/rx/rx-gdbsim.c | 196 +++++++++++ hw/rx/rx62n.c | 318 +++++++++++++++++ hw/sh4/sh7750.c | 1 + hw/timer/renesas_cmt.c | 283 +++++++++++++++ hw/timer/renesas_tmr.c | 477 ++++++++++++++++++++++++++ hw/timer/sh_timer.c | 3 +- MAINTAINERS | 33 +- hw/Kconfig | 1 + hw/char/Kconfig | 3 + hw/char/Makefile.objs | 1 + hw/intc/Kconfig | 3 + hw/intc/Makefile.objs | 1 + hw/rx/Kconfig | 10 + hw/rx/Makefile.objs | 2 + hw/timer/Kconfig | 6 + hw/timer/Makefile.objs | 2 + tests/acceptance/machine_rx_gdbsim.py | 68 ++++ 29 files changed, 2515 insertions(+), 13 deletions(-) create mode 100644 docs/system/target-rx.rst create mode 100644 include/hw/char/renesas_sci.h create mode 100644 include/hw/intc/rx_icu.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 include/hw/timer/tmu012.h create mode 100644 hw/char/renesas_sci.c create mode 100644 hw/intc/rx_icu.c create mode 100644 hw/rx/rx-gdbsim.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 hw/rx/Kconfig create mode 100644 hw/rx/Makefile.objs create mode 100644 tests/acceptance/machine_rx_gdbsim.py
Signature · 1 line
2.21.3
PATCH 1/15 MAINTAINERS: Cover sh_intc files in the R2D/Shix machine sections
Commit 81527b94ad added hw/intc/sh_intc.c, but only to the R2D machine (it is also used by the Shix machine). Complete the previous commit by adding the header to the R2D section, and both source + header to the Shix section.
--- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+)
MAINTAINERS +3 -0
@@ -1261,12 +1261,15 @@ S: Maintained F: hw/sh4/r2d.c F: hw/intc/sh_intc.c F: hw/timer/sh_timer.c +F: include/hw/sh4/sh_intc.h Shix M: Yoshinori Sato <[email protected]> R: Magnus Damm <[email protected]> S: Odd Fixes F: hw/sh4/shix.c +F: hw/intc/sh_intc.c +F: include/hw/sh4/sh_intc.h SPARC Machines --------------
Signature · 1 line
2.21.3
PATCH 2/15 MAINTAINERS: Add an entry for common Renesas peripherals
In reply to Philippe Mathieu-DaudéRenesas peripherals are common to SH4/RX based MCUs. Their datasheets share common sections. It makes sense to maintain them altogether.
Add the uncovered UART SCI peripheral.
The current names are misleading (see the 'sh_' prefix). In another series we will remove these peripherals with the 'renesas_' prefix. Out of the scope of this change in MAINTAINERS.
--- MAINTAINERS | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
MAINTAINERS +8 -1
@@ -1260,7 +1260,6 @@ R: Magnus Damm <[email protected]> S: Maintained F: hw/sh4/r2d.c F: hw/intc/sh_intc.c -F: hw/timer/sh_timer.c F: include/hw/sh4/sh_intc.h Shix
@@ -1964,6 +1963,14 @@ F: hw/*/*xive* F: include/hw/*/*xive* F: docs/*/*xive* +Renesas peripherals +M: Yoshinori Sato <[email protected]> +R: Magnus Damm <[email protected]> +S: Maintained +F: hw/char/sh_serial.c +F: hw/timer/sh_timer.c +F: include/hw/sh4/sh.h + Subsystems ---------- Audio
Signature · 1 line
2.21.3
PATCH 3/15 hw/sh4: Use MemoryRegion typedef
In reply to Philippe Mathieu-DaudéUse the MemoryRegion type defined in "qemu/typedefs.h", to keep the repository style consistent.
--- include/hw/sh4/sh.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
include/hw/sh4/sh.h +2 -3
@@ -10,9 +10,8 @@/* sh7750.c */ struct SH7750State ; -struct MemoryRegion ; -struct SH7750State *sh7750_init (SuperHCPU *cpu,struct MemoryRegion *sysmem); +struct SH7750State *sh7750_init (SuperHCPU *cpu,MemoryRegion *sysmem); typedef struct { /* The callback will be triggered if any of the designated lines change */
@@ -32,7 +31,7 @@ int sh7750_register_io_device(struct SH7750State *s,#define TMU012_FEAT_TOCR (1 << 0)#define TMU012_FEAT_3CHAN (1 << 1)#define TMU012_FEAT_EXTCLK (1 << 2) -void tmu012_init (struct MemoryRegion *sysmem,hwaddr base, +void tmu012_init (MemoryRegion *sysmem,hwaddr base,int feat,uint32_t freq,qemu_irq ch0_irq,qemu_irq ch1_irq,qemu_irq ch2_irq0,qemu_irq ch2_irq1);
Signature · 1 line
2.21.3
PATCH 4/15 hw/sh4: Extract timer definitions to 'hw/timer/tmu012.h'
In reply to Philippe Mathieu-DaudéExtract timer definitions to 'hw/timer/tmu012.h'.
--- include/hw/sh4/sh.h | 9 --------- include/hw/timer/tmu012.h | 23 +++++++++++++++++++++++ hw/sh4/sh7750.c | 1 + hw/timer/sh_timer.c | 2 ++ 4 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 include/hw/timer/tmu012.h
include/hw/sh4/sh.h +0 -9
@@ -27,15 +27,6 @@ typedef struct {int sh7750_register_io_device (struct SH7750State *s,sh7750_io_device * device); -/* sh_timer.c */ -#define TMU012_FEAT_TOCR (1 << 0) -#define TMU012_FEAT_3CHAN (1 << 1) -#define TMU012_FEAT_EXTCLK (1 << 2) -void tmu012_init (MemoryRegion *sysmem,hwaddr base, -int feat,uint32_t freq, -qemu_irq ch0_irq,qemu_irq ch1_irq, -qemu_irq ch2_irq0,qemu_irq ch2_irq1); -/* sh_serial.c */ #define SH_SERIAL_FEAT_SCIF (1 << 0)
include/hw/timer/tmu012.h new file +23 -0
@@ -0,0 +1,23 @@ +/* +* SuperH Timer +* +* Copyright (c) 2007 Magnus Damm +* +* This code is licensed under the GPL. +*/ + +#ifndef HW_TIMER_TMU012_H +#define HW_TIMER_TMU012_H + +#include "exec/hwaddr.h" + +#define TMU012_FEAT_TOCR (1 << 0) +#define TMU012_FEAT_3CHAN (1 << 1) +#define TMU012_FEAT_EXTCLK (1 << 2) + +void tmu012_init (MemoryRegion *sysmem,hwaddr base, +int feat,uint32_t freq, +qemu_irq ch0_irq,qemu_irq ch1_irq, +qemu_irq ch2_irq0,qemu_irq ch2_irq1); + +#endif
hw/sh4/sh7750.c +1 -0
@@ -30,6 +30,7 @@#include "sh7750_regs.h" #include "sh7750_regnames.h" #include "hw/sh4/sh_intc.h" +#include "hw/timer/tmu012.h" #include "cpu.h" #include "exec/exec-all.h"
hw/timer/sh_timer.c +2 -0
@@ -9,10 +9,12 @@*/ #include "qemu/osdep.h" +#include "exec/memory.h" #include "hw/hw.h" #include "hw/irq.h" #include "hw/sh4/sh.h" #include "qemu/timer.h" +#include "hw/timer/tmu012.h" #include "hw/ptimer.h" //#define DEBUG_TIMER
Signature · 1 line
2.21.3
PATCH 5/15 hw/timer/sh_timer: Remove unused 'qemu/timer.h' include
In reply to Philippe Mathieu-DaudéRemove unused "qemu/timer.h" include.
--- hw/timer/sh_timer.c | 1 - 1 file changed, 1 deletion(-)
hw/timer/sh_timer.c +0 -1
@@ -13,7 +13,6 @@#include "hw/hw.h" #include "hw/irq.h" #include "hw/sh4/sh.h" -#include "qemu/timer.h" #include "hw/timer/tmu012.h" #include "hw/ptimer.h"
Signature · 1 line
2.21.3
PATCH 6/15 hw/intc: RX62N interrupt controller (ICUa)
In reply to Philippe Mathieu-DaudéFrom: Yoshinori Sato <[email protected]>
This implementation supported only ICUa.
Hardware manual.
https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01uh0033ej0140_rx62n.pdf
Message-Id: <[email protected]>
--- include/hw/intc/rx_icu.h | 76 ++++++++ hw/intc/rx_icu.c | 397 +++++++++++++++++++++++++++++++++++++++ MAINTAINERS | 6 + hw/intc/Kconfig | 3 + hw/intc/Makefile.objs | 1 + 5 files changed, 483 insertions(+) create mode 100644 include/hw/intc/rx_icu.h create mode 100644 hw/intc/rx_icu.c
include/hw/intc/rx_icu.h new file +76 -0
@@ -0,0 +1,76 @@ +/* +* RX Interrupt Control Unit +* +* Copyright (c) 2019 Yoshinori Sato +* +* SPDX-License-Identifier: GPL-2.0-or-later +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2 or later, as published by the Free Software Foundation. +* +* This program is distributed in the hope it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef HW_INTC_RX_ICU_H +#define HW_INTC_RX_ICU_H + +#include "hw/sysbus.h" + +enum TRG_MODE { +TRG_LEVEL =0 , +TRG_NEDGE =1 ,/* Falling */ +TRG_PEDGE =2 ,/* Raising */ +TRG_BEDGE =3 ,/* Both */ +}; + +struct IRQSource { +enum TRG_MODE sense; +int level; +}; + +enum { +/* Software interrupt request */ +SWI =27 , +NR_IRQS =256 +}; + +struct RXICUState { +/*< private >*/ +SysBusDevice parent_obj; +/*< public >*/ + +MemoryRegion memory; +struct IRQSource src[NR_IRQS ]; +uint32_t nr_irqs; +uint8_t *map; +uint32_t nr_sense; +uint8_t *init_sense; + +uint8_t ir[NR_IRQS ]; +uint8_t dtcer[NR_IRQS ]; +uint8_t ier[NR_IRQS /8 ]; +uint8_t ipr[142 ]; +uint8_t dmasr[4 ]; +uint16_t fir; +uint8_t nmisr; +uint8_t nmier; +uint8_t nmiclr; +uint8_t nmicr; +int16_t req_irq; +qemu_irq _irq; +qemu_irq _fir; +qemu_irq _swi; +}; +typedef struct RXICUState RXICUState ; + +#define TYPE_RX_ICU "rx-icu" +#define RX_ICU (obj) OBJECT_CHECK(RXICUState, (obj), TYPE_RX_ICU) + +#endif /* RX_ICU_H */
hw/intc/rx_icu.c new file +397 -0
397 lines not on this page · raw message
MAINTAINERS +6 -0
@@ -1971,6 +1971,12 @@ F: hw/char/sh_serial.c F: hw/timer/sh_timer.c F: include/hw/sh4/sh.h +Renesas RX peripherals +M: Yoshinori Sato <[email protected]> +S: Maintained +F: hw/intc/rx_icu.c +F: include/hw/intc/rx_icu.h + Subsystems ---------- Audio
hw/intc/Kconfig +3 -0
@@ -61,3 +61,6 @@ config S390_FLIC_KVM config OMPIC bool + +config RX_ICU + bool
hw/intc/Makefile.objs +1 -0
@@ -20,6 +20,7 @@ common-obj-$(CONFIG_ARM_GIC) += arm_gicv3_dist.o common-obj-$(CONFIG_ARM_GIC) += arm_gicv3_redist.o common-obj-$(CONFIG_ARM_GIC) += arm_gicv3_its_common.o common-obj-$(CONFIG_OPENPIC) += openpic.o +common-obj-$(CONFIG_RX_ICU) += rx_icu.o common-obj-y += intc.o obj-$(CONFIG_APIC) += apic.o apic_common.o
Signature · 1 line
2.21.3
PATCH 7/15 hw/timer: RX62N 8-Bit timer (TMR)
In reply to Philippe Mathieu-DaudéFrom: Yoshinori Sato <[email protected]>
renesas_tmr: 8bit timer modules.
This part use many renesas's CPU.
Hardware manual.
https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01uh0033ej0140_rx62n.pdf
Message-Id: <[email protected]>
--- include/hw/timer/renesas_tmr.h | 55 ++++ hw/timer/renesas_tmr.c | 477 +++++++++++++++++++++++++++++++++ MAINTAINERS | 2 + hw/timer/Kconfig | 3 + hw/timer/Makefile.objs | 1 + 5 files changed, 538 insertions(+) create mode 100644 include/hw/timer/renesas_tmr.h create mode 100644 hw/timer/renesas_tmr.c
include/hw/timer/renesas_tmr.h new file +55 -0
@@ -0,0 +1,55 @@ +/* +* Renesas 8bit timer Object +* +* Copyright (c) 2018 Yoshinori Sato +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#ifndef HW_TIMER_RENESAS_TMR_H +#define HW_TIMER_RENESAS_TMR_H + +#include "qemu/timer.h" +#include "hw/sysbus.h" + +#define TYPE_RENESAS_TMR "renesas-tmr" +#define RTMR (obj) OBJECT_CHECK(RTMRState, (obj), TYPE_RENESAS_TMR) + +enum timer_event { + cmia =0 , + cmib =1 , + ovi =2 , + none =3 , +TMR_NR_EVENTS =4 +}; + +enum { +TMR_CH =2 , +TMR_NR_IRQ =3 *TMR_CH +}; + +typedef struct RTMRState { +/*< private >*/ +SysBusDevice parent_obj; +/*< public >*/ + +uint64_t input_freq; +MemoryRegion memory; + +int64_t tick; +uint8_t tcnt[TMR_CH ]; +uint8_t tcora[TMR_CH ]; +uint8_t tcorb[TMR_CH ]; +uint8_t tcr[TMR_CH ]; +uint8_t tccr[TMR_CH ]; +uint8_t tcor[TMR_CH ]; +uint8_t tcsr[TMR_CH ]; +int64_t div_round[TMR_CH ]; +uint8_t next[TMR_CH ]; +qemu_irq cmia[TMR_CH ]; +qemu_irq cmib[TMR_CH ]; +qemu_irq ovi[TMR_CH ]; +QEMUTimer timer[TMR_CH ]; +}RTMRState ; + +#endif
hw/timer/renesas_tmr.c new file +477 -0
477 lines not on this page · raw message
MAINTAINERS +2 -0
@@ -1968,8 +1968,10 @@ M: Yoshinori Sato <[email protected]> R: Magnus Damm <[email protected]> S: Maintained F: hw/char/sh_serial.c +F: hw/timer/renesas_tmr.c F: hw/timer/sh_timer.c F: include/hw/sh4/sh.h +F: include/hw/timer/renesas_tmr.h Renesas RX peripherals M: Yoshinori Sato <[email protected]>
hw/timer/Kconfig +3 -0
@@ -35,3 +35,6 @@ config CMSDK_APB_TIMER config CMSDK_APB_DUALTIMER bool select PTIMER + +config RENESAS_TMR + bool
hw/timer/Makefile.objs +1 -0
@@ -23,6 +23,7 @@ common-obj-$(CONFIG_OMAP) += omap_gptimer.o common-obj-$(CONFIG_OMAP) += omap_synctimer.o common-obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o common-obj-$(CONFIG_SH4) += sh_timer.o +common-obj-$(CONFIG_RENESAS_TMR) += renesas_tmr.o common-obj-$(CONFIG_DIGIC) += digic-timer.o common-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o
Signature · 1 line
2.21.3
PATCH 8/15 hw/timer: RX62N compare match timer (CMT)
In reply to Philippe Mathieu-DaudéFrom: Yoshinori Sato <[email protected]>
renesas_cmt: 16bit compare match timer modules.
This part use many renesas's CPU.
Hardware manual.
https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01uh0033ej0140_rx62n.pdf
Message-Id: <[email protected]>
--- include/hw/timer/renesas_cmt.h | 40 +++++ hw/timer/renesas_cmt.c | 283 +++++++++++++++++++++++++++++++++ MAINTAINERS | 4 +- hw/timer/Kconfig | 3 + hw/timer/Makefile.objs | 1 + 5 files changed, 329 insertions(+), 2 deletions(-) create mode 100644 include/hw/timer/renesas_cmt.h create mode 100644 hw/timer/renesas_cmt.c
include/hw/timer/renesas_cmt.h new file +40 -0
@@ -0,0 +1,40 @@ +/* +* Renesas Compare-match timer Object +* +* Copyright (c) 2019 Yoshinori Sato +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#ifndef HW_TIMER_RENESAS_CMT_H +#define HW_TIMER_RENESAS_CMT_H + +#include "qemu/timer.h" +#include "hw/sysbus.h" + +#define TYPE_RENESAS_CMT "renesas-cmt" +#define RCMT (obj) OBJECT_CHECK(RCMTState, (obj), TYPE_RENESAS_CMT) + +enum { +CMT_CH =2 , +CMT_NR_IRQ =1 *CMT_CH +}; + +typedef struct RCMTState { +/*< private >*/ +SysBusDevice parent_obj; +/*< public >*/ + +uint64_t input_freq; +MemoryRegion memory; + +uint16_t cmstr; +uint16_t cmcr[CMT_CH ]; +uint16_t cmcnt[CMT_CH ]; +uint16_t cmcor[CMT_CH ]; +int64_t tick[CMT_CH ]; +qemu_irq cmi[CMT_CH ]; +QEMUTimer timer[CMT_CH ]; +}RCMTState ; + +#endif
hw/timer/renesas_cmt.c new file +283 -0
283 lines not on this page · raw message
MAINTAINERS +2 -2
@@ -1968,10 +1968,10 @@ M: Yoshinori Sato <[email protected]> R: Magnus Damm <[email protected]> S: Maintained F: hw/char/sh_serial.c -F: hw/timer/renesas_tmr.c +F: hw/timer/renesas_*.c F: hw/timer/sh_timer.c F: include/hw/sh4/sh.h -F: include/hw/timer/renesas_tmr.h +F: include/hw/timer/renesas_*.h Renesas RX peripherals M: Yoshinori Sato <[email protected]>
hw/timer/Kconfig +3 -0
@@ -38,3 +38,6 @@ config CMSDK_APB_DUALTIMER config RENESAS_TMR bool + +config RENESAS_CMT + bool
hw/timer/Makefile.objs +1 -0
@@ -24,6 +24,7 @@ common-obj-$(CONFIG_OMAP) += omap_synctimer.o common-obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o common-obj-$(CONFIG_SH4) += sh_timer.o common-obj-$(CONFIG_RENESAS_TMR) += renesas_tmr.o +common-obj-$(CONFIG_RENESAS_CMT) += renesas_cmt.o common-obj-$(CONFIG_DIGIC) += digic-timer.o common-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o
Signature · 1 line
2.21.3
PATCH 9/15 hw/char: RX62N serial communication interface (SCI)
In reply to Philippe Mathieu-DaudéFrom: Yoshinori Sato <[email protected]>
This module supported only non FIFO type.
Hardware manual.
https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01uh0033ej0140_rx62n.pdf
Message-Id: <[email protected]>
--- include/hw/char/renesas_sci.h | 51 +++++ hw/char/renesas_sci.c | 350 ++++++++++++++++++++++++++++++++++ MAINTAINERS | 2 + hw/char/Kconfig | 3 + hw/char/Makefile.objs | 1 + 5 files changed, 407 insertions(+) create mode 100644 include/hw/char/renesas_sci.h create mode 100644 hw/char/renesas_sci.c
include/hw/char/renesas_sci.h new file +51 -0
@@ -0,0 +1,51 @@ +/* +* Renesas Serial Communication Interface +* +* Copyright (c) 2018 Yoshinori Sato +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#ifndef HW_CHAR_RENESAS_SCI_H +#define HW_CHAR_RENESAS_SCI_H + +#include "chardev/char-fe.h" +#include "hw/sysbus.h" + +#define TYPE_RENESAS_SCI "renesas-sci" +#define RSCI (obj) OBJECT_CHECK(RSCIState, (obj), TYPE_RENESAS_SCI) + +enum { +ERI =0 , +RXI =1 , +TXI =2 , +TEI =3 , +SCI_NR_IRQ =4 +}; + +typedef struct { +/*< private >*/ +SysBusDevice parent_obj; +/*< public >*/ + +MemoryRegion memory; +QEMUTimer timer; +CharBackend chr; +qemu_irq irq[SCI_NR_IRQ ]; + +uint8_t smr; +uint8_t brr; +uint8_t scr; +uint8_t tdr; +uint8_t ssr; +uint8_t rdr; +uint8_t scmr; +uint8_t semr; + +uint8_t read_ssr; +int64_t trtime; +int64_t rx_next; +uint64_t input_freq; +}RSCIState ; + +#endif
hw/char/renesas_sci.c new file +350 -0
350 lines not on this page · raw message
MAINTAINERS +2 -0
@@ -1967,9 +1967,11 @@ Renesas peripherals M: Yoshinori Sato <[email protected]> R: Magnus Damm <[email protected]> S: Maintained +F: hw/char/renesas_sci.c F: hw/char/sh_serial.c F: hw/timer/renesas_*.c F: hw/timer/sh_timer.c +F: include/hw/char/renesas_sci.h F: include/hw/sh4/sh.h F: include/hw/timer/renesas_*.h
hw/char/Kconfig +3 -0
@@ -46,3 +46,6 @@ config SCLPCONSOLE config TERMINAL3270 bool + +config RENESAS_SCI + bool
hw/char/Makefile.objs +1 -0
@@ -20,6 +20,7 @@ common-obj-$(CONFIG_SH4) += sh_serial.o common-obj-$(CONFIG_DIGIC) += digic-uart.o common-obj-$(CONFIG_STM32F2XX_USART) += stm32f2xx_usart.o common-obj-$(CONFIG_RASPI) += bcm2835_aux.o +common-obj-$(CONFIG_RENESAS_SCI) += renesas_sci.o common-obj-$(CONFIG_CMSDK_APB_UART) += cmsdk-apb-uart.o common-obj-$(CONFIG_ETRAXFS) += etraxfs_ser.o
Signature · 1 line
2.21.3
PATCH 10/15 hw/rx: RX62N microcontroller (MCU)
In reply to Philippe Mathieu-DaudéFrom: Yoshinori Sato <[email protected]>
rx62n - RX62N cpu.
[PMD: Use TYPE_RX62N_CPU, use #define for RX62N_NR_TMR/CMT/SCI,
renamed CPU -> MCU, device -> microcontroller]
Message-Id: <[email protected]>
--- include/hw/rx/rx62n.h | 75 +++++++++++++ hw/rx/rx62n.c | 254 ++++++++++++++++++++++++++++++++++++++++++ MAINTAINERS | 2 + hw/Kconfig | 1 + hw/rx/Kconfig | 6 + hw/rx/Makefile.objs | 1 + 6 files changed, 339 insertions(+) create mode 100644 include/hw/rx/rx62n.h create mode 100644 hw/rx/rx62n.c create mode 100644 hw/rx/Kconfig create mode 100644 hw/rx/Makefile.objs
include/hw/rx/rx62n.h new file +75 -0
@@ -0,0 +1,75 @@ +/* +* RX62N MCU Object +* +* Datasheet: RX62N Group, RX621 Group User's Manual: Hardware +* (Rev.1.40 R01UH0033EJ0140) +* +* Copyright (c) 2019 Yoshinori Sato +* +* SPDX-License-Identifier: GPL-2.0-or-later +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2 or later, as published by the Free Software Foundation. +* +* This program is distributed in the hope it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef HW_RX_RX62N_MCU_H +#define HW_RX_RX62N_MCU_H + +#include "target/rx/cpu.h" +#include "hw/intc/rx_icu.h" +#include "hw/timer/renesas_tmr.h" +#include "hw/timer/renesas_cmt.h" +#include "hw/char/renesas_sci.h" +#include "qemu/units.h" + +#define TYPE_RX62N_MCU "rx62n-mcu" +#define RX62N_MCU (obj) OBJECT_CHECK(RX62NState, (obj), TYPE_RX62N_MCU) + +#define RX62N_NR_TMR 2 +#define RX62N_NR_CMT 2 +#define RX62N_NR_SCI 6 + +typedef struct RX62NState { +/*< private >*/ +DeviceState parent_obj; +/*< public >*/ + +RXCPU cpu; +RXICUState icu; +RTMRState tmr[RX62N_NR_TMR ]; +RCMTState cmt[RX62N_NR_CMT ]; +RSCIState sci[RX62N_NR_SCI ]; + +MemoryRegion *sysmem; +bool kernel; + +MemoryRegion iram; +MemoryRegion iomem1; +MemoryRegion d_flash; +MemoryRegion iomem2; +MemoryRegion iomem3; +MemoryRegion c_flash; +qemu_irq irq[NR_IRQS ]; +}RX62NState ; + +/* +* RX62N Internal Memory +* It is the value of R5F562N8. +* Please change the size for R5F562N7. +*/ +#define RX62N_IRAM_SIZE (96 * KiB) +#define RX62N_DFLASH_SIZE (32 * KiB) +#define RX62N_CFLASH_SIZE (512 * KiB) + +#define RX62N_PCLK (48 * 1000 * 1000) + +#endif
hw/rx/rx62n.c new file +254 -0
254 lines not on this page · raw message
MAINTAINERS +2 -0
@@ -1979,7 +1979,9 @@ Renesas RX peripherals M: Yoshinori Sato <[email protected]> S: Maintained F: hw/intc/rx_icu.c +F: hw/rx/ F: include/hw/intc/rx_icu.h +F: include/hw/rx/ Subsystems ----------
hw/Kconfig +1 -0
@@ -55,6 +55,7 @@ source nios2/Kconfig source openrisc/Kconfig source ppc/Kconfig source riscv/Kconfig +source rx/Kconfig source s390x/Kconfig source sh4/Kconfig source sparc/Kconfig
hw/rx/Kconfig new file +6 -0
@@ -0,0 +1,6 @@ +config RX62N_MCU + bool + select RX_ICU + select RENESAS_TMR + select RENESAS_CMT + select RENESAS_SCI
hw/rx/Makefile.objs new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_RX62N_MCU) += rx62n.o
Signature · 1 line
2.21.3
PATCH 11/15 hw/rx: Honor -accel qtest
In reply to Philippe Mathieu-DaudéFrom: Richard Henderson <[email protected]>
Issue an error if no kernel, no bios, and not qtest'ing. Fixes make check-qtest-rx: test/qom-test.
Message-Id: <[email protected]>
--- hw/rx/rx62n.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
hw/rx/rx62n.c +8 -1
@@ -21,12 +21,14 @@#include "qemu/osdep.h" #include "qapi/error.h" +#include "qemu/error-report.h" #include "hw/hw.h" #include "hw/rx/rx62n.h" #include "hw/loader.h" #include "hw/sysbus.h" #include "hw/qdev-properties.h" #include "sysemu/sysemu.h" +#include "sysemu/qtest.h" #include "cpu.h" /*
@@ -208,7 +210,12 @@ static void rx62n_realize(DeviceState *dev, Error **errp)memory_region_add_subregion (s->sysmem,RX62N_CFLASH_BASE , &s->c_flash);if (!s->kernel) { -rom_add_file_fixed (bios_name,RX62N_CFLASH_BASE ,0 ); +if (bios_name) { +rom_add_file_fixed (bios_name,RX62N_CFLASH_BASE ,0 ); + }else if (!qtest_enabled ()) { +error_report ("No bios or kernel specified" ); +exit (1 ); + } }/* Initialize CPU */
Signature · 1 line
2.21.3
PATCH 12/15 hw/rx: Register R5F562N7 and R5F562N8 MCUs
In reply to Philippe Mathieu-DaudéMake the current TYPE_RX62N_MCU an abstract class, and generate TYPE_R5F562N7_MCU and TYPE_R5F562N8_MCU models.
--- include/hw/rx/rx62n.h | 17 ++++----- hw/rx/rx62n.c | 87 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 80 insertions(+), 24 deletions(-)
include/hw/rx/rx62n.h +8 -9
@@ -34,6 +34,9 @@#define TYPE_RX62N_MCU "rx62n-mcu"#define RX62N_MCU (obj) OBJECT_CHECK(RX62NState, (obj), TYPE_RX62N_MCU) +#define TYPE_R5F562N7_MCU "r5f562n7-mcu" +#define TYPE_R5F562N8_MCU "r5f562n8-mcu" +#define RX62N_NR_TMR 2#define RX62N_NR_CMT 2#define RX62N_NR_SCI 6
@@ -59,16 +62,12 @@ typedef struct RX62NState {MemoryRegion iomem3;MemoryRegion c_flash;qemu_irq irq[NR_IRQS ]; -} RX62NState; -/* -* RX62N Internal Memory -* It is the value of R5F562N8. -* Please change the size for R5F562N7. -*/ -#define RX62N_IRAM_SIZE (96 * KiB) -#define RX62N_DFLASH_SIZE (32 * KiB) -#define RX62N_CFLASH_SIZE (512 * KiB) +/* Input Clock (XTAL) frequency */ +uint32_t xtal_freq_hz; +/* Peripheral Module Clock frequency */ +uint32_t pclk_freq_hz; +} RX62NState;#define RX62N_PCLK (48 * 1000 * 1000)
hw/rx/rx62n.c +72 -15
142 lines not on this page · raw message
Signature · 1 line
2.21.3
Re: [PATCH rc1 12/15] hw/rx: Register R5F562N7 and R5F562N8 MCUs
hw/rx/rx62n.c static void register_sci(RX62NState *s, int unit) · line 231
Quoted 9 lines · Philippe Mathieu-Daudé
hw/rx/rx62n.c +9
-0+/* XTAL range: 8-14 MHz */ +if (s->xtal_freq_hz <8e6 || s->xtal_freq_hz >14e6 ) { +error_setg (errp,"\"xtal-frequency-hz\" property in incorrect range." ); +return ; + } +/* Use a 4x fixed multiplier */ + s->pclk_freq_hz =4 * s->xtal_freq_hz; +/* PCLK range: 8-50 MHz */ +assert (s->pclk_freq_hz <=50e6 );
It's just startup, so it's not vital, but forcing floating-point comparisons just because the notation is shorter isn't ideal.
Perhaps just a local "const uint32_t MHz = 10000000;", and some multiplies.
Otherwise,
r~
Re: [PATCH rc1 12/15] hw/rx: Register R5F562N7 and R5F562N8 MCUs
Quoted 11 lines · Richard Henderson
hw/rx/rx62n.c static void register_sci(RX62NState *s, int unit) · line 231
Quoted 9 lines · Philippe Mathieu-Daudé
hw/rx/rx62n.c +9
-0+/* XTAL range: 8-14 MHz */ +if (s->xtal_freq_hz <8e6 || s->xtal_freq_hz >14e6 ) { +error_setg (errp,"\"xtal-frequency-hz\" property in incorrect range." ); +return ; + } +/* Use a 4x fixed multiplier */ + s->pclk_freq_hz =4 * s->xtal_freq_hz; +/* PCLK range: 8-50 MHz */ +assert (s->pclk_freq_hz <=50e6 );
Quoted 2 lines
It's just startup, so it's not vital, but forcing floating-point comparisons just because the notation is shorter isn't ideal.
OK.
Quoted 2 lines
Perhaps just a local "const
uint32_tMHz = 10000000;", and some multiplies.
/10 :P
Quoted 3 lines
Otherwise,
Reviewed-by Richard Henderson <[email protected]>
Thanks a lot for reviewing all the patches!
Regards,
Phil.
PATCH 13/15 hw/rx: Add RX GDB simulator
In reply to Philippe Mathieu-DaudéFrom: Yoshinori Sato <[email protected]>
Add the RX machine internally simulated in GDB.
[PMD: Use TYPE_RX62N_CPU, use #define for RX62N_NR_TMR/CMT/SCI,
renamed CPU -> MCU, device -> microcontroller]
Message-Id: <[email protected]>
--- default-configs/rx-softmmu.mak | 1 + include/hw/rx/rx62n.h | 4 + hw/rx/rx-gdbsim.c | 196 +++++++++++++++++++++++++++++++++ MAINTAINERS | 7 ++ hw/rx/Kconfig | 4 + hw/rx/Makefile.objs | 1 + 6 files changed, 213 insertions(+) create mode 100644 hw/rx/rx-gdbsim.c
default-configs/rx-softmmu.mak +1 -0
@@ -1,2 +1,3 @@ # Default configuration for rx-softmmu +CONFIG_RX_GDBSIM=y
include/hw/rx/rx62n.h +4 -0
@@ -37,6 +37,10 @@#define TYPE_R5F562N7_MCU "r5f562n7-mcu"#define TYPE_R5F562N8_MCU "r5f562n8-mcu" +#define EXT_CS_BASE 0x01000000 +#define VECTOR_TABLE_BASE 0xffffff80 +#define RX62N_CFLASH_BASE 0xfff80000 +#define RX62N_NR_TMR 2#define RX62N_NR_CMT 2#define RX62N_NR_SCI 6
hw/rx/rx-gdbsim.c new file +196 -0
196 lines not on this page · raw message
MAINTAINERS +7 -0
@@ -1252,6 +1252,13 @@ S: Supported F: hw/riscv/opentitan.c F: include/hw/riscv/opentitan.h +RX Machines +----------- +rx-gdbsim +M: Yoshinori Sato <[email protected]> +S: Maintained +F: hw/rx/rx-gdbsim.c + SH4 Machines ------------ R2D
hw/rx/Kconfig +4 -0
@@ -4,3 +4,7 @@ config RX62N_MCU select RENESAS_TMR select RENESAS_CMT select RENESAS_SCI + +config RX_GDBSIM + bool + select RX62N_MCU
hw/rx/Makefile.objs +1 -0
@@ -1 +1,2 @@ obj-$(CONFIG_RX62N_MCU) += rx62n.o +obj-$(CONFIG_RX_GDBSIM) += rx-gdbsim.o
Signature · 1 line
2.21.3
PATCH 14/15 BootLinuxConsoleTest: Test the RX GDB simulator
In reply to Philippe Mathieu-DaudéFrom: Philippe Mathieu-Daudé <[email protected]>
Add two tests for the rx-gdbsim machine, based on the recommended test setup from Yoshinori Sato:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg03586.html
- U-Boot prompt
- Linux kernel with Sash shell
These are very quick tests:
$ avocado run -t arch:rx tests/acceptance/machine_rx_gdbsim.py JOB ID : 84a6ef01c0b87975ecbfcb31a920afd735753ace JOB LOG : /home/phil/avocado/job-results/job-2019-05-24T05.02-84a6ef0/job.log (1/2) tests/acceptance/machine_rx_gdbsim.py:RxGdbSimMachine.test_uboot: PASS (0.11 s) (2/2) tests/acceptance/machine_rx_gdbsim.py:RxGdbSimMachine.test_linux_sash: PASS (0.45 s) RESULTS : PASS 2 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
Tests can also be run with:
$ avocado --show=console run -t arch:rx tests/acceptance/machine_rx_gdbsim.py console: U-Boot 2016.05-rc3-23705-ga1ef3c71cb-dirty (Feb 05 2019 - 21:56:06 +0900) console: Linux version 4.19.0+ (yo-satoh@yo-satoh-debian) (gcc version 9.0.0 20181105 (experimental) (GCC)) #137 Wed Feb 20 23:20:02 JST 2019 console: Built 1 zonelists, mobility grouping on. Total pages: 8128 ... 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
Message-Id: <[email protected]>
--- MAINTAINERS | 1 + tests/acceptance/machine_rx_gdbsim.py | 68 +++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 tests/acceptance/machine_rx_gdbsim.py
MAINTAINERS +1 -0
@@ -1258,6 +1258,7 @@ rx-gdbsim M: Yoshinori Sato <[email protected]> S: Maintained F: hw/rx/rx-gdbsim.c +F: tests/acceptance/machine_rx_gdbsim.py SH4 Machines ------------
tests/acceptance/machine_rx_gdbsim.py new file +68 -0
68 lines not on this page · raw message
Signature · 1 line
2.21.3
Re: [PATCH rc1 14/15] BootLinuxConsoleTest: Test the RX GDB simulator
Quoted 32 lines · Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <[email protected]>
Add two tests for the rx-gdbsim machine, based on the recommended test setup from Yoshinori Sato:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg03586.html- U-Boot prompt
- Linux kernel with Sash shellThese are very quick tests:
$ avocado run -t arch:rx tests/acceptance/machine_rx_gdbsim.py JOB ID : 84a6ef01c0b87975ecbfcb31a920afd735753ace JOB LOG : /home/phil/avocado/job-results/job-2019-05-24T05.02-84a6ef0/job.log (1/2) tests/acceptance/machine_rx_gdbsim.py:RxGdbSimMachine.test_uboot: PASS (0.11 s) (2/2) tests/acceptance/machine_rx_gdbsim.py:RxGdbSimMachine.test_linux_sash: PASS (0.45 s) RESULTS : PASS 2 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0Tests can also be run with:
$ avocado --show=console run -t arch:rx tests/acceptance/machine_rx_gdbsim.py console: U-Boot 2016.05-rc3-23705-ga1ef3c71cb-dirty (Feb 05 2019 - 21:56:06 +0900) console: Linux version 4.19.0+ (yo-satoh@yo-satoh-debian) (gcc version 9.0.0 20181105 (experimental) (GCC)) #137 Wed Feb 20 23:20:02 JST 2019 console: Built 1 zonelists, mobility grouping on. Total pages: 8128 ... 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 sciSigned-off-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Yoshinori Sato <[email protected]>
Quoted 8 lines
Message-Id: <[email protected]>
[PMD: Replace obsolete set_machine() by machine tag, and rename as gdbsim]Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- MAINTAINERS | 1 + tests/acceptance/machine_rx_gdbsim.py | 68 +++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 tests/acceptance/machine_rx_gdbsim.py
r~
PATCH 15/15 docs: Document the RX target
In reply to Philippe Mathieu-DaudéFrom: Yoshinori Sato <[email protected]>
Add rx-virt target specification document.
Message-Id: <[email protected]>
--- docs/system/target-rx.rst | 36 ++++++++++++++++++++++++++++++++++++ docs/system/targets.rst | 1 + MAINTAINERS | 1 + 3 files changed, 38 insertions(+) create mode 100644 docs/system/target-rx.rst
docs/system/target-rx.rst new file +36 -0
@@ -0,0 +1,36 @@ +.. _RX-System-emulator: + +RX System emulator +-------------------- + +Use the executable ``qemu-system-rx`` to simulate RX target (GDB simulator). +This target emulated following devices. + +- R5F562N8 MCU + + - On-chip memory (ROM 512KB, RAM 96KB) + - Interrupt Control Unit (ICUa) + - 8Bit Timer x 1CH (TMR0,1) + - Compare Match Timer x 2CH (CMT0,1) + - Serial Communication Interface x 1CH (SCI0) + +- External memory 16MByte + +Example of ``qemu-system-rx`` usage for RX is shown below: + +Download ``<u-boot_image_file>`` from +https://osdn.net/users/ysato/pf/qemu/dl/u-boot.bin.gz + +Start emulation of rx-virt:: + qemu-system-rx -M gdbsim-r5f562n8 -bios <u-boot_image_file> + +Download ``kernel_image_file`` from +https://osdn.net/users/ysato/pf/qemu/dl/zImage + +Download ``device_tree_blob`` from +https://osdn.net/users/ysato/pf/qemu/dl/rx-virt.dtb + +Start emulation of rx-virt:: + qemu-system-rx -M gdbsim-r5f562n8 \ + -kernel <kernel_image_file> -dtb <device_tree_blob> \ + -append "earlycon"
docs/system/targets.rst +1 -0
@@ -18,3 +18,4 @@ Contents: target-m68k target-xtensa target-s390x + target-rx
MAINTAINERS +1 -0
@@ -1257,6 +1257,7 @@ RX Machines rx-gdbsim M: Yoshinori Sato <[email protected]> S: Maintained +F: docs/system/target-rx.rst F: hw/rx/rx-gdbsim.c F: tests/acceptance/machine_rx_gdbsim.py
Signature · 1 line
2.21.3
Re: [PATCH rc1 15/15] docs: Document the RX target
Quoted 6 lines · Philippe Mathieu-Daudé
From: Yoshinori Sato <[email protected]>
Add rx-virt target specification document.
Signed-off-by Yoshinori Sato <[email protected]>Message-Id: <[email protected]>
Quoted 8 lines
[PMD: Cover in MAINTAINERS, rename as gdbsim, use machine argument]Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- docs/system/target-rx.rst | 36 ++++++++++++++++++++++++++++++++++++ docs/system/targets.rst | 1 + MAINTAINERS | 1 + 3 files changed, 38 insertions(+) create mode 100644 docs/system/target-rx.rst
r~
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.
=== TEST SCRIPT BEGIN ===
#!/bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1 === TEST SCRIPT END ===
CC qga/commands.o CC qga/guest-agent-command-state.o CC qga/main.o /usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o) CC qga/commands-posix.o CC qga/channel-posix.o CC qga/qapi-generated/qga-qapi-types.o --- GEN docs/interop/qemu-ga-ref.html GEN docs/interop/qemu-ga-ref.txt GEN docs/interop/qemu-ga-ref.7
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
LINK qemu-keymap
LINK ivshmem-client/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
LINK ivshmem-server/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o) /usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
LINK qemu-nbd LINK qemu-storage-daemon AS pc-bios/optionrom/multiboot.o /usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o) LINK qemu-img /usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o) LINK qemu-io LINK qemu-edid LINK fsdev/virtfs-proxy-helper --- BUILD pc-bios/optionrom/multiboot.raw BUILD pc-bios/optionrom/linuxboot_dma.img BUILD pc-bios/optionrom/pvh.raw
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
LINK vhost-user-input/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
BUILD pc-bios/optionrom/linuxboot_dma.raw/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o) /usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
BUILD pc-bios/optionrom/kvmvapic.img/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)/usr/bin/ld : /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
SIGN pc-bios/optionrom/multiboot.bin/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
BUILD pc-bios/optionrom/linuxboot.img
SIGN pc-bios/optionrom/linuxboot_dma.bin
BUILD pc-bios/optionrom/kvmvapic.raw
SIGN pc-bios/optionrom/pvh.bin
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
BUILD pc-bios/optionrom/linuxboot.raw
SIGN pc-bios/optionrom/kvmvapic.bin
SIGN pc-bios/optionrom/linuxboot.bin
LINK qemu-ga
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
GEN x86_64-softmmu/hmp-commands.h
GEN x86_64-softmmu/hmp-commands-info.h
GEN x86_64-softmmu/config-devices.h
---
CC x86_64-softmmu/hw/virtio/virtio-crypto.o
CC x86_64-softmmu/hw/virtio/vhost-user-fs.o
CC x86_64-softmmu/hw/virtio/virtio-crypto-pci.o
/tmp/qemu-test/src/fpu/softfloat.c:3365:13: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
absZ &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
/tmp/qemu-test/src/fpu/softfloat.c:3423:18: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
absZ0 &= ~ ( ( (uint64_t) ( absZ1<<1 ) == 0 ) & roundNearestEven );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
/tmp/qemu-test/src/fpu/softfloat.c:3483:18: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
absZ0 &= ~(((uint64_t)(absZ1<<1) == 0) & roundNearestEven);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
/tmp/qemu-test/src/fpu/softfloat.c:3606:13: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
zSig &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
/tmp/qemu-test/src/fpu/softfloat.c:3760:13: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
zSig &= ~ ( ( ( roundBits ^ 0x200 ) == 0 ) & roundNearestEven );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
/tmp/qemu-test/src/fpu/softfloat.c:3987:21: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
~ ( ( (uint64_t) ( zSig1<<1 ) == 0 ) & roundNearestEven );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
/tmp/qemu-test/src/fpu/softfloat.c:4003:22: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
zSig0 &= ~ ( ( (uint64_t) ( zSig1<<1 ) == 0 ) & roundNearestEven );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
/tmp/qemu-test/src/fpu/softfloat.c:4273:18: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation]
zSig1 &= ~ ( ( zSig2 + zSig2 == 0 ) & roundNearestEven );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!8 errors generated.
make[1]: *** [/tmp/qemu-test/src/rules.mak:69: fpu/softfloat.o] Error 1
make[1]: *** Waiting for unfinished jobs..../tmp/qemu-test/src/migration/ram.c:919:45: error: implicit conversion from 'unsigned long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]
xbzrle_counters.encoding_rate = UINT64_MAX;
~ ^~~~~~~~~~/usr/include/stdint.h:130:23: note: expanded from macro 'UINT64_MAX'
---
18446744073709551615UL
^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [/tmp/qemu-test/src/rules.mak:69: migration/ram.o] Error 1
make: *** [Makefile:527: x86_64-softmmu/all] Error 2 Traceback (most recent call last):
File "./tests/docker/docker.py", line 669, in <module>
sys.exit(main())
---
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=3a7831a127594556bfa87f417528a9a8', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=x86_64-softmmu', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-g0f5n67e/src/docker-src.2020-06-17-15.40.45.9879:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-debug']' returned non-zero exit status 2. filter=--filter=label=com.qemu.instance.uuid=3a7831a127594556bfa87f417528a9a8
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-g0f5n67e/src'
make: *** [docker-run-test-debug@fedora] Error 2
real 4m5.743s
user 0m8.415s
The full log is available at
http://patchew.org/logs/[email protected]/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Quoted 43 lines · Philippe Mathieu-Daudé
Hi Richard, Yoshinori,
This is a merger of the latest SH4 patches (add a common entry for Renesas hardware in
MAINTAINERS, an acceptance test from Thomas), and Yoshinori's v32 [*] of the RX machine.
Call this release, or merge, candidate 1.[*] https://www.mail-archive.com/[email protected]/msg682290.html
---
Richard,
A few months ago, I volunteered to integrate the RX port posted last year on the list, to help you ease the burden of your heavy workload.
As it took a long time, at some point I suggested doing the integration in two parts, first the architecture part (target/ directory), then the hardware (hw/ directory). You disagreed, arguing that this approach could be dangerous, as we don’t want to maintain a partly integrated port. In hindsight I learned the hard way that you were right!
When I decided to send the architectural part first, I made the commitment to you to finish the full integration before the following release. The second part has been a painful experience.
With this series, I have now fulfilled this commitment. I don't plan to continue working on the RX port.
Thank you for your support during this experiment, I learned a lot, and I’d be grateful to work with you again in the future in other parts of the project.
---
Yoshinori,
I appreciated integrating your work, which is of very good quality overall. Despite the numerous iterations you had to go through, the outcome has proven worthwhile.
Working with you has been a great experience.
Quoted 9 lines
I volunteered to help maintain the RX hardware in my leisure time. Such hobby projects are supposed to be fun, and not have the same level of pressure as paid work.
Sadly, my experience trying to get your work merged has not been fun:
too much aggressive criticism, and constant demands for more work. The pressure has become too great for what is, essentially, unpaid work.
Thank you very much.
I wouldn't have been able to achieve such an outcome without your great cooperation.
There are still some functions that I want to implement on the RX port, so I will continue working.
Quoted 100 lines
---
Missing review: patches 2 and 12
- 02/15MAINTAINERS: Add an entry for common Renesas peripherals
- 12/15 hw/rx: Register R5F562N7 and R5F562N8 MCUsChanges since v32:
- Rebased on DeviceReset API change
- Renamed CPU -> MCU
- Renamed device -> microcontroller
- Rebased ondevice_class_set_parent_realizeAPI change
- Split timer patch in two distincts: CMT and TMR
- Rebased on ramdev API change
- UseTYPE_RX62N_CPUdefinition
- Use RX62N_NR_TMR/CMT/SCI definitions
- Replace obsoleteset_machine()by machine tag
- Split rx-virt patch in two distinct, MCU first, machine next
- Renamed machined as gdbsim
- MakeTYPE_RX62N_MCUan abstract class,
addTYPE_R5F562N7_MCUandTYPE_R5F562N8_MCUmodels
- Rename the machine gdbsim-r5f562n8, also add the gdbsim-r5f562n7
- Filled various VMStateField for migration
- Rebase on qdev/sysbus API changeCI:
https://travis-ci.org/github/philmd/qemu/builds/698974425Philippe Mathieu-Daudé (7):
MAINTAINERS: Coversh_intcfiles in the R2D/Shix machine sections
MAINTAINERS: Add an entry for common Renesas peripherals hw/sh4: Use MemoryRegion typedef
hw/sh4: Extract timer definitions to 'hw/timer/tmu012.h' hw/timer/sh_timer: Remove unused 'qemu/timer.h' include hw/rx: Register R5F562N7 and R5F562N8 MCUs
BootLinuxConsoleTest: Test the RX GDB simulatorRichard Henderson (1):
hw/rx: Honor -accel qtestYoshinori Sato (7):
hw/intc: RX62N interrupt controller (ICUa) hw/timer: RX62N 8-Bit timer (TMR)
hw/timer: RX62N compare match timer (CMT) hw/char: RX62N serial communication interface (SCI) hw/rx: RX62N microcontroller (MCU)
hw/rx: Add RX GDB simulator
docs: Document the RX targetdocs/system/target-rx.rst | 36 ++ docs/system/targets.rst | 1 + default-configs/rx-softmmu.mak | 1 + include/hw/char/renesas_sci.h | 51 +++ include/hw/intc/rx_icu.h | 76 ++++ include/hw/rx/rx62n.h | 78 +++++ include/hw/sh4/sh.h | 12 +- include/hw/timer/renesas_cmt.h | 40 +++ include/hw/timer/renesas_tmr.h | 55 +++ include/hw/timer/tmu012.h | 23 ++ hw/char/renesas_sci.c | 350 +++++++++++++++++++ hw/intc/rx_icu.c | 397 +++++++++++++++++++++ hw/rx/rx-gdbsim.c | 196 +++++++++++ hw/rx/rx62n.c | 318 +++++++++++++++++ hw/sh4/sh7750.c | 1 + hw/timer/renesas_cmt.c | 283 +++++++++++++++ hw/timer/renesas_tmr.c | 477 ++++++++++++++++++++++++++ hw/timer/sh_timer.c | 3 +- MAINTAINERS | 33 +- hw/Kconfig | 1 + hw/char/Kconfig | 3 + hw/char/Makefile.objs | 1 + hw/intc/Kconfig | 3 + hw/intc/Makefile.objs | 1 + hw/rx/Kconfig | 10 + hw/rx/Makefile.objs | 2 + hw/timer/Kconfig | 6 + hw/timer/Makefile.objs | 2 + tests/acceptance/machine_rx_gdbsim.py | 68 ++++ 29 files changed, 2515 insertions(+), 13 deletions(-) create mode 100644 docs/system/target-rx.rst create mode 100644 include/hw/char/renesas_sci.h create mode 100644 include/hw/intc/rx_icu.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 include/hw/timer/tmu012.h create mode 100644 hw/char/renesas_sci.c create mode 100644 hw/intc/rx_icu.c create mode 100644 hw/rx/rx-gdbsim.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 hw/rx/Kconfig create mode 100644 hw/rx/Makefile.objs create mode 100644 tests/acceptance/machine_rx_gdbsim.pySignature · 1 line
2.21.3
Signature · 1 line
Yosinori Sato