Subject: UADDR was purged from NetBSD/mips
To: None <port-mips@netbsd.org>
From: Toru Nishimura <nisimura@is.aist-nara.ac.jp>
List: port-mips
Date: 12/01/1998 11:59:57
Hi, all.

I think I sucessfully purged address constants UADDR and KERNELSTACK
from NetBSD/mips.  This means NetBSD/mips is now free from 'the UNIX
heritage' of fixed-address u-area.  Benefits are not small.

- Simplied and faster context switch code path.

    cpuswitch_resume() do not brother hardwired UADDR TLB flush any more.
    mips1_cpuswitch_resume() saved 10+ TLB-related instructions.  

    switch_exit() has 5-line codes.  No TLB manipulation at all.
    	
    mips_init_proc0() intializes p_addr field for proc0 and nullproc.  It
    has few  explicit TLB operation and the size is small than 20 lines of
    C codes.
   
- Simpliy cache coherency management for R4000.

    Every kernel stack points around indenpedent values of
    curproc->p_addr + USPACE.  This makes DECstation NCR53C94 driver
    free from special case analysis of auto variables for certain SCSI
    ops which mandated 'KSEG2 address recalculation' on runtime.

    DECstation should run TCDS (already bus'ified) for NetBSD/alpha as it is.

This is my second major achievement for the internals of NetBSD/mips.
The first one was to eliminate FORKBRAINDAMAGE by introduction of
proc_trampoline() code.  After 2+ years of my involvement, I think I
can finally call NetBSD/mips a 'modern-style UNIX' as other ports. 

I will continue to make changes for MIPS3, then I flush the change for
R4000 owners for field tests. 

Tohru Nishimura
Information Technology Centre
Nara Institute of Science and Technology