diff options
Diffstat (limited to 'arch/x86_64/kernel/head.S')
-rw-r--r-- | arch/x86_64/kernel/head.S | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S index 02fc7fa0ea28..6df05e6034fa 100644 --- a/arch/x86_64/kernel/head.S +++ b/arch/x86_64/kernel/head.S | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | .text | 28 | .text |
29 | .section .bootstrap.text | ||
29 | .code32 | 30 | .code32 |
30 | .globl startup_32 | 31 | .globl startup_32 |
31 | /* %bx: 1 if coming from smp trampoline on secondary cpu */ | 32 | /* %bx: 1 if coming from smp trampoline on secondary cpu */ |
@@ -192,7 +193,8 @@ startup_64: | |||
192 | movq initial_code(%rip),%rax | 193 | movq initial_code(%rip),%rax |
193 | jmp *%rax | 194 | jmp *%rax |
194 | 195 | ||
195 | /* SMP bootup changes these two */ | 196 | /* SMP bootup changes these two */ |
197 | .align 8 | ||
196 | .globl initial_code | 198 | .globl initial_code |
197 | initial_code: | 199 | initial_code: |
198 | .quad x86_64_start_kernel | 200 | .quad x86_64_start_kernel |
@@ -237,7 +239,7 @@ ENTRY(no_long_mode) | |||
237 | .org 0xf00 | 239 | .org 0xf00 |
238 | .globl pGDT32 | 240 | .globl pGDT32 |
239 | pGDT32: | 241 | pGDT32: |
240 | .word gdt_end-cpu_gdt_table | 242 | .word gdt_end-cpu_gdt_table-1 |
241 | .long cpu_gdt_table-__START_KERNEL_map | 243 | .long cpu_gdt_table-__START_KERNEL_map |
242 | 244 | ||
243 | .org 0xf10 | 245 | .org 0xf10 |
@@ -293,8 +295,6 @@ NEXT_PAGE(level2_kernel_pgt) | |||
293 | /* Module mapping starts here */ | 295 | /* Module mapping starts here */ |
294 | .fill 492,8,0 | 296 | .fill 492,8,0 |
295 | 297 | ||
296 | NEXT_PAGE(empty_zero_page) | ||
297 | |||
298 | NEXT_PAGE(level3_physmem_pgt) | 298 | NEXT_PAGE(level3_physmem_pgt) |
299 | .quad phys_level2_kernel_pgt | 0x007 /* so that __va works even before pagetable_init */ | 299 | .quad phys_level2_kernel_pgt | 0x007 /* so that __va works even before pagetable_init */ |
300 | .fill 511,8,0 | 300 | .fill 511,8,0 |
@@ -337,7 +337,7 @@ ENTRY(boot_level4_pgt) | |||
337 | .align 16 | 337 | .align 16 |
338 | .globl cpu_gdt_descr | 338 | .globl cpu_gdt_descr |
339 | cpu_gdt_descr: | 339 | cpu_gdt_descr: |
340 | .word gdt_end-cpu_gdt_table | 340 | .word gdt_end-cpu_gdt_table-1 |
341 | gdt: | 341 | gdt: |
342 | .quad cpu_gdt_table | 342 | .quad cpu_gdt_table |
343 | #ifdef CONFIG_SMP | 343 | #ifdef CONFIG_SMP |
@@ -352,7 +352,8 @@ gdt: | |||
352 | * Also sysret mandates a special GDT layout | 352 | * Also sysret mandates a special GDT layout |
353 | */ | 353 | */ |
354 | 354 | ||
355 | .align PAGE_SIZE | 355 | .section .data.page_aligned, "aw" |
356 | .align PAGE_SIZE | ||
356 | 357 | ||
357 | /* The TLS descriptors are currently at a different place compared to i386. | 358 | /* The TLS descriptors are currently at a different place compared to i386. |
358 | Hopefully nobody expects them at a fixed place (Wine?) */ | 359 | Hopefully nobody expects them at a fixed place (Wine?) */ |
@@ -378,9 +379,12 @@ gdt_end: | |||
378 | /* zero the remaining page */ | 379 | /* zero the remaining page */ |
379 | .fill PAGE_SIZE / 8 - GDT_ENTRIES,8,0 | 380 | .fill PAGE_SIZE / 8 - GDT_ENTRIES,8,0 |
380 | 381 | ||
381 | ENTRY(idt_table) | 382 | .section .bss, "aw", @nobits |
382 | .rept 256 | 383 | .align L1_CACHE_BYTES |
383 | .quad 0 | 384 | ENTRY(idt_table) |
384 | .quad 0 | 385 | .skip 256 * 16 |
385 | .endr | ||
386 | 386 | ||
387 | .section .bss.page_aligned, "aw", @nobits | ||
388 | .align PAGE_SIZE | ||
389 | ENTRY(empty_zero_page) | ||
390 | .skip PAGE_SIZE | ||