From fc562bbf9bbe418a6e5995c13c004cdf5e111ce7 Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Fri, 5 May 2017 05:40:26 +0800 Subject: rwsig: expose a new feature bit when RWSIG task is enabled Expose EC_FEATURE_RWSIG if RWSIG task is enabled. This allows flashrom to run EC_CMD_RWSIG_ACTION and abort RWSIG jump, then perform regular firmware update flow. BRANCH=none BUG=b:37584134 TEST=on eve, `ectool --name=cros_tp inventory` should show 'RWSIG task'. Change-Id: Iea14f4f01fab201767dccd07d711ae9e1b638f6a Signed-off-by: Wei-Ning Huang Reviewed-on: https://chromium-review.googlesource.com/497788 Commit-Ready: Wei-Ning Huang Tested-by: Wei-Ning Huang Reviewed-by: Nicolas Boichat Reviewed-by: Vincent Palatin --- common/host_command.c | 3 +++ include/ec_commands.h | 2 ++ util/ectool.c | 1 + 3 files changed, 6 insertions(+) diff --git a/common/host_command.c b/common/host_command.c index f5382b533f..33eb813bda 100644 --- a/common/host_command.c +++ b/common/host_command.c @@ -792,6 +792,9 @@ static int host_command_get_features(struct host_cmd_handler_args *args) #endif #ifdef HAS_TASK_CENTROIDING | EC_FEATURE_MASK_0(EC_FEATURE_TOUCHPAD) +#endif +#ifdef HAS_TASK_RWSIG + | EC_FEATURE_MASK_0(EC_FEATURE_RWSIG) #endif ; return EC_RES_SUCCESS; diff --git a/include/ec_commands.h b/include/ec_commands.h index f8f8306af9..84aa055d04 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -1080,6 +1080,8 @@ enum ec_feature_code { EC_FEATURE_FINGERPRINT = 28, /* The MCU exposes a Touchpad */ EC_FEATURE_TOUCHPAD = 29, + /* The MCU has RWSIG task enabled */ + EC_FEATURE_RWSIG = 30, }; #define EC_FEATURE_MASK_0(event_code) (1UL << (event_code % 32)) diff --git a/util/ectool.c b/util/ectool.c index 71f28969fd..651fcfcbaa 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -515,6 +515,7 @@ static const char * const ec_feature_names[] = { [EC_FEATURE_USBC_SS_MUX_VIRTUAL] = "Host-controlled USB-C SS mux", [EC_FEATURE_RTC] = "Real-time clock", [EC_FEATURE_TOUCHPAD] = "Touchpad", + [EC_FEATURE_RWSIG] = "RWSIG task", }; int cmd_inventory(int argc, char *argv[]) -- cgit v1.2.1