diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2018-04-04 09:18:19 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-04-05 23:45:42 +0000 |
commit | 96640173e99735c5705f29fb9577394d9ae776b4 (patch) | |
tree | b7ffa879b02e2e56aa8e0b50529dfe594ff7a308 | |
parent | 9e8239eeebb7ed54466e9a8f17cedcd6d0823350 (diff) | |
download | chrome-ec-96640173e99735c5705f29fb9577394d9ae776b4.tar.gz |
Features: Add EXEC_IN_RAM
This patch adds execution-in-ram, opposite of XIP: execution-in-place
(a.k.a. XIP) to the EC features. It can be currently implied by
CONFIG_EXTERNAL_STORAGE.
BUG=b:77306460
BRANCH=none
TEST=Verify ectool prints EXEC_IN_RAM on Fizz.
Change-Id: I4a7fb3b267864debe59fd211956371eceac57613
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/995968
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/998763
-rw-r--r-- | common/ec_features.c | 3 | ||||
-rw-r--r-- | include/ec_commands.h | 2 | ||||
-rw-r--r-- | util/ectool.c | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/common/ec_features.c b/common/ec_features.c index 49d5db4f63..6491f15f3b 100644 --- a/common/ec_features.c +++ b/common/ec_features.c @@ -119,6 +119,9 @@ uint32_t get_feature_flags1(void) #ifdef CONFIG_HOST_EVENT64 | EC_FEATURE_MASK_1(EC_FEATURE_HOST_EVENT64) #endif +#ifdef CONFIG_EXTERNAL_STORAGE + | EC_FEATURE_MASK_1(EC_FEATURE_EXEC_IN_RAM) +#endif ; #ifdef CONFIG_EC_FEATURE_BOARD_OVERRIDE result = board_override_feature_flags1(result); diff --git a/include/ec_commands.h b/include/ec_commands.h index bc654209f0..c7a2d76230 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -1248,6 +1248,8 @@ enum ec_feature_code { EC_FEATURE_UNIFIED_WAKE_MASKS = 32, /* EC supports 64-bit host events */ EC_FEATURE_HOST_EVENT64 = 33, + /* EC runs code in RAM (not in place, a.k.a. XIP) */ + EC_FEATURE_EXEC_IN_RAM = 34, }; #define EC_FEATURE_MASK_0(event_code) (1UL << (event_code % 32)) diff --git a/util/ectool.c b/util/ectool.c index cdd5e2c2d3..be20de6a70 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -538,6 +538,10 @@ static const char * const ec_feature_names[] = { [EC_FEATURE_RTC] = "Real-time clock", [EC_FEATURE_TOUCHPAD] = "Touchpad", [EC_FEATURE_RWSIG] = "RWSIG task", + [EC_FEATURE_DEVICE_EVENT] = "Device events reporting", + [EC_FEATURE_UNIFIED_WAKE_MASKS] = "Unified wake masks for LPC/eSPI", + [EC_FEATURE_HOST_EVENT64] = "64-bit host events", + [EC_FEATURE_EXEC_IN_RAM] = "Execute code in RAM", }; int cmd_inventory(int argc, char *argv[]) |