mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-07-10 13:29:45 -04:00
When MPU is enabled, the first item in the TCB is not the top of the stack but the stored context location. As a result, xSecureContext is located at a negative offset from that position rather than at offset 0. The current implementation unconditionally reads xSecureContext at offset 0, which returns an incorrect value when MPU is enabled. This commit updates vPortFreeSecureContext to read xSecureContext at the correcct offset based on the port configuration: - CM33/CM35P/CM52/CM55/CM85/STAR_MC3: -20 (or -36 with PAC enabled) - CM23: -20 (no PAC support) - Without MPU: 0 (xSecureContext remains at the top of stack) Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> |
||
|---|---|---|
| .. | ||
| non_secure | ||
| secure | ||
| copy_files.py | ||
| ReadMe.txt | ||
This directory tree contains the master copy of the FreeRTOS Armv8-M and Armv8.1-M ports. Do not use the files located here! These file are copied into separate FreeRTOS/Source/portable/[compiler]/ARM_[CM23|CM33|CM52|CM55|CM85|STAR_MC3]_NNN directories prior to each FreeRTOS release. If your Armv8-M and Armv8.1-M application uses TrustZone then use the files from the FreeRTOS/Source/portable/[compiler]/ARM_[CM23|CM33|CM52|CM55|CM85|STAR_MC3] directories. If your Armv8-M and Armv8.1-M application does not use TrustZone then use the files from the FreeRTOS/Source/portable/[compiler]/ARM_[CM23|CM33|CM52|CM55|CM85|STAR_MC3]_NTZ directories.