Now the only thing my os does (in bochs) is switch to 32 bit mode and crash, I managed to track it down to here using the bochs's debugger
Code: Select all
Next at t=35427029
(0) [0x000000007cfa] 0008:0000000000007cfa (unk. ctxt): wrmsr ; 0f30
<bochs:26>
Next at t=35427030
(0) [0x000000007cfc] 0008:0000000000007cfc (unk. ctxt): mov eax, cr0 ; 0f20c0
<bochs:27>
Next at t=35427031
(0) [0x000000007cff] 0008:0000000000007cff (unk. ctxt): or eax, 0x0b8000bf ; 0dbf00800b
<bochs:28>
Next at t=35427032
(0) [0x000000007d04] 0008:0000000000007d04 (unk. ctxt): add byte ptr ds:[eax-72], cl ; 0048b8
<bochs:29>
Next at t=35427033
(0) [0x000000007d07] 0008:0000000000007d07 (unk. ctxt): and byte ptr ds:[edi], cl ; 200f
<bochs:30>
Code: Select all
mov eax, cr0 ; Set the A-register to control register 0.
or eax, 1 << 31 ; Set the PG-bit, which is the 32nd bit (bit 31).
mov cr0, eax ; Set control register 0 to the A-register.
jmp $