[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/3] hw/hppa/machine: Correctly check the firmware is in PDC
From: |
Helge Deller |
Subject: |
Re: [PATCH 1/3] hw/hppa/machine: Correctly check the firmware is in PDC range |
Date: |
Wed, 8 Jan 2020 22:15:41 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
On 08.01.20 19:14, Philippe Mathieu-Daudé wrote:
> 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.
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Acked-by: Helge Deller <address@hidden>
> ---
> Note we define FIRMWARE_END=0xf0800000 but in the specs
> the PDC ends at 0xf1000000.
> ---
> hw/hppa/machine.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
> index 5d0de26140..6775d879f8 100644
> --- a/hw/hppa/machine.c
> +++ b/hw/hppa/machine.c
> @@ -155,7 +155,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);
> }
>