Skip to content

[Backport v3.7-branch] arch: common: fix copy for ramfunc region during XIP init #92835

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Jul 8, 2025

Backport 6023d6a from #80768.

Fixes #88047

ramfunc region is copied into RAM from FLASH region during XIP init. We
copy from the loadaddr of the region, and were previously loading to the
symbol __ramfunc_start. This is incorrect when using an MPU with
alignment requirements, as the __ramfunc_start symbol may have padding
placed before it in the region. The __ramfunc_start symbol still needs
to be aligned in order to be used by the MPU though, so define a new
symbol __ramfunc_region_start, and use that symbol when copying the
__ramfunc region from FLASH to RAM.

Fixes #75296

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
(cherry picked from commit 6023d6a)
Copy link
Contributor

@JarmouniA JarmouniA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs #88599 to be applied to avoid introducing an issue.

Copy link

sonarqubecloud bot commented Jul 8, 2025

@etienne-lms
Copy link
Contributor

I've creat'ed #92848 to backport to 2 fixes in a single P-R.
Maybe the 2 commits should be squashed, to prevent build issues e.g. during a git bisect sequence?

@JarmouniA
Copy link
Contributor

Closed in favor of #92848

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

Successfully merging this pull request may close these issues.

3 participants