diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2012-05-17 00:44:10 +0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2012-05-17 00:44:10 +0400 |
commit | 51edbe6a2f47c78c6c6e529999ee0a044fe59a89 (patch) | |
tree | 8e68fcbac877e409e04596e97f6868d7db8f3fe2 /arch/x86/realmode/rm/trampoline_64.S | |
parent | 796038799a72adb279d785c9154df6eeb98b6e8d (diff) | |
download | linux-51edbe6a2f47c78c6c6e529999ee0a044fe59a89.tar.xz |
x86, realmode: Move not-common bits out of trampoline_common.S
Move the bits that aren't actually common out of trampoline_common.S
and into the arch-specific files. Furthermore, make sure the page
directory is first in the .bss section for trampoline_64.S in order to
not waste an entire page of memory.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
Diffstat (limited to 'arch/x86/realmode/rm/trampoline_64.S')
-rw-r--r-- | arch/x86/realmode/rm/trampoline_64.S | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/x86/realmode/rm/trampoline_64.S b/arch/x86/realmode/rm/trampoline_64.S index 66e26f088288..1b9e1bc1ac5e 100644 --- a/arch/x86/realmode/rm/trampoline_64.S +++ b/arch/x86/realmode/rm/trampoline_64.S @@ -125,4 +125,29 @@ ENTRY(startup_64) # Now jump into the kernel using virtual addresses jmpq *tr_start(%rip) + .section ".rodata","a" + # Duplicate the global descriptor table + # so the kernel can live anywhere + .balign 16 + .globl tr_gdt +tr_gdt: + .short tr_gdt_end - tr_gdt - 1 # gdt limit + .long pa_tr_gdt + .short 0 + .quad 0x00cf9b000000ffff # __KERNEL32_CS + .quad 0x00af9b000000ffff # __KERNEL_CS + .quad 0x00cf93000000ffff # __KERNEL_DS +tr_gdt_end: + + .bss + .balign PAGE_SIZE +GLOBAL(trampoline_pgd) .space PAGE_SIZE + + .balign 8 +GLOBAL(trampoline_header) + tr_start: .space 8 + GLOBAL(tr_cr4) .space 4 + GLOBAL(tr_efer) .space 8 +END(trampoline_header) + #include "trampoline_common.S" |