Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/atari/atari Use common pmap_bootstrap_finalize() to...



details:   https://anonhg.NetBSD.org/src/rev/e30ba172fa20
branches:  trunk
changeset: 749570:e30ba172fa20
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Wed Dec 02 15:53:34 2009 +0000

description:
Use common pmap_bootstrap_finalize() to initialize lwp0 uarea etc.
Tested on TT030.

diffstat:

 sys/arch/atari/atari/atari_init.c |  16 +++++-----------
 sys/arch/atari/atari/locore.s     |  10 ++++------
 2 files changed, 9 insertions(+), 17 deletions(-)

diffs (88 lines):

diff -r 15f461666584 -r e30ba172fa20 sys/arch/atari/atari/atari_init.c
--- a/sys/arch/atari/atari/atari_init.c Wed Dec 02 15:52:14 2009 +0000
+++ b/sys/arch/atari/atari/atari_init.c Wed Dec 02 15:53:34 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atari_init.c,v 1.88 2009/11/27 03:23:05 rmind Exp $    */
+/*     $NetBSD: atari_init.c,v 1.89 2009/12/02 15:53:34 tsutsui Exp $  */
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.88 2009/11/27 03:23:05 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.89 2009/12/02 15:53:34 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mbtype.h"
@@ -41,7 +41,6 @@
 
 #include <sys/param.h>
 #include <sys/systm.h>
-#include <sys/proc.h>
 #include <sys/ioctl.h>
 #include <sys/select.h>
 #include <sys/tty.h>
@@ -275,7 +274,7 @@
        /*
         * Save KVA of lwp0 uarea and allocate it.
         */
-       uvm_lwp_setuarea(&lwp0, vstart);
+       lwp0uarea  = vstart;
        pstart    += USPACE;
        vstart    += USPACE;
        avail     -= USPACE;
@@ -567,14 +566,9 @@
        }
 
        /*
-        * Initialize the "u-area" pages.
-        *
-        * Must initialize uarea before autoconfig or the fault handler
-        * will get a NULL reference.
+        * Initialize the "u-area" pages etc.
         */
-       memset((void*)uvm_lwp_getuarea(&lwp0), 0, USPACE);
-       curlwp = &lwp0;
-       curpcb = lwp_getpcb(&lwp0);
+       pmap_bootstrap_finalize();
 
        /*
         * Get the hardware into a defined state
diff -r 15f461666584 -r e30ba172fa20 sys/arch/atari/atari/locore.s
--- a/sys/arch/atari/atari/locore.s     Wed Dec 02 15:52:14 2009 +0000
+++ b/sys/arch/atari/atari/locore.s     Wed Dec 02 15:53:34 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.103 2009/11/26 00:19:13 matt Exp $        */
+/*     $NetBSD: locore.s,v 1.104 2009/12/02 15:53:34 tsutsui Exp $     */
 
 /*
  * Copyright (c) 1980, 1990 The Regents of the University of California.
@@ -1024,15 +1024,13 @@
        jsr     _C_LABEL(start_c)
 
        /*
-        * set kernel stack, user SP, and initial pcb
+        * set kernel stack, user SP
         */
-       lea     _C_LABEL(lwp0),%a0      | grab lwp0.p_addr
-       movl    %a0@(L_ADDR),%a1
+       movl    _C_LABEL(lwp0uarea),%a1 | grab lwp0 uarea
        lea     %a1@(USPACE-4),%sp      | set kernel stack to end of area
        movl    #USRSTACK-4,%a2
        movl    %a2,%usp                | init user SP
        movl    %a2,%a1@(PCB_USP)       | and save it
-       movl    %a1,_C_LABEL(curpcb)    | lwp0 is running
        clrw    %a1@(PCB_FLAGS)         | clear flags
 
        /* flush TLB and turn on caches */
@@ -1077,7 +1075,7 @@
        movw    #PSL_USER,%sp@-         |  in user mode
        clrl    %sp@-                   |  stack adjust count
        lea     %sp@(-64),%sp           |  construct space for D0-D7/A0-A7
-       #lea    _C_LABEL(lwp0),%a0      | lwp0 in a0
+       lea     _C_LABEL(lwp0),%a0      | lwp0 in a0
        movl    %sp,%a0@(L_MD_REGS)     | save frame for lwp0
        movl    %usp,%a1
        movl    %a1,%sp@(FR_SP)         | save user stack pointer in frame



Home | Main Index | Thread Index | Old Index