diff options
author | Daisuke Nojiri <dnojiri@google.com> | 2013-04-02 17:49:59 -0700 |
---|---|---|
committer | Daisuke Nojiri <dnojiri@google.com> | 2013-09-05 19:06:27 +0000 |
commit | 748154d55f10f260502eb19bdb81298878543329 (patch) | |
tree | f4550d9601398e70e8f9fbda71c7b6af357a0371 /chip | |
parent | b0d559a918c8c83dcdb2d57c468b3c50268b2b5f (diff) | |
download | chrome-ec-748154d55f10f260502eb19bdb81298878543329.tar.gz |
Introducing MPU module for Cortex-M3
Preventing instruction fetch from RAM for Link except iram.text, which is used
for hibernation. Stm32 on Snow does not support MPU.
Tested on Link using commands 'crash nxtext/nxdata/nxstack', which run code from
.iram.text, .data section, and the stack, respectively:
...
RAM locked. Exclusion 20005980-200059a0
...
> crash nxtext
Running from 20005984
> crash nxdata
=== PROCESS EXCEPTION: 04 ====== xPSR: 61000000 ===
r0 :00000000 r1 :0000dff2 r2 :00000005 r3 :0000086d
r4 :00000000 r5 :00000032 r6 :2000544c r7 :00000000
r8 :00000000 r9 :20005456 r10:00000000 r11:00000000
r12:20005961 sp :20002748 lr :000008d7 pc :20005960
Instruction access violation
mmfs = 1, shcsr = 70001, hfsr = 0, dfsr = 0
=========== Process Stack Contents ===========
200027b0: 0000086d 00000002 0000d504 00009f27
200027c0: 2000544c 20005452 00000000 00000000
200027d0: 00000000 00000000 00000000 00000000
200027e0: 00000000 00000000 00000000 00000cbb
Rebooting...
> crash nxstack
=== PROCESS EXCEPTION: 04 ====== xPSR: 20000200 ===
r0 :00000070 r1 :00000047 r2 :00000000 r3 :200027a8
r4 :00000000 r5 :00000001 r6 :2000544c r7 :00000000
r8 :00000000 r9 :20005456 r10:00000000 r11:00000000
r12:00000002 sp :20002740 lr :00000913 pc :200027ac
Instruction access violation
mmfs = 1, shcsr = 70001, hfsr = 0, dfsr = 0
=========== Process Stack Contents ===========
200027ac: 00000070 00000047 00000002 0000d57c
200027bc: 00009f9f 2000544c 20005452 00000000
200027cc: 00000000 00000000 00000000 00000000
200027dc: 00000000 00000000 00000000 00000000
Rebooting...
BUG=chrome-os-partner:16904
BRANCH=master
TEST=stated above
Change-Id: I7c6593c527f29609442f33550f9d16755f32297c
Signed-off-by: Daisuke Nojiri <dnojiri@google.com>
Reviewed-on: https://chromium-review.googlesource.com/51337
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/lm4/config_chip.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/chip/lm4/config_chip.h b/chip/lm4/config_chip.h index 9fbda8d970..1ade3365f4 100644 --- a/chip/lm4/config_chip.h +++ b/chip/lm4/config_chip.h @@ -117,6 +117,7 @@ #define CONFIG_LPC #define CONFIG_PECI #define CONFIG_SWITCH +#define CONFIG_MPU /* Compile for running from RAM instead of flash */ /* #define COMPILE_FOR_RAM */ |