This patch series updates the SeaBIOS' low-memory allocation scheme so that it no longer uses the EBDA or the 9-segment for internal low memory allocations. Instead, the e-segment is used where SeaBIOS requires read/writable "low" memory.
There is now plenty of space in the e-segment (there has been ever since SeaBIOS was updated to relocate its initialization code), while using 9-segment space can reserve the memory from OS use (in particular on older operating systems). Also, using the 9-segment (and indirectly the EBDA) is more fragile as it requires handling of a relocatable EBDA.
As a result of this change, SeaBIOS will be able to allocate larger amounts of low-memory. Indeed, the size of the "extra stack" for 16bit code is increased from 512 bytes to 2K in this series.
-Kevin
Kevin O'Connor (8): Use the e-segment instead of the 9-segment for bios "low mem". Add mechanism to declare variables as "low mem" and use for extra stack. Convert timer code EBDA variables to VARLOW variables. Convert boot code EBDA variables to VARLOW variables. Convert ps2 code EBDA variables to VARLOW variables. Convert USB keyboard code EBDA variables to VARLOW variables. Convert disk code EBDA variables to VARLOW variables. EBDA cleanups.
src/acpi.c | 2 +- src/ahci.c | 2 +- src/asm-offsets.c | 8 ---- src/ata.c | 6 +-- src/biosvar.h | 80 +---------------------------------- src/block.c | 5 +- src/blockcmd.h | 2 + src/boot.c | 19 ++++----- src/bootsplash.c | 1 - src/cdrom.c | 80 ++++++++++++++++++------------------ src/clock.c | 32 ++++++++------- src/config.h | 2 + src/coreboot.c | 3 +- src/disk.c | 73 ++++++++++++++------------------ src/disk.h | 38 ++++++++++++++++- src/memmap.c | 2 +- src/mouse.c | 31 +++++++------- src/mtrr.c | 2 +- src/optionroms.c | 14 +----- src/pcibios.c | 2 +- src/pciinit.c | 3 +- src/pirtable.c | 2 +- src/pmm.c | 116 ++++++++++++---------------------------------------- src/post.c | 50 ++++++++++++++++------ src/ps2port.c | 18 ++++---- src/romlayout.S | 9 ++-- src/shadow.c | 4 +- src/smbios.c | 1 - src/stacks.c | 15 ++++--- src/types.h | 4 ++ src/usb-hid.c | 17 ++++++- src/util.h | 3 +- src/xen.h | 3 +- tools/layoutrom.py | 81 ++++++++++++++++++++++++------------ 34 files changed, 337 insertions(+), 393 deletions(-)