Skip to content
Snippets Groups Projects
Verified Commit 75b78273 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Load gdt before and after thunk

parent 6ed05fca
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,9 @@ thunk:
; save esp
mov [.esp], esp
; load gdt
lgdt [gdtr]
; far jump to protected mode 16-bit
jmp gdt.pm16_code:.pm16
......@@ -121,6 +124,9 @@ USE16
; save registers
pushad
; load gdt (BIOS sometimes overwrites this)
lgdt [gdtr]
; restore cr0, will enable protected mode
mov eax, [.cr0]
mov cr0, eax
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment