diff options
author | Tom Hughes <tomhughes@chromium.org> | 2020-05-13 15:30:03 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-05-22 19:22:02 +0000 |
commit | da723da31208d9730c99903b3eef04c7600c22bb (patch) | |
tree | 57bb616fa170b39f127829d94de3b8e5d77166c6 /test/rollback.c | |
parent | 38df3878f8d7d4bc149faaa0884f0ded501b491c (diff) | |
download | chrome-ec-da723da31208d9730c99903b3eef04c7600c22bb.tar.gz |
cortex-m: Always enable MPU in mpu_pre_init
The MPU was only being enabled when CONFIG_ARMV7_CACHE and
CONFIG_CHIP_UNCACHED_REGION were enabled; these are enabled for the
STM32H743 (dartmonkey), but not the STM32F412 (bloonchipper).
BRANCH=none
BUG=b:155229277, b:156501835
TEST=Compile and flash "rollback" test on dragonclaw with region 0
On console: "runtest"
=> Reboots with "Data access violation, mfar = 8020000"
=> PASS
TEST=Compile and flash "rollback" test on dragonclaw with region 1
On console: "runtest"
=> Reboots with "Data access violation, mfar = 8040000"
=> PASS
TEST=Compile and flash "rollback" test on dragontalon with region 0
On console: "runtest"
=> Reboots with "Data access violation, mfar = 80c0000"
=> PASS
TEST=Compile and flash "rollback" test on dragontalon with region 1
On console: "runtest"
=> Reboots with "Data access violation, mfar = 80e0000"
=> PASS
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I7bca3864205bd1dd6797732aa903bc3bc325ac6f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2200201
Commit-Queue: Yicheng Li <yichengli@chromium.org>
Tested-by: Yicheng Li <yichengli@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'test/rollback.c')
-rw-r--r-- | test/rollback.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/rollback.c b/test/rollback.c index cd74f4e367..e5a566c22f 100644 --- a/test/rollback.c +++ b/test/rollback.c @@ -57,7 +57,10 @@ test_static int _test_lock_rollback(const struct rollback_info *info, { int rv; - mpu_enable(); + /* + * We expect the MPU to have already been enabled during the + * initialization process (mpu_pre_init). + */ rv = mpu_lock_rollback(0); TEST_EQ(rv, EC_SUCCESS, "%d"); |