aboutsummaryrefslogtreecommitdiff
path: root/fw_cfg.c
AgeCommit message (Collapse)AuthorFilesLines
2022-09-19Place setup_data at location specified by hostHEADmasterJason A. Donenfeld1-5/+8
QEMU places setup_data at a particular location, which cannot be relocated due to it containing self references in absolute address terms. For this reason, it supplies the intended location in FW_CFG_SETUP_ADDR. That is what is used in the option ROMs provided by QEMU, use this too in qboot. This also has the effect of removing the 8k limit on the copied size, since the header is copied to the right location from the beginning. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Message-Id: <20220916133603.693135-1-Jason@zx2c4.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-04-23Fix initrd base address for PVH bootLorenz Brun1-1/+1
2019-07-24do not mix tabs and spaces in a single filePaolo Bonzini1-15/+15
2019-01-16pvh: load initrd from fw_cfgStefano Garzarella1-6/+17
If we found initrd through fw_cfg, we can load it and use the first module of hvm_start_info to pass initrd address and size to the kernel. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
2018-12-28pvh: add benchmark exit pointLiam Merwick1-0/+6
This commit adds a PVH specific VM exit point for use in benchmarking boot times using a QEMU specific device that terminates the QEMU process and thus the VM itself when handling those VM exits. Since the VM terminates right at those exit points, generic tools like time can be used to measure the time spent between the QEMU startup and termination moments. The QEMU device used for those measurement is called isa-debug-exit for the PC and Q35 machine types. These devices take 2 arguments: iobase and iosize. iobase specifies which IO port we need to write into to have these devices eventually handle the corresponding VM exit. If for example, QEMU is started with the following argument: -device isa-debug-exit,iobase=0xf4 then any IO write to 0xf4 will terminate the QEMU process and the corresponding VM. Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
2018-12-28pvh: use x86/HVM direct boot ABILiam Merwick1-1/+70
These changes (along with corresponding QEMU and Linux kernel changes) enable a guest to be booted using the x86/HVM direct boot ABI. QEMU parses the uncompressed kernel binary passed to it via -kernel to read the ELF Note which contains the address to be loaded. QEMU then depends on qboot to populate the start_info struct needed by the direct boot ABI and configure the guest e820 tables before jumping to the loaded kernel entry. Signed-off-by: George Kennedy <George.Kennedy@oracle.com> Signed-off-by: Liam Merwick <Liam.Merwick@oracle.com>
2018-10-24benchmark: Define exit points and valuesSamuel Ortiz1-1/+2
Benchmarking IO port addresses and return values are now defined through a dedicated header. Each exit point can have its own IO port address and return value. With this we are able to discriminate between similar code paths through the QEMU process return values or between different code paths by having the QEMU debugexit device monitoring different IO port addresses. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2016-09-06use DMA to read fw_cfg file namesPaolo Bonzini1-6/+23
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-09-06use fw_cfg DMA for fw_cfg_readPaolo Bonzini1-1/+10
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-09-06use fw_cfg DMA for fw_cfg_read_entryPaolo Bonzini1-0/+47
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-09-06use fw_cfg_read_entryPaolo Bonzini1-9/+5
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-05-30apply benchmarking hack to multiboot as wellPaolo Bonzini1-0/+7
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-05-25boot multiboot from fw_cfgPaolo Bonzini1-1/+52
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-05-25load ACPI tables from fw_cfgPaolo Bonzini1-0/+2
2015-05-21protect against no -kernelPaolo Bonzini1-0/+3
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-05-21malloc fw_cfg filesPaolo Bonzini1-4/+5
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-05-21parse vmlinuz inside firmwarePaolo Bonzini1-0/+45
This will make it possible to load the vmlinuz from CBFS. We need some contortions because QEMU splits the real mode and protected mode parts of vmlinuz in different fw_cfg files. The parsing code is lifted from QEMU. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-05-21initial fw_cfg supportPaolo Bonzini1-0/+50
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>