diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2018-09-27 19:26:30 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-10-04 00:37:07 -0700 |
commit | 9ef91389ca20f0dc50c2ab0d6d231ec6feb2802b (patch) | |
tree | 50d6a99cc44b2ad5b0846b8b99438f92b8191157 /include/ccd_config.h | |
parent | 14a70cf973458d73fa71e14d46351769ddf131da (diff) | |
download | chrome-ec-9ef91389ca20f0dc50c2ab0d6d231ec6feb2802b.tar.gz |
rma: when processing 'RMA open' do not reboot the device
Once RMA open is processed and CCD state is updated, the AP still
might require to perform some operations, even if TPM is not available
any more.
With this patch enable_ccd_factory_mode() does not trigger device
reset, if invoked by the RMA open handler.
Another modification is that WP is disabled immediately when factory
mode is enabled, there is no need to reset the H1 for WP status to
change.
BRANCH=cr50, cr50-mp
BUG=b:115495431
TEST=verified that running 'gsctool -a -r <authcode>' sets to 'Y' all
CCD properties, disables write protection, but does not reboot
the device.
Change-Id: I834a9e4b5ebbe4aaaf1caafad9c82424087d01f7
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1250037
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'include/ccd_config.h')
-rw-r--r-- | include/ccd_config.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/ccd_config.h b/include/ccd_config.h index fdcb1e20ff..7c377f394f 100644 --- a/include/ccd_config.h +++ b/include/ccd_config.h @@ -301,8 +301,16 @@ void ccd_tpm_reset_callback(void); int ccd_has_password(void); /** - * Enter CCD factory mode. This will clear the TPM and do a hard reboot after - * updating the ccd config. + * Enter CCD factory mode. This will clear the TPM, update the ccd config, and + * then do a hard reboot if 'reset_required' is True. */ -void enable_ccd_factory_mode(void); +void enable_ccd_factory_mode(int reset_required); + +/* + * Enable factory mode but not necessarily rebooting the device. This will + * clear the TPM and disable flash write protection. Will trigger system reset + * only if 'reset_required' is True. + */ +void factory_enable(int reset_required); + #endif /* __CROS_EC_CCD_CONFIG_H */ |