Add write_cr3()
This commit is contained in:
1 parent
ef01239468
commit
9e3d9b18ea
1 file changed
+5
@@ -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}");
|
||||||
|
|||||||
Reference in new issue
Block a user