aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/realmode/rm/trampoline_common.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/realmode/rm/trampoline_common.S')
-rw-r--r--arch/x86/realmode/rm/trampoline_common.S19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/x86/realmode/rm/trampoline_common.S b/arch/x86/realmode/rm/trampoline_common.S
index c3f951c468c5..cac444b942f8 100644
--- a/arch/x86/realmode/rm/trampoline_common.S
+++ b/arch/x86/realmode/rm/trampoline_common.S
@@ -1,5 +1,20 @@
1 .section ".rodata","a" 1 .section ".rodata","a"
2 2
3#ifdef CONFIG_X86_64
4 # Duplicate the global descriptor table
5 # so the kernel can live anywhere
6 .balign 16
7 .globl tr_gdt
8tr_gdt:
9 .short tr_gdt_end - tr_gdt - 1 # gdt limit
10 .long pa_tr_gdt
11 .short 0
12 .quad 0x00cf9b000000ffff # __KERNEL32_CS
13 .quad 0x00af9b000000ffff # __KERNEL_CS
14 .quad 0x00cf93000000ffff # __KERNEL_DS
15tr_gdt_end:
16#endif
17
3 .balign 4 18 .balign 4
4tr_idt: .fill 1, 6, 0 19tr_idt: .fill 1, 6, 0
5 20
@@ -8,12 +23,16 @@ tr_idt: .fill 1, 6, 0
8 .balign 4 23 .balign 4
9GLOBAL(trampoline_status) .space 4 24GLOBAL(trampoline_status) .space 4
10 25
26 .balign 8
11GLOBAL(trampoline_header) 27GLOBAL(trampoline_header)
12#ifdef CONFIG_X86_32 28#ifdef CONFIG_X86_32
13 tr_start: .space 4 29 tr_start: .space 4
30 tr_gdt_pad: .space 2
14 tr_gdt: .space 6 31 tr_gdt: .space 6
15#else 32#else
16 tr_start: .space 8 33 tr_start: .space 8
34 GLOBAL(tr_cr4) .space 4
35 GLOBAL(tr_efer) .space 8
17#endif 36#endif
18END(trampoline_header) 37END(trampoline_header)
19 38