diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2017-06-29 12:46:22 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-07-13 19:45:57 -0700 |
commit | 7630636a0fe8ceb2dbba2b175564a17900d175cf (patch) | |
tree | df62a9bfb8f965442f8a3a975794f70cd330e87e /include/rwsig.h | |
parent | 34fed775b65063fb519d11deb11eb1feac7a8ecc (diff) | |
download | chrome-ec-7630636a0fe8ceb2dbba2b175564a17900d175cf.tar.gz |
vboot: Verify and jump to RW_A or RW_B
This patch gives EC the capability of verifying and jumping to
RW_A or RW_B. EC tries the slot stored in a persistent storage
(e.g. BBRAM). If verification fails due to invalid contents, EC
tries the other slot. AP's expectation and its reaction to the
state of the slots and the currently running image are summarized
below.
Since the system is still unlocked (CONFIG_SYSTEM_UNLOCKED), EC
won't try to verify or jump to RW yet.
| AP expects X
----------+---------------------------
SLOT_A=X | proceed
SLOT_B=X | proceed
----------+---------------------------
SLOT_A=X' | reboot to B
SLOT_B=X | proceed
----------+---------------------------
SLOT_A=X | proceed
SLOT_B=X' | reboot to A
----------+---------------------------
SLOT_A=X' | write X to B, reboot to B
SLOT_B=X' | write X to A, reboot to A
BUG=b:38462249
BRANCH=none
TEST=Lock the system and boot Fizz on barrel-jack and type-c.
Change-Id: I51e3abd4d9af44ab3d531561cb9bfa2e8d775f6a
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/556286
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/rwsig.h')
-rw-r--r-- | include/rwsig.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/rwsig.h b/include/rwsig.h index 0cb98c83f0..813fa06f9c 100644 --- a/include/rwsig.h +++ b/include/rwsig.h @@ -77,12 +77,14 @@ void rwsig_jump_now(void); #endif /* ! CONFIG_RO_PUBKEY_SIZE */ #ifndef CONFIG_RO_PUBKEY_ADDR #ifdef CONFIG_RWSIG_TYPE_RWSIG +#define CONFIG_RO_PUBKEY_STORAGE_OFF (CONFIG_RO_STORAGE_OFF \ + + CONFIG_RO_SIZE \ + - CONFIG_RO_PUBKEY_SIZE) + /* The pubkey resides at the end of the RO image */ #define CONFIG_RO_PUBKEY_ADDR (CONFIG_PROGRAM_MEMORY_BASE \ + CONFIG_EC_PROTECTED_STORAGE_OFF \ - + CONFIG_RO_STORAGE_OFF \ - + CONFIG_RO_SIZE \ - - CONFIG_RO_PUBKEY_SIZE) + + CONFIG_RO_PUBKEY_STORAGE_OFF) #else /* * usbpd1 type assumes pubkey location at the end of first half of flash, |