1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:47:35 +00:00

Kernel: Set up and activate the MMU in the aarch64 perkernel

This commit is contained in:
James Mintram 2021-11-24 20:09:43 +00:00 committed by Brian Gianforcaro
parent c2d7e200eb
commit 271b9b8da3
5 changed files with 191 additions and 0 deletions

View file

@ -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 (;;) {