8000 arch: Cortex-M: Set MPU address per arch by bradjc · Pull Request #4427 · tock/tock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

arch: Cortex-M: Set MPU address per arch #4427

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
merged 2 commits into from
May 16, 2025
Merged

Conversation

bradjc
Copy link
Contributor
@bradjc bradjc commented May 14, 2025

Pull Request Overview

It seems that newer Cortex-M variants (eg Cortex-M33) support the same MPU but at a different (not secure) address. This generalizes setting the address to per-arch, so that each cortex-m arch can choose the appropriate register start address.

This is inspired by #4416 because I think we want to avoid having a StaticRef to registers that don't actually exist at that address.

Testing Strategy

travis

TODO or Help Wanted

The tradeoff is we now have the unsafe StaticRef definition in several places rather than one, but I think that is still worth it. I added a new() function to each arch's mpu module so that choosing the register is up to the arch and not the chip. Let me know if you see a better way to do this.

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

bradjc added 2 commits May 14, 2025 09:41
It seems that newer Cortex-M variants use the same MPU but at a
different (not secure) address. This generalizes setting the address to
per-arch, so that each cortex-m arch can choose the appropriate
register start address.
@github-actions github-actions bot added sam4l Change pertains to the SAM4L MCU. nrf Change pertains to the nRF5x family of MCUs. stm32 Change pertains to the stm32 family of MCUSs labels May 14, 2025
Copy link
Member
@alevy alevy left a comment

Choose a reason for hiding this comment

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

Clearly good IMO.

@alevy alevy added the last-call Final review period for a pull request. label May 15, 2025
@ppannuto ppannuto added this pull request to the merge queue May 16, 2025
Merged via the queue into master with commit 63a4f5b May 16, 2025
21 checks passed
@ppannuto ppannuto deleted the cortexm-mpu-address-per-arch branch May 16, 2025 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
last-call Final review period for a pull request. nrf Change pertains to the nRF5x family of MCUs. sam4l Change pertains to the SAM4L MCU. stm32 Change pertains to the stm32 family of MCUSs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0