Ömer Özsipahi feature: C kernel
switch_pm.asm 502 B
_switch_to_pm:
cli
lgdt [_gdt_descriptor]
mov eax, cr0
or eax, 0x1
mov cr0, eax
jmp CODE_SEG:_init_pm
[BITS 32]
_init_pm:
mov ax, DATA_SEG
mov ds, ax
mov ss, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ebp, 0x90000
mov esp, ebp
call CODE_SEG:_pm_defs
_pm_defs:
jmp _begin_pm
DEFINE_PRINT_STR_VGA _print_str_vga32, ebx, ecx, edx
_begin_pm:
mov ebx, MSG_PROT_MODE
mov ecx, 9
call _print_str_vga32
call set_pg_table