Repository navigation
Conversation
Generated by AI: GPT-5.6 Terra
Generated by AI: GPT-5.6 Terra
The new Cortex-M55 port required GNU C extensions to build. Several assembly files also needed preprocessing, and the port lacked the current secure stack and context save checks used by the maintained ports. Shared memory limits mixed address and MPU attribute bits. Used C99-compatible GNU assembly syntax and preprocessed the mode-specific sources. Applied the maintained checks to GNU and IAR, corrected the MPU limit encoding, and ran the GNU module manager in secure-only mode on the AN547 QEMU machine. Inline CMSE register access retains the existing MISRA C:2023 Rule 1.2 and Directive 4.3 deviations for hardware access. GCC 14 built the dual-state GNU archives in C99 mode. QEMU passed 4/4 on M3, 4/4 on M4, and 3/3 on M55 with PRIMASK and with BASEPRI plus WFI. The M55 MPU limit regression failed before the encoding fix. Secure-only QEMU covered 90/97 executable lines and 30/39 branch outcomes in M55 manager C. IAR and STM32N6 were not run locally. Assisted-by: Codex (GPT-6.2-Sol) <noreply@openai.com>
The M55 module SVC handler skipped secure stack initialization, and the dispatcher validated thread arguments by size. Releasing an active stack left its address in the Secure stack registers. Dispatch the startup SVC by its return address, authenticate live thread objects, and clear the active stack registers and context ownership on release. GNU register access uses MISRA C:2023 Rule 1.2 and Directive 4.3 deviations for hardware access. Rule 11.6 applies to comparing a stack limit address with the register value. QEMU passed 4/4 on M3, 4/4 on M4, and 3/3 in each M55 secure-only and dual-state interrupt configuration. The startup regression failed before the fix. GCC covered 97/97 lines and 39/39 branch outcomes in secure-only GNU M55 manager C and 206/232 lines and 92/121 branch outcomes in dual-state manager C. IAR and STM32N6 testing of this follow-up remains outstanding. Assisted-by: Codex (GPT-6.2-Sol) <noreply@openai.com> Signed-off-by: Frédéric Desbiens <frederic.desbiens@eclipse-foundation.org>
The dual-state module tests exercised secure stack allocation and release with room in the allocator and the context pool. They left the startup and interrupt caller checks in the public APIs partly untested. Bounded the QEMU Secure heap and added a regression that exhausts both resources, retries after a release, and calls the public APIs during startup and from timer callbacks. The fixture documents its MISRA C:2023 deviations for the heap's alignment and the newlib system-call interface. GCC 14 and QEMU passed 26/26 across seven Cortex-M configurations. The test failed when allocation stopped returning a context after malloc failure. Combined M55 dual-state manager C coverage reached 216/232 lines and 101/121 branch outcomes. Both secure stack API wrappers reached full line and branch coverage. Assisted-by: Codex (GPT-6.2-Sol) <noreply@openai.com> Signed-off-by: Frédéric Desbiens <frederic.desbiens@eclipse-foundation.org>
The dual-state QEMU tests covered normal secure stack operations, resource exhaustion, and timer callers. Secure-side rejection paths remained uncovered. Moved register access into GNU port macros and added a Linux regression that compiles the port source with a simulated register bank and CMSE decisions. The Cortex-M55 object retained identical instructions and relocations. GCC 14 passed 26/26 QEMU tests and 14/14 Linux Module Manager tests. QEMU exercised 216/232 GNU dual-state manager C lines and 101/121 branch outcomes. Combined with the Linux guard test, coverage reached 232/232 lines and 121/121 branch outcomes. Assisted-by: Codex (GPT-6.2-Sol) <noreply@openai.com> Signed-off-by: Frédéric Desbiens <frederic.desbiens@eclipse-foundation.org>
|
@rahmanih We’ll carry the Cortex-M55 fixes from #810 into the M85 port while #810 goes through verification. That includes the GNU C99 build and assembly preprocessing, secure-stack startup and release, thread-handle validation, and shared MPU limits. Once #810 merges, we’ll rebase the M85 commit onto Once that head is ready, could you rerun your STM32V8 tests with GNU and IAR in secure-only and dual-state modes? Please check the protected module lifecycle and shared-memory access in both modes. In dual-state mode, please also verify secure-stack initialization at boot and allocation, use across context switches, and release. Please share the compiler versions and results here. |
The Cortex-M55 tests overlapped new Module Manager and pointer-context tests on dev. The M55 shell called only scalar entries, so pointer workers did not start when the opt-in APIs were enabled. Preserved the Cortex-A35 tests and gave the QEMU results distinct slots. Used the shared module entry dispatcher in the GNU and IAR M55 shells. The QEMU workflow exercises both pointer settings across the three ports. Arm GNU 14.2 and QEMU 10.2 passed 38/38 tests across ten configurations, including both M55 security modes and dual-state timer ISR processing. GCC 14 passed 136/136 Linux host tests. Assisted-by: Codex (GPT-6.2-Sol) <noreply@openai.com>
|
@fdesbiens |
The Cortex-M85 contribution was based on the original Cortex-M55 port. The Cortex-M55 branch has since integrated current dev and gained fixes and regression coverage. Merged the updated Cortex-M55 branch to keep the existing Cortex-M85 contribution and its prerequisite history. Git verified a clean merge and confirmed that the result differs from the updated Cortex-M55 branch only by the original Cortex-M85 files. Assisted-by: Codex (GPT-6.2-Sol) <noreply@openai.com>
The Cortex-M85 port inherited the original Cortex-M55 code, including unpreprocessed GNU assembly and incomplete Secure stack and module entry handling. Applied the corresponding GNU and IAR fixes for stack initialization and release, module handle checks, shared MPU capacity, and pointer entry dispatch. Extended the host guard test to both ports and checked pool exhaustion, allocation rollback, and save and restore. Arm GNU 14.2 built the manager and module library in six configurations with zero warnings. GCC 14 passed 137/137 Linux tests and covered 118/118 lines and 62/62 branch outcomes in each host Secure stack build. Assisted-by: Codex (GPT-6.2-Sol) <noreply@openai.com>
|
Hi @rahmanih, once I push the updated #811 head, could you run a first pass on STM32V8 with IAR and
Please share the board, IAR version, configurations tested, and results. |
Generated by AI: GPT-5.6 Terra
PR checklist