Skip to content

Commit a6be4c8

Browse files
authored
Hotfix/MPU Part 3 (#637)
* fix(MPU): Dynamic regions linker symbols wrong usage * chore(MPU): Add changeset
1 parent 2a6f7d2 commit a6be4c8

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
release: patch
2+
summary: MPUDomain dynamic regions were configured using the linker symbol values instead of their addresses (that is the correct way of using linker symbols). That made non-cached regions cached, and caused harware undefined behaviour.

Inc/HALAL/Models/MPU.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,18 +310,18 @@ struct MPUDomain {
310310

311311
// Dynamic Configuration based on Linker Symbols
312312
configure_dynamic_region(
313-
(uintptr_t)__mpu_d1_nc_start,
314-
(uintptr_t)__mpu_d1_nc_end,
313+
reinterpret_cast<uintptr_t>(&__mpu_d1_nc_start),
314+
reinterpret_cast<uintptr_t>(&__mpu_d1_nc_end),
315315
MPU_REGION_NUMBER3
316316
);
317317
configure_dynamic_region(
318-
(uintptr_t)__mpu_d2_nc_start,
319-
(uintptr_t)__mpu_d2_nc_end,
318+
reinterpret_cast<uintptr_t>(&__mpu_d2_nc_start),
319+
reinterpret_cast<uintptr_t>(&__mpu_d2_nc_end),
320320
MPU_REGION_NUMBER5
321321
);
322322
configure_dynamic_region(
323-
(uintptr_t)__mpu_d3_nc_start,
324-
(uintptr_t)__mpu_d3_nc_end,
323+
reinterpret_cast<uintptr_t>(&__mpu_d3_nc_start),
324+
reinterpret_cast<uintptr_t>(&__mpu_d3_nc_end),
325325
MPU_REGION_NUMBER7
326326
);
327327

0 commit comments

Comments
 (0)