summaryrefslogtreecommitdiff
path: root/common/ccd_config.c
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@google.com>2018-05-21 13:03:44 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-05-31 16:22:35 -0700
commit37fadc39b5134d29e701ee7e0f08fd7da5900840 (patch)
treef779cfea4ecb59521966d77f3784c7738f0cd98d /common/ccd_config.c
parenta5f6726587edb2761caeb396e4a10d32a74ed09e (diff)
downloadchrome-ec-37fadc39b5134d29e701ee7e0f08fd7da5900840.tar.gz
cr50: add command for factory reset
The factory reset command can be used to enable ccd factory mode. The command can open ccd if write protect is removed and ccd hasn't been restricted. Right now we check FWMP and the ccd password before allowing factory reset. Factory reset cannot be used to get around anything that disables ccd. This adds 72 bytes. BUG=b:77543904 BRANCH=cr50 TEST=Try enabling factory mode using factory reset. Verify setting write protect, setting the FWMP disable ccd bit, or setting a ccd password prevents factory reset from enabling factory mode. Change-Id: I6e203bf6068250f009881aa95c13bc56cb2aa9e7 Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/1069369 Commit-Ready: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'common/ccd_config.c')
-rw-r--r--common/ccd_config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/ccd_config.c b/common/ccd_config.c
index c356d0a04e..a3d419356c 100644
--- a/common/ccd_config.c
+++ b/common/ccd_config.c
@@ -581,6 +581,11 @@ static void ccd_testlab_toggle(void)
/******************************************************************************/
/* External interface */
+int ccd_has_password(void)
+{
+ return raw_has_password();
+}
+
void ccd_config_init(enum ccd_state state)
{
/* Set initial state, after making sure it's a valid one */