diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2017-08-15 16:34:52 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-09-12 01:11:59 -0700 |
commit | 4dcee1c545c31d288b23221d8e07bc452214ce7b (patch) | |
tree | 1ddab11d51dcd5c0571f6f777b655ba333cd84e6 /test/flash.c | |
parent | a52cfbc80c060d9883aee9de4e764e0b250d184a (diff) | |
download | chrome-ec-4dcee1c545c31d288b23221d8e07bc452214ce7b.tar.gz |
EFS: Add support for early firmware selection
Chromebox ECs performs EFS: verifying firmware before the AP boots.
This patch updates host commands which are required for the EFS.
The change includes:
* Update EC_CMD_FLASH_REGION_INFO to accept EC_FLASH_REGION_UPDATE
* Update EC_CMD_VBOOT_HASH to accept EC_VBOOT_HASH_OFFSET_UPDATE
When EC_FLASHS_REGION_UPDATE is specified, EC_CMD_FLASH_REGION_INFO
returns the slot which currently is not hosting a running RW copy.
When EC_VBOOT_HASH_OFFSET_UPDATE is specified, EC_CMD_VBOOT_HASH
computs the hash of the update slot. This hash covers the entire
region, including the signature at the end.
This patch undefines CONFIG_CMD_USBMUX and CONFIG_CMD_TYPEC
for gru to create space.
BUG=b:65028930
BRANCH=none
CQ-DEPEND=CL:648071
TEST=On Fizz, verify:
1. RW_B is old and updated by soft sync. RW_B is activated and
executed after reboot. System continues to boot to OS.
2. RW_A is old and updated by soft sync. RW_A is activated and
executed after reboot. System continues to boot to OS.
Change-Id: I9ece907b764d07ce94054ba27996e048c665a80a
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/648448
Diffstat (limited to 'test/flash.c')
-rw-r--r-- | test/flash.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/flash.c b/test/flash.c index b3bad5e984..3ee3384619 100644 --- a/test/flash.c +++ b/test/flash.c @@ -364,11 +364,14 @@ static int test_region_info(void) VERIFY_REGION_INFO(EC_FLASH_REGION_RO, CONFIG_EC_PROTECTED_STORAGE_OFF + CONFIG_RO_STORAGE_OFF, CONFIG_RO_SIZE); - VERIFY_REGION_INFO(EC_FLASH_REGION_RW, + VERIFY_REGION_INFO(EC_FLASH_REGION_ACTIVE, CONFIG_EC_WRITABLE_STORAGE_OFF + CONFIG_RW_STORAGE_OFF, CONFIG_RW_SIZE); VERIFY_REGION_INFO(EC_FLASH_REGION_WP_RO, CONFIG_WP_STORAGE_OFF, CONFIG_WP_STORAGE_SIZE); + VERIFY_REGION_INFO(EC_FLASH_REGION_UPDATE, + CONFIG_EC_WRITABLE_STORAGE_OFF + + CONFIG_RW_STORAGE_OFF, CONFIG_RW_SIZE); return EC_SUCCESS; } |