-
Notifications
You must be signed in to change notification settings - Fork 12
hal/arm: per-process MPU configuration #407
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
base: master
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @etiaro, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant architectural enhancement to the Memory Protection Unit (MPU) management system. By shifting from a global MPU configuration to a per-process model, it enables dynamic and flexible memory mapping for individual applications. This change is crucial for improving spatial separation between processes and forms the foundational stage for developing more robust partitioning mechanisms within the system. The refactoring impacts how MPU regions are allocated, managed, and displayed, providing greater control and visibility over memory access permissions for each running program. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a significant and valuable feature: per-process MPU configuration. The changes are extensive, touching multiple architectures to refactor MPU handling from a global to a per-program basis. The core logic in mpu.c files for ARMv7-M, ARMv7-R, and ARMv8-M has been substantially rewritten to support this new model, and the mpu command has been updated accordingly. My review has identified a few areas for improvement, including a critical missing function for ARMv8-M that would cause build failures, some redundant error logging, a leftover logic bug in syspage.c, and an inconsistency in MPU region invalidation logic. Addressing these points will enhance the robustness and maintainability of this new feature.
4813059 to
fdefe42
Compare
This commit introduces loader support for full MPU regions reconfiguration on context switch, allowing for more flexibile configuration of memory maps on MPU targets. Changes include * MPU configuration during app command, based on hal_syspage_prog_t structure with program configuration of MPU regions in form of ready-to-copy register values * reimplementation of mpu command, showing generated mpu configuration on per-app basis * passing all maps at once to hal/mpu module, allowing future map merging to reduce count of used MPU regions JIRA: RTOS-1149
fdefe42 to
d01652f
Compare
This commit introduces loader support for full MPU regions reconfiguration on context switch, allowing for more flexibile configuration of memory maps on MPU targets.
Changes include
JIRA: RTOS-1149
Description
Motivation and Context
This change enables users to define more memory maps, allowing more flexible configuration and better spatial separation of processes, which is first stage of development of partitioning mechanism.
Types of changes
How Has This Been Tested?
Checklist:
Special treatment