FreeRTOS-Kernel/portable/GCC
Gaurav-Aggarwal-AWS b6a43866da
Add support for privileged heap to ARMV8-M ports (#85)
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>
2020-07-14 16:22:14 -07:00
..
ARM7_AT91FR40008 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
ARM7_AT91SAM7S Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
ARM7_LPC23xx Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
ARM7_LPC2000 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
ARM_CA9 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
ARM_CA53_64_BIT Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
ARM_CM0 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
ARM_CM3 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
ARM_CM3_MPU Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
ARM_CM4_MPU Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
ARM_CM4F Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
ARM_CM7 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
ARM_CM23 Add support for privileged heap to ARMV8-M ports (#85) 2020-07-14 16:22:14 -07:00
ARM_CM23_NTZ/non_secure Add support for privileged heap to ARMV8-M ports (#85) 2020-07-14 16:22:14 -07:00
ARM_CM33 Add support for privileged heap to ARMV8-M ports (#85) 2020-07-14 16:22:14 -07:00
ARM_CM33_NTZ/non_secure Add support for privileged heap to ARMV8-M ports (#85) 2020-07-14 16:22:14 -07:00
ARM_CR5 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
ARM_CRx_No_GIC Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
ATMega323 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
AVR32_UC3 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
ColdFire_V2 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
CORTUS_APS3 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
H8S2329 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
HCS12 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
IA32_flat Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
MCF5235 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
MicroBlaze Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
MicroBlazeV8 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
MicroBlazeV9 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
MSP430F449 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
NiosII Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
PPC405_Xilinx Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
PPC440_Xilinx Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
RISC-V Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
RL78 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
RX100 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
RX600 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
RX600v2 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
STR75x Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
TriCore_1782 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00