Skip to content

Commit

Permalink
Enable fw_cfg DMA interface for x86
Browse files Browse the repository at this point in the history
Enable the fw_cfg DMA interface for all the x86 platforms.

Based on Gerd Hoffman's initial implementation.

Signed-off-by: Marc Marí <markmb@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  • Loading branch information
Marc Marí authored and kraxel committed Oct 19, 2015
1 parent 0b341a8 commit c886fc4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions hw/i386/pc.c
Expand Up @@ -752,14 +752,15 @@ static void pc_build_smbios(FWCfgState *fw_cfg)
}
}

static FWCfgState *bochs_bios_init(void)
static FWCfgState *bochs_bios_init(AddressSpace *as)
{
FWCfgState *fw_cfg;
uint64_t *numa_fw_cfg;
int i, j;
unsigned int apic_id_limit = pc_apic_id_limit(max_cpus);

fw_cfg = fw_cfg_init_io(BIOS_CFG_IOPORT);
fw_cfg = fw_cfg_init_io_dma(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 4, as);

/* FW_CFG_MAX_CPUS is a bit confusing/problematic on x86:
*
* SeaBIOS needs FW_CFG_MAX_CPUS for CPU hotplug, but the CPU hotplug
Expand Down Expand Up @@ -1393,7 +1394,8 @@ FWCfgState *pc_memory_init(PCMachineState *pcms,
option_rom_mr,
1);

fw_cfg = bochs_bios_init();
fw_cfg = bochs_bios_init(&address_space_memory);

rom_set_fw(fw_cfg);

if (guest_info->has_reserved_memory && pcms->hotplug_memory.base) {
Expand Down

0 comments on commit c886fc4

Please sign in to comment.