Add an EXTMEM_SIZE option to set the size of extended memory on systems

that lie about it.  Deals with PRs #1319 and #1831.
This commit is contained in:
thorpej 1996-03-05 01:28:51 +00:00
parent 0b9cc167a8
commit b65bdb63d6
1 changed files with 9 additions and 1 deletions

View File

@ -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);