summaryrefslogtreecommitdiffstats
path: root/hw/i386/multiboot.c
diff options
context:
space:
mode:
authorRichard Henderson2021-11-03 18:07:30 +0100
committerRichard Henderson2021-11-03 18:07:30 +0100
commitb1fd92137e4d485adeec8e9f292f928ff335b76c (patch)
treea313d04130309d9898fc07698096724c4b316386 /hw/i386/multiboot.c
parentMerge remote-tracking branch 'remotes/vivier/tags/trivial-branch-for-6.2-pull... (diff)
parentconfigure: fix --audio-drv-list help message (diff)
downloadqemu-b1fd92137e4d485adeec8e9f292f928ff335b76c.tar.gz
qemu-b1fd92137e4d485adeec8e9f292f928ff335b76c.tar.xz
qemu-b1fd92137e4d485adeec8e9f292f928ff335b76c.zip
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* Build system fixes and cleanups * DMA support in the multiboot option ROM * Rename default-bus-bypass-iommu * Deprecate -watchdog and cleanup -watchdog-action * HVF fix for <PAGE_SIZE regions * Support TSC scaling for AMD nested virtualization * Fix for ESP fuzzing bug # gpg: Signature made Tue 02 Nov 2021 10:57:37 AM EDT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] * remotes/bonzini/tags/for-upstream: (27 commits) configure: fix --audio-drv-list help message configure: Remove the check for the __thread keyword Move the l2tpv3 test from configure to meson.build meson: remove unnecessary coreaudio test program meson: remove pointless warnings meson.build: Allow to disable OSS again meson: bump submodule to 0.59.3 qtest/am53c974-test: add test for cancelling in-flight requests esp: ensure in-flight SCSI requests are always cancelled KVM: SVM: add migration support for nested TSC scaling hw/i386: fix vmmouse registration watchdog: remove select_watchdog_action vl: deprecate -watchdog watchdog: add information from -watchdog help to -device help hw/i386: Rename default_bus_bypass_iommu hvf: Avoid mapping regions < PAGE_SIZE as ram configure: do not duplicate CPU_CFLAGS into QEMU_LDFLAGS configure: remove useless NPTL probe target/i386: use DMA-enabled multiboot ROM for new-enough QEMU machine types optionrom: add a DMA-enabled multiboot ROM ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw/i386/multiboot.c')
-rw-r--r--hw/i386/multiboot.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c
index 9e7d69d470..0a10089f14 100644
--- a/hw/i386/multiboot.c
+++ b/hw/i386/multiboot.c
@@ -143,7 +143,8 @@ static void mb_add_mod(MultibootState *s,
s->mb_mods_count++;
}
-int load_multiboot(FWCfgState *fw_cfg,
+int load_multiboot(X86MachineState *x86ms,
+ FWCfgState *fw_cfg,
FILE *f,
const char *kernel_filename,
const char *initrd_filename,
@@ -151,6 +152,7 @@ int load_multiboot(FWCfgState *fw_cfg,
int kernel_file_size,
uint8_t *header)
{
+ bool multiboot_dma_enabled = X86_MACHINE_GET_CLASS(x86ms)->fwcfg_dma_enabled;
int i, is_multiboot = 0;
uint32_t flags = 0;
uint32_t mh_entry_addr;
@@ -401,7 +403,11 @@ int load_multiboot(FWCfgState *fw_cfg,
fw_cfg_add_bytes(fw_cfg, FW_CFG_INITRD_DATA, mb_bootinfo_data,
sizeof(bootinfo));
- option_rom[nb_option_roms].name = "multiboot.bin";
+ if (multiboot_dma_enabled) {
+ option_rom[nb_option_roms].name = "multiboot_dma.bin";
+ } else {
+ option_rom[nb_option_roms].name = "multiboot.bin";
+ }
option_rom[nb_option_roms].bootindex = 0;
nb_option_roms++;