0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #include <linux/linkage.h>
0024 #include <asm/segment.h>
0025 #include <asm/page_types.h>
0026 #include "realmode.h"
0027
0028 .text
0029 .code16
0030
0031 .balign PAGE_SIZE
0032 SYM_CODE_START(trampoline_start)
0033 wbinvd # Needed for NUMA-Q should be harmless for others
0034
0035 LJMPW_RM(1f)
0036 1:
0037 mov %cs, %ax # Code and data in the same place
0038 mov %ax, %ds
0039
0040 cli # We should be safe anyway
0041
0042 movl tr_start, %eax # where we need to go
0043
0044
0045
0046
0047
0048
0049
0050 lidtl tr_idt # load idt with 0, 0
0051 lgdtl tr_gdt # load gdt with whatever is appropriate
0052
0053 movw $1, %dx # protected mode (PE) bit
0054 lmsw %dx # into protected mode
0055
0056 ljmpl $__BOOT_CS, $pa_startup_32
0057 SYM_CODE_END(trampoline_start)
0058
0059 .section ".text32","ax"
0060 .code32
0061 SYM_CODE_START(startup_32) # note: also used from wakeup_asm.S
0062 jmp *%eax
0063 SYM_CODE_END(startup_32)
0064
0065 .bss
0066 .balign 8
0067 SYM_DATA_START(trampoline_header)
0068 SYM_DATA_LOCAL(tr_start, .space 4)
0069 SYM_DATA_LOCAL(tr_gdt_pad, .space 2)
0070 SYM_DATA_LOCAL(tr_gdt, .space 6)
0071 SYM_DATA_END(trampoline_header)
0072
0073 #include "trampoline_common.S"