Skip to content

[Backport v3.7-branch] arch: common: fix copy for ramfunc region during XIP init + related fixup commit #92848

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

Open
wants to merge 2 commits into
base: v3.7-branch
Choose a base branch
from

Conversation

etienne-lms
Copy link
Contributor

Backport 6023d6a (#80768) and b84076a (#88599)

Fixes #88047

danieldegrasse and others added 2 commits July 8, 2025 11:33
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 zephyrproject-rtos#75296

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
(cherry picked from commit 6023d6a)
Remove usage of ld-specific ADDR function within the cmake linker
generator scripting. Since the linker generator scripting doesn't
support MPUs, we can simply set the __ramfunc_region_start symbol to be
equal to __ramfunc_start

Fixes zephyrproject-rtos#87200

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
(cherry picked from commit b84076a)
@etienne-lms etienne-lms changed the title Backport 80768 and 88599: arch: common: fix copy for ramfunc region during XIP init [Backport v3.7-branch] arch: common: fix copy for ramfunc region during XIP init + related fixup commit Jul 8, 2025
Copy link

sonarqubecloud bot commented Jul 8, 2025

@JarmouniA JarmouniA linked an issue Jul 8, 2025 that may be closed by this pull request
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.

[Backport v3.7-branch] Failed to backport #80768 __nocache section conflicts with __ramfunc on stm32h750
6 participants