diff options
-rw-r--r-- | i386/i386/locore.S | 2 | ||||
-rw-r--r-- | x86_64/locore.S | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/i386/i386/locore.S b/i386/i386/locore.S index 8314e25a..df41722d 100644 --- a/i386/i386/locore.S +++ b/i386/i386/locore.S @@ -592,7 +592,6 @@ trap_from_kernel: je 1f /* OK if so */ movl %ecx,%edx - cmpl CX(EXT(kernel_stack),%edx),%esp /* already on kernel stack? */ ja 0f @@ -612,6 +611,7 @@ trap_from_kernel: call EXT(kernel_trap) /* to kernel trap routine */ addl $4,%esp /* pop parameter */ #endif /* MACH_KDB || MACH_TTD */ + jmp _return_from_kernel diff --git a/x86_64/locore.S b/x86_64/locore.S index af3809ee..296a8e28 100644 --- a/x86_64/locore.S +++ b/x86_64/locore.S @@ -711,11 +711,13 @@ trap_from_kernel: pushq %rbx /* save old stack */ movq %rbx,%rdi /* pass as parameter */ call EXT(kernel_trap) /* to kernel trap routine */ + popq %rsp /* return to old stack */ #else /* MACH_KDB || MACH_TTD */ movq %rsp,%rdi /* pass parameter */ call EXT(kernel_trap) /* to kernel trap routine */ + #endif /* MACH_KDB || MACH_TTD */ jmp _return_from_kernel |