mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
If xTaskCreate API is used to create a task, the task's stack is allocated on heap using pvPortMalloc. This places the task's stack in the privileged data section, if the heap is placed in the privileged data section. We use a separate MPU region to grant a task access to its stack. If the task's stack is in the privileged data section, this results in overlapping MPU regions as privileged data section is already protected using a separate MPU region. ARMv8-M does not allow overlapping MPU regions and this results in a fault. This commit ensures to not use a separate MPU region for the task's stack if it lies within the privileged data section. Note that if the heap memory is placed in the privileged data section, the xTaskCreate API cannot be used to create an unprivileged task as the task's stack will be in the privileged data section and the task won't have access to it. xTaskCreateRestricted and xTaskCreateRestrictedStatic API should be used to create unprivileged tasks. Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> |
||
---|---|---|
.. | ||
78K0R | ||
ARM_CA5_No_GIC | ||
ARM_CA9 | ||
ARM_CM0 | ||
ARM_CM3 | ||
ARM_CM4F | ||
ARM_CM4F_MPU | ||
ARM_CM7 | ||
ARM_CM23 | ||
ARM_CM23_NTZ/non_secure | ||
ARM_CM33 | ||
ARM_CM33_NTZ/non_secure | ||
ARM_CRx_No_GIC | ||
ATMega323 | ||
AtmelSAM7S64 | ||
AtmelSAM9XE | ||
AVR32_UC3 | ||
LPC2000 | ||
MSP430 | ||
MSP430X | ||
RISC-V | ||
RL78 | ||
RX100 | ||
RX600 | ||
RXv2 | ||
STR71x | ||
STR75x | ||
STR91x | ||
V850ES |