diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-02-20 18:35:44 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-02-20 18:35:44 +0000 |
commit | bab488fcfb90d7b7090fa84aad7392abd3ef2c56 (patch) | |
tree | 79f9f7acb26c465e39370a5591f508fb93a9fc93 /sys/arch/mips64 | |
parent | a7ba0924ae2eb011fe89230eaebfa5a81a55036b (diff) |
Preserve pcb_onfault within kcopy(), as expected and as all other platforms do.
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r-- | sys/arch/mips64/mips64/lcore_access.S | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/sys/arch/mips64/mips64/lcore_access.S b/sys/arch/mips64/mips64/lcore_access.S index ca52a6053cf..5606a946978 100644 --- a/sys/arch/mips64/mips64/lcore_access.S +++ b/sys/arch/mips64/mips64/lcore_access.S @@ -1,4 +1,4 @@ -/* $OpenBSD: lcore_access.S,v 1.10 2007/05/20 14:34:23 miod Exp $ */ +/* $OpenBSD: lcore_access.S,v 1.11 2008/02/20 18:35:43 miod Exp $ */ /* * Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -415,19 +415,22 @@ _copyerr: /* * kcopy is a wrapper around bcopy that catches bad memory references. */ -NON_LEAF(kcopy, FRAMESZ(CF_SZ), ra) - PTR_SUBU sp, sp, FRAMESZ(CF_SZ) - .mask 0x80000000, (CF_RA_OFFS - FRAMESZ(CF_SZ)) - PTR_S ra, CF_RA_OFFS(sp) - li v0, KT_KCOPYERR +NON_LEAF(kcopy, FRAMESZ(CF_SZ + REGSZ), ra) + PTR_SUBU sp, sp, FRAMESZ(CF_SZ + REGSZ) + .mask 0x80000000, (CF_RA_OFFS - FRAMESZ(CF_SZ + REGSZ)) + PTR_S ra, CF_RA_OFFS + REGSZ(sp) PTR_L t3, curprocpaddr + lw v1, PCB_ONFAULT(t3) + li v0, KT_KCOPYERR + PTR_S v1, CF_ARGSZ(sp) # save old pcb_onfault jal bcopy sw v0, PCB_ONFAULT(t3) - PTR_L ra, CF_RA_OFFS(sp) + PTR_L v0, CF_ARGSZ(sp) PTR_L t3, curprocpaddr - sw zero, PCB_ONFAULT(t3) - PTR_ADDU sp, sp, FRAMESZ(CF_SZ) + PTR_L ra, CF_RA_OFFS + REGSZ(sp) + sw v0, PCB_ONFAULT(t3) + PTR_ADDU sp, sp, FRAMESZ(CF_SZ + REGSZ) j ra move v0, zero END(kcopy) |