diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2017-08-01 12:41:13 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-08-07 19:29:13 -0700 |
commit | 5f72f0a085f4b3063e119d629fe3b20c4961317f (patch) | |
tree | c06b8e38c7b5de242e8de7a0375ae33672d0764a /chip/npcx/config_chip-npcx7.h | |
parent | 0d385e7e5754327dae713415d3b931172514eae9 (diff) | |
download | chrome-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 'chip/npcx/config_chip-npcx7.h')
-rw-r--r-- | chip/npcx/config_chip-npcx7.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chip/npcx/config_chip-npcx7.h b/chip/npcx/config_chip-npcx7.h index 1ccc2c64cb..5e0c538d8e 100644 --- a/chip/npcx/config_chip-npcx7.h +++ b/chip/npcx/config_chip-npcx7.h @@ -47,7 +47,8 @@ /* Use chip variant to specify the size and start address of program memory */ #if defined(CHIP_VARIANT_NPCX7M6F) || defined(CHIP_VARIANT_NPCX7M6G) /* 62KB data ram */ -#define CONFIG_RAM_SIZE (0x00010000 - NPCX_BTRAM_SIZE) +#define CONFIG_DATA_RAM_SIZE 0x00010000 +#define CONFIG_RAM_SIZE (CONFIG_DATA_RAM_SIZE - NPCX_BTRAM_SIZE) /* 192KB RAM for FW code */ #define NPCX_PROGRAM_MEMORY_SIZE (192 * 1024) /* program memory base address for 192KB Code RAM (ie. 0x100C0000 - 192KB) */ @@ -57,8 +58,7 @@ #endif /* Total RAM size checking for npcx ec */ -#define NPCX_RAM_SIZE (NPCX_BTRAM_SIZE + CONFIG_RAM_SIZE + \ - NPCX_PROGRAM_MEMORY_SIZE) +#define NPCX_RAM_SIZE (CONFIG_DATA_RAM_SIZE + NPCX_PROGRAM_MEMORY_SIZE) #if defined(CHIP_VARIANT_NPCX7M6F) || defined(CHIP_VARIANT_NPCX7M6G) /* 256KB RAM in NPCX7M6F */ #if (NPCX_RAM_SIZE != 0x40000) |