From: Zhao Liu <[email protected]> Now all calls of x86 machines to fw_cfg_init_io_dma() pass DMA arguments, so the FWCfgState (FWCfgIoState) created by x86 machines enables DMA by default.
Then 'linuxboot.bin' isn't used anymore, and it will be removed in the next commit. Signed-off-by: Zhao Liu <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- hw/i386/fw_cfg.c | 1 + hw/i386/x86-common.c | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index bf38338fb47..528862d2e33 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -226,6 +226,7 @@ void fw_cfg_add_acpi_dsdt(Aml *scope, FWCfgState *fw_cfg) * of the i/o region used is FW_CFG_CTL_SIZE; And the DMA control * register is located at FW_CFG_DMA_IO_BASE + 4 */ + assert(fw_cfg_dma_enabled(fw_cfg)); io_size = ROUND_UP(FW_CFG_CTL_SIZE, 4) + sizeof(dma_addr_t); aml_append(dev, aml_name_decl("_HID", aml_string("QEMU0002"))); diff --git a/hw/i386/x86-common.c b/hw/i386/x86-common.c index 1ee55382dab..e8dc4d903bd 100644 --- a/hw/i386/x86-common.c +++ b/hw/i386/x86-common.c @@ -1002,10 +1002,8 @@ void x86_load_linux(X86MachineState *x86ms, } option_rom[nb_option_roms].bootindex = 0; - option_rom[nb_option_roms].name = "linuxboot.bin"; - if (fw_cfg_dma_enabled(fw_cfg)) { - option_rom[nb_option_roms].name = "linuxboot_dma.bin"; - } + assert(fw_cfg_dma_enabled(fw_cfg)); + option_rom[nb_option_roms].name = "linuxboot_dma.bin"; nb_option_roms++; } -- 2.51.0
