diff options
author | Mary Ruthven <mruthven@google.com> | 2018-08-27 11:35:03 -0700 |
---|---|---|
committer | Mary Ruthven <mruthven@chromium.org> | 2018-08-29 04:20:29 +0000 |
commit | 5496a29d847d4fc2383ec68a6b371b3fa0e445e0 (patch) | |
tree | 19b0f2e7902f456af729a0efc8ff8568dc5fc2df /include | |
parent | 129807aa19f5d375f8574438d37b729c709f4cf2 (diff) | |
download | chrome-ec-5496a29d847d4fc2383ec68a6b371b3fa0e445e0.tar.gz |
cr50: add more ccd open capabilities
Add a capability for opening cr50 without dev mode and a capability for
opening cr50 from the console. This will make it so cr50 can easily be
opened from the console after RMA open.
BUG=b:113266255,b:113267161
BRANCH=cr50
TEST=verify OpenFromConsole and OpenW/ODevMode are set to IfOpened with
CCD_OPEN_PREPVT isn't defined and set to Always when it is defined. Make
sure they are set to Always after factory mode is enabled.
Change-Id: Ic149b4163ee9a3ce5e0c051dc42634a31a4a0a7e
Signed-off-by: Mary Ruthven <mruthven@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1191386
Tested-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/ccd_config.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/ccd_config.h b/include/ccd_config.h index 240feb5240..fdcb1e20ff 100644 --- a/include/ccd_config.h +++ b/include/ccd_config.h @@ -100,6 +100,12 @@ enum ccd_capability { /* Read-only access to hash or dump EC or AP flash */ CCD_CAP_FLASH_READ = 16, + /* Allow ccd open without dev mode enabled */ + CCD_CAP_OPEN_WITHOUT_DEV_MODE = 17, + + /* Allow ccd open from usb */ + CCD_CAP_OPEN_FROM_USB = 18, + /* Number of currently defined capabilities */ CCD_CAP_COUNT }; @@ -130,6 +136,14 @@ struct ccd_capability_info { enum ccd_capability_state default_state; }; +#ifdef CONFIG_CCD_OPEN_PREPVT +/* In prepvt images always allow ccd open from the console without dev mode */ +#define CCD_CAP_STATE_OPEN_REQ CCD_CAP_STATE_ALWAYS +#else +/* In prod images restrict how ccd can be opened */ +#define CCD_CAP_STATE_OPEN_REQ CCD_CAP_STATE_IF_OPENED +#endif + #define CAP_INFO_DATA { \ {"UartGscRxAPTx", CCD_CAP_STATE_ALWAYS}, \ {"UartGscTxAPRx", CCD_CAP_STATE_ALWAYS}, \ @@ -151,6 +165,8 @@ struct ccd_capability_info { {"UpdateNoTPMWipe", CCD_CAP_STATE_ALWAYS}, \ {"I2C", CCD_CAP_STATE_IF_OPENED}, \ {"FlashRead", CCD_CAP_STATE_ALWAYS}, \ + {"OpenNoDevMode", CCD_CAP_STATE_OPEN_REQ}, \ + {"OpenFromUSB", CCD_CAP_STATE_OPEN_REQ}, \ } #define CCD_STATE_NAMES { "Locked", "Unlocked", "Opened" } |