aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/virt.c
diff options
context:
space:
mode:
authorDavid Engraf <david.engraf@sysgo.com>2019-07-15 14:17:04 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-07-15 14:17:04 +0100
commit80734cbdcab6ddb8d45a75910e8f7e3841daca2c (patch)
treef2b56e0da7aa514138662180d8e32a71a177164d /hw/arm/virt.c
parenta09ef5040477643a7026703199d8781fe048d3a8 (diff)
hw/arm/virt: Fix non-secure flash mode
Using the whole 128 MiB flash in non-secure mode is not working because virt_flash_fdt() expects the same address for secure_sysmem and sysmem. This is not correctly handled by caller because it forwards NULL for secure_sysmem in non-secure flash mode. Fixed by using sysmem when secure_sysmem is NULL. Signed-off-by: David Engraf <david.engraf@sysgo.com> Message-id: 20190712075002.14326-1-david.engraf@sysgo.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/virt.c')
-rw-r--r--hw/arm/virt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 0b5138cb22..d9496c9363 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1674,7 +1674,7 @@ static void machvirt_init(MachineState *machine)
&machine->device_memory->mr);
}
- virt_flash_fdt(vms, sysmem, secure_sysmem);
+ virt_flash_fdt(vms, sysmem, secure_sysmem ?: sysmem);
create_gic(vms, pic);