Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/pmax/pmax Back out the change of the way to grab pr...



details:   https://anonhg.NetBSD.org/src/rev/8f7a1a2fddce
branches:  trunk
changeset: 499702:8f7a1a2fddce
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Mon Nov 27 08:57:08 2000 +0000

description:
Back out the change of the way to grab proc0's USPACE. It produces
kernel lock up in mach_init() by a reason unknown to me.

diffstat:

 sys/arch/pmax/pmax/machdep.c |  25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diffs (53 lines):

diff -r b9bf7e9d8526 -r 8f7a1a2fddce sys/arch/pmax/pmax/machdep.c
--- a/sys/arch/pmax/pmax/machdep.c      Mon Nov 27 08:55:41 2000 +0000
+++ b/sys/arch/pmax/pmax/machdep.c      Mon Nov 27 08:57:08 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.183 2000/11/27 05:57:27 soren Exp $      */
+/*     $NetBSD: machdep.c,v 1.184 2000/11/27 08:57:08 nisimura Exp $   */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.183 2000/11/27 05:57:27 soren Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.184 2000/11/27 08:57:08 nisimura Exp $");
 
 #include "fs_mfs.h"
 #include "opt_ddb.h"
@@ -303,6 +303,18 @@
        if (boothowto & RB_KDB)
                Debugger();
 #endif
+
+       /*
+        * Alloc u pages for proc0 stealing KSEG0 memory.
+        */
+       proc0.p_addr = proc0paddr = (struct user *)kernend;
+       proc0.p_md.md_regs = (struct frame *)(kernend + USPACE) - 1;
+       memset(proc0.p_addr, 0, USPACE);
+       curpcb = &proc0.p_addr->u_pcb;
+       curpcb->pcb_context[11] = MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
+
+       kernend += USPACE;
+
        /*
         * Initialize physmem_boardmax; assume no SIMM-bank limits.
         * Adjust later in model-specific code if necessary.
@@ -357,15 +369,6 @@
        mips_init_msgbuf();
 
        /*
-        * Allocate space for proc0's USPACE.
-        */
-       v = (caddr_t)pmap_steal_memory(USPACE, NULL, NULL); 
-       proc0.p_addr = proc0paddr = (struct user *)v;
-       proc0.p_md.md_regs = (struct frame *)(v + USPACE) - 1;
-       curpcb = &proc0.p_addr->u_pcb;
-       curpcb->pcb_context[11] = MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
-
-       /*
         * Allocate space for system data structures.  These data structures
         * are allocated here instead of cpu_startup() because physical memory
         * is directly addressable.  We don't have to map these into virtual



Home | Main Index | Thread Index | Old Index