]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[lkrnprefix] Allow relocation when no initrd is present
authorMichael Brown <mcb30@ipxe.org>
Fri, 15 Mar 2013 15:22:57 +0000 (15:22 +0000)
committerMichael Brown <mcb30@ipxe.org>
Fri, 15 Mar 2013 15:34:50 +0000 (15:34 +0000)
commit747e9eb6f39c4e755b5f3ed0cbc82e1d04b0124a
tree0ab788cf1a18e7bf25817a45819fbe62b54b3608
parente63f6c9241394eca5bfbc962704c19dff1448e37
[lkrnprefix] Allow relocation when no initrd is present

Commit 2629b7e ("[pcbios] Inhibit all calls to INT 15,e820 and INT
15,e801 during POST") introduced a regression into .lkrn images when
used with no corresponding initrd.

Specifically, the semantics of the "maximum address for relocation"
value passed to install_prealloc() in %ebp changed so that zero became
a special value meaning "inhibit use of INT 15,e820 and INT 15,e801".
The %ebp value meaing "no upper limit on relocation" was changed from
zero to 0xffffffff, and all prefixes providing fixed values for %ebp
were updated to match the new semantics.

The .lkrn prefix provides the initrd base address as the maximum
address for relocation.  When no initrd is present, this address will
be zero, and so will unintentionally trigger the "inhibit INT 15,e820
and INT 15,e801" behaviour.

Fix by explicitly setting %ebp to 0xffffffff if no initrd is present
before calling install_prealloc().

Reported-by: Ján ONDREJ (SAL) <ondrejj@salstar.sk>
Tested-by: Ján ONDREJ (SAL) <ondrejj@salstar.sk>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/i386/prefix/lkrnprefix.S