x86: Add symbolic constant for exceptions with error code

Add a symbolic constant for the bitmask which states which exceptions
carry an error code.

Signed-off-by: H. Peter Anvin <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
This commit is contained in:
H. Peter Anvin authored and H. Peter Anvin committed 2012-04-19 15:07:49 -07:00
1 parent 46326013e3
commit 84f4fc524e
2 files changed
+3 -1

No files matched your search

+2
View File
@@ -205,6 +205,8 @@
#define IDT_ENTRIES 256
#define NUM_EXCEPTION_VECTORS 32
/* Bitmask of exception vectors which push an error code on the stack */
#define EXCEPTION_ERRCODE_MASK 0x00027d00
#define GDT_SIZE (GDT_ENTRIES * 8)
#define GDT_ENTRY_TLS_ENTRIES 3
#define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8)
+1 -1
View File
@@ -295,7 +295,7 @@ ENTRY(early_idt_handler)
ja 0f
movl $1,%eax
salq %cl,%rax
testl $0x27d00,%eax
testl $EXCEPTION_ERRCODE_MASK,%eax
je 0f
popq %r8 # get error code
0: movq 0(%rsp),%rcx # get ip