diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/i386/pc.c | 10 | ||||
-rw-r--r-- | hw/nvram/fw_cfg.c | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index f56e225..1b8baa8 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -998,8 +998,13 @@ static void load_linux(PCMachineState *pcms, fw_cfg_add_i32(fw_cfg, FW_CFG_SETUP_SIZE, setup_size); fw_cfg_add_bytes(fw_cfg, FW_CFG_SETUP_DATA, setup, setup_size); - option_rom[nb_option_roms].name = "linuxboot.bin"; - option_rom[nb_option_roms].bootindex = 0; + if (fw_cfg_dma_enabled(fw_cfg)) { + option_rom[nb_option_roms].name = "linuxboot_dma.bin"; + option_rom[nb_option_roms].bootindex = 0; + } else { + option_rom[nb_option_roms].name = "linuxboot.bin"; + option_rom[nb_option_roms].bootindex = 0; + } nb_option_roms++; } @@ -1291,6 +1296,7 @@ void xen_load_linux(PCMachineState *pcms) load_linux(pcms, fw_cfg); for (i = 0; i < nb_option_roms; i++) { assert(!strcmp(option_rom[i].name, "linuxboot.bin") || + !strcmp(option_rom[i].name, "linuxboot_dma.bin") || !strcmp(option_rom[i].name, "multiboot.bin")); rom_add_option(option_rom[i].name, option_rom[i].bootindex); } diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index 74a0079..2873030 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -552,7 +552,7 @@ static bool is_version_1(void *opaque, int version_id) return version_id == 1; } -static bool fw_cfg_dma_enabled(void *opaque) +bool fw_cfg_dma_enabled(void *opaque) { FWCfgState *s = opaque; |