From 5e968c689b0e8819ee0e4bc8958b0963fdb18439 Mon Sep 17 00:00:00 2001 From: Jason Downs Date: Thu, 30 Sep 1999 06:29:58 +0000 Subject: Change extmem counter to include *all* extended memory segments. Obviously, the kernel does not (and can not) know where the ACPI and such pages are, since the boot -> kernel API does not support passing the information. This will stomp on them, once again, but we can NOT limit half the PCs in existance to only 64MB of RAM. Approved by deraadt. --- sys/arch/i386/stand/libsa/memprobe.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/arch/i386/stand/libsa/memprobe.c b/sys/arch/i386/stand/libsa/memprobe.c index 287ebba51a8..6c00ef0f519 100644 --- a/sys/arch/i386/stand/libsa/memprobe.c +++ b/sys/arch/i386/stand/libsa/memprobe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: memprobe.c,v 1.32 1999/08/25 00:54:19 mickey Exp $ */ +/* $OpenBSD: memprobe.c,v 1.33 1999/09/30 06:29:57 downsj Exp $ */ /* * Copyright (c) 1997-1999 Michael Shalayeff @@ -291,6 +291,7 @@ memprobe() #else printf(" mem["); #endif + if(!(pm = bios_E820(bios_memmap))) { im = bios_int12(bios_memmap); #if 0 @@ -322,7 +323,7 @@ memprobe() /* XXX - Compatibility, remove later (smpprobe() relies on it) */ extmem = cnvmem = 0; for(im = bios_memmap; im->type != BIOS_MAP_END; im++) { - /* Count only "good" memory chunks 4K and up in size */ + /* Count only "good" memory chunks 12K and up in size */ if ((im->type == BIOS_MAP_FREE) && (im->size >= 12*1024)) { if (im->size > 1024 * 1024) printf("%uM ", (u_int)im->size / (1024 * 1024)); @@ -341,8 +342,8 @@ memprobe() */ if(im->addr < IOM_BEGIN) cnvmem = max(cnvmem, im->addr + im->size); - if(im->addr == IOM_END) - extmem = im->size; + if(im->addr >= IOM_END) + extmem += im->size; } } cnvmem /= 1024; -- cgit v1.2.3