diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2013-01-21 11:38:49 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2013-02-07 21:37:06 -0500 |
commit | 6ca0460fbb8ecfa5d42c8928b7ee71f20d0cffdb (patch) | |
tree | c8f95a05f44a7b70950d97bbf704c5a88ceec8d1 /src/pmm.c | |
parent | 8ed2e535edf731e6acfb444dbe5c4a917cf5fa8f (diff) | |
download | qemu-seabios-6ca0460fbb8ecfa5d42c8928b7ee71f20d0cffdb.tar.gz |
POST: Reorganize post entry and "preinit" functions.
Unlocking ram in handle_post() is tricky and only needed under qemu.
Separate out that logic from the coreboot/xen paths by invoking
handle_elf_post separately. This simplifies both the qemu and
non-qemu code paths.
Also, organize all the "pre-init" functions into one section of the
file.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/pmm.c')
-rw-r--r-- | src/pmm.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -222,6 +222,14 @@ malloc_preinit(void) ASSERT32FLAT(); dprintf(3, "malloc setup\n"); + dprintf(1, "Ram Size=0x%08x (0x%016llx high)\n", RamSize, RamSizeOver4G); + + // Don't declare any memory between 0xa0000 and 0x100000 + add_e820(BUILD_LOWRAM_END, BUILD_BIOS_ADDR-BUILD_LOWRAM_END, E820_HOLE); + + // Mark known areas as reserved. + add_e820(BUILD_BIOS_ADDR, BUILD_BIOS_SIZE, E820_RESERVED); + // Populate temp high ram u32 highram = 0; int i; |