调整一个Debug代价最小的指令顺序

This commit is contained in:
pointer-to-bios 2023-12-03 17:45:02 +08:00
parent e75c342c4b
commit ce139b3aaa
1 changed files with 4 additions and 17 deletions

View File

@ -35,16 +35,14 @@ init32:
loop init32_loop0
; 加载GDTR和段寄存器
db 0x66
lgdt [0x104028]
jmp after_lgdt
after_lgdt:
mov ax, 0x10
mov ds, ax
; mov es, ax
; mov ss, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
db 0x66
lgdt [0x104028]
; 打开PAE
mov eax, cr4
@ -96,14 +94,3 @@ gdt_end:
gdt_ptr:
dw gdt_end - gdt - 1
dq gdt
; 临时的32位分段
gdt32:
dq 0
dq 0x00cf9a000000ffff
dq 0x00cf92000000ffff
gdt32_end:
gdt32_ptr:
dw gdt32_end - gdt32_end - 1
dd gdt32