PERFORCE change 135084 for review
Randall R. Stewart
rrs at FreeBSD.org
Fri Feb 8 18:55:46 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=135084
Change 135084 by rrs at rrs-mips2-jnpr on 2008/02/09 02:55:05
Fix a bug in TARGET_OCTEON. We were calling a clear
function in the exception handler and then calling
trap. Trap expects that a0 will have the stack frame
pointer, the line above the CLEAR_STATUS sets the stack
frame pointer into a0, but the octeon specific
CLEAR_STATUS uses a0 thus blasting the arg to trap.
re-arrange the lines so the clear status happens
BEFORE the save off of the stack.
Affected files ...
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#14 edit
Differences ...
==== //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#14 (text+ko) ====
@@ -160,6 +160,7 @@
mfc0 k0, COP_0_BAD_VADDR #09: k0=bad address (again)
beq k1, zero, 2f #0a: ==0 -- no page table
srl k0, PGSHIFT - 2 #0b: k0=VPN (aka va>>10)
+
andi k0, k0, ((NPTEPG/2) - 1) << 3 #0c: k0=page tab offset
addu k1, k1, k0 #0d: k1=pte address
lw k0, 0(k1) #0e: k0=lo0 pte
@@ -303,8 +304,8 @@
SAVE_REG(a3, PC, sp) ;\
addu v0, sp, KERN_EXC_FRAME_SIZE ;\
SAVE_REG(v0, SP, sp) ;\
+ CLEAR_STATUS ;\
addu a0, sp, STAND_ARG_SIZE ;\
- CLEAR_STATUS ;\
ITLBNOPFIX
#ifdef DDB
More information about the p4-projects
mailing list