diff options
Diffstat (limited to 'Kernel/Arch/aarch64')
-rw-r--r-- | Kernel/Arch/aarch64/Aarch64Asm.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Kernel/Arch/aarch64/Aarch64Asm.h b/Kernel/Arch/aarch64/Aarch64Asm.h index 41276949c5..ceeb362316 100644 --- a/Kernel/Arch/aarch64/Aarch64Asm.h +++ b/Kernel/Arch/aarch64/Aarch64Asm.h @@ -10,6 +10,22 @@ namespace Kernel { +inline void set_ttbr1_el1(FlatPtr ttbr1_el1) +{ + asm("msr ttbr1_el1, %[value]" ::[value] "r"(ttbr1_el1)); +} + +inline void set_ttbr0_el1(FlatPtr ttbr0_el1) +{ + asm("msr ttbr0_el1, %[value]" ::[value] "r"(ttbr0_el1)); +} + +inline void flush() +{ + asm("dsb ish"); + asm("isb"); +} + [[noreturn]] inline void halt() { for (;;) { |