Files
OpenCellular/include
Randall Spangler ff4d22819a cr50: Add SPI hashing command
This allows hashing or dumping SPI flash from the Cr50 console even on
a locked device, so you can verify the RO Firmware on a system via CCD.

See design doc: go/verify-ro-firmware
(more specifically, "Cr50 console commands for option 1")

BUG=chromium:804507
BRANCH=cr50 release (after testing)
TEST=manual:
   # Sample sequence
   spihash ap -> requires physical presence; tap power button
   spihash 0 1024 -> gives a hash; compare with first 1KB of image.bin
   spihash 0 128 dump -> dumps first 128 bytes; compare with image.bin
   spihash 128 128 -> offset works
   spihash 0 0x100000 -> gives a hash; doesn't watchdog reset
   spihdev ec
   spihash 0 1024 -> compare with ec.bin
   spihash disable
   # Test timeout
   spihash ap
   # Wait 30 seconds
   spihash 0 1024 -> still works
   # Wait 60 seconds; goes back disabled automatically
   spihash 0 1024 -> fails because spihash is disabled
   # Presence not required when CCD opened
   ccd open
   spihash ap -> no PP required
   spihash 0 1024 -> works
   spihash disable
   # Possible for owner to disable via CCD config
   ccd -> HashFlash is "Always"
   ccd set HashFlash IfOpened
   ccd lock
   spihash ap -> access denied
   # Cleanup
   ccd open
   ccd reset
   ccd lock

Change-Id: I27b5054730dea6b27fbad1b1c4aa0a650e3b4f99
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/889725
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2018-02-08 23:42:33 -08:00
..
2017-02-17 04:09:37 -08:00
2017-01-07 13:29:52 -08:00
2016-05-26 16:17:26 -07:00
2013-12-17 21:27:53 +00:00
2017-11-17 20:18:38 -08:00
2018-02-08 23:42:33 -08:00
2017-08-29 19:37:04 -07:00
2017-12-18 20:32:58 -08:00
2015-06-18 19:07:00 +00:00
2015-07-27 22:19:16 +00:00
2014-02-08 00:14:48 +00:00
2013-10-25 20:12:49 +00:00
2015-06-10 18:24:05 +00:00
2018-01-23 05:25:08 -08:00
2015-05-27 03:58:16 +00:00
2017-12-28 12:35:08 -08:00
2015-05-27 03:58:16 +00:00
2013-06-26 09:08:23 -07:00
2017-12-07 05:09:28 -08:00
2018-02-05 23:05:39 -08:00
2011-12-07 19:10:02 +00:00
2016-11-08 17:11:28 -08:00
2017-06-02 10:38:57 -07:00
2012-10-25 14:12:11 -07:00
2017-07-28 17:45:13 -07:00
2015-06-18 19:07:00 +00:00
2017-10-02 23:28:24 -07:00
2017-10-10 22:13:43 -07:00
2015-06-18 19:07:00 +00:00
2016-11-15 17:41:53 -08:00
2018-01-08 17:22:48 -08:00
2016-11-08 17:11:28 -08:00
2015-09-16 14:49:46 -07:00
2018-01-31 13:47:15 -08:00
2017-02-23 11:36:21 -08:00
2017-06-29 10:37:40 -07:00
2017-06-29 10:37:40 -07:00
2015-06-18 19:07:00 +00:00
2017-09-22 10:18:50 -07:00
2017-10-31 21:49:24 -07:00
2015-01-20 20:56:43 +00:00