1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2025-02-24 15:55:41 -05:00
kernel/paging.asm

30 lines
340 B
NASM
Raw Normal View History

2017-11-04 14:59:01 +00:00
[GLOBAL read_cr0]
[GLOBAL read_cr4]
[GLOBAL write_cr0]
2017-11-04 14:43:07 +00:00
[GLOBAL write_cr3]
2017-11-04 14:59:01 +00:00
[GLOBAL write_cr4]
read_cr0:
mov eax, cr0
ret
read_cr4:
mov eax, cr4
ret
write_cr0:
mov eax, [esp+4]
mov cr0, eax
ret
2017-11-04 14:43:07 +00:00
write_cr3:
mov eax, [esp+4]
mov cr3, eax
ret
2017-11-04 14:59:01 +00:00
write_cr4:
mov eax, [esp+4]
mov cr4, eax
ret