summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2017-08-01 12:41:13 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-08-07 19:29:13 -0700
commit5f72f0a085f4b3063e119d629fe3b20c4961317f (patch)
treec06b8e38c7b5de242e8de7a0375ae33672d0764a /core
parent0d385e7e5754327dae713415d3b931172514eae9 (diff)
downloadchrome-ec-5f72f0a085f4b3063e119d629fe3b20c4961317f.tar.gz
npcx: Define CONFIG_DATA_RAM_SIZE
This patch defines CONFIG_DATA_RAM_SIZE, which indicates the size of the RAM used for data, thus can be marked as non-executable. If it's not defined, it defaults to CONFIG_RAM_SIZE. Thus, other chips are not affected. BUG=b:36037354 BRANCH=none TEST=buildall. Run 'sysjump disable' on Reef and verify mpu_protect_ram is successful. Change-Id: I54d74fd1dabff7e1013fff2542fd02c3646803d1 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/596518 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/cortex-m/mpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/cortex-m/mpu.c b/core/cortex-m/mpu.c
index e49a8d533d..d12191dbdd 100644
--- a/core/cortex-m/mpu.c
+++ b/core/cortex-m/mpu.c
@@ -128,7 +128,7 @@ int mpu_protect_ram(void)
{
int ret;
ret = mpu_lock_region(REGION_IRAM, CONFIG_RAM_BASE,
- CONFIG_RAM_SIZE, MPU_ATTR_INTERNAL_SRAM);
+ CONFIG_DATA_RAM_SIZE, MPU_ATTR_INTERNAL_SRAM);
if (ret != EC_SUCCESS)
return ret;
ret = mpu_unlock_region(