Skip to content

Commit 4d22a46

Browse files
committed
bios: Make sure PVH still works with "rom" feature
Without this change, QEMU/CloudHV will attempt to load the ROM into the memory region below 4GiB. But something (i.e. SeaBIOS) is already there. We just pick an arbitrary address. It doesn't actually matter where it gets loaded, as the ROM code isn't used when doing PVH boot. Signed-off-by: Joe Richey <joerichey@google.com>
1 parent 9c62748 commit 4d22a46

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

layout.ld

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ PHDRS
44
{
55
ram PT_LOAD FILEHDR PHDRS ;
66
note PT_NOTE ;
7-
rom PT_LOAD ;
7+
/* We set the PhysAddr to an arbitrary RAM address, so that the ROM will still
8+
boot with PVH. Without this, this PHDR conflicts with QEMU's SeaBIOS. */
9+
rom PT_LOAD AT(ram_max) ;
810
}
911

1012
/* Loaders like to put stuff in low memory (< 1M), so we don't use it. */

0 commit comments

Comments
 (0)