x86: Invalidate LDT before handoff

This commit is contained in:
mintsuki 2021-07-06 02:13:25 +02:00
parent fa2a2d77bb
commit 572bcdae3b
3 changed files with 9 additions and 0 deletions

View File

@ -12,6 +12,9 @@ common_spinup:
lidt [invalid_idt]
xor eax, eax
lldt ax
; We don't need the return address
add esp, 4

View File

@ -53,6 +53,9 @@ bits 32
mov gs, ax
mov ss, ax
xor eax, eax
lldt ax
mov eax, 0x00000011
mov cr0, eax

View File

@ -31,6 +31,9 @@ smp_trampoline:
mov gs, ax
mov ss, ax
xor eax, eax
lldt ax
xor eax, eax
mov cr4, eax