Files
OpenCellular/extra
Vadim Bendebury b676f5e0ac gsctool: add support for CCD info
The new option allows to retrieve CCD information from the device. It
is reported similar to the way it is reported on the Cr50 console with
a few deviations:

 - current capability setting is spelled out (instead of stating that
   it is at default);

 - default capability setting is reported only if it is different from
   the current value.

- a bitmap of enabled capabilities is added in the end for ease of
   verifying CCD state during factory process.

BRANCH=cr50, cr50-mp
BUG=b:72718383
TEST=ran the command on a Coral device:

  $ gsctool -a -I
  State: Locked
  Password: None
  Flags: 000000
  Capabilities, current and default:
    UartGscRxAPTx   Y Always
    UartGscTxAPRx   Y Always
    UartGscRxECTx   Y Always
    UartGscTxECRx   - IfOpened
    FlashAP         - IfOpened
    FlashEC         - IfOpened
    OverrideWP      - IfOpened
    RebootECAP      - IfOpened
    GscFullConsole  - IfOpened
    UnlockNoReboot  Y Always
    UnlockNoShortPP Y Always
    OpenNoTPMWipe   - IfOpened
    OpenNoLongPP    - IfOpened
    BatteryBypassPP Y Always
    UpdateNoTPMWipe Y Always
    I2C             - IfOpened
    FlashRead       Y Always
  CCD caps bitmap: 0x16607

  - then took the device through 'ccd open' sequence and tried again,
    observed that all capabilities were set to 'Y' and caps bitmap was
    set to 0x1ffff.

  - then on the Cr50 console modified UnlockNoShortPP capability to be
    set 'UnlessLocked', ran the command again, observed the default
    value (Always) reported.

  - locked the CCD on Cr50 console, ran the command one more time:

  $ gsctool -a -I
  State: Locked
  Password: None
  Flags: 000000
  Capabilities, current and default:
    UartGscRxAPTx   Y Always
    UartGscTxAPRx   Y Always
    UartGscRxECTx   Y Always
    UartGscTxECRx   - IfOpened
    FlashAP         - IfOpened
    FlashEC         - IfOpened
    OverrideWP      - IfOpened
    RebootECAP      - IfOpened
    GscFullConsole  - IfOpened
    UnlockNoReboot  Y Always
    UnlockNoShortPP - UnlessLocked  (Always)
    OpenNoTPMWipe   - IfOpened
    OpenNoLongPP    - IfOpened
    BatteryBypassPP Y Always
    UpdateNoTPMWipe Y Always
    I2C             - IfOpened
    FlashRead       Y Always
  CCD caps bitmap: 0x16207

Change-Id: I0fd5e6bd9402ae518e3f2a3ed82589f8696dfd44
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/999826
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2018-04-10 16:29:17 -07:00
..
2017-10-25 01:38:45 -07:00

This directory is for experiments only. It is not built automatically,
required, supported, guaranteed to work, or necessarily well-documented.

The contents may change without warning at any time.