mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-07 13:45:00 -05:00
Add support to call xPortxPortIsAuthorizedToAccessBuffer function only when using latest MPU wrappers
This commit is contained in:
parent
8c10944575
commit
1106673086
25 changed files with 300 additions and 292 deletions
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif/* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif/* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif/* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif/* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -264,14 +264,14 @@ BaseType_t xPortIsTaskPrivileged( void ) PRIVILEGED_FUNCTION;
|
||||||
* switches can only occur when uxCriticalNesting is zero. */
|
* switches can only occur when uxCriticalNesting is zero. */
|
||||||
static UBaseType_t uxCriticalNesting = 0xaaaaaaaa;
|
static UBaseType_t uxCriticalNesting = 0xaaaaaaaa;
|
||||||
|
|
||||||
#if ( ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This variable is set to pdTRUE when the scheduler is started.
|
* This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Used by the portASSERT_IF_INTERRUPT_PRIORITY_INVALID() macro to ensure
|
* Used by the portASSERT_IF_INTERRUPT_PRIORITY_INVALID() macro to ensure
|
||||||
|
|
@ -878,11 +878,11 @@ BaseType_t xPortStartScheduler( void )
|
||||||
/* Initialise the critical nesting count ready for the first task. */
|
/* Initialise the critical nesting count ready for the first task. */
|
||||||
uxCriticalNesting = 0;
|
uxCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
__asm volatile (
|
__asm volatile (
|
||||||
|
|
@ -1371,53 +1371,55 @@ void vPortStoreTaskMPUSettings( xMPU_SETTINGS * xMPUSettings,
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
uint32_t ulBufferLength,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulBufferLength,
|
||||||
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
{
|
{
|
||||||
uint32_t i, ulBufferStartAddress, ulBufferEndAddress;
|
uint32_t i, ulBufferStartAddress, ulBufferEndAddress;
|
||||||
BaseType_t xAccessGranted = pdFALSE;
|
BaseType_t xAccessGranted = pdFALSE;
|
||||||
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings( NULL ); /* Calling task's MPU settings. */
|
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings( NULL ); /* Calling task's MPU settings. */
|
||||||
|
|
||||||
if( xSchedulerRunning == pdFALSE )
|
if( xSchedulerRunning == pdFALSE )
|
||||||
{
|
|
||||||
/* Grant access to all the kernel objects before the scheduler
|
|
||||||
* is started. It is necessary because there is no task running
|
|
||||||
* yet and therefore, we cannot use the permissions of any
|
|
||||||
* task. */
|
|
||||||
xAccessGranted = pdTRUE;
|
|
||||||
}
|
|
||||||
else if( ( xTaskMpuSettings->ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
|
|
||||||
{
|
|
||||||
xAccessGranted = pdTRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if( portADD_UINT32_WILL_OVERFLOW( ( ( uint32_t ) pvBuffer ), ( ulBufferLength - 1UL ) ) == pdFALSE )
|
|
||||||
{
|
{
|
||||||
ulBufferStartAddress = ( uint32_t ) pvBuffer;
|
/* Grant access to all the kernel objects before the scheduler
|
||||||
ulBufferEndAddress = ( ( ( uint32_t ) pvBuffer ) + ulBufferLength - 1UL );
|
* is started. It is necessary because there is no task running
|
||||||
|
* yet and therefore, we cannot use the permissions of any
|
||||||
for( i = 0; i < portTOTAL_NUM_REGIONS_IN_TCB; i++ )
|
* task. */
|
||||||
|
xAccessGranted = pdTRUE;
|
||||||
|
}
|
||||||
|
else if( ( xTaskMpuSettings->ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
|
||||||
|
{
|
||||||
|
xAccessGranted = pdTRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if( portADD_UINT32_WILL_OVERFLOW( ( ( uint32_t ) pvBuffer ), ( ulBufferLength - 1UL ) ) == pdFALSE )
|
||||||
{
|
{
|
||||||
if( portIS_ADDRESS_WITHIN_RANGE( ulBufferStartAddress,
|
ulBufferStartAddress = ( uint32_t ) pvBuffer;
|
||||||
xTaskMpuSettings->xRegionSettings[ i ].ulRegionStartAddress,
|
ulBufferEndAddress = ( ( ( uint32_t ) pvBuffer ) + ulBufferLength - 1UL );
|
||||||
xTaskMpuSettings->xRegionSettings[ i ].ulRegionEndAddress ) &&
|
|
||||||
portIS_ADDRESS_WITHIN_RANGE( ulBufferEndAddress,
|
for( i = 0; i < portTOTAL_NUM_REGIONS_IN_TCB; i++ )
|
||||||
xTaskMpuSettings->xRegionSettings[ i ].ulRegionStartAddress,
|
|
||||||
xTaskMpuSettings->xRegionSettings[ i ].ulRegionEndAddress ) &&
|
|
||||||
portIS_AUTHORIZED( ulAccessRequested, xTaskMpuSettings->xRegionSettings[ i ].ulRegionPermissions ) )
|
|
||||||
{
|
{
|
||||||
xAccessGranted = pdTRUE;
|
if( portIS_ADDRESS_WITHIN_RANGE( ulBufferStartAddress,
|
||||||
break;
|
xTaskMpuSettings->xRegionSettings[ i ].ulRegionStartAddress,
|
||||||
|
xTaskMpuSettings->xRegionSettings[ i ].ulRegionEndAddress ) &&
|
||||||
|
portIS_ADDRESS_WITHIN_RANGE( ulBufferEndAddress,
|
||||||
|
xTaskMpuSettings->xRegionSettings[ i ].ulRegionStartAddress,
|
||||||
|
xTaskMpuSettings->xRegionSettings[ i ].ulRegionEndAddress ) &&
|
||||||
|
portIS_AUTHORIZED( ulAccessRequested, xTaskMpuSettings->xRegionSettings[ i ].ulRegionPermissions ) )
|
||||||
|
{
|
||||||
|
xAccessGranted = pdTRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configASSERT_DEFINED == 1 )
|
#if ( configASSERT_DEFINED == 1 )
|
||||||
|
|
|
||||||
|
|
@ -289,14 +289,14 @@ BaseType_t xPortIsTaskPrivileged( void ) PRIVILEGED_FUNCTION;
|
||||||
* switches can only occur when uxCriticalNesting is zero. */
|
* switches can only occur when uxCriticalNesting is zero. */
|
||||||
static UBaseType_t uxCriticalNesting = 0xaaaaaaaa;
|
static UBaseType_t uxCriticalNesting = 0xaaaaaaaa;
|
||||||
|
|
||||||
#if ( ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This variable is set to pdTRUE when the scheduler is started.
|
* This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Used by the portASSERT_IF_INTERRUPT_PRIORITY_INVALID() macro to ensure
|
* Used by the portASSERT_IF_INTERRUPT_PRIORITY_INVALID() macro to ensure
|
||||||
|
|
@ -963,11 +963,11 @@ BaseType_t xPortStartScheduler( void )
|
||||||
/* Initialise the critical nesting count ready for the first task. */
|
/* Initialise the critical nesting count ready for the first task. */
|
||||||
uxCriticalNesting = 0;
|
uxCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
|
||||||
|
|
||||||
/* Ensure the VFP is enabled - it should be anyway. */
|
/* Ensure the VFP is enabled - it should be anyway. */
|
||||||
vPortEnableVFP();
|
vPortEnableVFP();
|
||||||
|
|
@ -1514,53 +1514,55 @@ void vPortStoreTaskMPUSettings( xMPU_SETTINGS * xMPUSettings,
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
|
||||||
uint32_t ulBufferLength,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulBufferLength,
|
||||||
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
{
|
{
|
||||||
uint32_t i, ulBufferStartAddress, ulBufferEndAddress;
|
uint32_t i, ulBufferStartAddress, ulBufferEndAddress;
|
||||||
BaseType_t xAccessGranted = pdFALSE;
|
BaseType_t xAccessGranted = pdFALSE;
|
||||||
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings( NULL ); /* Calling task's MPU settings. */
|
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings( NULL ); /* Calling task's MPU settings. */
|
||||||
|
|
||||||
if( xSchedulerRunning == pdFALSE )
|
if( xSchedulerRunning == pdFALSE )
|
||||||
{
|
|
||||||
/* Grant access to all the kernel objects before the scheduler
|
|
||||||
* is started. It is necessary because there is no task running
|
|
||||||
* yet and therefore, we cannot use the permissions of any
|
|
||||||
* task. */
|
|
||||||
xAccessGranted = pdTRUE;
|
|
||||||
}
|
|
||||||
else if( ( xTaskMpuSettings->ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
|
|
||||||
{
|
|
||||||
xAccessGranted = pdTRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if( portADD_UINT32_WILL_OVERFLOW( ( ( uint32_t ) pvBuffer ), ( ulBufferLength - 1UL ) ) == pdFALSE )
|
|
||||||
{
|
{
|
||||||
ulBufferStartAddress = ( uint32_t ) pvBuffer;
|
/* Grant access to all the kernel objects before the scheduler
|
||||||
ulBufferEndAddress = ( ( ( uint32_t ) pvBuffer ) + ulBufferLength - 1UL );
|
* is started. It is necessary because there is no task running
|
||||||
|
* yet and therefore, we cannot use the permissions of any
|
||||||
for( i = 0; i < portTOTAL_NUM_REGIONS_IN_TCB; i++ )
|
* task. */
|
||||||
|
xAccessGranted = pdTRUE;
|
||||||
|
}
|
||||||
|
else if( ( xTaskMpuSettings->ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
|
||||||
|
{
|
||||||
|
xAccessGranted = pdTRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if( portADD_UINT32_WILL_OVERFLOW( ( ( uint32_t ) pvBuffer ), ( ulBufferLength - 1UL ) ) == pdFALSE )
|
||||||
{
|
{
|
||||||
if( portIS_ADDRESS_WITHIN_RANGE( ulBufferStartAddress,
|
ulBufferStartAddress = ( uint32_t ) pvBuffer;
|
||||||
xTaskMpuSettings->xRegionSettings[ i ].ulRegionStartAddress,
|
ulBufferEndAddress = ( ( ( uint32_t ) pvBuffer ) + ulBufferLength - 1UL );
|
||||||
xTaskMpuSettings->xRegionSettings[ i ].ulRegionEndAddress ) &&
|
|
||||||
portIS_ADDRESS_WITHIN_RANGE( ulBufferEndAddress,
|
for( i = 0; i < portTOTAL_NUM_REGIONS_IN_TCB; i++ )
|
||||||
xTaskMpuSettings->xRegionSettings[ i ].ulRegionStartAddress,
|
|
||||||
xTaskMpuSettings->xRegionSettings[ i ].ulRegionEndAddress ) &&
|
|
||||||
portIS_AUTHORIZED( ulAccessRequested, xTaskMpuSettings->xRegionSettings[ i ].ulRegionPermissions ) )
|
|
||||||
{
|
{
|
||||||
xAccessGranted = pdTRUE;
|
if( portIS_ADDRESS_WITHIN_RANGE( ulBufferStartAddress,
|
||||||
break;
|
xTaskMpuSettings->xRegionSettings[ i ].ulRegionStartAddress,
|
||||||
|
xTaskMpuSettings->xRegionSettings[ i ].ulRegionEndAddress ) &&
|
||||||
|
portIS_ADDRESS_WITHIN_RANGE( ulBufferEndAddress,
|
||||||
|
xTaskMpuSettings->xRegionSettings[ i ].ulRegionStartAddress,
|
||||||
|
xTaskMpuSettings->xRegionSettings[ i ].ulRegionEndAddress ) &&
|
||||||
|
portIS_AUTHORIZED( ulAccessRequested, xTaskMpuSettings->xRegionSettings[ i ].ulRegionPermissions ) )
|
||||||
|
{
|
||||||
|
xAccessGranted = pdTRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
|
#endif /* #if ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configASSERT_DEFINED == 1 )
|
#if ( configASSERT_DEFINED == 1 )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -300,14 +300,14 @@ extern void xPortPendSVHandler( void ) PRIVILEGED_FUNCTION;
|
||||||
* variable. */
|
* variable. */
|
||||||
static UBaseType_t uxCriticalNesting = 0xaaaaaaaa;
|
static UBaseType_t uxCriticalNesting = 0xaaaaaaaa;
|
||||||
|
|
||||||
#if ( ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This variable is set to pdTRUE when the scheduler is started.
|
* This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Used by the portASSERT_IF_INTERRUPT_PRIORITY_INVALID() macro to ensure
|
* Used by the portASSERT_IF_INTERRUPT_PRIORITY_INVALID() macro to ensure
|
||||||
|
|
@ -858,11 +858,11 @@ BaseType_t xPortStartScheduler( void )
|
||||||
/* Initialise the critical nesting count ready for the first task. */
|
/* Initialise the critical nesting count ready for the first task. */
|
||||||
uxCriticalNesting = 0;
|
uxCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
|
||||||
|
|
||||||
/* Ensure the VFP is enabled - it should be anyway. */
|
/* Ensure the VFP is enabled - it should be anyway. */
|
||||||
vPortEnableVFP();
|
vPortEnableVFP();
|
||||||
|
|
@ -1244,53 +1244,55 @@ void vPortStoreTaskMPUSettings( xMPU_SETTINGS * xMPUSettings,
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
|
||||||
uint32_t ulBufferLength,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulBufferLength,
|
||||||
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
{
|
{
|
||||||
uint32_t i, ulBufferStartAddress, ulBufferEndAddress;
|
uint32_t i, ulBufferStartAddress, ulBufferEndAddress;
|
||||||
BaseType_t xAccessGranted = pdFALSE;
|
BaseType_t xAccessGranted = pdFALSE;
|
||||||
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings( NULL ); /* Calling task's MPU settings. */
|
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings( NULL ); /* Calling task's MPU settings. */
|
||||||
|
|
||||||
if( xSchedulerRunning == pdFALSE )
|
if( xSchedulerRunning == pdFALSE )
|
||||||
{
|
|
||||||
/* Grant access to all the kernel objects before the scheduler
|
|
||||||
* is started. It is necessary because there is no task running
|
|
||||||
* yet and therefore, we cannot use the permissions of any
|
|
||||||
* task. */
|
|
||||||
xAccessGranted = pdTRUE;
|
|
||||||
}
|
|
||||||
else if( ( xTaskMpuSettings->ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
|
|
||||||
{
|
|
||||||
xAccessGranted = pdTRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if( portADD_UINT32_WILL_OVERFLOW( ( ( uint32_t ) pvBuffer ), ( ulBufferLength - 1UL ) ) == pdFALSE )
|
|
||||||
{
|
{
|
||||||
ulBufferStartAddress = ( uint32_t ) pvBuffer;
|
/* Grant access to all the kernel objects before the scheduler
|
||||||
ulBufferEndAddress = ( ( ( uint32_t ) pvBuffer ) + ulBufferLength - 1UL );
|
* is started. It is necessary because there is no task running
|
||||||
|
* yet and therefore, we cannot use the permissions of any
|
||||||
for( i = 0; i < portTOTAL_NUM_REGIONS_IN_TCB; i++ )
|
* task. */
|
||||||
|
xAccessGranted = pdTRUE;
|
||||||
|
}
|
||||||
|
else if( ( xTaskMpuSettings->ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
|
||||||
|
{
|
||||||
|
xAccessGranted = pdTRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if( portADD_UINT32_WILL_OVERFLOW( ( ( uint32_t ) pvBuffer ), ( ulBufferLength - 1UL ) ) == pdFALSE )
|
||||||
{
|
{
|
||||||
if( portIS_ADDRESS_WITHIN_RANGE( ulBufferStartAddress,
|
ulBufferStartAddress = ( uint32_t ) pvBuffer;
|
||||||
xTaskMpuSettings->xRegionSettings[ i ].ulRegionStartAddress,
|
ulBufferEndAddress = ( ( ( uint32_t ) pvBuffer ) + ulBufferLength - 1UL );
|
||||||
xTaskMpuSettings->xRegionSettings[ i ].ulRegionEndAddress ) &&
|
|
||||||
portIS_ADDRESS_WITHIN_RANGE( ulBufferEndAddress,
|
for( i = 0; i < portTOTAL_NUM_REGIONS_IN_TCB; i++ )
|
||||||
xTaskMpuSettings->xRegionSettings[ i ].ulRegionStartAddress,
|
|
||||||
xTaskMpuSettings->xRegionSettings[ i ].ulRegionEndAddress ) &&
|
|
||||||
portIS_AUTHORIZED( ulAccessRequested, xTaskMpuSettings->xRegionSettings[ i ].ulRegionPermissions ) )
|
|
||||||
{
|
{
|
||||||
xAccessGranted = pdTRUE;
|
if( portIS_ADDRESS_WITHIN_RANGE( ulBufferStartAddress,
|
||||||
break;
|
xTaskMpuSettings->xRegionSettings[ i ].ulRegionStartAddress,
|
||||||
|
xTaskMpuSettings->xRegionSettings[ i ].ulRegionEndAddress ) &&
|
||||||
|
portIS_ADDRESS_WITHIN_RANGE( ulBufferEndAddress,
|
||||||
|
xTaskMpuSettings->xRegionSettings[ i ].ulRegionStartAddress,
|
||||||
|
xTaskMpuSettings->xRegionSettings[ i ].ulRegionEndAddress ) &&
|
||||||
|
portIS_AUTHORIZED( ulAccessRequested, xTaskMpuSettings->xRegionSettings[ i ].ulRegionPermissions ) )
|
||||||
|
{
|
||||||
|
xAccessGranted = pdTRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
|
#endif /* #if ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
|
||||||
|
|
@ -496,14 +496,14 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t * pulCallerStackAddress ) PRIV
|
||||||
#endif /* configENABLE_MPU == 1 */
|
#endif /* configENABLE_MPU == 1 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This variable is set to pdTRUE when the scheduler is started.
|
* @brief This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Each task maintains its own interrupt status in the critical nesting
|
* @brief Each task maintains its own interrupt status in the critical nesting
|
||||||
|
|
@ -1740,11 +1740,11 @@ BaseType_t xPortStartScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
/* Initialize the critical nesting count ready for the first task. */
|
/* Initialize the critical nesting count ready for the first task. */
|
||||||
ulCriticalNesting = 0;
|
ulCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
|
|
||||||
/* Start the first task. */
|
/* Start the first task. */
|
||||||
vStartFirstTask();
|
vStartFirstTask();
|
||||||
|
|
@ -1896,7 +1896,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* configENABLE_MPU */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if ( configENABLE_MPU == 1 )
|
#if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulBufferLength,
|
uint32_t ulBufferLength,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
@ -1949,7 +1949,7 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
#endif /* configENABLE_MPU */
|
#endif /* #if ( ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsInsideInterrupt( void )
|
BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
|
|
||||||
|
|
@ -149,14 +149,14 @@ typedef void ( * portISR_t )( void );
|
||||||
* switches can only occur when uxCriticalNesting is zero. */
|
* switches can only occur when uxCriticalNesting is zero. */
|
||||||
PRIVILEGED_DATA static UBaseType_t uxCriticalNesting = 0xaaaaaaaa;
|
PRIVILEGED_DATA static UBaseType_t uxCriticalNesting = 0xaaaaaaaa;
|
||||||
|
|
||||||
#if ( ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This variable is set to pdTRUE when the scheduler is started.
|
* This variable is set to pdTRUE when the scheduler is started.
|
||||||
*/
|
*/
|
||||||
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
PRIVILEGED_DATA static BaseType_t xSchedulerRunning = pdFALSE;
|
||||||
|
|
||||||
#endif
|
#endif /* #if ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup the timer to generate the tick interrupts.
|
* Setup the timer to generate the tick interrupts.
|
||||||
|
|
@ -963,11 +963,11 @@ BaseType_t xPortStartScheduler( void )
|
||||||
/* Initialise the critical nesting count ready for the first task. */
|
/* Initialise the critical nesting count ready for the first task. */
|
||||||
uxCriticalNesting = 0;
|
uxCriticalNesting = 0;
|
||||||
|
|
||||||
#if ( ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
|
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
|
||||||
{
|
{
|
||||||
xSchedulerRunning = pdTRUE;
|
xSchedulerRunning = pdTRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* #if ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
|
||||||
|
|
||||||
/* Ensure the VFP is enabled - it should be anyway. */
|
/* Ensure the VFP is enabled - it should be anyway. */
|
||||||
vPortEnableVFP();
|
vPortEnableVFP();
|
||||||
|
|
@ -1499,54 +1499,56 @@ void vPortStoreTaskMPUSettings( xMPU_SETTINGS * xMPUSettings,
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
|
||||||
uint32_t ulBufferLength,
|
BaseType_t xPortIsAuthorizedToAccessBuffer( const void * pvBuffer,
|
||||||
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
uint32_t ulBufferLength,
|
||||||
|
uint32_t ulAccessRequested ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
{
|
{
|
||||||
uint32_t i, ulBufferStartAddress, ulBufferEndAddress;
|
uint32_t i, ulBufferStartAddress, ulBufferEndAddress;
|
||||||
BaseType_t xAccessGranted = pdFALSE;
|
BaseType_t xAccessGranted = pdFALSE;
|
||||||
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings( NULL ); /* Calling task's MPU settings. */
|
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings( NULL ); /* Calling task's MPU settings. */
|
||||||
|
|
||||||
|
|
||||||
if( xSchedulerRunning == pdFALSE )
|
if( xSchedulerRunning == pdFALSE )
|
||||||
{
|
|
||||||
/* Grant access to all the kernel objects before the scheduler
|
|
||||||
* is started. It is necessary because there is no task running
|
|
||||||
* yet and therefore, we cannot use the permissions of any
|
|
||||||
* task. */
|
|
||||||
xAccessGranted = pdTRUE;
|
|
||||||
}
|
|
||||||
else if( ( xTaskMpuSettings->ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
|
|
||||||
{
|
|
||||||
xAccessGranted = pdTRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if( portADD_UINT32_WILL_OVERFLOW( ( ( uint32_t ) pvBuffer ), ( ulBufferLength - 1UL ) ) == pdFALSE )
|
|
||||||
{
|
{
|
||||||
ulBufferStartAddress = ( uint32_t ) pvBuffer;
|
/* Grant access to all the kernel objects before the scheduler
|
||||||
ulBufferEndAddress = ( ( ( uint32_t ) pvBuffer ) + ulBufferLength - 1UL );
|
* is started. It is necessary because there is no task running
|
||||||
|
* yet and therefore, we cannot use the permissions of any
|
||||||
for( i = 0; i < portTOTAL_NUM_REGIONS_IN_TCB; i++ )
|
* task. */
|
||||||
|
xAccessGranted = pdTRUE;
|
||||||
|
}
|
||||||
|
else if( ( xTaskMpuSettings->ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
|
||||||
|
{
|
||||||
|
xAccessGranted = pdTRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if( portADD_UINT32_WILL_OVERFLOW( ( ( uint32_t ) pvBuffer ), ( ulBufferLength - 1UL ) ) == pdFALSE )
|
||||||
{
|
{
|
||||||
if( portIS_ADDRESS_WITHIN_RANGE( ulBufferStartAddress,
|
ulBufferStartAddress = ( uint32_t ) pvBuffer;
|
||||||
xTaskMpuSettings->xRegionSettings[ i ].ulRegionStartAddress,
|
ulBufferEndAddress = ( ( ( uint32_t ) pvBuffer ) + ulBufferLength - 1UL );
|
||||||
xTaskMpuSettings->xRegionSettings[ i ].ulRegionEndAddress ) &&
|
|
||||||
portIS_ADDRESS_WITHIN_RANGE( ulBufferEndAddress,
|
for( i = 0; i < portTOTAL_NUM_REGIONS_IN_TCB; i++ )
|
||||||
xTaskMpuSettings->xRegionSettings[ i ].ulRegionStartAddress,
|
|
||||||
xTaskMpuSettings->xRegionSettings[ i ].ulRegionEndAddress ) &&
|
|
||||||
portIS_AUTHORIZED( ulAccessRequested, xTaskMpuSettings->xRegionSettings[ i ].ulRegionPermissions ) )
|
|
||||||
{
|
{
|
||||||
xAccessGranted = pdTRUE;
|
if( portIS_ADDRESS_WITHIN_RANGE( ulBufferStartAddress,
|
||||||
break;
|
xTaskMpuSettings->xRegionSettings[ i ].ulRegionStartAddress,
|
||||||
|
xTaskMpuSettings->xRegionSettings[ i ].ulRegionEndAddress ) &&
|
||||||
|
portIS_ADDRESS_WITHIN_RANGE( ulBufferEndAddress,
|
||||||
|
xTaskMpuSettings->xRegionSettings[ i ].ulRegionStartAddress,
|
||||||
|
xTaskMpuSettings->xRegionSettings[ i ].ulRegionEndAddress ) &&
|
||||||
|
portIS_AUTHORIZED( ulAccessRequested, xTaskMpuSettings->xRegionSettings[ i ].ulRegionPermissions ) )
|
||||||
|
{
|
||||||
|
xAccessGranted = pdTRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return xAccessGranted;
|
return xAccessGranted;
|
||||||
}
|
}
|
||||||
|
#endif /* #if ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
__asm uint32_t prvPortGetIPSR( void )
|
__asm uint32_t prvPortGetIPSR( void )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue