mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-25 11:15:34 +00:00
Allow MAXMEM to be larger than the detected physical memory. This change
was supposed to have already been made, but got botched somewhere. Don't clobber the last page of memory (where the message buffer is). Some BIOS don't gratuitously wipe it out on reboot.
This commit is contained in:
parent
7c85e00e1c
commit
288c2640aa
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=4517
|
@ -35,7 +35,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.91 1994/11/14 14:23:54 bde Exp $
|
||||
* $Id: machdep.c,v 1.92 1994/11/15 14:12:55 bde Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
|
@ -1307,8 +1307,7 @@ init386(first)
|
|||
Maxmem = pagesinext + 0x100000/PAGE_SIZE;
|
||||
|
||||
#ifdef MAXMEM
|
||||
if (MAXMEM/4 < Maxmem)
|
||||
Maxmem = MAXMEM/4;
|
||||
Maxmem = MAXMEM/4;
|
||||
#endif
|
||||
/*
|
||||
* Calculate number of physical pages, but account for Maxmem
|
||||
|
@ -1326,7 +1325,7 @@ init386(first)
|
|||
*/
|
||||
printf("Testing memory (%dMB)...", ptoa(Maxmem)/1024/1024);
|
||||
|
||||
for (target_page = Maxmem - 1; target_page >= atop(first); target_page--) {
|
||||
for (target_page = Maxmem - 2; target_page >= atop(first); target_page--) {
|
||||
|
||||
/*
|
||||
* map page into kernel: valid, read/write, non-cacheable
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.91 1994/11/14 14:23:54 bde Exp $
|
||||
* $Id: machdep.c,v 1.92 1994/11/15 14:12:55 bde Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
|
@ -1307,8 +1307,7 @@ init386(first)
|
|||
Maxmem = pagesinext + 0x100000/PAGE_SIZE;
|
||||
|
||||
#ifdef MAXMEM
|
||||
if (MAXMEM/4 < Maxmem)
|
||||
Maxmem = MAXMEM/4;
|
||||
Maxmem = MAXMEM/4;
|
||||
#endif
|
||||
/*
|
||||
* Calculate number of physical pages, but account for Maxmem
|
||||
|
@ -1326,7 +1325,7 @@ init386(first)
|
|||
*/
|
||||
printf("Testing memory (%dMB)...", ptoa(Maxmem)/1024/1024);
|
||||
|
||||
for (target_page = Maxmem - 1; target_page >= atop(first); target_page--) {
|
||||
for (target_page = Maxmem - 2; target_page >= atop(first); target_page--) {
|
||||
|
||||
/*
|
||||
* map page into kernel: valid, read/write, non-cacheable
|
||||
|
|
Loading…
Reference in a new issue