summaryrefslogtreecommitdiff
path: root/hw/i386
diff options
context:
space:
mode:
authorMarc MarĂ­ <markmb@redhat.com>2016-05-23 19:11:33 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2016-07-14 15:50:52 +0200
commitb2a575a1c652904600869e774e45bf4c9ed72c55 (patch)
tree8e513030be9a11c9bc6d971812a01d2e8d1725ef /hw/i386
parenta91a4e7d8cfe6ece610aacf7c52738188f5b5cb5 (diff)
downloadqemu-b2a575a1c652904600869e774e45bf4c9ed72c55.tar.gz
qemu-b2a575a1c652904600869e774e45bf4c9ed72c55.tar.bz2
qemu-b2a575a1c652904600869e774e45bf4c9ed72c55.zip
Add optionrom compatible with fw_cfg DMA version
This optionrom is based on linuxboot.S. Signed-off-by: Marc MarĂ­ <markmb@redhat.com> Signed-off-by: Richard W.M. Jones <rjones@redhat.com> Message-Id: <1464027093-24073-2-git-send-email-rjones@redhat.com> [Add -fno-toplevel-reorder, support clang without -m16. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/i386')
-rw-r--r--hw/i386/pc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index f56e225a99..1b8baa8fee 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);
}