Add write_cr3()
This commit is contained in:
parent
ef01239468
commit
9e3d9b18ea
@ -15,6 +15,11 @@ ulong read_cr3()
|
|||||||
return __asm!ulong("mov %cr3, %rax", "={rax}");
|
return __asm!ulong("mov %cr3, %rax", "={rax}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void write_cr3(ulong v)
|
||||||
|
{
|
||||||
|
__asm("mov $0, %cr3", "r", v);
|
||||||
|
}
|
||||||
|
|
||||||
ulong read_cr4()
|
ulong read_cr4()
|
||||||
{
|
{
|
||||||
return __asm!ulong("mov %cr4, %rax", "={rax}");
|
return __asm!ulong("mov %cr4, %rax", "={rax}");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user