diff options
author | James Mintram <me@jamesrm.com> | 2021-11-24 20:09:43 +0000 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-11-28 22:01:21 -0800 |
commit | 271b9b8da3a5c05fe03df4869a688b8ea33cf205 (patch) | |
tree | f302168aacafd13ab84b46f76ef580bdea751e05 /Kernel/Arch/aarch64 | |
parent | c2d7e200eb1cc01567e635b2d84ab59505521feb (diff) | |
download | serenity-271b9b8da3a5c05fe03df4869a688b8ea33cf205.zip |
Kernel: Set up and activate the MMU in the aarch64 perkernel
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 (;;) { |