OSDN Git Service

optionrom: add new PVH option rom
authorStefano Garzarella <sgarzare@redhat.com>
Fri, 18 Jan 2019 12:01:41 +0000 (13:01 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 5 Feb 2019 15:50:17 +0000 (16:50 +0100)
commit2785dc7b1786a833ca5ad6d8d39d64eb82e2cddc
tree0eb715dd8a0ba1312d325fc7ea7ba3351d49fcaf
parent6dfa01437bea02b2e5ae14f9e163e55610ead6fe
optionrom: add new PVH option rom

The new pvh.bin option rom can be used with SeaBIOS to boot
uncompressed kernel using the x86/HVM direct boot ABI.

pvh.S contains the entry point of the option rom. It runs
in real mode, loads the e820 table querying the BIOS, and
then it switches to 32bit protected mode and jumps to the
pvh_load_kernel() written in pvh_main.c.
pvh_load_kernel() loads the cmdline and kernel entry_point
using fw_cfg, then it looks for RSDP, fills the
hvm_start_info required by x86/HVM ABI, and finally jumps
to the kernel entry_point.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
.gitignore
Makefile
pc-bios/optionrom/Makefile
pc-bios/optionrom/pvh.S [new file with mode: 0644]
pc-bios/optionrom/pvh_main.c [new file with mode: 0644]
pc-bios/pvh.bin [new file with mode: 0644]