lmsw %ax # CR0.PE = 1 (enter protected mode)
ljmpl $BOOT_CS32,$bootsym_rel(trampoline_protmode_entry,6)
- .balign 8
- .word 0
-idt_48: .word 0, 0, 0 # base = limit = 0
- .word 0
-gdt_48: .word 6*8-1
- .long bootsym_rel(trampoline_gdt,4)
-
trampoline_gdt:
/* 0x0000: unused */
.quad 0x0000000000000000
#include "wakeup.S"
+ .balign 8
+ .word 0
+idt_48: .word 0, 0, 0 # base = limit = 0
+ .word 0
+gdt_48: .word 6*8-1
+ .long bootsym_rel(trampoline_gdt,4)
+
/* The first page of trampoline is permanent, the rest boot-time only. */
/* Reuse the boot trampoline on the 1st trampoline page as stack for wakeup. */
.equ wakeup_stack, trampoline_start + PAGE_SIZE
movw %ax, %fs
movw $0x0e00 + 'L', %fs:(0x10)
- # boot trampoline is under 1M, and shift its start into
- # %fs to reference symbols in that area
- mov wakesym(trampoline_seg), %fs
- lidt %fs:bootsym(idt_48)
- lgdt %fs:bootsym(gdt_48)
+ lidt wakesym(idt_48)
+ lgdt wakesym(gdt_48)
movw $1, %ax
lmsw %ax # Turn on CR0.PE
.long 0
GLOBAL(video_flags)
.long 0
-trampoline_seg: .word 0
- .pushsection .trampoline_seg, "a"
- .long trampoline_seg - .
- .popsection
.code32