freertos(IDF): Remove dependency on portUSING_MPU_WRAPPERS

This commit removes the dependency on portUSING_MPU_WRAPPERS on the Xtensa port
of IDF FreeRTOS. This dependency was added due to a hack implemented in the
upstream port that required the usage of the "xMPUSettings" member of the TCB.
The "xMPUSettings" would be used as a pointer to the task's coprocessor save
area on the stack, even though FreeRTOS MPU support was not available.

The hack has now been removed, and the CPSA pointer is now calculated using
a combination of constant offsets values and the pxEndOfStack member of the
TCB.

Note: This impelemtation was copied from the Xtensa port of Amazon SMP FreeRTOS.
This commit is contained in:
Darian Leung
2022-12-14 20:44:13 +08:00
parent 9300bef9b8
commit c318c89453
11 changed files with 160 additions and 123 deletions

View File

@@ -4848,6 +4848,10 @@ BaseType_t xTaskGetAffinity( TaskHandle_t xTask )
vPortReleaseTaskMPUSettings( &( pxTCB->xMPUSettings ) );
#endif
#ifdef portCLEAN_UP_COPROC
portCLEAN_UP_COPROC( ( void * ) pxTCB );
#endif
#if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 0 ) && ( portUSING_MPU_WRAPPERS == 0 ) )
{
/* The task can only have been allocated dynamically - free both