From b65bdb63d6eedfb2b4bcaf67abadf678a188b63a Mon Sep 17 00:00:00 2001 From: thorpej Date: Tue, 5 Mar 1996 01:28:51 +0000 Subject: [PATCH] Add an EXTMEM_SIZE option to set the size of extended memory on systems that lie about it. Deals with PRs #1319 and #1831. --- sys/arch/i386/i386/machdep.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 930b1d14b72e..df27d850be18 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.191 1996/03/01 21:49:49 scottr Exp $ */ +/* $NetBSD: machdep.c,v 1.192 1996/03/05 01:28:51 thorpej Exp $ */ /*- * Copyright (c) 1993, 1994, 1995 Charles M. Hannum. All rights reserved. @@ -1102,11 +1102,19 @@ init386(first_avail) /* * Use BIOS values stored in RTC CMOS RAM, since probing * breaks certain 386 AT relics. + * + * XXX Not only does probing break certain 386 AT relics, but + * not all BIOSes (Dell, Compaq, others) report the correct + * amount of extended memory. */ biosbasemem = (mc146818_read(NULL, NVRAM_BASEHI) << 8) | mc146818_read(NULL, NVRAM_BASELO); +#ifdef EXTMEM_SIZE + biosextmem = EXTMEM_SIZE; +#else biosextmem = (mc146818_read(NULL, NVRAM_EXTHI) << 8) | mc146818_read(NULL, NVRAM_EXTLO); +#endif /* EXTMEM_SIZE */ /* Round down to whole pages. */ biosbasemem &= -(NBPG / 1024);