aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/head.S8
-rw-r--r--arch/x86_64/kernel/head.S15
2 files changed, 22 insertions, 1 deletions
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S
index f74dfc419b56..82714668d43b 100644
--- a/arch/i386/kernel/head.S
+++ b/arch/i386/kernel/head.S
@@ -168,6 +168,12 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
168.section .init.text,"ax",@progbits 168.section .init.text,"ax",@progbits
169#endif 169#endif
170 170
171 /* Do an early initialization of the fixmap area */
172 movl $(swapper_pg_dir - __PAGE_OFFSET), %edx
173 movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax
174 addl $0x007, %eax /* 0x007 = PRESENT+RW+USER */
175 movl %eax, 4092(%edx)
176
171#ifdef CONFIG_SMP 177#ifdef CONFIG_SMP
172ENTRY(startup_32_smp) 178ENTRY(startup_32_smp)
173 cld 179 cld
@@ -507,6 +513,8 @@ ENTRY(_stext)
507.section ".bss.page_aligned","w" 513.section ".bss.page_aligned","w"
508ENTRY(swapper_pg_dir) 514ENTRY(swapper_pg_dir)
509 .fill 1024,4,0 515 .fill 1024,4,0
516ENTRY(swapper_pg_pmd)
517 .fill 1024,4,0
510ENTRY(empty_zero_page) 518ENTRY(empty_zero_page)
511 .fill 4096,1,0 519 .fill 4096,1,0
512 520
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S
index 1fab487dee86..941c84baecc8 100644
--- a/arch/x86_64/kernel/head.S
+++ b/arch/x86_64/kernel/head.S
@@ -73,7 +73,11 @@ startup_64:
73 addq %rbp, init_level4_pgt + (511*8)(%rip) 73 addq %rbp, init_level4_pgt + (511*8)(%rip)
74 74
75 addq %rbp, level3_ident_pgt + 0(%rip) 75 addq %rbp, level3_ident_pgt + 0(%rip)
76
76 addq %rbp, level3_kernel_pgt + (510*8)(%rip) 77 addq %rbp, level3_kernel_pgt + (510*8)(%rip)
78 addq %rbp, level3_kernel_pgt + (511*8)(%rip)
79
80 addq %rbp, level2_fixmap_pgt + (506*8)(%rip)
77 81
78 /* Add an Identity mapping if I am above 1G */ 82 /* Add an Identity mapping if I am above 1G */
79 leaq _text(%rip), %rdi 83 leaq _text(%rip), %rdi
@@ -314,7 +318,16 @@ NEXT_PAGE(level3_kernel_pgt)
314 .fill 510,8,0 318 .fill 510,8,0
315 /* (2^48-(2*1024*1024*1024)-((2^39)*511))/(2^30) = 510 */ 319 /* (2^48-(2*1024*1024*1024)-((2^39)*511))/(2^30) = 510 */
316 .quad level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE 320 .quad level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE
317 .fill 1,8,0 321 .quad level2_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE
322
323NEXT_PAGE(level2_fixmap_pgt)
324 .fill 506,8,0
325 .quad level1_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE
326 /* 8MB reserved for vsyscalls + a 2MB hole = 4 + 1 entries */
327 .fill 5,8,0
328
329NEXT_PAGE(level1_fixmap_pgt)
330 .fill 512,8,0
318 331
319NEXT_PAGE(level2_ident_pgt) 332NEXT_PAGE(level2_ident_pgt)
320 /* Since I easily can, map the first 1G. 333 /* Since I easily can, map the first 1G.