1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:07:44 +00:00

Kernel/aarch64: Implement Thread Local Storage

This commit adds Processor::set_thread_specific_data, and this function
is used to factor out architecture specific implementation of setting
the thread specific data. This function is implemented for
aarch64 and x86_64, and the callsites are changed to use this function
instead.
This commit is contained in:
Timon Kruiper 2023-02-15 19:49:37 +01:00 committed by Jelle Raaijmakers
parent 7d0917f50b
commit cfd73e5d9f
6 changed files with 24 additions and 6 deletions

View file

@ -37,6 +37,11 @@ inline void set_sp_el1(FlatPtr sp_el1)
asm("msr sp_el1, %[value]" ::[value] "r"(sp_el1));
}
inline void set_tpidr_el0(FlatPtr tpidr_el0)
{
asm("msr tpidr_el0, %[value]" ::[value] "r"(tpidr_el0));
}
inline void flush()
{
asm("dsb ish");