opengnsys_ipxe/src
Michael Brown cc40fcbf8b [romprefix] Avoid using PMM-allocated memory in UNDI loader entry point
The UNDI loader entry point is very likely to be called after POST,
when there is a high chance that the PMM-allocated image source area
and decompression area have been reused by something else.

In particular, using an iPXE .iso to test a separate iPXE ROM's UNDI
loader entry point in a qemu VM is likely to crash.  SeaBIOS allocates
PMM blocks from close to the top of memory and so these blocks have a
high chance of colliding with the runtime addresses subsequently
chosen by the non-ROM iPXE by scanning the INT 15,e820 memory map.

The standard romprefix.S has no choice about relying on the
PMM-allocated image source area, since it has no other way to retrieve
its compressed payload.

In mromprefix.S, the image source area functions only as an optional
buffer used to avoid repeated reads from the (potentially slow)
expansion ROM BAR by the decompression code.  We can therefore always
set %esi=0 when calling install_prealloc from the UNDI loader entry
point, and simply fall back to reading directly from the expansion ROM
BAR.

We can always set %edi=0 when calling install_prealloc from the UNDI
loader entry point.  This will behave as though the decompression area
PMM allocation failed, and will therefore use INT 15,88 to find a
temporary decompression area somewhere close to 64MB.  This is by no
means guaranteed to be safe from collisions, but it's probably safer
on balance than the PMM-allocated address.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-12-05 15:21:45 +00:00
..
arch [romprefix] Avoid using PMM-allocated memory in UNDI loader entry point 2016-12-05 15:21:45 +00:00
bin Rename .cvsignore files to .gitignore 2007-06-09 22:57:00 +01:00
config [efi] Add basic EFI SAN booting capability 2016-11-16 23:03:37 +00:00
core [interface] Provide intf_reinit() to reinitialise nullified interfaces 2016-11-16 22:22:13 +00:00
crypto [crypto] Mark permanent certificates as permanent 2016-08-31 17:23:42 +01:00
doc [build] Rename gPXE to iPXE 2010-04-19 23:43:39 +01:00
drivers [intel] Remove duplicate intelvf_mbox_queues() function 2016-07-14 13:51:07 +01:00
hci [cmdline] Add certificate management commands 2016-08-31 17:11:14 +01:00
image [crypto] Add PEM image format 2016-07-29 01:13:27 +01:00
include [efi] Add basic EFI SAN booting capability 2016-11-16 23:03:37 +00:00
interface [efi] Add basic EFI SAN booting capability 2016-11-16 23:03:37 +00:00
libgcc [libgcc] Provide __divmoddi4() 2016-05-05 23:42:57 +01:00
net [iscsi] Avoid potential infinite loops during shutdown 2016-11-16 23:03:37 +00:00
scripts [efi] Centralise architecture-independent EFI Makefile and linker script 2016-03-12 21:47:13 +00:00
tests [list] Add list_next_entry() and list_prev_entry() 2016-08-31 15:06:36 +01:00
usr [crypto] Add certstat() to display basic certificate information 2016-08-31 15:41:15 +01:00
util [build] Remove nested "my" declaration 2016-06-03 18:09:54 +01:00
.gitignore [build] Add support for local configuration files 2010-03-26 19:07:22 +00:00
Makefile [build] Remove unnecessary dependency on zlib 2016-05-02 23:09:49 +01:00
Makefile.efi [efi] Centralise architecture-independent EFI Makefile and linker script 2016-03-12 21:47:13 +00:00
Makefile.housekeeping [profile] Allow profiling to be globally enabled or disabled 2016-07-05 13:49:51 +01:00
doxygen.cfg [build] Remove PACKED macro 2010-05-29 23:49:47 +01:00