diff options
author | Marcus Hähnel <marcus.haehnel@kernkonzept.com> | 2021-10-20 14:55:04 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-11-02 15:57:27 +0100 |
commit | 48972f8cad24eb4462c97ea68003e2dd35be0444 (patch) | |
tree | 6381678103fc9d67e5247006b31c218828a39eda /pc-bios/optionrom/multiboot.S | |
parent | f014c974595a1e3482c6afb57557a6e479b80328 (diff) | |
download | qemu-48972f8cad24eb4462c97ea68003e2dd35be0444.zip qemu-48972f8cad24eb4462c97ea68003e2dd35be0444.tar.gz qemu-48972f8cad24eb4462c97ea68003e2dd35be0444.tar.bz2 |
optionrom: add a DMA-enabled multiboot ROM
Add a new option rom for the multiboot loader, using DMA transfers to copy
data instead of "rep insb".
This significantly lowers QEMU's startup latency by a factor of about 40,
for example, going from 30sec to 0.8sec when loading modules of 120MB
in size.
Signed-off-by: Marcus Hähnel <marcus.haehnel@kernkonzept.com>
Signed-off-by: Adam Lackorzynski <adam@l4re.org>
[Modified to keep the non-DMA code depending on #ifdef USE_FW_CFG_DMA;
do not write below stack. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'pc-bios/optionrom/multiboot.S')
-rw-r--r-- | pc-bios/optionrom/multiboot.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pc-bios/optionrom/multiboot.S b/pc-bios/optionrom/multiboot.S index b7efe4d..181a4b0 100644 --- a/pc-bios/optionrom/multiboot.S +++ b/pc-bios/optionrom/multiboot.S @@ -68,7 +68,7 @@ run_multiboot: mov %eax, %es /* Read the bootinfo struct into RAM */ - read_fw_blob(FW_CFG_INITRD) + read_fw_blob_dma(FW_CFG_INITRD) /* FS = bootinfo_struct */ read_fw FW_CFG_INITRD_ADDR @@ -188,7 +188,7 @@ prot_mode: movl %eax, %gs /* Read the kernel and modules into RAM */ - read_fw_blob(FW_CFG_KERNEL) + read_fw_blob_dma(FW_CFG_KERNEL) /* Jump off to the kernel */ read_fw FW_CFG_KERNEL_ENTRY |