ladybird/Kernel/Arch/aarch64
Sönke Holz 243d7003a2 Kernel+LibC+LibELF: Move TLS handling to userspace
This removes the allocate_tls syscall and adds an archctl option to set
the fs_base for the current thread on x86-64, since you can't set that
register from userspace. enter_thread_context loads the fs_base for the
next thread on each context switch.
This also moves tpidr_el0 (the thread pointer register on AArch64) to
the register state, so it gets properly saved/restored on context
switches.

The userspace TLS allocation code is kept pretty similar to the original
kernel TLS code, aside from a couple of style changes.

We also have to add a new argument "tls_pointer" to
SC_create_thread_params, as we otherwise can't prevent race conditions
between setting the thread pointer register and signal handling code
that might be triggered before the thread pointer was set, which could
use TLS.
2024-04-19 16:46:47 -06:00
..
Firmware/ACPI Kernel/ACPI: Make most of StaticParsing methods to be platform-agnostic 2023-06-19 23:49:00 +02:00
RPi Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
archctl.cpp Kernel+LibC: Introduce new archctl syscall 2024-04-19 16:46:47 -06:00
ArchSpecificThreadData.h Kernel: Add a Thread member for arch-specific data 2024-04-19 16:46:47 -06:00
ASM_wrapper.h Kernel: Share Processor class (and others) across architectures 2023-10-03 16:08:29 -06:00
boot.S Kernel/aarch64: Execute kernel with SP_EL1 instead of SP_EL0 2023-01-27 11:41:43 +01:00
BootPPMParser.cpp Kernel: Remove Prekernel namespace in the aarch64 Kernel 2022-05-12 23:14:05 +02:00
BootPPMParser.h Kernel: Remove Prekernel namespace in the aarch64 Kernel 2022-05-12 23:14:05 +02:00
CPU.h Kernel: Move Memory/PageDirectory.{cpp,h} to arch-specific directory 2023-01-27 11:41:43 +01:00
CPUID.cpp Everywhere: Change all XXX into FIXME or remove as appropriate 2023-02-15 23:33:25 +01:00
CPUID.h Everywhere: Move global Kernel pattern code to Kernel/Library directory 2023-06-04 21:32:34 +02:00
CurrentTime.cpp Kernel: Fix build error on AARCH64 2022-10-15 06:01:45 +00:00
Dummy.cpp Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
Exceptions.cpp Kernel: Share Processor class (and others) across architectures 2023-10-03 16:08:29 -06:00
FPUState.h Kernel: Share Processor class (and others) across architectures 2023-10-03 16:08:29 -06:00
InterruptManagement.cpp Kernel: Stub more functions to progress aarch64 build 2022-10-26 20:01:45 +02:00
InterruptManagement.h Kernel: Stub more functions to progress aarch64 build 2022-10-26 20:01:45 +02:00
Interrupts.cpp Kernel+LibC+LibELF: Move TLS handling to userspace 2024-04-19 16:46:47 -06:00
IRQController.h AK+Kernel: Add AK::AtomicRefCounted and use everywhere in the kernel 2022-08-20 17:15:52 +02:00
kprintf.cpp Kernel: Move all Graphics-related code into Devices/GPU directory 2023-06-06 00:40:32 +02:00
linker.ld Kernel/aarch64: Subtract KERNEL_MAPPING_BASE from driver_init section 2023-09-30 16:58:15 +02:00
MainIdRegister.cpp Revert "Kernel: Remove old ‘main id register accessorʼ for Aarch64" 2023-02-17 11:29:33 -07:00
MainIdRegister.h Revert "Kernel: Remove old ‘main id register accessorʼ for Aarch64" 2023-02-17 11:29:33 -07:00
mcontext.h Kernel+LibC: Modify aarch64's __mcontext to store registers in an array 2023-04-06 21:19:58 +03:00
MMU.cpp Kernel: Move all boot-related code to the new Boot subdirectory 2023-06-04 21:32:34 +02:00
PageDirectory.cpp Kernel: Move InterruptDisabler to the Interrupts subdirectory 2023-06-04 21:32:34 +02:00
PageDirectory.h AK: Make IndexSequence use size_t 2024-02-11 18:53:00 +01:00
Panic.cpp Everywhere: Move global Kernel pattern code to Kernel/Library directory 2023-06-04 21:32:34 +02:00
PowerState.cpp Kernel: Simplify reboot & poweroff code flow a bit 2023-06-27 20:04:42 +02:00
pre_init.cpp Kernel: Move Memory/PageDirectory.{cpp,h} to arch-specific directory 2023-01-27 11:41:43 +01:00
Processor.cpp Kernel+LibC+LibELF: Move TLS handling to userspace 2024-04-19 16:46:47 -06:00
Processor.h Kernel: Share Processor class (and others) across architectures 2023-10-03 16:08:29 -06:00
Registers.h Kernel/aarch64: Use unsigned values in the register bitfields 2023-07-05 08:17:51 +01:00
RegisterState.h Kernel+LibC+LibELF: Move TLS handling to userspace 2024-04-19 16:46:47 -06:00
SafeMem.cpp Everywhere: Move global Kernel pattern code to Kernel/Library directory 2023-06-04 21:32:34 +02:00
SmapDisabler.cpp Kernel: Use default constructors/destructors 2022-03-17 00:51:36 -07:00
ThreadRegisters.h Kernel+LibC+LibELF: Move TLS handling to userspace 2024-04-19 16:46:47 -06:00
TrapFrame.h AK: Make IndexSequence use size_t 2024-02-11 18:53:00 +01:00
vector_table.S Kernel+LibC+LibELF: Move TLS handling to userspace 2024-04-19 16:46:47 -06:00