3 #if defined(CONFIG_X86_BL_MB) || defined(CONFIG_X86_BL_MB2)
4 #include "sys/boot/multiboot.S.inc"
7 #include "sys/mm/mempart64.h"
35 .type start_, @function
42 movl $__boot_stack_top, %esp
46 # first, setup a simple initial page table
47 # to enable transition to IA32e
49 # L0 linkage to L1, RWX
55 movl %ebx, _tmp_l0 + 4
60 movl %ebx, _tmp_l1 + 4
63 addl $0x40000000, %eax
64 movl %eax, _tmp_l1 + 8
65 movl %ebx, _tmp_l1 + 12
68 addl $0x40000000, %eax
69 movl %eax, _tmp_l1 + 16
70 movl %ebx, _tmp_l1 + 20
73 addl $0x40000000, %eax
74 movl %eax, _tmp_l1 + 24
75 movl %ebx, _tmp_l1 + 28
80 # now, commencing transition
83 orl $(1 << 5), %eax # PAE
86 movl $0xc0000080, %ecx
88 orl $(1 << 8), %eax # IA32_EFER.LME
89 orl $(1 << 11), %eax # IA32_EFER.NXE
93 orl $(1 << 31), %eax # PG
99 # although cpu might already cleared for us upon mode switching
105 # x86_64 compatibility mode
106 # load a temporary gdt for getting into long mode
110 movl $__tmp_gdt, 2(%esp)
116 # do a far jump to switch cs
131 movabsq $hhk_entry_, %rax