[pcbios] Prepare for multiple splits of hidden e820 memory regions

Define a list of N allowed memory regions, and split each underlying
e820 region into up to N subregions.  Strip resulting empty regions
out of the map, avoiding using the "return with CF set to strip last
empty region" trick, because it seems that bootmgr.exe in Win2k8 gets
upset if the memory map is terminated with CF set.

This is an intermediate checkin that defines a single allowed memory
region covering the entire 64-bit address space, and uses the existing
map-mangling code on top of the new region-splitting code.  This
sanitises the memory map to the point that Win2k8 is able to boot even
on a system that defines a final zero-length region at the 4GB mark.

I'm checking this in because it may be useful for future debugging
efforts to be able to run with the existing and known-working map
mangling code together with the map sanitisation capabilities of the
new map mangling code.
This commit is contained in:
Michael Brown
2008-08-18 01:01:45 +01:00
parent 23bca8f9d8
commit 9737095d49
2 changed files with 328 additions and 2 deletions

View File

@@ -82,6 +82,7 @@ SECTIONS {
__data16 = .;
*(.data16)
*(.data16.*)
*(SORT(.tbl.data16.*)) /* Various tables. See include/tables.h */
_edata16_progbits = .;
}
.bss16 : AT ( _data16_load_offset + __bss16 ) {