qemu-patch-raspberry4/hw
Peter Maydell f1dfab0d9b hw/arm/mps2-tz: Implement AN524 memory remapping via machine property
The AN524 FPGA image supports two memory maps, which differ in where
the QSPI and BRAM are.  In the default map, the BRAM is at
0x0000_0000, and the QSPI at 0x2800_0000.  In the second map, they
are the other way around.

In hardware, the initial mapping can be selected by the user by
writing either "REMAP: BRAM" (the default) or "REMAP: QSPI" in the
board configuration file.  The board config file is acted on by the
"Motherboard Configuration Controller", which is an entirely separate
microcontroller on the dev board but outside the FPGA.

The guest can also dynamically change the mapping via the SCC
CFG_REG0 register.

Implement this functionality for QEMU, using a machine property
"remap" with valid values "BRAM" and "QSPI" to allow the user to set
the initial mapping, in the same way they can on the FPGA, and
wiring up the bit from the SCC register to also switch the mapping.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20210504120912.23094-4-peter.maydell@linaro.org
2021-05-10 17:21:54 +01:00
..
9pfs hw/9pfs/9p-synth: Replaced qemu_mutex_lock with QEMU_LOCK_GUARD 2021-03-16 11:41:49 +01:00
acpi Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
adc clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
alpha Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
arm hw/arm/mps2-tz: Implement AN524 memory remapping via machine property 2021-05-10 17:21:54 +01:00
audio hw: Replace anti-social QOM type names 2021-03-19 15:18:43 +01:00
avr Do not include hw/boards.h if it's not really necessary 2021-05-02 17:24:51 +02:00
block Trivial patches pull request 20210503 2021-05-05 13:52:00 +01:00
char Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
core Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
cpu cpu/core: Fix "help" of CPU core device types 2021-04-09 16:05:16 -04:00
cris Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
display Do not include hw/boards.h if it's not really necessary 2021-05-02 17:24:51 +02:00
dma Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
gpio hw: gpio: implement gpio-pwr driver for qemu reset/poweroff 2021-01-29 10:47:28 +00:00
hppa Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
hyperv qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
i2c Trivial patches pull request 20210503 2021-05-05 13:52:00 +01:00
i386 Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
ide hw: Do not include hw/sysbus.h if it is not necessary 2021-05-02 17:24:50 +02:00
input Do not include sysemu/sysemu.h if it's not really necessary 2021-05-02 17:24:50 +02:00
intc ppc patch queue 2021-05-04 2021-05-05 20:29:14 +01:00
ipack Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
ipmi hw: Do not include qemu/log.h if it is not necessary 2021-05-02 17:24:50 +02:00
isa ppc patch queue 2021-05-04 2021-05-05 20:29:14 +01:00
lm32 Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
m68k Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
mem Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
microblaze Do not include sysemu/sysemu.h if it's not really necessary 2021-05-02 17:24:50 +02:00
mips Trivial patches pull request 20210503 2021-05-05 13:52:00 +01:00
misc hw/misc/mps2-scc: Support using CFG0 bit 0 for remapping 2021-05-10 17:21:54 +01:00
moxie Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
net Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
nios2 Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
nubus hw: Do not include hw/sysbus.h if it is not necessary 2021-05-02 17:24:50 +02:00
nvram Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
openrisc Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
pci Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
pci-bridge Kconfig: Compile PXB for ARM_VIRT 2021-01-17 06:42:54 -05:00
pci-host ppc patch queue 2021-05-04 2021-05-05 20:29:14 +01:00
pcmcia hw/pcmcia: Do not register PCMCIA type if not required 2021-05-02 17:24:50 +02:00
ppc ppc patch queue 2021-05-04 2021-05-05 20:29:14 +01:00
rdma pvrdma: wean code off pvrdma_ring.h kernel header 2021-03-15 16:41:22 +08:00
remote Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
riscv Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
rtc mc146818rtc: put it into the 'misc' category 2021-05-02 17:24:51 +02:00
rx hw/rx/rx-gdbsim: Do not accept invalid memory size 2021-05-03 10:07:41 +02:00
s390x Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
scsi Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
sd hw/sd/omap_mmc: Use device_cold_reset() instead of device_legacy_reset() 2021-05-10 17:21:53 +01:00
sh4 Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
smbios i386: do not use ram_size global 2020-12-10 12:15:08 -05:00
sparc Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
sparc64 Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
ssi Trivial patches pull request 20210503 2021-05-05 13:52:00 +01:00
timer hw: Do not include hw/irq.h if it is not necessary 2021-05-02 17:24:50 +02:00
tpm Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
tricore Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
unicore32 meson: convert hw/arch* 2020-08-21 06:30:33 -04:00
usb hw: Do not include qemu/log.h if it is not necessary 2021-05-02 17:24:50 +02:00
vfio Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
virtio Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
watchdog clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
xen Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
xenpv meson: convert hw/arch* 2020-08-21 06:30:33 -04:00
xtensa Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
Kconfig semihosting: Move hw/semihosting/ -> semihosting/ 2021-03-10 15:34:12 +00:00
meson.build semihosting: Move hw/semihosting/ -> semihosting/ 2021-03-10 15:34:12 +00:00