mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-02 04:13:54 -04:00
Add Cortex M7 r0p1 Errata 837070 workaround to CM4_MPU ports (#513)
* Clarify Cortex M7 r0p1 errata number in r0p1 specific port. * Add ARM Cortex M7 r0p0 / r0p1 Errata 837070 workaround to CM4 MPU ports. Optionally, enable the errata workaround by defining configTARGET_ARM_CM7_r0p0 or configTARGET_ARM_CM7_r0p1 in FreeRTOSConfig.h. * Add r0p1 errata support to IAR port as well Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> * Change macro name to configENABLE_ERRATA_837070_WORKAROUND Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
8e89acfc98
commit
2dfdfc4ba4
8 changed files with 122 additions and 24 deletions
|
@ -98,8 +98,8 @@
|
|||
#define portNVIC_PENDSVCLEAR_BIT ( 1UL << 27UL )
|
||||
#define portNVIC_PEND_SYSTICK_CLEAR_BIT ( 1UL << 25UL )
|
||||
|
||||
/* Constants used to detect a Cortex-M7 r0p1 core, which should use the ARM_CM7
|
||||
* r0p1 port. */
|
||||
/* Constants used to detect Cortex-M7 r0p0 and r0p1 cores, and ensure
|
||||
* that a work around is active for errata 837070. */
|
||||
#define portCPUID ( *( ( volatile uint32_t * ) 0xE000ed00 ) )
|
||||
#define portCORTEX_M7_r0p1_ID ( 0x410FC271UL )
|
||||
#define portCORTEX_M7_r0p0_ID ( 0x410FC270UL )
|
||||
|
@ -350,11 +350,17 @@ BaseType_t xPortStartScheduler( void )
|
|||
* See https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */
|
||||
configASSERT( configMAX_SYSCALL_INTERRUPT_PRIORITY );
|
||||
|
||||
/* This port can be used on all revisions of the Cortex-M7 core other than
|
||||
* the r0p1 parts. r0p1 parts should use the port from the
|
||||
* /source/portable/GCC/ARM_CM7/r0p1 directory. */
|
||||
configASSERT( portCPUID != portCORTEX_M7_r0p1_ID );
|
||||
configASSERT( portCPUID != portCORTEX_M7_r0p0_ID );
|
||||
/* Errata 837070 workaround must only be enabled on Cortex-M7 r0p0
|
||||
* and r0p1 cores. */
|
||||
#if ( configENABLE_ERRATA_837070_WORKAROUND == 1 )
|
||||
configASSERT( ( portCPUID == portCORTEX_M7_r0p1_ID ) || ( portCPUID == portCORTEX_M7_r0p0_ID ) );
|
||||
#else
|
||||
/* When using this port on a Cortex-M7 r0p0 or r0p1 core, define
|
||||
* configENABLE_ERRATA_837070_WORKAROUND to 1 in your
|
||||
* FreeRTOSConfig.h. */
|
||||
configASSERT( portCPUID != portCORTEX_M7_r0p1_ID );
|
||||
configASSERT( portCPUID != portCORTEX_M7_r0p0_ID );
|
||||
#endif
|
||||
|
||||
#if ( configASSERT_DEFINED == 1 )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue