aboutsummaryrefslogtreecommitdiff
path: root/hw/i386
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-07-14 16:49:18 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-07-14 16:49:18 +0100
commit1c8e93fb41c1ee37853ff7b85ebe1218a4a43780 (patch)
treee1c580d9178fc918dc360ab8469e793333e53fde /hw/i386
parent22e28174ae423629e57b0d03f4bbf2d1bedcd58f (diff)
parentb2a575a1c652904600869e774e45bf4c9ed72c55 (diff)
downloadqemu-1c8e93fb41c1ee37853ff7b85ebe1218a4a43780.zip
qemu-1c8e93fb41c1ee37853ff7b85ebe1218a4a43780.tar.gz
qemu-1c8e93fb41c1ee37853ff7b85ebe1218a4a43780.tar.bz2
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream-fwcfg' into staging
* Updated fw_cfg option ROM to include DMA support # gpg: Signature made Thu 14 Jul 2016 14:51:06 BST # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream-fwcfg: Add optionrom compatible with fw_cfg DMA version Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
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 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);
}