From 785f1bce086b7f077788a19915f541148c113323 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 2 Jul 1999 04:33:05 +0000 Subject: Zap totally the npx0 memory size override. It only worked if statically specified in the kernel config file - but setting options MAXMEM works exactly the same. Userconfig overrides of this have not worked for ages. Also, change the getenv for the loader override to hw.physmem based on a prior suggestion from Mike Smith. I think he still wants to change this some, but this shouldn't get in his way. This is a forced setting of the memory size, not a "cap". We probably should have a plain 'maxmem' variable as well which does do a cap, without loosing the bios memory configuration data. --- sys/amd64/amd64/machdep.c | 16 ++-------------- sys/i386/i386/machdep.c | 16 ++-------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 8dfa360..5e563de 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.346 1999/07/01 18:27:15 peter Exp $ + * $Id: machdep.c,v 1.347 1999/07/01 18:33:22 peter Exp $ */ #include "apm.h" @@ -248,9 +248,6 @@ vm_offset_t phys_avail[10]; static vm_offset_t buffer_sva, buffer_eva; vm_offset_t clean_sva, clean_eva; static vm_offset_t pager_sva, pager_eva; -#if NNPX > 0 -extern struct isa_driver npxdriver; -#endif #define offsetof(type, member) ((size_t)(&((type *)0)->member)) @@ -1343,17 +1340,8 @@ physmap_done: speculative_mprobe = FALSE; #endif -#if NNPX > 0 - if (resource_int_value("npx", 0, "msize", &msize) == 0) { - if (msize != 0) { - Maxmem = msize / 4; - speculative_mprobe = FALSE; - } - } -#endif - /* Allow final override from the kernel environment */ - if (getenv_int("MAXMEM", &msize)) { + if (getenv_int("hw.physmem", &msize)) { if (msize != 0) { Maxmem = msize / 4; speculative_mprobe = FALSE; diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 8dfa360..5e563de 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.346 1999/07/01 18:27:15 peter Exp $ + * $Id: machdep.c,v 1.347 1999/07/01 18:33:22 peter Exp $ */ #include "apm.h" @@ -248,9 +248,6 @@ vm_offset_t phys_avail[10]; static vm_offset_t buffer_sva, buffer_eva; vm_offset_t clean_sva, clean_eva; static vm_offset_t pager_sva, pager_eva; -#if NNPX > 0 -extern struct isa_driver npxdriver; -#endif #define offsetof(type, member) ((size_t)(&((type *)0)->member)) @@ -1343,17 +1340,8 @@ physmap_done: speculative_mprobe = FALSE; #endif -#if NNPX > 0 - if (resource_int_value("npx", 0, "msize", &msize) == 0) { - if (msize != 0) { - Maxmem = msize / 4; - speculative_mprobe = FALSE; - } - } -#endif - /* Allow final override from the kernel environment */ - if (getenv_int("MAXMEM", &msize)) { + if (getenv_int("hw.physmem", &msize)) { if (msize != 0) { Maxmem = msize / 4; speculative_mprobe = FALSE; -- cgit v1.1