]> git.proxmox.com Git - mirror_qemu.git/commit - hw/arm/netduinoplus2.c
target/arm: Make boards pass base address to armv7m_load_kernel()
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 23 Aug 2022 16:04:17 +0000 (17:04 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 14 Sep 2022 10:19:40 +0000 (11:19 +0100)
commit761c532ab1ebe9d345c9afe4fb9c2c4b26c58582
tree8b18095aecbc67978fb1ca9a8355106e6767518c
parentf92bd43480bf2da36354e148d139ef2aac12d3f2
target/arm: Make boards pass base address to armv7m_load_kernel()

Currently armv7m_load_kernel() takes the size of the block of memory
where it should load the initial guest image, but assumes that it
should always load it at address 0.  This happens to be true of all
our M-profile boards at the moment, but it isn't guaranteed to always
be so: M-profile CPUs can be configured (via init-svtor and
init-nsvtor, which match equivalent hardware configuration signals)
to have the initial vector table at any address, not just zero.  (For
instance the Teeny board has the boot ROM at address 0x0200_0000.)

Add a base address argument to armv7m_load_kernel(), so that
callers now pass in both base address and size. All the current
callers pass 0, so this is not a behaviour change.

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: <20220823160417.3858216-3-peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 files changed:
hw/arm/armv7m.c
hw/arm/aspeed.c
hw/arm/microbit.c
hw/arm/mps2-tz.c
hw/arm/mps2.c
hw/arm/msf2-som.c
hw/arm/musca.c
hw/arm/netduino2.c
hw/arm/netduinoplus2.c
hw/arm/stellaris.c
hw/arm/stm32vldiscovery.c
include/hw/arm/boot.h