[romprefix] Inhibit the use of relocation during POST
authorMichael Brown <mcb30@ipxe.org>
Sun, 25 Apr 2010 00:37:25 +0000 (01:37 +0100)
committerStefan Hajnoczi <stefanha@gmail.com>
Wed, 7 Jul 2010 19:14:36 +0000 (20:14 +0100)
commit38b86f8b4f436c83455c0e582da9126f014100e7
tree71bbc330611dea360443f6fd92db65c06b952eea
parent443814a6dab09c06736339b1adb4316b54e183d6
[romprefix] Inhibit the use of relocation during POST

It is common for system memory maps to be grotesquely unreliable
during POST.  Many sanity checks have been added to the memory map
reading code, but these do not catch all problems.

Skip relocation entirely if called during POST.  This should avoid the
problems typically encountered, at the cost of slightly disrupting the
memory map of an operating system booted via gPXE when gPXE was
entered during POST.  Since this is a very rare special case (used,
for example, when reflashing an experimental ROM that would otherwise
prevent the system from completing POST), this is an acceptable cost.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
src/arch/i386/prefix/libprefix.S
src/arch/i386/prefix/romprefix.S
src/arch/i386/prefix/undiloader.S