Skip to content
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

soc/*adsp: Fix snippets linkage #75055

Closed
wants to merge 1 commit into from

Conversation

andyross
Copy link
Contributor

The Intel and NXP adsp linker scripts (mostly evolved via cut/paste between themselves) never actually had support for linker "sections" snippets as e.g. needed for STRUCT_SECTION_ITERABLE() usage[1]. Add them in reasonably appropriate places (Intel doesn't really have a clean .rodata area, because of the way cache address munging works, so in fact they're adjacent there).

[1] Actually cAVS did have the include for ROM snippets, but it was in
the wrong place and dumped the symbols into unusable addresses at
the top of memory.

The Intel and NXP adsp linker scripts (mostly evolved via cut/paste
between themselves) never actually had support for linker "sections"
snippets as e.g. needed for STRUCT_SECTION_ITERABLE() usage[1].  Add
them in reasonably appropriate places (Intel doesn't really have a
clean .rodata area, because of the way cache address munging works, so
in fact they're adjacent there).

[1] Actually cAVS did have the include for ROM snippets, but it was in
    the wrong place and dumped the symbols into unusable addresses at
    the top of memory.

Signed-off-by: Andy Ross <andyross@google.com>
@andyross
Copy link
Contributor Author

See thesofproject/sof#9261 for the SOF PR that needs this

@andyross
Copy link
Contributor Author

Actually, closing this. It turns out that the SECTIONS snippets linkage is complicated on the intel_adsp devices because the cache/uncache flipping interacts with the fact that idtlist.ld is included in that snippet level, and it needs to link somewhere else.

Also there's a brand new ROM_SECTIONS snippet type from @pdgendt that literally just merged last week in #71911 which will work great; I'll use that.

@andyross andyross closed this Jun 27, 2024
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