diff options
Diffstat (limited to 'common/ec_comm.c')
-rw-r--r-- | common/ec_comm.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/common/ec_comm.c b/common/ec_comm.c index e24c2af94c..169e65eb55 100644 --- a/common/ec_comm.c +++ b/common/ec_comm.c @@ -322,6 +322,23 @@ static int command_ec_comm(int argc, char **argv) return EC_ERROR_INVAL; } + if (argc > 1) { +#ifdef CR50_RELAXED + if (!strcasecmp(argv[1], "corrupt")) + ec_efs_corrupt_hash(); + else if (!strcasecmp(argv[1], "reload")) + ec_efs_refresh(); + else + return EC_ERROR_PARAM1; + /* + * let's keep processing so that we can see how the context + * values are changed. + */ +#else + return EC_ERROR_PARAM_COUNT; +#endif + } + /* * EC Packet Context */ @@ -343,5 +360,13 @@ static int command_ec_comm(int argc, char **argv) return EC_SUCCESS; } -DECLARE_SAFE_CONSOLE_COMMAND(ec_comm, command_ec_comm, NULL, - "Dump EC-CR50-comm status"); +DECLARE_SAFE_CONSOLE_COMMAND(ec_comm, command_ec_comm, +#ifdef CR50_RELAXED + "[corrupt|reload]", + "Dump EC-CR50-comm status, or corrupt ECRW hash," + "or reload it" +#else + NULL, + "Dump EC-CR50-comm status" +#endif +); |