From 1b6a1ec666e182671fcde23d5039847c53a6fe05 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 3b4738e962c..f23e4a09b8f 100644 --- a/include/mpu_wrappers.h +++ b/include/mpu_wrappers.h @@ -280,6 +280,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 20de6bd293dcc1f690b08b0bd1c753cb9c8c6b1a 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 abc22103e1e..a5b5d9b7f52 160000 --- a/portable/ThirdParty/Partner-Supported-Ports +++ b/portable/ThirdParty/Partner-Supported-Ports @@ -1 +1 @@ -Subproject commit abc22103e1e6634b33457d4127bff1ab62f27f90 +Subproject commit a5b5d9b7f524f931dedb85a7b2992891dc6c2d07 From c616f1f9e020029e8e463af8894effe4064a7628 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 f23e4a09b8f..ab70c89effa 100644 --- a/include/mpu_wrappers.h +++ b/include/mpu_wrappers.h @@ -280,17 +280,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 b84a78c5708587e9af3c11d99259de2cf16abf7d 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 a5b5d9b7f52..fccbbce9bd7 160000 --- a/portable/ThirdParty/Partner-Supported-Ports +++ b/portable/ThirdParty/Partner-Supported-Ports @@ -1 +1 @@ -Subproject commit a5b5d9b7f524f931dedb85a7b2992891dc6c2d07 +Subproject commit fccbbce9bd7e227ee211b01fdbbcf133dc3a474a