From bd099226dfd97c96c820315059cb56bb69e66000 Mon Sep 17 00:00:00 2001 From: Ian Thompson Date: Wed, 16 Jul 2025 16:22:48 -0700 Subject: [PATCH] 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 --- include/mpu_wrappers.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/mpu_wrappers.h b/include/mpu_wrappers.h index ebbd5f940..8cfe9da72 100644 --- a/include/mpu_wrappers.h +++ b/include/mpu_wrappers.h @@ -284,6 +284,12 @@ #define PRIVILEGED_DATA __attribute__( ( section( "privileged_data" ) ) ) #define FREERTOS_SYSTEM_CALL __attribute__( ( section( "freertos_system_calls" ) ) ) +#elif ( defined portMOVE_PRIVILEGED_DATA ) + + #define PRIVILEGED_FUNCTION + #define PRIVILEGED_DATA portMOVE_PRIVILEGED_DATA + #define FREERTOS_SYSTEM_CALL + #else /* portUSING_MPU_WRAPPERS */ #define PRIVILEGED_FUNCTION