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 /include | |
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 'include')
-rw-r--r-- | include/config.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/config.h b/include/config.h index 04f87de2d4..b557b7b8be 100644 --- a/include/config.h +++ b/include/config.h @@ -1931,7 +1931,14 @@ /* Base address of RAM for the chip */ #undef CONFIG_RAM_BASE -/* Size of RAM available on the chip, in bytes */ +/* + * CONFIG_DATA_RAM_SIZE and CONFIG_RAM_SIZE indicate size of all data RAM + * available on the chip in bytes and size of data RAM available for EC in + * bytes, respectively. + * Usually, CONFIG_DATA_RAM_SIZE = CONFIG_RAM_SIZE but some chips need to + * allocate RAM for the mask ROM. Then CONFIG_DATA_RAM_SIZE > CONFIG_RAM_SIZE. + */ +#undef CONFIG_DATA_RAM_SIZE #undef CONFIG_RAM_SIZE /* Enable rbox peripheral */ @@ -2866,6 +2873,14 @@ /******************************************************************************/ /* + * Set default data ram size unless it's customized by the chip. + */ +#ifndef CONFIG_DATA_RAM_SIZE +#define CONFIG_DATA_RAM_SIZE CONFIG_RAM_SIZE +#endif + +/******************************************************************************/ +/* * Disable the built-in console history if using the experimental console. * * The experimental console keeps its own session-persistent history which |