Randall Spangler 89184dbc8d cr50: restrict console and control WP via CCD config
The WP command is now controlled by CCD configuration (ccdset
wpoverride).  In addition to enabling/disabling/following battery for
the current boot (counting deep sleep resume), it is also possible to
set the WP override at boot.  That's needed to support persistently
disabling WP for RMA without needing to persistently remove the
battery.

Restricted console commands are now controlled by CCD configuration
(ccdset cr50fullconsole).

The old 'lock' console command has been removed, now that
ccdopen/ccdunlock/ccdlock replace it.

The old TPM vendor commands for set_lock is gone; it will be replaced
by CCD configuration TPM vendor commands in a subsequent CL.  The
get_lock command still exists, but only reports the console lock
state; it will be removed too.

See go/cr50-ccd-wp for more information.

BUG=b:62537474
BRANCH=cr50
TEST=manual with CR50_DEV=1 build
     ccdinfo --> State = Opened, WPOverride = default(IfOpened)

     plug in battery (or jumper DIOM2 to ground on a dev board)
     gpioget --> make sure GPIO_BATT_PRES_L=0
     wp --> enabled, at boot follow battery
     remove battery (or jumper DIOM2 to JTAG pin3 on a dev board)
     gpioget --> make sure GPIO_BATT_PRES_L=1
     wp --> disabled, at boot follow battery

     wp enable --> forced enabled, at boot follow battery
     idle d
     (wait for restart)
     wp --> forced enabled, at boot follow battery
     reboot
     wp --> disabled, at boot follow battery

     plug in battery (or jumper DIOM2 to ground on a dev board)
     wp --> enabled, at boot follow battery
     wp disable --> forced disabled, at boot follow battery
     idle d
     (wait for restart)
     wp --> forced disabled, at boot follow battery
     reboot
     wp --> enabled, at boot follow battery

     wp disable atboot --> forced disabled, at boot forced disabled
     reboot
     wp --> forced disabled, at boot forced disabled
     wp enable --> forced enabled, at boot forced disabled
     idle d
     (wait for restart)
     wp --> forced enabled, at boot forced disabled

     wp follow_batt_pres --> enabled, at boot forced disabled
     wp follow_batt_pres atboot --> enabled, at boot follow battery

     ccdunlock
     wp disable --> access denied
     help --> commands like 'crash' are disabled

     ccdoops
     ccdset cr50fullconsole unlesslocked
     ccdset wpoverride always
     ccdunlock
     help --> commands like 'crash' are still enabled
     ccdlock
     help --> commands like 'crash' are disabled
     wp disable --> forced disabled
     ccdoops

Change-Id: Ic441f490bdd7a19dd646fe8338e5d608b42ce72c
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/575997
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2017-07-27 19:56:22 -07:00
2017-07-08 20:38:53 -07:00
2012-05-11 09:11:52 -07:00
2014-04-02 19:58:53 +00:00
2015-12-08 20:05:05 -08:00

For an overview of the Embedded Controller firmware, refer to

http://www.chromium.org/chromium-os/2014-firmware-summit

For instructions on building from source, refer to

http://www.chromium.org/chromium-os/ec-development/getting-started-building-ec-images-quickly
Description
No description provided
Readme 1.4 GiB
Languages
C 64.7%
Lasso 20.7%
ASL 3.6%
JavaScript 3.2%
C# 2.9%
Other 4.6%