diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-03-09 13:46:15 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-03-09 13:46:15 +0000 |
commit | beb6b8a91035a5ac00a5fa9e0ff0bae3a4e15ed3 (patch) | |
tree | dc8e24bea7460f82247f28bedaec23bd15fb7ca6 | |
parent | ceff8857b3d865b9c88e078b2b79825de2ca5bfb (diff) |
Unmask interrupts unconditionnally before calling the generic trap handler.
Reduce differences with amd64.
Inputs from mikeb@, ok mlarkin@
-rw-r--r-- | sys/arch/i386/i386/locore.s | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s index 8116dfdbef8..e533b6d3684 100644 --- a/sys/arch/i386/i386/locore.s +++ b/sys/arch/i386/i386/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.165 2016/03/03 12:32:23 mpi Exp $ */ +/* $OpenBSD: locore.s,v 1.166 2016/03/09 13:46:14 mpi Exp $ */ /* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */ /*- @@ -1282,15 +1282,11 @@ ENTRY(savectx) * (possibly the next clock tick). Thus, we disable interrupt before checking, * and only enable them again on the final `iret' or before calling the AST * handler. - * - * XXX - debugger traps are now interrupt gates so at least bdb doesn't lose - * control. STI gives the standard losing behaviour for ddb and kgdb. */ #define IDTVEC(name) ALIGN_TEXT; .globl X##name; X##name: #define TRAP(a) pushl $(a) ; jmp _C_LABEL(alltraps) #define ZTRAP(a) pushl $0 ; TRAP(a) -#define STI testb $(PSL_I>>8),13(%esp) ; jz 1f ; sti ; 1: ; .text @@ -1304,12 +1300,10 @@ IDTVEC(dbg) andb $~0xf,%al movl %eax,%dr6 popl %eax - STI TRAP(T_TRCTRAP) IDTVEC(nmi) ZTRAP(T_NMI) IDTVEC(bpt) - STI ZTRAP(T_BPTFLT) IDTVEC(ofl) ZTRAP(T_OFLOW) @@ -1405,7 +1399,6 @@ IDTVEC(align) * This will cause the process to get a SIGBUS. */ NENTRY(resume_iret) - sti ZTRAP(T_PROTFLT) NENTRY(resume_pop_ds) pushl %es @@ -1430,6 +1423,7 @@ NENTRY(resume_pop_fs) */ NENTRY(alltraps) INTRENTRY + sti calltrap: #ifdef DIAGNOSTIC movl CPL,%ebx |