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 Use pmap_steal_memory() to glab proc0's U...
details: https://anonhg.NetBSD.org/src/rev/8a76856b8a6b
branches: trunk
changeset: 499690:8a76856b8a6b
user: nisimura <nisimura%NetBSD.org@localhost>
date: Mon Nov 27 05:12:32 2000 +0000
description:
Use pmap_steal_memory() to glab proc0's USPACE.
diffstat:
sys/arch/pmax/pmax/machdep.c | 25 +++++++++++--------------
1 files changed, 11 insertions(+), 14 deletions(-)
diffs (53 lines):
diff -r 370415db3963 -r 8a76856b8a6b sys/arch/pmax/pmax/machdep.c
--- a/sys/arch/pmax/pmax/machdep.c Mon Nov 27 04:36:40 2000 +0000
+++ b/sys/arch/pmax/pmax/machdep.c Mon Nov 27 05:12:32 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.180 2000/09/24 12:32:38 jdolecek Exp $ */
+/* $NetBSD: machdep.c,v 1.181 2000/11/27 05:12:32 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.180 2000/09/24 12:32:38 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.181 2000/11/27 05:12:32 nisimura Exp $");
#include "fs_mfs.h"
#include "opt_ddb.h"
@@ -303,18 +303,6 @@
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.
@@ -369,6 +357,15 @@
mips_init_msgbuf();
/*
+ * Allocate space for proc0's USPACE
+ */
+ p0 = (caddr_t)pmap_steal_memory(USPACE, NULL, NULL);
+ proc0.p_addr = proc0paddr = (struct user *)p0;
+ proc0.p_md.md_regs = (struct frame *)(p0 + 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