diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2012-05-12 23:49:33 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2012-05-13 23:13:54 -0400 |
commit | 9c98517c938d20c38f537d516c71b30bb60c3ea0 (patch) | |
tree | 16832e16880eda2b11985818bd399693df29ac24 /src/optionroms.c | |
parent | b8fcf46826e77c835da0ad8127a17895bb2e2fca (diff) | |
download | seabios-9c98517c938d20c38f537d516c71b30bb60c3ea0.tar.gz |
Use the e-segment instead of the 9-segment for bios "low mem".
Use the e-segment for ZoneLow allocations. There is plenty of
e-segment space (there has been since SeaBIOS supported code
relocation), while using the 9-segment space can impact old real-mode
applications.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/optionroms.c')
-rw-r--r-- | src/optionroms.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/optionroms.c b/src/optionroms.c index 06db1c1b..5ce8af8e 100644 --- a/src/optionroms.c +++ b/src/optionroms.c @@ -16,12 +16,10 @@ #include "paravirt.h" // qemu_cfg_* #include "optionroms.h" // struct rom_header -/**************************************************************** - * Definitions - ****************************************************************/ - // The end of the last deployed rom. u32 RomEnd = BUILD_ROM_START; +// The maximum memory location a rom may extend to. +u32 RomTop; /**************************************************************** @@ -120,15 +118,9 @@ get_pci_rom(struct rom_header *rom) return pd; } -// Return start of code in 0xc0000-0xf0000 space. -static inline u32 _max_rom(void) { - extern u8 code32flat_start[], code32init_end[]; - return CONFIG_RELOCATE_INIT ? (u32)code32init_end : (u32)code32flat_start; -} // Return the memory position up to which roms may be located. static inline u32 max_rom(void) { - u32 end = _max_rom(); - return end > BUILD_BIOS_ADDR ? BUILD_BIOS_ADDR : end; + return RomTop; } // Copy a rom to its permanent location below 1MiB |