feat(mpu): Cortex-R4F MPU (CP15) configuration driver #127
No reviewers
Labels
No labels
Category
App
Category
Documentation
Category
Firmware
Category
Hardware
Category
Qms
PR_Size
L
PR_Size
M
PR_Size
S
PR_Size
XL
PR_Size
XS
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Priority
Very Low Priority
Size
Epic
Size
Feature
Size
Task
Status
Blocked
Status
Draft
Status
Needs-review
Team
Board
Team
Dev
Team
Management
Type
Bug
Type
Capa
Type
Improvement
Type
New-feature
Type
Regulatory
Type
Usability
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
opendutchsolutions.public/hal_awr6843!127
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/126-mpu-driver"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #126.
New
hal_mpudriver (ENABLE_MPU_MODULE):hal_mpu_config()disables the MPU, programs a 12-region table (peripheral space Strongly-Ordered -- the region that turned out to matter for real-hardware bring-up), then re-enables it. Not called automatically byhal_soc_init()-- a consumer opts in explicitly beforehal_soc_init()if it touches write-ordering-sensitive peripheral sequences.Values/order are a direct transliteration of a hardware-confirmed sibling project's own MPU bring-up, not independently re-derived (no TRM section available for this device's MPU region layout).
Wired through the standard
ENABLE_MPU_MODULE/CONFIG_HAL_AWR6843_MPUconfig path (hal_config_mss.h,template/hal_config_mss_template.h,zephyr/Kconfig,zephyr/CMakeLists.txt,tools/misra/run_misra.sh,testing/CMakeLists.txt), matching every other driver's landing pattern.Testability note: CP15 register access has no host-testable equivalent (see
hal_mpu.h's top-of-file comment) --hal_mpu_region_table(the datahal_mpu_config()applies) is exposed and host-tested instead; the CP15 primitives themselves are no-ops underMMWHAL_HOST_TEST_BUILD, same patternmmwhal_types.h's ownMMWHAL_DISABLE_IRQ()/MMWHAL_ENABLE_IRQ()already use. Sanity-checked: flipped region 5's memory type in the table, confirmed the new test caught it, reverted.Local verification:
ctest: 411/411 passing (clean full rebuild, +8 new test cases/47 assertions)tools/misra/run_misra.sh): 0 findings (4 genuinemisra-c2012-2.7false positives from cppcheck not parsing GNU extended-asm operand lists -- same root cause as the existingmisra-c2012-17.3suppression -- addressed with targeted inlinecppcheck-suppresscomments rather than a blanket rule suppression)clang-format --dry-run --Werror: cleanPR_Size/M