|
@@ -544,6 +544,10 @@ ENDPROC(early_idt_handlers)
|
|
/* This is global to keep gas from relaxing the jumps */
|
|
/* This is global to keep gas from relaxing the jumps */
|
|
ENTRY(early_idt_handler)
|
|
ENTRY(early_idt_handler)
|
|
cld
|
|
cld
|
|
|
|
+
|
|
|
|
+ cmpl $X86_TRAP_NMI,(%esp)
|
|
|
|
+ je is_nmi # Ignore NMI
|
|
|
|
+
|
|
cmpl $2,%ss:early_recursion_flag
|
|
cmpl $2,%ss:early_recursion_flag
|
|
je hlt_loop
|
|
je hlt_loop
|
|
incl %ss:early_recursion_flag
|
|
incl %ss:early_recursion_flag
|
|
@@ -594,8 +598,9 @@ ex_entry:
|
|
pop %edx
|
|
pop %edx
|
|
pop %ecx
|
|
pop %ecx
|
|
pop %eax
|
|
pop %eax
|
|
- addl $8,%esp /* drop vector number and error code */
|
|
|
|
decl %ss:early_recursion_flag
|
|
decl %ss:early_recursion_flag
|
|
|
|
+is_nmi:
|
|
|
|
+ addl $8,%esp /* drop vector number and error code */
|
|
iret
|
|
iret
|
|
ENDPROC(early_idt_handler)
|
|
ENDPROC(early_idt_handler)
|
|
|
|
|