|
|
7711c0 |
From 5991cbe99b2faf035522ec4910524421a34d9f14 Mon Sep 17 00:00:00 2001
|
|
|
7711c0 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
7711c0 |
Date: Fri, 17 May 2019 06:51:16 +0200
|
|
|
7711c0 |
Subject: [PATCH 49/53] pc_sysfw: Pass PCMachineState to
|
|
|
7711c0 |
pc_system_firmware_init()
|
|
|
7711c0 |
MIME-Version: 1.0
|
|
|
7711c0 |
Content-Type: text/plain; charset=UTF-8
|
|
|
7711c0 |
Content-Transfer-Encoding: 8bit
|
|
|
7711c0 |
|
|
|
7711c0 |
RH-Author: Markus Armbruster <armbru@redhat.com>
|
|
|
7711c0 |
Message-id: <20190517065120.12028-28-armbru@redhat.com>
|
|
|
7711c0 |
Patchwork-id: 87988
|
|
|
7711c0 |
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH v3 27/31] pc_sysfw: Pass PCMachineState to pc_system_firmware_init()
|
|
|
7711c0 |
Bugzilla: 1624009
|
|
|
7711c0 |
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
7711c0 |
|
|
|
7711c0 |
From: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
7711c0 |
|
|
|
7711c0 |
pc_system_firmware_init() parameter @isapc_ram_fw is PCMachineState
|
|
|
7711c0 |
member pci_enabled negated. The next commit will need more of
|
|
|
7711c0 |
PCMachineState. To prepare for that, pass a PCMachineState *, and
|
|
|
7711c0 |
drop the now redundant parameter @isapc_ram_fw.
|
|
|
7711c0 |
|
|
|
7711c0 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
7711c0 |
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
7711c0 |
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
7711c0 |
Message-Id: <20190308131445.17502-11-armbru@redhat.com>
|
|
|
7711c0 |
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
7711c0 |
(cherry picked from commit 5e640a9e78ea61c50401a2b11fa144b5f0c217dc)
|
|
|
7711c0 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
7711c0 |
---
|
|
|
7711c0 |
hw/i386/pc.c | 2 +-
|
|
|
7711c0 |
hw/i386/pc_sysfw.c | 5 ++++-
|
|
|
7711c0 |
include/hw/i386/pc.h | 3 +--
|
|
|
7711c0 |
3 files changed, 6 insertions(+), 4 deletions(-)
|
|
|
7711c0 |
|
|
|
7711c0 |
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
|
|
|
7711c0 |
index 7160969..86e9d43 100644
|
|
|
7711c0 |
--- a/hw/i386/pc.c
|
|
|
7711c0 |
+++ b/hw/i386/pc.c
|
|
|
7711c0 |
@@ -1413,7 +1413,7 @@ void pc_memory_init(PCMachineState *pcms,
|
|
|
7711c0 |
}
|
|
|
7711c0 |
|
|
|
7711c0 |
/* Initialize PC system firmware */
|
|
|
7711c0 |
- pc_system_firmware_init(rom_memory, !pcmc->pci_enabled);
|
|
|
7711c0 |
+ pc_system_firmware_init(pcms, rom_memory);
|
|
|
7711c0 |
|
|
|
7711c0 |
option_rom_mr = g_malloc(sizeof(*option_rom_mr));
|
|
|
7711c0 |
memory_region_init_ram(option_rom_mr, NULL, "pc.rom", PC_ROM_SIZE,
|
|
|
7711c0 |
diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c
|
|
|
7711c0 |
index d40d727..2a0e18c 100644
|
|
|
7711c0 |
--- a/hw/i386/pc_sysfw.c
|
|
|
7711c0 |
+++ b/hw/i386/pc_sysfw.c
|
|
|
7711c0 |
@@ -240,8 +240,11 @@ static void old_pc_system_rom_init(MemoryRegion *rom_memory, bool isapc_ram_fw)
|
|
|
7711c0 |
bios);
|
|
|
7711c0 |
}
|
|
|
7711c0 |
|
|
|
7711c0 |
-void pc_system_firmware_init(MemoryRegion *rom_memory, bool isapc_ram_fw)
|
|
|
7711c0 |
+void pc_system_firmware_init(PCMachineState *pcms,
|
|
|
7711c0 |
+ MemoryRegion *rom_memory)
|
|
|
7711c0 |
{
|
|
|
7711c0 |
+ PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
|
|
|
7711c0 |
+ bool isapc_ram_fw = !pcmc->pci_enabled;
|
|
|
7711c0 |
DriveInfo *pflash_drv;
|
|
|
7711c0 |
|
|
|
7711c0 |
pflash_drv = drive_get(IF_PFLASH, 0, 0);
|
|
|
7711c0 |
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
|
|
|
7711c0 |
index 1e9f252..611e111 100644
|
|
|
7711c0 |
--- a/include/hw/i386/pc.h
|
|
|
7711c0 |
+++ b/include/hw/i386/pc.h
|
|
|
7711c0 |
@@ -290,8 +290,7 @@ extern PCIDevice *piix4_dev;
|
|
|
7711c0 |
int piix4_init(PCIBus *bus, ISABus **isa_bus, int devfn);
|
|
|
7711c0 |
|
|
|
7711c0 |
/* pc_sysfw.c */
|
|
|
7711c0 |
-void pc_system_firmware_init(MemoryRegion *rom_memory,
|
|
|
7711c0 |
- bool isapc_ram_fw);
|
|
|
7711c0 |
+void pc_system_firmware_init(PCMachineState *pcms, MemoryRegion *rom_memory);
|
|
|
7711c0 |
|
|
|
7711c0 |
/* acpi-build.c */
|
|
|
7711c0 |
void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid,
|
|
|
7711c0 |
--
|
|
|
7711c0 |
1.8.3.1
|
|
|
7711c0 |
|