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.
  • Loading branch information
josephlr committed Apr 9, 2020
1 parent cae8fcc commit 99abf1d
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 99abf1d

Please sign in to comment.