soc: st: stm32: h7rsxx: Fix MPU region for read-only id flash region #99745
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



Set correct MPU memory type and size for the uniqe device id, package code and ADC VREF/TS calibration read-only flash region.
(DEVICE_NON_SHAREABLE | REGION_512B | P_RO_U_NA_Msk)) is the same as REGION_IO_ATTR (used for PERIPH region) but RO instead of RW. The size is reduced to 512 bytes, because RM0477 table 28 and chapter 5.3.12 state that this read-only flash area has a size of 512 bytes.
I introduced this region with PR #97364, both configurations work, but it is more correct with this one.
Testing: Network still initializes with this changes (reads uniqe device ID for creating the mac address per default).
Cross-check: Will mem-fault during zephyr init when commenting out this
MPU_REGION_ENTRY.Open question: Create a
#definefor this type?REGION_IO_ATTR_ROfor example