summaryrefslogtreecommitdiff
path: root/i386/i386/locore.S
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-04-01 14:01:14 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-07-26 12:14:40 +0200
commit550f9a075207b6b3f398d292ccae7335eba38189 (patch)
tree640769d8e3392ba57101669e4ec5679b8b05f058 /i386/i386/locore.S
parent37d9736575075d2681b1f1c77286a6a7edf85fb5 (diff)
XXX pmm from x15, userspace crashes soon
Diffstat (limited to 'i386/i386/locore.S')
-rw-r--r--i386/i386/locore.S12
1 files changed, 8 insertions, 4 deletions
diff --git a/i386/i386/locore.S b/i386/i386/locore.S
index cfda86f..bd2633a 100644
--- a/i386/i386/locore.S
+++ b/i386/i386/locore.S
@@ -542,8 +542,10 @@ trap_from_kernel:
#if MACH_KDB || MACH_TTD
movl %esp,%ebx /* save current stack */
- cmpl EXT(int_stack_high),%esp /* on an interrupt stack? */
- jb 1f /* OK if so */
+ movl %esp,%edx /* on an interrupt stack? */
+ and $(~(KERNEL_STACK_SIZE-1)),%edx
+ cmpl EXT(int_stack_base),%edx
+ je 1f /* OK if so */
CPU_NUMBER(%edx) /* get CPU number */
cmpl CX(EXT(kernel_stack),%edx),%esp
@@ -647,8 +649,10 @@ ENTRY(all_intrs)
pushl %edx
cld /* clear direction flag */
- cmpl %ss:EXT(int_stack_high),%esp /* on an interrupt stack? */
- jb int_from_intstack /* if not: */
+ movl %esp,%edx /* on an interrupt stack? */
+ and $(~(KERNEL_STACK_SIZE-1)),%edx
+ cmpl %ss:EXT(int_stack_base),%edx
+ je int_from_intstack /* if not: */
pushl %ds /* save segment registers */
pushl %es