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 <ianst@cadence.com>
This commit is contained in:
Ian Thompson 2026-08-17 14:30:57 -07:00
parent b28920b21b
commit 1badc974bc

View file

@ -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 )
#define PRIVILEGED_FUNCTION
#define PRIVILEGED_DATA portMOVE_PRIVILEGED_DATA
#define FREERTOS_SYSTEM_CALL
#else /* portUSING_MPU_WRAPPERS */
#ifndef PRIVILEGED_FUNCTION
#define PRIVILEGED_FUNCTION
#endif
#ifndef PRIVILEGED_DATA
#define PRIVILEGED_DATA
#endif
#ifndef FREERTOS_SYSTEM_CALL
#define FREERTOS_SYSTEM_CALL
#endif
#endif /* portUSING_MPU_WRAPPERS */