hujun260 opened a new pull request, #20801: URL: https://github.com/apache/nuttx/pull/20801
## Summary On ARM64, keep the current thread's TLS information pointer in `TPIDR_EL0`. The ARM64 implementation provides `up_tls_info()` by reading `TPIDR_EL0`. The register is initialized during primary and secondary CPU boot and updated whenever the current task changes through interrupt or syscall handling. Specifically: 1. Add the ARM64 `up_tls_info()` implementation using `TPIDR_EL0`. 2. Initialize `TPIDR_EL0` with the idle stack allocation during CPU boot. 3. Update `TPIDR_EL0` with the new task's stack allocation pointer after an interrupt context switch. 4. Update `TPIDR_EL0` after syscall handling. 5. Clear `TPIDR_EL0` during the initial ARM64 assembly startup sequence. ## Impact ARM64 only. The TLS information for the current task can be obtained directly from `TPIDR_EL0`, avoiding a stack-pointer-based lookup and ensuring that the TLS pointer follows the currently running task across interrupt and syscall context switches. ## Testing Build: ```text rm -rf build cmake -B build -DBOARD_CONFIG=qemu-armv8a:nsh_smp -GNinja cmake --build build -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
