- Adjust arguments to pmap_steal_memory() for new interface.

- We no longer able to use uvm_pageboot_alloc() before pmap_bootstrap()
  is called.  Use pmap_steal_memory() directly instead.

Approved by Jason R. Thorpe.
This commit is contained in:
enami 2003-05-09 05:33:52 +00:00
parent 0230a54dfb
commit 550608176e
2 changed files with 8 additions and 15 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.266 2003/04/26 11:05:07 ragge Exp $ */
/* $NetBSD: machdep.c,v 1.267 2003/05/09 05:33:52 enami Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -75,7 +75,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.266 2003/04/26 11:05:07 ragge Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.267 2003/05/09 05:33:52 enami Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -635,20 +635,13 @@ nobootinfo:
if (sz != reqsz)
printf("WARNING: %ld bytes not available for msgbuf "
"in last cluster (%ld used)\n", reqsz, sz);
}
/*
* NOTE: It is safe to use uvm_pageboot_alloc() before
* pmap_bootstrap() because our pmap_virtual_space()
* returns compile-time constants.
*/
/*
* Init mapping for u page(s) for proc 0
*/
lwp0.l_addr = proc0paddr =
(struct user *)uvm_pageboot_alloc(UPAGES * PAGE_SIZE);
(struct user *)pmap_steal_memory(UPAGES * PAGE_SIZE);
/*
* Allocate space for system data structures. These data structures
@ -657,7 +650,7 @@ nobootinfo:
* virtual address space.
*/
size = (vsize_t)allocsys(NULL, NULL);
v = (caddr_t)uvm_pageboot_alloc(size);
v = (caddr_t)pmap_steal_memory(size);
if ((allocsys(v, NULL) - v) != size)
panic("alpha_init: table size inconsistency");

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.198 2003/05/08 18:13:12 thorpej Exp $ */
/* $NetBSD: pmap.c,v 1.199 2003/05/09 05:33:53 enami Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -149,7 +149,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.198 2003/05/08 18:13:12 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.199 2003/05/09 05:33:53 enami Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -3157,7 +3157,7 @@ pmap_growkernel(vaddr_t maxkvaddr)
* be handled a little differently.
*/
ptaddr = ALPHA_K0SEG_TO_PHYS(
pmap_steal_memory(PAGE_SIZE, NULL, NULL));
pmap_steal_memory(PAGE_SIZE));
} else if (pmap_physpage_alloc(PGU_NORMAL,
&ptaddr) == FALSE)
goto die;
@ -3196,7 +3196,7 @@ pmap_growkernel(vaddr_t maxkvaddr)
* See above.
*/
ptaddr = ALPHA_K0SEG_TO_PHYS(
pmap_steal_memory(PAGE_SIZE, NULL, NULL));
pmap_steal_memory(PAGE_SIZE));
} else if (pmap_physpage_alloc(PGU_NORMAL, &ptaddr) == FALSE)
goto die;
*l2pte = (atop(ptaddr) << PG_SHIFT) |