Look up the kernel environment for MAXMEM as a final override for the
memory size. If somebody wants to change the name, fine - I used this since it's consistant with the config variable it replaces. This is intended to replace the npx0 msize hack (which no longer works).
This commit is contained in:
parent
12d5777cd5
commit
bf0087145c
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.345 1999/06/28 15:34:54 luoqi Exp $
|
||||
* $Id: machdep.c,v 1.346 1999/07/01 18:27:15 peter Exp $
|
||||
*/
|
||||
|
||||
#include "apm.h"
|
||||
@ -1141,9 +1141,7 @@ getmemsize(int first)
|
||||
u_int64_t length;
|
||||
u_int32_t type;
|
||||
} *smap;
|
||||
#if NNPX > 0
|
||||
int msize;
|
||||
#endif
|
||||
|
||||
bzero(&vmf, sizeof(struct vm86frame));
|
||||
bzero(physmap, sizeof(physmap));
|
||||
@ -1354,6 +1352,14 @@ getmemsize(int first)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Allow final override from the kernel environment */
|
||||
if (getenv_int("MAXMEM", &msize)) {
|
||||
if (msize != 0) {
|
||||
Maxmem = msize / 4;
|
||||
speculative_mprobe = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SMP
|
||||
/* look for the MP hardware - needed for apic addresses */
|
||||
mp_probe();
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.345 1999/06/28 15:34:54 luoqi Exp $
|
||||
* $Id: machdep.c,v 1.346 1999/07/01 18:27:15 peter Exp $
|
||||
*/
|
||||
|
||||
#include "apm.h"
|
||||
@ -1141,9 +1141,7 @@ getmemsize(int first)
|
||||
u_int64_t length;
|
||||
u_int32_t type;
|
||||
} *smap;
|
||||
#if NNPX > 0
|
||||
int msize;
|
||||
#endif
|
||||
|
||||
bzero(&vmf, sizeof(struct vm86frame));
|
||||
bzero(physmap, sizeof(physmap));
|
||||
@ -1354,6 +1352,14 @@ getmemsize(int first)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Allow final override from the kernel environment */
|
||||
if (getenv_int("MAXMEM", &msize)) {
|
||||
if (msize != 0) {
|
||||
Maxmem = msize / 4;
|
||||
speculative_mprobe = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SMP
|
||||
/* look for the MP hardware - needed for apic addresses */
|
||||
mp_probe();
|
||||
|
Loading…
Reference in New Issue
Block a user