diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-10-24 20:01:39 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-10-24 20:01:39 +0000 |
commit | a649fd7acf8837f41450313169ec2b40df408eae (patch) | |
tree | 4d567b9a359e9623eae4920a7f778946f3b5a485 | |
parent | d6741fc9e75d7d300302bbf66e87fd67da3f421b (diff) |
In cpu_switchto(), load pmap->pm_tlbpid manually, instead of expecting
pmap_update() to return with this value in v0. A void function. Bwahahaha.
-rw-r--r-- | sys/arch/mips64/mips64/context.S | 15 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/genassym.cf | 8 |
2 files changed, 16 insertions, 7 deletions
diff --git a/sys/arch/mips64/mips64/context.S b/sys/arch/mips64/mips64/context.S index dc7a783d0dc..ce7fa4d744e 100644 --- a/sys/arch/mips64/mips64/context.S +++ b/sys/arch/mips64/mips64/context.S @@ -1,4 +1,4 @@ -/* $OpenBSD: context.S,v 1.16 2007/10/18 04:32:25 miod Exp $ */ +/* $OpenBSD: context.S,v 1.17 2007/10/24 20:01:36 miod Exp $ */ /* * Copyright (c) 2002-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -111,10 +111,9 @@ NON_LEAF(cpu_switchto, FRAMESZ(CF_SZ), ra) .mask 0x80000000, (CF_RA_OFFS - FRAMESZ(CF_SZ)) beqz a0, 1f - nop + mfc0 v0, COP_0_STATUS_REG lw t0, cpl - REG_S t0, PCB_CONTEXT+13*REGSZ(t3) REG_S s0, PCB_CONTEXT+0*REGSZ(t3) # do a 'savectx()' REG_S s1, PCB_CONTEXT+1*REGSZ(t3) REG_S s2, PCB_CONTEXT+2*REGSZ(t3) @@ -125,16 +124,15 @@ NON_LEAF(cpu_switchto, FRAMESZ(CF_SZ), ra) REG_S s7, PCB_CONTEXT+7*REGSZ(t3) REG_S s8, PCB_CONTEXT+9*REGSZ(t3) REG_S ra, PCB_CONTEXT+10*REGSZ(t3) - mfc0 t0, COP_0_STATUS_REG cfc0 t1, COP_0_ICR - REG_S t0, PCB_CONTEXT+11*REGSZ(t3) + REG_S v0, PCB_CONTEXT+11*REGSZ(t3) REG_S t1, PCB_CONTEXT+12*REGSZ(t3) + REG_S t0, PCB_CONTEXT+13*REGSZ(t3) 1: /* * Disable interrupts */ - mfc0 v0, COP_0_STATUS_REG # disable interrupts li v1, ~SR_INT_ENAB and v0, v0, v1 mtc0 v0, COP_0_STATUS_REG @@ -162,6 +160,11 @@ NON_LEAF(cpu_switchto, FRAMESZ(CF_SZ), ra) * put valid mappings in tlb entries 0 and 1. */ + /* get process ASID */ + PTR_L t0, P_VMSPACE(s0) # p->p_vmspace + PTR_L t1, VMSPACE_PMAP(t0) # ->vm_map.pmap + lw v0, PM_TLBPID(t1) # ->pm_tlbpid + or v0, t3 dmtc0 v0, COP_0_TLB_HI # init high entry (tlbid) LA t1, (VM_MIN_KERNEL_ADDRESS) diff --git a/sys/arch/sgi/sgi/genassym.cf b/sys/arch/sgi/sgi/genassym.cf index 2e5ac9202f8..9d6968489f0 100644 --- a/sys/arch/sgi/sgi/genassym.cf +++ b/sys/arch/sgi/sgi/genassym.cf @@ -1,4 +1,4 @@ -# $OpenBSD: genassym.cf,v 1.10 2007/10/10 15:53:52 art Exp $ +# $OpenBSD: genassym.cf,v 1.11 2007/10/24 20:01:38 miod Exp $ # # Copyright (c) 1997 Per Fogelstrom / Opsycon AB # @@ -41,6 +41,7 @@ struct proc #member p_priority member p_stat member p_addr +member p_vmspace #member P_UPTE p_md.md_upte member P_PC_CTRL p_md.md_pc_ctrl member P_PC_COUNT p_md.md_pc_count @@ -61,6 +62,11 @@ member ci_curproc export VM_MIN_KERNEL_ADDRESS export SIGFPE +struct vmspace +member VMSPACE_PMAP vm_map.pmap + +struct pmap +member pm_tlbpid export PMAP_SEGTABSIZE export CCA_NC |