Allow MAXMEM kernel option to indicate more memory than is detected; it

previously could only be used to limit the amount of memory.
This commit is contained in:
David Greenman 1994-10-25 08:58:33 +00:00
parent 669a646390
commit 03ed612f0e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3846
2 changed files with 6 additions and 8 deletions

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.78 1994/10/20 00:07:49 phk Exp $ * $Id: machdep.c,v 1.79 1994/10/25 08:34:50 davidg Exp $
*/ */
#include "npx.h" #include "npx.h"
@ -1312,10 +1312,9 @@ init386(first)
#endif #endif
/* /*
* Calculate number of physical pages, but account for Maxmem * Calculate number of physical pages, but account for Maxmem
* limitation above. * adjustment above.
*/ */
physmem = pagesinbase + physmem = pagesinbase + Maxmem - 0x100000/PAGE_SIZE;
(min(pagesinext + 0x100000/PAGE_SIZE, Maxmem) - 0x100000/PAGE_SIZE);
/* call pmap initialization to make new kernel address space */ /* call pmap initialization to make new kernel address space */
pmap_bootstrap (first, 0); pmap_bootstrap (first, 0);

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.78 1994/10/20 00:07:49 phk Exp $ * $Id: machdep.c,v 1.79 1994/10/25 08:34:50 davidg Exp $
*/ */
#include "npx.h" #include "npx.h"
@ -1312,10 +1312,9 @@ init386(first)
#endif #endif
/* /*
* Calculate number of physical pages, but account for Maxmem * Calculate number of physical pages, but account for Maxmem
* limitation above. * adjustment above.
*/ */
physmem = pagesinbase + physmem = pagesinbase + Maxmem - 0x100000/PAGE_SIZE;
(min(pagesinext + 0x100000/PAGE_SIZE, Maxmem) - 0x100000/PAGE_SIZE);
/* call pmap initialization to make new kernel address space */ /* call pmap initialization to make new kernel address space */
pmap_bootstrap (first, 0); pmap_bootstrap (first, 0);