summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2011-05-14 14:47:19 +0000
committermarcel <marcel@FreeBSD.org>2011-05-14 14:47:19 +0000
commitdce7f9162949af4d10251f74426f436b34356d90 (patch)
tree86f2a11fd010a4055aadeae681517a88ed7a859c /sys/ia64
parent2ef192a4b43b1740ebb16a663ddf18fda82c1e34 (diff)
downloadFreeBSD-src-dce7f9162949af4d10251f74426f436b34356d90.zip
FreeBSD-src-dce7f9162949af4d10251f74426f436b34356d90.tar.gz
Sharpening the saw:
o Clobber the register that holds the restart token immediately after crossing the restart point. This prevents false positives (i.e. a nested exception that we don't know can happen and that is being treated as one we know by virtue of a lingering restart token). o Now that the bootstrap kernel stack is free, switch onto it and call trap() for nested traps that we don't know about. In trap we panic() so that we can analyze the condition.
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/exception.S20
1 files changed, 12 insertions, 8 deletions
diff --git a/sys/ia64/ia64/exception.S b/sys/ia64/ia64/exception.S
index 7ff771a..729a96c 100644
--- a/sys/ia64/ia64/exception.S
+++ b/sys/ia64/ia64/exception.S
@@ -202,13 +202,13 @@ exception_save_restart:
{ .mmi
st8 [r30]=r19,16 // length
st8 [r31]=r0,16 // flags
- add r19=16,r19
+ add r29=16,r19 // Clobber restart token
;;
}
{ .mmi
st8.spill [r30]=sp,16 // sp
st8 [r31]=r20,16 // unat
- sub sp=r23,r19
+ sub sp=r23,r29
;;
}
{ .mmi
@@ -641,7 +641,7 @@ exception_restore_restart:
mov r30=ar.bspstore
;;
loadrs // load user regs
- nop 0
+ mov r29=0 // Clobber restart token
;;
}
{ .mmi
@@ -1094,22 +1094,26 @@ IVT_ENTRY(Data_Nested_TLB, 0x1400)
}
{ .mlx
mov r26=ar.bsp
- movl r27=kstack
+ movl r29=kstack
;;
}
-{ .mmi
+{ .mlx
mov r28=sp
- nop 0
- addl r27=KSTACK_PAGES*PAGE_SIZE-16,r0
+ movl r27=kstack_top
;;
}
{ .mmi
- mov sp=r27
+ add sp=-16,r27
;;
mov r27=ar.bspstore
nop 0
;;
}
+ mov ar.rsc=0
+ dep r29=r27,r29,0,9
+ ;;
+ mov ar.bspstore=r29
+ ;;
CALL(trap, 5, r30)
IVT_END(Data_Nested_TLB)
OpenPOWER on IntegriCloud