aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/xlnx-versal-virt.c
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar.iglesias@xilinx.com>2022-01-30 12:03:13 +0100
committerPeter Maydell <peter.maydell@linaro.org>2022-02-08 10:56:28 +0000
commit40874a383dd9b4bca0f09b07641487919645d8c4 (patch)
tree9573caa9a16bf7f119714e9310cc3b13bb72335b /hw/arm/xlnx-versal-virt.c
parente4b0bb80713a8ae530fd868ca84543f1b8ecb290 (diff)
downloadqemu-40874a383dd9b4bca0f09b07641487919645d8c4.zip
qemu-40874a383dd9b4bca0f09b07641487919645d8c4.tar.gz
qemu-40874a383dd9b4bca0f09b07641487919645d8c4.tar.bz2
hw/arm: versal-virt: Always call arm_load_kernel()
Always call arm_load_kernel() regardless of kernel_filename being set. This is needed because arm_load_kernel() sets up reset for the CPUs. Fixes: 6f16da53ff (hw/arm: versal: Add a virtual Xilinx Versal board) Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Message-id: 20220130110313.4045351-2-edgar.iglesias@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/xlnx-versal-virt.c')
-rw-r--r--hw/arm/xlnx-versal-virt.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c
index ef3231c..7c7baff 100644
--- a/hw/arm/xlnx-versal-virt.c
+++ b/hw/arm/xlnx-versal-virt.c
@@ -681,20 +681,13 @@ static void versal_virt_init(MachineState *machine)
s->binfo.get_dtb = versal_virt_get_dtb;
s->binfo.modify_dtb = versal_virt_modify_dtb;
s->binfo.psci_conduit = psci_conduit;
- if (machine->kernel_filename) {
- arm_load_kernel(&s->soc.fpd.apu.cpu[0], machine, &s->binfo);
- } else {
- AddressSpace *as = arm_boot_address_space(&s->soc.fpd.apu.cpu[0],
- &s->binfo);
+ if (!machine->kernel_filename) {
/* Some boot-loaders (e.g u-boot) don't like blobs at address 0 (NULL).
* Offset things by 4K. */
s->binfo.loader_start = 0x1000;
s->binfo.dtb_limit = 0x1000000;
- if (arm_load_dtb(s->binfo.loader_start,
- &s->binfo, s->binfo.dtb_limit, as, machine) < 0) {
- exit(EXIT_FAILURE);
- }
}
+ arm_load_kernel(&s->soc.fpd.apu.cpu[0], machine, &s->binfo);
for (i = 0; i < XLNX_VERSAL_NUM_OSPI_FLASH; i++) {
BusState *spi_bus;