diff options
author | Erich-McMillan <erich.mcmillan@hp.com> | 2020-12-08 09:53:38 -0600 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2020-12-09 13:04:17 -0500 |
commit | 0657c657eb37bb48bfd9fe3ae8a323ae3455f47b (patch) | |
tree | 1b7f86b752626acbd402152e640e8825a1918e75 /hw/i386/pc_sysfw.c | |
parent | 552c2c4c101335e67ac8ae8ab022d88a8795f2ac (diff) | |
download | qemu-0657c657eb37bb48bfd9fe3ae8a323ae3455f47b.zip qemu-0657c657eb37bb48bfd9fe3ae8a323ae3455f47b.tar.gz qemu-0657c657eb37bb48bfd9fe3ae8a323ae3455f47b.tar.bz2 |
hw/i386/pc: add max combined fw size as machine configuration option
At Hewlett Packard Inc. we have a need for increased fw size to enable testing of our custom fw.
Rebase v6 patch to d73c46e4
Signed-off-by: Erich McMillan <erich.mcmillan@hp.com>
Message-Id: <20201208155338.14-1-erich.mcmillan@hp.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/pc_sysfw.c')
-rw-r--r-- | hw/i386/pc_sysfw.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c index b6c0822..f8bd3a8 100644 --- a/hw/i386/pc_sysfw.c +++ b/hw/i386/pc_sysfw.c @@ -39,15 +39,6 @@ #include "hw/block/flash.h" #include "sysemu/kvm.h" -/* - * We don't have a theoretically justifiable exact lower bound on the base - * address of any flash mapping. In practice, the IO-APIC MMIO range is - * [0xFEE00000..0xFEE01000] -- see IO_APIC_DEFAULT_ADDRESS --, leaving free - * only 18MB-4KB below 4G. For now, restrict the cumulative mapping to 8MB in - * size. - */ -#define FLASH_SIZE_LIMIT (8 * MiB) - #define FLASH_SECTOR_SIZE 4096 static void pc_isa_bios_init(MemoryRegion *rom_memory, @@ -140,7 +131,7 @@ void pc_system_flash_cleanup_unused(PCMachineState *pcms) * Stop at the first pcms->flash[0] lacking a block backend. * Set each flash's size from its block backend. Fatal error if the * size isn't a non-zero multiple of 4KiB, or the total size exceeds - * FLASH_SIZE_LIMIT. + * pcms->max_fw_size. * * If pcms->flash[0] has a block backend, its memory is passed to * pc_isa_bios_init(). Merging several flash devices for isa-bios is @@ -182,10 +173,10 @@ static void pc_system_flash_map(PCMachineState *pcms, } if ((hwaddr)size != size || total_size > HWADDR_MAX - size - || total_size + size > FLASH_SIZE_LIMIT) { + || total_size + size > pcms->max_fw_size) { error_report("combined size of system firmware exceeds " "%" PRIu64 " bytes", - FLASH_SIZE_LIMIT); + pcms->max_fw_size); exit(1); } |