diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2020-01-09 01:05:23 +0100 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2020-01-27 10:49:51 -0800 |
commit | 8262863d4b59aed7e22866234dcfd3d8fb016a6b (patch) | |
tree | 39e850c36170e1c3e8869e34b49cd4d652612a4e /hw/hppa | |
parent | 4765384ce33dd7dec6e4419616cddfee5358571a (diff) |
hw/hppa/machine: Correctly check the firmware is in PDC range
The firmware has to reside in the PDC range. If the Elf file
expects to load it below FIRMWARE_START, it is incorrect,
regardless the RAM size.
Acked-by: Helge Deller <deller@gmx.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200109000525.24744-2-f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw/hppa')
-rw-r--r-- | hw/hppa/machine.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index a35527cfc7..e57530950a 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -171,7 +171,7 @@ static void machine_hppa_init(MachineState *machine) qemu_log_mask(CPU_LOG_PAGE, "Firmware loaded at 0x%08" PRIx64 "-0x%08" PRIx64 ", entry at 0x%08" PRIx64 ".\n", firmware_low, firmware_high, firmware_entry); - if (firmware_low < ram_size || firmware_high >= FIRMWARE_END) { + if (firmware_low < FIRMWARE_START || firmware_high >= FIRMWARE_END) { error_report("Firmware overlaps with memory or IO space"); exit(1); } |