summaryrefslogtreecommitdiff
path: root/common_modules/module_manager
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-09-11 13:27:32 -0400
committerGitHub <[email protected]>2026-09-11 13:27:32 -0400
commitdde43b8ab2e8accfe636842d5216204f70682fc2 (patch)
tree9cd97f3790ba15e541fbdcf91c7a0927e7059f58 /common_modules/module_manager
parentc0aa4dbe2932bb12bb69545ff5d4945e0b019ffe (diff)
Replaced the stale system stack switch pseudo-code in the ARMv7-A ports with comments that describe what the code actually does (#735)
The context save, vectored context save and system return routines in the ARMv7-A ports carried pseudo-code comments claiming that they saved the thread stack pointer and then switched to _tx_thread_system_stack_ptr. Neither of those things happens, and none of these ports references that variable outside an unused IMPORT in their example builds. On ARMv7-A each processor mode has its own banked stack pointer. The IRQ handler branches to _tx_thread_context_save while still in IRQ mode, so the core's banked IRQ stack already serves as the system stack, and the thread stack pointer is stored in the control block by _tx_thread_context_restore, and only when the interrupt results in preemption. The scheduler runs on the banked SVC mode stack that the startup code sets up. There is nothing for a software stack switch to do. The comments were therefore misleading rather than merely redundant, and had led at least one user to try to restore the code they described. They are now replaced by a description of the actual mechanism. The AArch64 SMP ports keep their comments unchanged, because ARMv8-A does not bank a stack pointer per processor mode and those ports do reload _tx_thread_system_stack_ptr[core] explicitly. This is a comment-only change. Every changed line is a comment, and all twenty-five GNU variants still assemble cleanly for their target core. The fourteen files under ports/cortex_a{5,7,8,9,12,15,17} were regenerated from ports_arch/ARMv7-A/threadx/common/src/tx_thread_system_return.S with ports_arch/ARMv7-A/update.sh. The ARMv7-A SMP ports have no generator, so those files were edited directly. Fixes #734 Assisted-by: Copilot (Opus 5) <[email protected]>
Diffstat (limited to 'common_modules/module_manager')
0 files changed, 0 insertions, 0 deletions