diff options
author | Andrew McRae <amcrae@google.com> | 2020-05-23 13:53:58 +1000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-05-27 03:14:03 +0000 |
commit | 595c67985b07111cadc8ddc238ee1662870d7c0b (patch) | |
tree | 4428541b84d4c3508999f36b2f1c7b712076f0e5 /core/cortex-m/include | |
parent | d47f66468e4f84fbc3c56cd2f82611190e8dc093 (diff) | |
download | chrome-ec-595c67985b07111cadc8ddc238ee1662870d7c0b.tar.gz |
cortex-m: Init the MPU to check for correct operation
Disable all a MPU regions using the smallest supported size.
BUG=chromium:1085868
TEST=Boot successfully on Puff
TEST=Boot successfully on Volteer
BRANCH=none
Change-Id: Ie6924c3d9691ba6f4b218c9897b4e42b35b12bb7
Signed-off-by: Andrew McRae <amcrae@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2212010
Reviewed-by: Andrew McRae <amcrae@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Tested-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'core/cortex-m/include')
-rw-r--r-- | core/cortex-m/include/mpu.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/cortex-m/include/mpu.h b/core/cortex-m/include/mpu.h index 17539fa09e..81aefa6a75 100644 --- a/core/cortex-m/include/mpu.h +++ b/core/cortex-m/include/mpu.h @@ -12,6 +12,11 @@ #include "config.h" /* chips might override MPU attribute settings */ /* + * ARMv7-M SRAM region + */ +#define CORTEX_M_SRAM_BASE 0x20000000 + +/* * Region assignment. 7 as the highest, a higher index has a higher priority. * For example, using 7 for .iram.text allows us to mark entire RAM XN except * .iram.text, which is used for hibernation. @@ -54,6 +59,11 @@ enum mpu_region { #define MPU_CTRL_ENABLE BIT(0) /* + * Minimum region size is 32 bytes, 5 bits of address space + */ +#define MPU_SIZE_BITS_MIN 5 + +/* * XN (execute never) bit. It's bit 12 if accessed by halfword. * 0: XN off * 1: XN on |