1
0
mirror of https://gitlab.os-k.eu/os-k-team/os-k.git synced 2023-08-25 14:03:10 +02:00
os-k/kaleid/kernel/mm/paging.asm

25 lines
335 B
NASM
Raw Normal View History

2019-05-14 14:39:35 +02:00
global MmEnableWriteProtect
global MmDisableWriteProtect
global MmLoadPML4
MmEnableWriteProtect:
push rax
mov rax, cr0
or rax, 1<<16
mov cr0, rax
pop rax
ret
MmDisableWriteProtect:
push rax
mov rax, cr0
and rax, ~(1<<16)
mov cr0, rax
pop rax
ret
MmLoadPML4:
mov cr3, rsi
ret