Commit b1c931e3 authored by Eric W. Biderman's avatar Eric W. Biderman Committed by Linus Torvalds

x86: initial fixmap support

Needed to get fixed virtual address for USB debug and earlycon with mmio.
Signed-off-by: default avatarEric W. Biderman <ebiderman@xmisson.com>
Signed-off-by: default avatarYinghai Lu <yinghai.lu@sun.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d37bf60d
...@@ -168,6 +168,12 @@ page_pde_offset = (__PAGE_OFFSET >> 20); ...@@ -168,6 +168,12 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
.section .init.text,"ax",@progbits .section .init.text,"ax",@progbits
#endif #endif
/* Do an early initialization of the fixmap area */
movl $(swapper_pg_dir - __PAGE_OFFSET), %edx
movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax
addl $0x007, %eax /* 0x007 = PRESENT+RW+USER */
movl %eax, 4092(%edx)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
ENTRY(startup_32_smp) ENTRY(startup_32_smp)
cld cld
...@@ -507,6 +513,8 @@ ENTRY(_stext) ...@@ -507,6 +513,8 @@ ENTRY(_stext)
.section ".bss.page_aligned","w" .section ".bss.page_aligned","w"
ENTRY(swapper_pg_dir) ENTRY(swapper_pg_dir)
.fill 1024,4,0 .fill 1024,4,0
ENTRY(swapper_pg_pmd)
.fill 1024,4,0
ENTRY(empty_zero_page) ENTRY(empty_zero_page)
.fill 4096,1,0 .fill 4096,1,0
......
...@@ -73,7 +73,11 @@ startup_64: ...@@ -73,7 +73,11 @@ startup_64:
addq %rbp, init_level4_pgt + (511*8)(%rip) addq %rbp, init_level4_pgt + (511*8)(%rip)
addq %rbp, level3_ident_pgt + 0(%rip) addq %rbp, level3_ident_pgt + 0(%rip)
addq %rbp, level3_kernel_pgt + (510*8)(%rip) addq %rbp, level3_kernel_pgt + (510*8)(%rip)
addq %rbp, level3_kernel_pgt + (511*8)(%rip)
addq %rbp, level2_fixmap_pgt + (506*8)(%rip)
/* Add an Identity mapping if I am above 1G */ /* Add an Identity mapping if I am above 1G */
leaq _text(%rip), %rdi leaq _text(%rip), %rdi
...@@ -314,7 +318,16 @@ NEXT_PAGE(level3_kernel_pgt) ...@@ -314,7 +318,16 @@ NEXT_PAGE(level3_kernel_pgt)
.fill 510,8,0 .fill 510,8,0
/* (2^48-(2*1024*1024*1024)-((2^39)*511))/(2^30) = 510 */ /* (2^48-(2*1024*1024*1024)-((2^39)*511))/(2^30) = 510 */
.quad level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE .quad level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE
.fill 1,8,0 .quad level2_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE
NEXT_PAGE(level2_fixmap_pgt)
.fill 506,8,0
.quad level1_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE
/* 8MB reserved for vsyscalls + a 2MB hole = 4 + 1 entries */
.fill 5,8,0
NEXT_PAGE(level1_fixmap_pgt)
.fill 512,8,0
NEXT_PAGE(level2_ident_pgt) NEXT_PAGE(level2_ident_pgt)
/* Since I easily can, map the first 1G. /* Since I easily can, map the first 1G.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment