[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 25/27] pc_sysfw: Pass PCMachineState to pc_system_fir
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 25/27] pc_sysfw: Pass PCMachineState to pc_system_firmware_init() |
Date: |
Mon, 11 Mar 2019 23:08:41 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
pc_system_firmware_init() parameter @isapc_ram_fw is PCMachineState
member pci_enabled negated. The next commit will need more of
PCMachineState. To prepare for that, pass a PCMachineState *, and
drop the now redundant parameter @isapc_ram_fw.
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
---
hw/i386/pc.c | 2 +-
hw/i386/pc_sysfw.c | 5 ++++-
include/hw/i386/pc.h | 3 +--
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index c6d047b42b..d8572d3c00 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1809,7 +1809,7 @@ void pc_memory_init(PCMachineState *pcms,
}
/* Initialize PC system firmware */
- pc_system_firmware_init(rom_memory, !pcmc->pci_enabled);
+ pc_system_firmware_init(pcms, rom_memory);
option_rom_mr = g_malloc(sizeof(*option_rom_mr));
memory_region_init_ram(option_rom_mr, NULL, "pc.rom", PC_ROM_SIZE,
diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c
index 46b87afe23..785123252c 100644
--- a/hw/i386/pc_sysfw.c
+++ b/hw/i386/pc_sysfw.c
@@ -231,8 +231,11 @@ static void old_pc_system_rom_init(MemoryRegion
*rom_memory, bool isapc_ram_fw)
bios);
}
-void pc_system_firmware_init(MemoryRegion *rom_memory, bool isapc_ram_fw)
+void pc_system_firmware_init(PCMachineState *pcms,
+ MemoryRegion *rom_memory)
{
+ PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
+ bool isapc_ram_fw = !pcmc->pci_enabled;
DriveInfo *pflash_drv;
pflash_drv = drive_get(IF_PFLASH, 0, 0);
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 54222a202d..4f5ed7cefc 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -277,8 +277,7 @@ extern PCIDevice *piix4_dev;
int piix4_init(PCIBus *bus, ISABus **isa_bus, int devfn);
/* pc_sysfw.c */
-void pc_system_firmware_init(MemoryRegion *rom_memory,
- bool isapc_ram_fw);
+void pc_system_firmware_init(PCMachineState *pcms, MemoryRegion *rom_memory);
/* acpi-build.c */
void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid,
--
2.17.2
- [Qemu-devel] [PULL 24/27] pc_sysfw: Remove unused PcSysFwDevice, (continued)
- [Qemu-devel] [PULL 24/27] pc_sysfw: Remove unused PcSysFwDevice, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 17/27] qom: Move compat_props machinery from qdev to QOM, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 04/27] pflash: Rename *CFI_PFLASH* to *PFLASH_CFI*, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 11/27] hw/mips/malta: Remove fl_sectors variable, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 19/27] sysbus: Fix latent bug with onboard devices, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 12/27] hw/mips/malta: Restrict 'bios_size' variable scope, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 07/27] ppc405_boards: Delete stale, disabled DEBUG_BOARD_INIT code, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 21/27] vl: Factor configure_blockdev() out of main(), Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 26/27] pc: Support firmware configuration with -blockdev, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 13/27] mips_malta: Clean up definition of flash memory size somewhat, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 25/27] pc_sysfw: Pass PCMachineState to pc_system_firmware_init(),
Markus Armbruster <=
- [Qemu-devel] [PULL 27/27] docs/interop/firmware.json: Prefer -machine to if=pflash, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 15/27] pflash: Clean up after commit 368a354f02b, part 2, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 22/27] vl: Create block backends before setting machine properties, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 18/27] vl: Fix latent bug with -global and onboard devices, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 23/27] pflash_cfi01: Add pflash_cfi01_get_blk() helper, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 14/27] pflash: Clean up after commit 368a354f02b, part 1, Markus Armbruster, 2019/03/11
- Re: [Qemu-devel] [PULL 00/27] Pflash and firmware configuration patches for 2019-03-11, Peter Maydell, 2019/03/12