|
|
9ae3a8 |
From f7572e4bdfc5c0c57d6a37712c6f5b79cc86e063 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
|
|
9ae3a8 |
Date: Wed, 13 Dec 2017 13:38:39 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 08/41] Enable fw_cfg DMA interface for x86
|
|
|
9ae3a8 |
MIME-Version: 1.0
|
|
|
9ae3a8 |
Content-Type: text/plain; charset=UTF-8
|
|
|
9ae3a8 |
Content-Transfer-Encoding: 8bit
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
9ae3a8 |
Message-id: <20171213133912.26176-9-marcandre.lureau@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 78357
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.5 qemu-kvm PATCH v3 08/41] Enable fw_cfg DMA interface for x86
|
|
|
9ae3a8 |
Bugzilla: 1411490
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: Marc Marí <markmb@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Enable the fw_cfg DMA interface for all the x86 platforms.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Based on Gerd Hoffman's initial implementation.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Marc Marí <markmb@redhat.com>
|
|
|
9ae3a8 |
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
(cherry picked from commit c886fc4c20ff8456b2f788a1404dd321b8b59243)
|
|
|
9ae3a8 |
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/i386/pc.c | 6 +++---
|
|
|
9ae3a8 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
|
|
|
9ae3a8 |
index 29d6588..e2fd732 100644
|
|
|
9ae3a8 |
--- a/hw/i386/pc.c
|
|
|
9ae3a8 |
+++ b/hw/i386/pc.c
|
|
|
9ae3a8 |
@@ -600,7 +600,7 @@ static unsigned int pc_apic_id_limit(unsigned int max_cpus)
|
|
|
9ae3a8 |
return x86_cpu_apic_id_from_index(max_cpus - 1) + 1;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
-static FWCfgState *bochs_bios_init(void)
|
|
|
9ae3a8 |
+static FWCfgState *bochs_bios_init(AddressSpace *as)
|
|
|
9ae3a8 |
{
|
|
|
9ae3a8 |
FWCfgState *fw_cfg;
|
|
|
9ae3a8 |
uint8_t *smbios_table;
|
|
|
9ae3a8 |
@@ -609,7 +609,7 @@ static FWCfgState *bochs_bios_init(void)
|
|
|
9ae3a8 |
int i, j;
|
|
|
9ae3a8 |
unsigned int apic_id_limit = pc_apic_id_limit(max_cpus);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- fw_cfg = fw_cfg_init(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 1, 0, 0);
|
|
|
9ae3a8 |
+ fw_cfg = fw_cfg_init_io_dma(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 4, as);
|
|
|
9ae3a8 |
/* FW_CFG_MAX_CPUS is a bit confusing/problematic on x86:
|
|
|
9ae3a8 |
*
|
|
|
9ae3a8 |
* SeaBIOS needs FW_CFG_MAX_CPUS for CPU hotplug, but the CPU hotplug
|
|
|
9ae3a8 |
@@ -1172,7 +1172,7 @@ FWCfgState *pc_memory_init(MemoryRegion *system_memory,
|
|
|
9ae3a8 |
option_rom_mr,
|
|
|
9ae3a8 |
1);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- fw_cfg = bochs_bios_init();
|
|
|
9ae3a8 |
+ fw_cfg = bochs_bios_init(&address_space_memory);
|
|
|
9ae3a8 |
rom_set_fw(fw_cfg);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
if (linux_boot) {
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|