Re:Pmode + Kernel
Posted: Tue Jun 08, 2004 3:36 pm
Code: Select all
cli ; Disable interrupts
lgdt [gdtDesc] ; Load our GDT
mov eax, cr0 ; EAX -> CR0
or eax, 1 ; Set first bet to 1
mov cr0, eax ; CR0 -> EAX
jmp 0x08:proMode ; Clear the instruction pipeline
[bits 32] ; Assemble 32 bit instructions
proMode: ; This is where we jump too
mov ax, 0x08 ; AX -> 0x08
mov ds, ax ; DS -> AX (0x08)
mov ss, ax ; SS -> AX (0x08)
mov esp, 0x90000 ; Setup stack at 0x90000
jmp 0x1000:0x0000 ; Jump to our kernel
jmp $ ; Hang if we get here
Code: Select all
00000711223e[CPU0 ] load_seg_reg(): not writable data segment
00000711223e[CPU0 ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting