Some old DOS programs can also use f-segment space as Upper Memory Blocks (UMB), so also report on what space is available in debug messages.
Signed-off-by: Kevin O'Connor kevin@koconnor.net --- src/pmm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/pmm.c b/src/pmm.c index b003dd1..d1986c2 100644 --- a/src/pmm.c +++ b/src/pmm.c @@ -324,11 +324,12 @@ malloc_prepboot(void) int size = (BUILD_BIOS_ADDR - base) / 512; dummyrom->size = (size > 255) ? 255 : size; 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); + dprintf(1, "Space available for UMB: %x-%x, %x-%x\n" + , RomEnd, base, (u32)info->dataend, (u32)info->allocend);
// Give back unused high ram. info = findLast(&ZoneHigh);
On Mon, 2013-02-18 at 10:34 -0500, Kevin O'Connor wrote:
Some old DOS programs can also use f-segment space as Upper Memory Blocks (UMB), so also report on what space is available in debug messages.
Should we mark it as available in E820 too?
On Tue, Feb 19, 2013 at 09:16:30AM +0000, David Woodhouse wrote:
On Mon, 2013-02-18 at 10:34 -0500, Kevin O'Connor wrote:
Some old DOS programs can also use f-segment space as Upper Memory Blocks (UMB), so also report on what space is available in debug messages.
Should we mark it as available in E820 too?
The f-segment is typically made read-only, so it's not memory an OS can really use. (As I understand it, the old DOS programs that use UMB could detect empty space in the f-segment and use the 386 paging system to map high-memory in its place.)
In any case, my experience has been that the first 1 megabyte of the e820 is "magic": 0-0x9fc00 = RAM, 0x9fc00=0xa0000 = RESERVED, 0xa0000-0xf0000 = hole, 0xf0000-0x100000 = RESERVED. It's possible to tweak the ranges a little (eg, 0xe0000-0x100000 = RESERVED), but fundamental changes (even if more correct) have a good chance of breaking programs.
-Kevin