From bd099226dfd97c96c820315059cb56bb69e66000 Mon Sep 17 00:00:00 2001 From: Ian Thompson Date: Wed, 16 Jul 2025 16:22:48 -0700 Subject: [PATCH 1/4] 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 ebbd5f9405..8cfe9da722 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 From b28920b21b262de8cd206528d535927851b2f373 Mon Sep 17 00:00:00 2001 From: Ian Thompson Date: Thu, 18 Jun 2026 17:43:28 -0700 Subject: [PATCH 2/4] Updated submodule ThirdParty/FreeRTOS-Kernel-Partner-Supported-Ports --- portable/ThirdParty/Partner-Supported-Ports | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portable/ThirdParty/Partner-Supported-Ports b/portable/ThirdParty/Partner-Supported-Ports index abc22103e1..a5b5d9b7f5 160000 --- a/portable/ThirdParty/Partner-Supported-Ports +++ b/portable/ThirdParty/Partner-Supported-Ports @@ -1 +1 @@ -Subproject commit abc22103e1e6634b33457d4127bff1ab62f27f90 +Subproject commit a5b5d9b7f524f931dedb85a7b2992891dc6c2d07 From 1badc974bcf55670b312361b6fff307a04637f29 Mon Sep 17 00:00:00 2001 From: Ian Thompson Date: Mon, 17 Aug 2026 14:30:57 -0700 Subject: [PATCH 3/4] Remove MPU wrapper macro for moving PRIVILEGED_DATA - Instead, when MPU wrappers are not used, allow port to override PRIVILEGED_FUNCTION, PRIVILEGED_DATA, or FREERTOS_SYSTEM_CALL selectively, permitting custom section placement at link-time. - 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 | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/include/mpu_wrappers.h b/include/mpu_wrappers.h index 8cfe9da722..69e6cbb40b 100644 --- a/include/mpu_wrappers.h +++ b/include/mpu_wrappers.h @@ -284,17 +284,19 @@ #define PRIVILEGED_DATA __attribute__( ( section( "privileged_data" ) ) ) #define FREERTOS_SYSTEM_CALL __attribute__( ( section( "freertos_system_calls" ) ) ) -#elif ( defined portMOVE_PRIVILEGED_DATA ) +#else /* portUSING_MPU_WRAPPERS */ - #define PRIVILEGED_FUNCTION - #define PRIVILEGED_DATA portMOVE_PRIVILEGED_DATA - #define FREERTOS_SYSTEM_CALL + #ifndef PRIVILEGED_FUNCTION + #define PRIVILEGED_FUNCTION + #endif -#else /* portUSING_MPU_WRAPPERS */ + #ifndef PRIVILEGED_DATA + #define PRIVILEGED_DATA + #endif - #define PRIVILEGED_FUNCTION - #define PRIVILEGED_DATA - #define FREERTOS_SYSTEM_CALL + #ifndef FREERTOS_SYSTEM_CALL + #define FREERTOS_SYSTEM_CALL + #endif #endif /* portUSING_MPU_WRAPPERS */ From a121830dd042fb341162807c0277844b1b136c91 Mon Sep 17 00:00:00 2001 From: Ian Thompson Date: Tue, 18 Aug 2026 10:27:17 -0700 Subject: [PATCH 4/4] Updated submodule ThirdParty/FreeRTOS-Kernel-Partner-Supported-Ports --- portable/ThirdParty/Partner-Supported-Ports | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portable/ThirdParty/Partner-Supported-Ports b/portable/ThirdParty/Partner-Supported-Ports index a5b5d9b7f5..fccbbce9bd 160000 --- a/portable/ThirdParty/Partner-Supported-Ports +++ b/portable/ThirdParty/Partner-Supported-Ports @@ -1 +1 @@ -Subproject commit a5b5d9b7f524f931dedb85a7b2992891dc6c2d07 +Subproject commit fccbbce9bd7e227ee211b01fdbbcf133dc3a474a