mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
Kernel/aarch64: Add helper to get the current TTBR0_EL1
This commit is contained in:
committed by
Andreas Kling
parent
d9946c8e89
commit
9e90932bfb
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user