Move uvm_setpagesize() calls from locore.s to pmap_bootstrap_finalize().

Also explicitly set uvmexp.pagesize to prepare 8KB/page settings.

XXX: There is #ifdef !defined(amiga) && !defined(atari) workaround
XXX: because they have different pmap initialization functions.
This commit is contained in:
tsutsui 2009-12-11 18:28:35 +00:00
parent 465857f028
commit 1401e77eb0
9 changed files with 28 additions and 34 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.19 2009/12/04 18:06:28 tsutsui Exp $ */
/* $NetBSD: locore.s,v 1.20 2009/12/11 18:28:35 tsutsui Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@ -331,10 +331,8 @@ Lenab1:
.long 0x4e7b0006 | movc d0,dtt0
.long 0x4e7b0007 | movc d0,dtt1
/* select the software page size now */
lea _ASM_LABEL(tmpstk),%sp | temporary stack
jbsr _C_LABEL(uvm_setpagesize) | select software page size
/* call final pmap setup which initialize lwp0, curlwp, and curpcb */
/* call final pmap setup */
jbsr _C_LABEL(pmap_bootstrap_finalize)
/* set kernel stack, user SP */
movl _C_LABEL(lwp0uarea),%a1 | get lwp0 uarea

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.148 2009/12/02 15:51:12 tsutsui Exp $ */
/* $NetBSD: locore.s,v 1.149 2009/12/11 18:28:35 tsutsui Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@ -549,10 +549,8 @@ Lehighcode:
* Should be running mapped from this point on
*/
Lenab1:
/* select the software page size now */
lea _ASM_LABEL(tmpstk),%sp | temporary stack
jbsr _C_LABEL(uvm_setpagesize) | select software page size
/* call final pmap setup which initialize lwp0, curlwp, and curpcb */
/* call final pmap setup */
jbsr _C_LABEL(pmap_bootstrap_finalize)
/* set kernel stack, user SP */
movl _C_LABEL(lwp0uarea),%a1 |

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.31 2009/12/04 18:06:28 tsutsui Exp $ */
/* $NetBSD: locore.s,v 1.32 2009/12/11 18:28:35 tsutsui Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@ -309,10 +309,8 @@ Lmotommu1:
* Should be running mapped from this point on
*/
Lenab1:
/* select the software page size now */
lea _ASM_LABEL(tmpstk),%sp | temporary stack
jbsr _C_LABEL(uvm_setpagesize) | select software page size
/* call final pmap setup which initialize lwp0, curlwp, and curpcb */
/* call final pmap setup */
jbsr _C_LABEL(pmap_bootstrap_finalize)
/* set kernel stack, user SP */
movl _C_LABEL(lwp0uarea),%a1 | get lwp0 uarea

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap_motorola.c,v 1.54 2009/12/06 06:41:30 tsutsui Exp $ */
/* $NetBSD: pmap_motorola.c,v 1.55 2009/12/11 18:28:35 tsutsui Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -117,7 +117,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap_motorola.c,v 1.54 2009/12/06 06:41:30 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap_motorola.c,v 1.55 2009/12/11 18:28:35 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -326,6 +326,16 @@ void
pmap_bootstrap_finalize(void)
{
#if !defined(amiga) && !defined(atari)
/*
* XXX
* amiga and atari have different pmap initialization functions
* and they require this earlier.
*/
uvmexp.pagesize = NBPG;
uvm_setpagesize();
#endif
/*
* Initialize protection array.
* XXX: Could this have port specific values? Can't this be static?

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.157 2009/12/04 16:57:18 tsutsui Exp $ */
/* $NetBSD: locore.s,v 1.158 2009/12/11 18:28:35 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@ -333,10 +333,8 @@ Lloaddone:
/*
* Should be running mapped from this point on
*/
/* select the software page size now */
lea _ASM_LABEL(tmpstk),%sp | temporary stack
jbsr _C_LABEL(uvm_setpagesize) | select software page size
/* call final pmap setup which initialize lwp0, curlwp, and curpcb */
/* call final pmap setup */
jbsr _C_LABEL(pmap_bootstrap_finalize)
/* set kernel stack, user SP, lwp0, and initial pcb */
movl _C_LABEL(lwp0uarea),%a1 | get lwp0 uarea

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.102 2009/12/04 18:06:28 tsutsui Exp $ */
/* $NetBSD: locore.s,v 1.103 2009/12/11 18:28:35 tsutsui Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@ -664,10 +664,8 @@ Lenab1:
movl %d0,_ASM_LABEL(bug_vbr)
movl #_C_LABEL(vectab),%d0 | get our VBR address
movc %d0,%vbr
/* select the software page size now */
lea _ASM_LABEL(tmpstk),%sp | temporary stack
jbsr _C_LABEL(uvm_setpagesize) | select software page size
/* call final pmap setup which initialize lwp0, curlwp, and curpcb */
/* call final pmap setup */
jbsr _C_LABEL(pmap_bootstrap_finalize)
/* set kernel stack, user SP */
movl _C_LABEL(lwp0uarea),%a1 | get lwp0 uarea

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.49 2009/12/02 15:54:19 tsutsui Exp $ */
/* $NetBSD: locore.s,v 1.50 2009/12/11 18:28:35 tsutsui Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@ -442,10 +442,8 @@ Lmotommu2:
* Should be running mapped from this point on
*/
Lenab1:
/* select the software page size now */
lea _ASM_LABEL(tmpstk),%sp | temporary stack
jbsr _C_LABEL(uvm_setpagesize) | select software page size
/* call final pmap setup which initialize lwp0, curlwp, and curpcb */
/* call final pmap setup */
jbsr _C_LABEL(pmap_bootstrap_finalize)
/* set kernel stack, user SP */
movl _C_LABEL(lwp0uarea),%a1 | get lwp0 uarea

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.52 2009/12/04 18:06:28 tsutsui Exp $ */
/* $NetBSD: locore.s,v 1.53 2009/12/11 18:28:35 tsutsui Exp $ */
/*
* Copyright (c) 1998 Darrin B. Jewell
@ -452,13 +452,11 @@ Lehighcode:
* Should be running mapped from this point on
*/
Lenab1:
/* select the software page size now */
lea _ASM_LABEL(tmpstk),%sp | temporary stack
jbsr _C_LABEL(uvm_setpagesize) | select software page size
bsr Lpushpc | Push the PC on the stack.
Lpushpc:
/* call final pmap setup which initialize lwp0, curlwp, and curpcb */
/* call final pmap setup */
jbsr _C_LABEL(pmap_bootstrap_finalize)
/* set kernel stack, user SP */
movl _C_LABEL(lwp0uarea),%a1 | get lwp0 uarea

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.94 2009/12/04 18:06:28 tsutsui Exp $ */
/* $NetBSD: locore.s,v 1.95 2009/12/11 18:28:35 tsutsui Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@ -935,13 +935,11 @@ Lenab1:
/* set vector base in virtual address */
movl #_C_LABEL(vectab),%d0 | set Vector Base Register
movc %d0,%vbr
/* select the software page size now */
lea _ASM_LABEL(tmpstk),%sp | temporary stack
jbsr _C_LABEL(uvm_setpagesize) | select software page size
/* detect FPU type */
jbsr _C_LABEL(fpu_probe)
movl %d0,_C_LABEL(fputype)
/* call final pmap setup which initialize lwp0, curlwp, and curpcb */
/* call final pmap setup */
jbsr _C_LABEL(pmap_bootstrap_finalize)
/* set kernel stack, user SP */
movl _C_LABEL(lwp0uarea),%a1 | grab lwp0 uarea