mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 13:01:57 -04:00
FreeRTOS MPU: Remove MPU region number check (#1261)
FreeRTOS MPU: Remove MPU region number check This change removes the assertion and runtime check that enforces matching between configTOTAL_MPU_REGIONS and physical MPU regions,. This allows applications running on devices with 16 MPU regions to manage 8 MPU regions while leaving the remaining 8 for the kernel. Signed-off-by: Erick Reyes <erickreyes@google.com>
This commit is contained in:
parent
dacce186cf
commit
b9aa064591
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -241,9 +241,6 @@ typedef void ( * portISR_t )( void );
|
|||
/* Enable MPU. */
|
||||
#define portMPU_ENABLE_BIT ( 1UL << 0UL )
|
||||
|
||||
/* Expected value of the portMPU_TYPE register. */
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( configTOTAL_MPU_REGIONS << 8UL )
|
||||
|
||||
/* Extract first address of the MPU region as encoded in the
|
||||
* RBAR (Region Base Address Register) value. */
|
||||
#define portEXTRACT_FIRST_ADDRESS_FROM_RBAR( rbar ) \
|
||||
|
@ -925,12 +922,6 @@ static void prvTaskExitError( void )
|
|||
/* The only permitted number of regions are 8 or 16. */
|
||||
configASSERT( ( configTOTAL_MPU_REGIONS == 8 ) || ( configTOTAL_MPU_REGIONS == 16 ) );
|
||||
|
||||
/* Ensure that the configTOTAL_MPU_REGIONS is configured correctly. */
|
||||
configASSERT( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE );
|
||||
|
||||
/* Check that the MPU is present. */
|
||||
if( portMPU_TYPE_REG == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* MAIR0 - Index 0. */
|
||||
portMPU_MAIR0_REG |= ( ( portMPU_NORMAL_MEMORY_BUFFERABLE_CACHEABLE << portMPU_MAIR_ATTR0_POS ) & portMPU_MAIR_ATTR0_MASK );
|
||||
/* MAIR0 - Index 1. */
|
||||
|
@ -983,7 +974,6 @@ static void prvTaskExitError( void )
|
|||
* regions have privileged access. */
|
||||
portMPU_CTRL_REG |= ( portMPU_PRIV_BACKGROUND_ENABLE_BIT | portMPU_ENABLE_BIT );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configENABLE_MPU */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
Loading…
Reference in a new issue