Skip to content

adsp: delegate creation of virtual memory regions to the application #93334

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

Merged

Conversation

marcinszkudlinski
Copy link
Contributor

this PR removes creation of virtual memory regions from
Zephyr, allowing the application to create required regions

It is up the application to use virtual memory as needed,
zephyr however is keeping the table and ensures no memory
addresses overlaps

@marcinszkudlinski
Copy link
Contributor Author

the push above - rebase ONLY

@marcinszkudlinski
Copy link
Contributor Author

twister check fails till #93939 is merged

@marcinszkudlinski
Copy link
Contributor Author

marcinszkudlinski commented Aug 7, 2025

#93939 is merged

twister problem after re-run:

esptool>=5.0.2 not found in PATH.

  Please install it using:

    west packages pip --install

trying again...

@marcinszkudlinski
Copy link
Contributor Author

marcinszkudlinski commented Aug 7, 2025

same result

it is rather not releated to the changes from the PR.
Similar problem was here #93939 (comment)
but disappeared somehow, looks like it back

@cgturner1
Copy link

same result

it is rather not releated to the changes from the PR. Similar problem was here #93939 (comment) but disappeared somehow, looks like it back

this is probably an issue with CI not this PR, this will be fixed in the docker on next release based on the commit zephyrproject-rtos/docker-image@5c70689 but not sure when the next update of the docker will be but once it is in we shouldn't see the error

@marcinszkudlinski
Copy link
Contributor Author

ok, and how can we proceed now? @cgturner1 ?

@dcpleung
Copy link
Member

The failure is from ESP32 platforms and not from this PR. That is due to esptool not being installed in CI. So should be good to go.

@dcpleung
Copy link
Member

One thing though, could you prefix the commit summary with mm:? As the summary should being with which subsystem it is modifying.

this commit removes creation of virtual memory regions from
Zephyr, allowing the application to create required regions

It is up the application to use virtual memory as needed,
zephyr however is keeping the table and ensures no memory
addresses overlaps

Signed-off-by: Marcin Szkudlinski <[email protected]>
this marker is an address of the very first byte not used by the linker,
with alignment to cacheline

Signed-off-by: Marcin Szkudlinski <[email protected]>
the commit adds sys_mm_drv_map_page_safe and sys_mm_drv_map_region_safe
functions, wrappers for sys_mm_drv_map_region and sys_mm_drv_map_region,
with additional check if a mapped region fits into given memory range

Using of those prevents collisions and/or hijacking of virtual memory

Signed-off-by: Marcin Szkudlinski <[email protected]>
@marcinszkudlinski
Copy link
Contributor Author

prefixes changed to mm:

Copy link

@henrikbrixandersen henrikbrixandersen merged commit 01d3575 into zephyrproject-rtos:main Aug 12, 2025
26 checks passed
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.

6 participants