From: Kevin O'Connor Date: Sat, 21 Jul 2012 15:56:09 +0000 (-0400) Subject: Minor - clear unused f-segment data at start of f-segment. X-Git-Tag: rel-1.7.1~13 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=65802ad7c72bd038144b0ea71c03f8a96d10b3ff;p=seabios.git Minor - clear unused f-segment data at start of f-segment. Zero the space - some old applications can use the space for UMB if it is zeroed. Signed-off-by: Kevin O'Connor --- diff --git a/src/pmm.c b/src/pmm.c index 1addb41..653c9e2 100644 --- a/src/pmm.c +++ b/src/pmm.c @@ -287,7 +287,6 @@ malloc_finalize(void) dprintf(3, "malloc finalize\n"); // Place an optionrom signature around used low mem area. - struct allocinfo_s *info = findLast(&ZoneLow); u32 base = rom_get_top(); struct rom_header *dummyrom = (void*)base; dummyrom->signature = OPTION_ROM_SIGNATURE; @@ -296,6 +295,10 @@ malloc_finalize(void) memset((void*)RomEnd, 0, base-RomEnd); dprintf(1, "Space available for UMB: %08x-%08x\n", RomEnd, base); + // Clear unused f-seg ram. + struct allocinfo_s *info = findLast(&ZoneFSeg); + memset(info->dataend, 0, info->allocend - info->dataend); + // Give back unused high ram. info = findLast(&ZoneHigh); if (info) {