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:
parent
c2d7e200eb
commit
271b9b8da3
5 changed files with 191 additions and 0 deletions
|
@ -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 (;;) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue