1 #include <machine/asm.h>
2 #include <machine/vm.h>
11 /* %cs has some value and we must use the same for data */
15 /* load gdt and idt prepared by bsp */
16 lgdtl _C_LABEL(__ap_gdt) - _C_LABEL(trampoline)
17 lidtl _C_LABEL(__ap_idt) - _C_LABEL(trampoline)
19 /* switch to protected mode */
24 /* set page table feature flags: cr4.PSE on, cr4.PGE off */
26 orl $I386_CR4_PSE, %eax /* Turn on PSE */
27 andl $~I386_CR4_PGE, %eax /* Turn off PGE */
30 /* load boot cr3 and turn PG on so CPU can see all of memory */
31 movl _C_LABEL(__ap_pt) - _C_LABEL(trampoline), %eax
34 orl $I386_CR0_PG, %ecx
37 /* turn on cr4.PGE after cr0.PG is on */
39 orl $I386_CR4_PGE, %eax
42 /* jump into regular highly mapped kernel */
43 ljmpl $KERN_CS_SELECTOR, $_C_LABEL(startup_ap_32)
55 .space GDT_SIZE*DESC_SIZE
57 .space IDT_SIZE*DESC_SIZE
58 LABEL(__trampoline_end)