aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/head_64.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/head_64.S')
-rw-r--r--arch/x86/kernel/head_64.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index 8b4c35cb519a..1d5a7a361200 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -267,6 +267,7 @@ init_rsp:
267bad_address: 267bad_address:
268 jmp bad_address 268 jmp bad_address
269 269
270#ifdef CONFIG_EARLY_PRINTK
270.macro early_idt_tramp first, last 271.macro early_idt_tramp first, last
271 .ifgt \last-\first 272 .ifgt \last-\first
272 early_idt_tramp \first, \last-1 273 early_idt_tramp \first, \last-1
@@ -281,8 +282,10 @@ early_idt_handlers:
281 early_idt_tramp 64, 127 282 early_idt_tramp 64, 127
282 early_idt_tramp 128, 191 283 early_idt_tramp 128, 191
283 early_idt_tramp 192, 255 284 early_idt_tramp 192, 255
285#endif
284 286
285ENTRY(early_idt_handler) 287ENTRY(early_idt_handler)
288#ifdef CONFIG_EARLY_PRINTK
286 cmpl $2,early_recursion_flag(%rip) 289 cmpl $2,early_recursion_flag(%rip)
287 jz 1f 290 jz 1f
288 incl early_recursion_flag(%rip) 291 incl early_recursion_flag(%rip)
@@ -311,8 +314,11 @@ ENTRY(early_idt_handler)
311 movq 8(%rsp),%rsi # get rip again 314 movq 8(%rsp),%rsi # get rip again
312 call __print_symbol 315 call __print_symbol
313#endif 316#endif
317#endif /* EARLY_PRINTK */
3141: hlt 3181: hlt
315 jmp 1b 319 jmp 1b
320
321#ifdef CONFIG_EARLY_PRINTK
316early_recursion_flag: 322early_recursion_flag:
317 .long 0 323 .long 0
318 324
@@ -320,6 +326,7 @@ early_idt_msg:
320 .asciz "PANIC: early exception %02lx rip %lx:%lx error %lx cr2 %lx\n" 326 .asciz "PANIC: early exception %02lx rip %lx:%lx error %lx cr2 %lx\n"
321early_idt_ripmsg: 327early_idt_ripmsg:
322 .asciz "RIP %s\n" 328 .asciz "RIP %s\n"
329#endif /* CONFIG_EARLY_PRINTK */
323 330
324.balign PAGE_SIZE 331.balign PAGE_SIZE
325 332