Issue created by Wayne Thornton: https://gitlab.rtems.org/rtems/docs/rtems-docs/-/work_items/149
## Description: We have introduced a new Super Core architecture hook, `_CPU_Spin_wait()`, to mitigate aggressive speculative execution penalties, reduce thermal load, and lower bus contention during SMP spin-wait polling loops. The reference template is currently documented in `cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h` and natively implemented for `x86_64` upon merging of rtems/rtos/rtems!1256 and closing of rtems/rtos/rtems#5648 The RTEMS CPU Architecture Supplement (`rtems-docs/cpu-supplement`) needs to be updated to formalize this interface for future architecture and BSP maintainers. ## Suggested Implementation: CPU Porting Guide Chapter: Add a new documentation entry under the CPU architecture support functions/macros section (alongside interfaces such as `_CPU_Context_switch` and `_CPU_Thread_Idle_body`). The documentation should detail: The purpose of the hook: throttling the processor instruction pipeline during tight polling loops to prevent speculative execution floods and memory controller saturation. The default fallback behavior: utilizing `RTEMS_COMPILER_MEMORY_BARRIER()` when no native hardware instruction is available, guaranteeing compliance with the C memory model during busy-loops. The guidelines for architecture maintainers: overriding the default implementation with an optimal inline assembly pause/yield instruction (e.g., `pause` on x86_64/RISC-V or `yield` on ARM/AArch64). x86_64 Architecture Chapter: Add a brief note under the target-specific or SMP features section documenting that `_CPU_Spin_wait()` is natively implemented for `x86_64` using the `pause` instruction. Verification: Validate that the Sphinx documentation builds cleanly without syntax or cross-referencing errors using `make html` (or the equivalent `Waf` doc build command) within the `rtems-docs` repository, and verify that the new section renders correctly in the generated HTML output. <!-- Pre-set options - milestone --> -- View it on GitLab: https://gitlab.rtems.org/rtems/docs/rtems-docs/-/work_items/149 You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/4-2rtd57lqv80t6j6bipu7hf9p2-j/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
_______________________________________________ bugs mailing list [email protected] http://lists.rtems.org/mailman/listinfo/bugs
