From aaf91fd6aa71844cc93dd8bbf07116cdeadf74e9 Mon Sep 17 00:00:00 2001 From: gwr Date: Fri, 17 Jan 1997 16:27:17 +0000 Subject: [PATCH] Adapt to rename of pcb_mmuctx to pcb_mmucrp, and corrected prototype of loadcrp(), which kills some bogus type casts. --- sys/arch/sun3/sun3x/locore.s | 9 +++------ sys/arch/sun3/sun3x/locore2.c | 6 +++--- sys/arch/sun3/sun3x/pmap.c | 11 +++++------ sys/arch/sun3x/sun3x/_startup.c | 6 +++--- sys/arch/sun3x/sun3x/locore.s | 9 +++------ sys/arch/sun3x/sun3x/pmap.c | 11 +++++------ 6 files changed, 22 insertions(+), 30 deletions(-) diff --git a/sys/arch/sun3/sun3x/locore.s b/sys/arch/sun3/sun3x/locore.s index bb3990301a80..c288d7aac572 100644 --- a/sys/arch/sun3/sun3x/locore.s +++ b/sys/arch/sun3/sun3x/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.1.1.1 1997/01/14 20:57:09 gwr Exp $ */ +/* $NetBSD: locore.s,v 1.2 1997/01/17 16:27:18 gwr Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -1079,7 +1079,7 @@ Lswnofpsave: movc d0,cacr | invalidate cache(s) pflusha | flush entire TLB - movl a1@(PCB_MMUCTX),a0 | get CRP phys. addr. + movl a1@(PCB_MMUCRP),a0 | get CRP phys. addr. pmove a0@,crp | load new user root pointer | Reload registers of new process. @@ -1266,10 +1266,7 @@ ENTRY(setvbr) /* * Load a new CPU Root Pointer (CRP) into the MMU. - * Arg is the address of CRP storage (2 longwords) - * i.e.: - * struct { int limit, paddr; } CRP; - * loadcrp(&CRP); + * void loadcrp(struct mmu_rootptr *); */ ENTRY(loadcrp) movl sp@(4),a0 | arg1: &CRP diff --git a/sys/arch/sun3/sun3x/locore2.c b/sys/arch/sun3/sun3x/locore2.c index 6c46be367ba1..c15fe9140b95 100644 --- a/sys/arch/sun3/sun3x/locore2.c +++ b/sys/arch/sun3/sun3x/locore2.c @@ -1,4 +1,4 @@ -/* $NetBSD: locore2.c,v 1.2 1997/01/16 21:53:07 gwr Exp $ */ +/* $NetBSD: locore2.c,v 1.3 1997/01/17 16:27:17 gwr Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -108,7 +108,7 @@ sun3x_mode_monitor __P((void)) setvbr(old_vector_table); set_clk_mode(IREG_CLOCK_ENAB_7, 0, 1); - loadcrp((int)&mon_crp); + loadcrp(&mon_crp); } /* @@ -127,7 +127,7 @@ sun3x_mode_normal __P((void)) pcb = curpcb ? curpcb : pcb = &proc0paddr->u_pcb; - loadcrp(pcb->pcb_mmuctx); + loadcrp(pcb->pcb_mmucrp); } /* diff --git a/sys/arch/sun3/sun3x/pmap.c b/sys/arch/sun3/sun3x/pmap.c index 8e3f98754609..58e450143fc4 100644 --- a/sys/arch/sun3/sun3x/pmap.c +++ b/sys/arch/sun3/sun3x/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.3 1997/01/16 22:12:50 gwr Exp $ */ +/* $NetBSD: pmap.c,v 1.4 1997/01/17 16:27:20 gwr Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -800,17 +800,16 @@ pmap_takeover_mmu() vm_offset_t tbladdr; tbladdr = mmu_vtop((vm_offset_t) kernAbase); - mon_printf("pmap_takeover_mmu: tbladdr=0x%x\n", tbladdr); /* Initialize the CPU Root Pointer (CRP) for proc0. */ /* XXX: I'd prefer per-process CRP storage. -gwr */ proc0crp.limit = 0x80000003; /* limit and type */ proc0crp.paddr = tbladdr; /* phys. addr. */ - curpcb->pcb_mmuctx = (int) &proc0crp; + curpcb->pcb_mmucrp = &proc0crp; - mon_printf("pmap_takeover_mmu: loadcrp...\n"); - loadcrp(curpcb->pcb_mmuctx); - mon_printf("pmap_takeover_mmu: survived!\n"); + /* mon_printf("pmap_takeover_mmu: loadcrp...\n"); */ + loadcrp(curpcb->pcb_mmucrp); + /* mon_printf("pmap_takeover_mmu: survived!\n"); */ } /* pmap_init INTERFACE diff --git a/sys/arch/sun3x/sun3x/_startup.c b/sys/arch/sun3x/sun3x/_startup.c index b6d435e43bcc..4b5d02dac96e 100644 --- a/sys/arch/sun3x/sun3x/_startup.c +++ b/sys/arch/sun3x/sun3x/_startup.c @@ -1,4 +1,4 @@ -/* $NetBSD: _startup.c,v 1.2 1997/01/16 21:53:07 gwr Exp $ */ +/* $NetBSD: _startup.c,v 1.3 1997/01/17 16:27:17 gwr Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -108,7 +108,7 @@ sun3x_mode_monitor __P((void)) setvbr(old_vector_table); set_clk_mode(IREG_CLOCK_ENAB_7, 0, 1); - loadcrp((int)&mon_crp); + loadcrp(&mon_crp); } /* @@ -127,7 +127,7 @@ sun3x_mode_normal __P((void)) pcb = curpcb ? curpcb : pcb = &proc0paddr->u_pcb; - loadcrp(pcb->pcb_mmuctx); + loadcrp(pcb->pcb_mmucrp); } /* diff --git a/sys/arch/sun3x/sun3x/locore.s b/sys/arch/sun3x/sun3x/locore.s index bb3990301a80..c288d7aac572 100644 --- a/sys/arch/sun3x/sun3x/locore.s +++ b/sys/arch/sun3x/sun3x/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.1.1.1 1997/01/14 20:57:09 gwr Exp $ */ +/* $NetBSD: locore.s,v 1.2 1997/01/17 16:27:18 gwr Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -1079,7 +1079,7 @@ Lswnofpsave: movc d0,cacr | invalidate cache(s) pflusha | flush entire TLB - movl a1@(PCB_MMUCTX),a0 | get CRP phys. addr. + movl a1@(PCB_MMUCRP),a0 | get CRP phys. addr. pmove a0@,crp | load new user root pointer | Reload registers of new process. @@ -1266,10 +1266,7 @@ ENTRY(setvbr) /* * Load a new CPU Root Pointer (CRP) into the MMU. - * Arg is the address of CRP storage (2 longwords) - * i.e.: - * struct { int limit, paddr; } CRP; - * loadcrp(&CRP); + * void loadcrp(struct mmu_rootptr *); */ ENTRY(loadcrp) movl sp@(4),a0 | arg1: &CRP diff --git a/sys/arch/sun3x/sun3x/pmap.c b/sys/arch/sun3x/sun3x/pmap.c index 8e3f98754609..58e450143fc4 100644 --- a/sys/arch/sun3x/sun3x/pmap.c +++ b/sys/arch/sun3x/sun3x/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.3 1997/01/16 22:12:50 gwr Exp $ */ +/* $NetBSD: pmap.c,v 1.4 1997/01/17 16:27:20 gwr Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -800,17 +800,16 @@ pmap_takeover_mmu() vm_offset_t tbladdr; tbladdr = mmu_vtop((vm_offset_t) kernAbase); - mon_printf("pmap_takeover_mmu: tbladdr=0x%x\n", tbladdr); /* Initialize the CPU Root Pointer (CRP) for proc0. */ /* XXX: I'd prefer per-process CRP storage. -gwr */ proc0crp.limit = 0x80000003; /* limit and type */ proc0crp.paddr = tbladdr; /* phys. addr. */ - curpcb->pcb_mmuctx = (int) &proc0crp; + curpcb->pcb_mmucrp = &proc0crp; - mon_printf("pmap_takeover_mmu: loadcrp...\n"); - loadcrp(curpcb->pcb_mmuctx); - mon_printf("pmap_takeover_mmu: survived!\n"); + /* mon_printf("pmap_takeover_mmu: loadcrp...\n"); */ + loadcrp(curpcb->pcb_mmucrp); + /* mon_printf("pmap_takeover_mmu: survived!\n"); */ } /* pmap_init INTERFACE