Skip to content

Commit

Permalink
bios: Make sure PVH still works with "rom" feature
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
josephlr committed Apr 9, 2020
1 parent cdb0167 commit b2662fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion layout.ld
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ PHDRS
{
ram PT_LOAD FILEHDR PHDRS ;
note PT_NOTE ;
rom PT_LOAD ;
/* We set the PhysAddr to an arbitrary RAM address, so that the ROM will still
boot with PVH. Without this, this PHDR conflicts with QEMU's SeaBIOS. */
rom PT_LOAD AT(ram_max) ;
}

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

0 comments on commit b2662fa

Please sign in to comment.