armv8-m: Fix MPU Region Limit Address config
On armv8-m the MPU region limits are inclusive. Thus, we must substract one byte of size from (base + limit). Signed-off-by: Michael Jung <michael.jung@secore.ly>
This commit is contained in:
parent
d4cbb4f5b8
commit
ec3805721c
|
@ -163,7 +163,7 @@ void mpu_configure_region(uintptr_t base, size_t size,
|
|||
* aligns with the size of the selected region."
|
||||
*/
|
||||
|
||||
limit = (base + size) & MPU_RLAR_LIMIT_MASK;
|
||||
limit = (base + size - 1) & MPU_RLAR_LIMIT_MASK;
|
||||
base &= MPU_RBAR_BASE_MASK;
|
||||
|
||||
/* Select the region */
|
||||
|
|
Loading…
Reference in New Issue