1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2024-11-20 11:16:10 -05:00
kernel/arch/paging.asm

30 lines
340 B
NASM
Raw Normal View History

2017-11-04 10:59:01 -04:00
[GLOBAL read_cr0]
[GLOBAL read_cr4]
[GLOBAL write_cr0]
2017-11-04 10:43:07 -04:00
[GLOBAL write_cr3]
2017-11-04 10:59:01 -04: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 10:43:07 -04:00
write_cr3:
mov eax, [esp+4]
mov cr3, eax
ret
2017-11-04 10:59:01 -04:00
write_cr4:
mov eax, [esp+4]
mov cr4, eax
ret