The size of the memory that the firmware uses at the top of RAM is passed to x86_load_linux(), which the microvm machine uses as well. Move it next to that function, so that microvm, which can be built without the PC machines, can use it too. No functional change.
Signed-off-by: Thomas Lamprecht <[email protected]> --- hw/i386/pc.c | 14 ++------------ include/hw/i386/x86.h | 10 ++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 4737eb471c..09ef6d0783 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -185,16 +185,6 @@ const size_t pc_compat_4_2_len = G_N_ELEMENTS(pc_compat_4_2); GlobalProperty pc_compat_4_1[] = {}; const size_t pc_compat_4_1_len = G_N_ELEMENTS(pc_compat_4_1); -/* - * @PC_FW_DATA: - * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables - * and other BIOS datastructures. - * - * BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K - * reported to be used at the moment, 32K should be enough for a while. - */ -#define PC_FW_DATA (0x20000 + 0x8000) - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; @@ -576,7 +566,7 @@ void xen_load_linux(PCMachineState *pcms) fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, x86ms->boot_cpus); rom_set_fw(fw_cfg); - x86_load_linux(x86ms, fw_cfg, PC_FW_DATA); + x86_load_linux(x86ms, fw_cfg, X86_FW_DATA); for (i = 0; i < nb_option_roms; i++) { assert(!strcmp(option_rom[i].name, "linuxboot_dma.bin") || !strcmp(option_rom[i].name, "pvh.bin") || @@ -910,7 +900,7 @@ void pc_memory_init(PCMachineState *pcms, } if (linux_boot) { - x86_load_linux(x86ms, fw_cfg, PC_FW_DATA); + x86_load_linux(x86ms, fw_cfg, X86_FW_DATA); } for (i = 0; i < nb_option_roms; i++) { diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index abb073ca47..14251d5bb9 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x86.h @@ -127,6 +127,16 @@ void x86_bios_rom_init(X86MachineState *x86ms, const char *default_firmware, MemoryRegion *rom_memory, bool isapc_ram_fw); void x86_bios_rom_reload(X86MachineState *x86ms); +/* + * @X86_FW_DATA: + * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables + * and other BIOS datastructures. + * + * BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K + * reported to be used at the moment, 32K should be enough for a while. + */ +#define X86_FW_DATA (0x20000 + 0x8000) + void x86_load_linux(X86MachineState *x86ms, FWCfgState *fw_cfg, int acpi_data_size); -- 2.47.3
