Skip to content

Optional PRIVILEGED_DATA wrapper + Partner-Supported-Ports submodule update - #1433

Open
ianstcdns wants to merge 2 commits into
FreeRTOS:mainfrom
foss-xtensa:xtensa-merge
Open

Optional PRIVILEGED_DATA wrapper + Partner-Supported-Ports submodule update#1433
ianstcdns wants to merge 2 commits into
FreeRTOS:mainfrom
foss-xtensa:xtensa-merge

Conversation

@ianstcdns

Copy link
Copy Markdown
Contributor

Support moving PRIVILEGED_DATA via an optional MPU wrapper:

  • 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.

Increment Partner-Supported-Ports submodule to the latest commit

Passed regression testing with 100+ Xtensa configurations (SMP and single-core)

Checklist:

  • [ x ] I have tested my changes. No regression in existing tests.
  • [ x ] I have modified and/or added unit-tests to cover the code changes in this Pull Request.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

- 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>
@sonarqubecloud

Copy link
Copy Markdown

@ianstcdns

Copy link
Copy Markdown
Contributor Author

@AniruddhaKanhere any chance you can review, or point this PR to the appropriate reviewer(s)? Thanks in advance.

@aggarg

aggarg commented Aug 11, 2026

Copy link
Copy Markdown
Member

Instead of adding a new config, how about changing this block to the following:

#ifndef PRIVILEGED_FUNCTION
    #define PRIVILEGED_FUNCTION
#endif

#ifndef PRIVILEGED_DATA
    #define PRIVILEGED_DATA
#endif

#ifndef FREERTOS_SYSTEM_CALL
    #define FREERTOS_SYSTEM_CALL
#endif

This makes it more generic as ports can override whichever macro they need in portmacro.h.

@ianstcdns

Copy link
Copy Markdown
Contributor Author

@aggarg thanks for your suggestion -- it is cleaner and more flexible than my original proposal. I should be able to make this work, although I will need to rearrange some include file ordering within the Xtensa port. I will do some testing and submit a PR to the submodule before updating this PR.

Separately, I'm assuming that updating the pointer to the Partner-Supported-Ports submodule through a PR like this is acceptable, but please LMK if there's a preferred procedure.

@aggarg

aggarg commented Aug 11, 2026

Copy link
Copy Markdown
Member

Separately, I'm assuming that updating the pointer to the Partner-Supported-Ports submodule through a PR like this is acceptable, but please LMK if there's a preferred procedure.

Yes, this is totally acceptable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants