Add write_cr0()
This commit is contained in:
parent
59e084c234
commit
11f922da33
@ -155,6 +155,11 @@ ulong read_cr0()
|
||||
return __asm!ulong("mov %cr0, %rax", "={rax}");
|
||||
}
|
||||
|
||||
void write_cr0(ulong v)
|
||||
{
|
||||
__asm("mov $0, %cr0", "r", v);
|
||||
}
|
||||
|
||||
ulong read_cr2()
|
||||
{
|
||||
return __asm!ulong("mov %cr2, %rax", "={rax}");
|
||||
|
Loading…
x
Reference in New Issue
Block a user