qemu-patch-raspberry4/hw/intc
Peter Maydell 9e60d759d3 hw/intc/armv7m_nvic: Provide default "reset the system" behaviour for SYSRESETREQ
The NVIC provides an outbound qemu_irq "SYSRESETREQ" which it signals
when the guest sets the SYSRESETREQ bit in the AIRCR register.  This
matches the hardware design (where the CPU has a signal of this name
and it is up to the SoC to connect that up to an actual reset
mechanism), but in QEMU it mostly results in duplicated code in SoC
objects and bugs where SoC model implementors forget to wire up the
SYSRESETREQ line.

Provide a default behaviour for the case where SYSRESETREQ is not
actually connected to anything: use qemu_system_reset_request() to
perform a system reset.  This will allow us to remove the
implementations of SYSRESETREQ handling from the boards where that's
exactly what it does, and also fixes the bugs in the board models
which forgot to wire up the signal:

 * microbit
 * mps2-an385
 * mps2-an505
 * mps2-an511
 * mps2-an521
 * musca-a
 * musca-b1
 * netduino
 * netduinoplus2

We still allow the board to wire up the signal if it needs to, in case
we need to model more complicated reset controller logic or to model
buggy SoC hardware which forgot to wire up the line itself. But
defaulting to "reset the system" is more often going to be correct
than defaulting to "do nothing".

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200728103744.6909-3-peter.maydell@linaro.org
2020-08-03 17:55:03 +01:00
..
allwinner-a10-pic.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
apic.c apic: Report current_count via 'info lapic' 2020-07-10 19:26:55 -04:00
apic_common.c apic: Report current_count via 'info lapic' 2020-07-10 19:26:55 -04:00
arm_gic.c arm_gic: Mask the un-supported priority bits 2020-02-28 16:14:57 +00:00
arm_gic_common.c arm_gic: Mask the un-supported priority bits 2020-02-28 16:14:57 +00:00
arm_gic_kvm.c error: Avoid error_propagate() after migrate_add_blocker() 2020-07-10 15:18:08 +02:00
arm_gicv2m.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
arm_gicv3.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
arm_gicv3_common.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
arm_gicv3_cpuif.c arm/gicv3: update virtual irq state after IAR register read 2020-01-17 14:27:16 +00:00
arm_gicv3_dist.c hw/intc/arm_gicv3: GICD_TYPER.SecurityExtn is RAZ if GICD_CTLR.DS == 1 2019-06-17 15:13:19 +01:00
arm_gicv3_its_common.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
arm_gicv3_its_kvm.c error: Avoid error_propagate() after migrate_add_blocker() 2020-07-10 15:18:08 +02:00
arm_gicv3_kvm.c error: Avoid error_propagate() after migrate_add_blocker() 2020-07-10 15:18:08 +02:00
arm_gicv3_redist.c hw/intc/arm_gicv3: Fix decoding of ID register range 2019-06-17 15:13:19 +01:00
armv7m_nvic.c hw/intc/armv7m_nvic: Provide default "reset the system" behaviour for SYSRESETREQ 2020-08-03 17:55:03 +01:00
aspeed_vic.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
bcm2835_ic.c hw/arm/bcm283x: Correct the license text 2020-03-23 17:22:30 +00:00
bcm2836_control.c hw/arm/bcm283x: Correct the license text 2020-03-23 17:22:30 +00:00
etraxfs_pic.c cris: improve passing PIC interrupt vector to the CPU 2020-01-07 17:24:29 +04:00
exynos4210_combiner.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
exynos4210_gic.c sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
gic_internal.h hw/intc/arm_gic: Drop GIC_BASE_IRQ macro 2018-09-25 15:13:24 +01:00
gicv3_internal.h target-arm: Add GICv3CPUState in CPUARMState struct 2017-02-28 17:10:00 +00:00
grlib_irqmp.c leon3: use qemu_irq framework instead of callback as property 2020-01-07 17:24:29 +04:00
heathrow_pic.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
i8259.c hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
i8259_common.c isa: Convert uses of isa_create() with Coccinelle 2020-06-15 22:05:28 +02:00
ibex_plic.c hw/intc: Initial commit of lowRISC Ibex PLIC 2020-06-19 08:24:07 -07:00
imx_avic.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
imx_gpcv2.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
intc.c intc: add an interface to gather statistics/informations on interrupt controllers 2016-10-04 10:00:25 +02:00
ioapic.c KVM: Kick resamplefd for split kernel irqchip 2020-06-10 12:10:33 -04:00
ioapic_common.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
Kconfig hw/intc: Add Loongson LIOINTC support 2020-06-27 19:42:22 +02:00
lm32_pic.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
loongson_liointc.c hw/intc: Add Loongson LIOINTC support 2020-06-27 19:42:22 +02:00
Makefile.objs hw/intc: Add Loongson LIOINTC support 2020-06-27 19:42:22 +02:00
mips_gic.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
nios2_iic.c qom: Don't handle impossible object_property_get_link() failure 2020-07-10 15:18:08 +02:00
omap_intc.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
ompic.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
openpic.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
openpic_kvm.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
pl190.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
pnv_xive.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
pnv_xive_regs.h ppc/pnv: add a XIVE interrupt controller model for POWER9 2019-03-12 14:33:04 +11:00
puv3_intc.c hw/unicore32/puv3: Use qemu_log_mask(ERROR) instead of debug printf() 2020-06-09 19:01:56 +02:00
realview_gic.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
rx_icu.c hw/intc: RX62N interrupt controller (ICUa) 2020-06-22 18:37:12 +02:00
s390_flic.c sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
s390_flic_kvm.c s390x: adapter routes error handling 2020-01-27 12:13:09 +01:00
sh_intc.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
slavio_intctl.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
spapr_xive.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
spapr_xive_kvm.c spapr/xive: Deduce the SpaprXive pointer from XiveTCTX::xptr 2020-01-08 11:01:59 +11:00
trace-events xics: Rename misleading ics_simple_*() functions 2019-10-04 19:08:22 +10:00
vgic_common.h intc/gic: Extract some reusable vGIC code 2015-09-24 01:29:36 +01:00
xics.c error: Eliminate error_propagate() with Coccinelle, part 2 2020-07-10 15:18:08 +02:00
xics_kvm.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
xics_pnv.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
xics_spapr.c spapr: Pass the maximum number of vCPUs to the KVM interrupt controller 2019-12-17 10:39:48 +11:00
xilinx_intc.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
xive.c error: Eliminate error_propagate() manually 2020-07-10 15:18:08 +02:00
xlnx-pmu-iomod-intc.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
xlnx-zynqmp-ipi.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00