aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86_64/kernel/head.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S
index b6d8725c1f61..9bd2e7a4b81e 100644
--- a/arch/x86_64/kernel/head.S
+++ b/arch/x86_64/kernel/head.S
@@ -200,14 +200,22 @@ init_rsp:
200 .quad init_thread_union+THREAD_SIZE-8 200 .quad init_thread_union+THREAD_SIZE-8
201 201
202ENTRY(early_idt_handler) 202ENTRY(early_idt_handler)
203 cmpl $2,early_recursion_flag(%rip)
204 jz 1f
205 incl early_recursion_flag(%rip)
203 xorl %eax,%eax 206 xorl %eax,%eax
204 movq 8(%rsp),%rsi # get rip 207 movq 8(%rsp),%rsi # get rip
205 movq (%rsp),%rdx 208 movq (%rsp),%rdx
206 movq %cr2,%rcx 209 movq %cr2,%rcx
207 leaq early_idt_msg(%rip),%rdi 210 leaq early_idt_msg(%rip),%rdi
208 call early_printk 211 call early_printk
212 cmpl $2,early_recursion_flag(%rip)
213 jz 1f
214 call dump_stack
2091: hlt 2151: hlt
210 jmp 1b 216 jmp 1b
217early_recursion_flag:
218 .long 0
211 219
212early_idt_msg: 220early_idt_msg:
213 .asciz "PANIC: early exception rip %lx error %lx cr2 %lx\n" 221 .asciz "PANIC: early exception rip %lx error %lx cr2 %lx\n"