Skip to content

Commit 1b6a1ec

Browse files
committed
Add MPU wrapper macro for moving PRIVILEGED_DATA
- User can define portMOVE_PRIVILEGED_DATA as a section attribute to move the PRIVILEGED_DATA section arbitrarily. - Allows critical data to be placed in port-specific location for improved performance, notably for cache-coherent SMP. - Does not require enabling the full MPU wrappers. Signed-off-by: Ian Thompson <ianst@cadence.com>
1 parent e146d64 commit 1b6a1ec

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

include/mpu_wrappers.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,12 @@
280280
#define PRIVILEGED_DATA __attribute__( ( section( "privileged_data" ) ) )
281281
#define FREERTOS_SYSTEM_CALL __attribute__( ( section( "freertos_system_calls" ) ) )
282282

283+
#elif ( defined portMOVE_PRIVILEGED_DATA )
284+
285+
#define PRIVILEGED_FUNCTION
286+
#define PRIVILEGED_DATA portMOVE_PRIVILEGED_DATA
287+
#define FREERTOS_SYSTEM_CALL
288+
283289
#else /* portUSING_MPU_WRAPPERS */
284290

285291
#define PRIVILEGED_FUNCTION

0 commit comments

Comments
 (0)