mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
Kernel/aarch64: Add helper to get the current TTBR0_EL1
This commit is contained in:
parent
d9946c8e89
commit
9e90932bfb
1 changed files with 8 additions and 0 deletions
|
@ -24,6 +24,14 @@ inline void set_ttbr0_el1(FlatPtr ttbr0_el1)
|
|||
asm("msr ttbr0_el1, %[value]" ::[value] "r"(ttbr0_el1));
|
||||
}
|
||||
|
||||
inline FlatPtr get_ttbr0_el1()
|
||||
{
|
||||
FlatPtr ttbr0_el1;
|
||||
asm("mrs %[value], ttbr0_el1\n"
|
||||
: [value] "=r"(ttbr0_el1));
|
||||
return ttbr0_el1;
|
||||
}
|
||||
|
||||
inline void set_sp_el1(FlatPtr sp_el1)
|
||||
{
|
||||
asm("msr sp_el1, %[value]" ::[value] "r"(sp_el1));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue