Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src/sys/arch Pull up following revision(s) (requested by tsut...



details:   https://anonhg.NetBSD.org/src/rev/d1706b068ffc
branches:  netbsd-6
changeset: 773839:d1706b068ffc
user:      riz <riz%NetBSD.org@localhost>
date:      Mon Feb 27 20:17:18 2012 +0000

description:
Pull up following revision(s) (requested by tsutsui in ticket #55):
        sys/arch/x68k/x68k/pmap_bootstrap.c: revision 1.59
        sys/arch/atari/atari/atari_init.c: revision 1.99
Use actual physmem size for allocation of bootstrap extra PT pages
to avoid wasting pages on low memory machines.
Improves atari specific part of PR/45915, tested on TT030.
Reserve more bootstrap kernel PT pages if options EXTENDED_MEMORY is defined
for VA allocation in the extended memory probe function and possible 128MB
memory on 060turbo, as worksaround for x68k specific part of PR/45915.
Fixes GENERIC kernel panic on X68030 even without extended memory.
XXX: we should rather have proper probe function before pmap_bootstrap()
Tested on 060turbo with 128MB SIMM by Y.Sugahara, and also
tested on XM6i with 68030 and custom 128MB memory settings by isaki@.
Should be pulled up to netbsd-6.

diffstat:

 sys/arch/atari/atari/atari_init.c   |   5 +++--
 sys/arch/x68k/x68k/pmap_bootstrap.c |  18 ++++++++++++++++--
 2 files changed, 19 insertions(+), 4 deletions(-)

diffs (67 lines):

diff -r e8ddae24eb58 -r d1706b068ffc sys/arch/atari/atari/atari_init.c
--- a/sys/arch/atari/atari/atari_init.c Mon Feb 27 20:15:33 2012 +0000
+++ b/sys/arch/atari/atari/atari_init.c Mon Feb 27 20:17:18 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atari_init.c,v 1.98 2012/02/10 04:49:44 mhitch Exp $   */
+/*     $NetBSD: atari_init.c,v 1.98.2.1 2012/02/27 20:17:19 riz Exp $  */
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.98 2012/02/10 04:49:44 mhitch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.98.2.1 2012/02/27 20:17:19 riz Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mbtype.h"
@@ -226,6 +226,7 @@
        st_pool_phys   = stphysize - st_pool_size;
        stphysize      = st_pool_phys;
 
+       physmem        = btoc(stphysize) + btoc(ttphysize);
        machineid      = id;
        esym           = esym_addr;
 
diff -r e8ddae24eb58 -r d1706b068ffc sys/arch/x68k/x68k/pmap_bootstrap.c
--- a/sys/arch/x68k/x68k/pmap_bootstrap.c       Mon Feb 27 20:15:33 2012 +0000
+++ b/sys/arch/x68k/x68k/pmap_bootstrap.c       Mon Feb 27 20:17:18 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap_bootstrap.c,v 1.58 2012/02/10 06:28:39 mhitch Exp $       */
+/*     $NetBSD: pmap_bootstrap.c,v 1.58.2.1 2012/02/27 20:17:18 riz Exp $      */
 
 /* 
  * Copyright (c) 1991, 1993
@@ -36,9 +36,10 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.58 2012/02/10 06:28:39 mhitch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.58.2.1 2012/02/27 20:17:18 riz Exp $");
 
 #include "opt_m68k_arch.h"
+#include "opt_extmem.h"
 
 #include <sys/param.h>
 #include <uvm/uvm_extern.h>
@@ -124,6 +125,19 @@
        kptpa = nextpa;
        nptpages = RELOC(Sysptsize, int) + howmany(RELOC(physmem, int), NPTEPG) +
                (IIOMAPSIZE + NPTEPG - 1) / NPTEPG;
+#ifdef EXTENDED_MEMORY
+       /*
+        * Current supported maximum EXTENDED_MEMORY is 128MB on 060turbo.
+        */
+#define MAX_EXTENDED_MEMORY    (128 * 1024 * 1024)
+       nptpages += howmany(btoc(MAX_EXTENDED_MEMORY), NPTEPG);
+
+       /*
+        * mem_exist() in machdep.c needs two extra VA pages before pmap_init()
+        * to probe >16MB memory.
+        */
+       nptpages += 1;
+#endif
        nextpa += nptpages * PAGE_SIZE;
 
        /*



Home | Main Index | Thread Index | Old Index