diff options
author | Nicolas Boichat <drinkcat@google.com> | 2017-02-14 11:13:52 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-02-25 08:36:41 -0800 |
commit | 2dcfd2446cbc0133d1351c018956c46717751e65 (patch) | |
tree | d69c6f9c5a0db457daf64f7835858fbd3fa9f157 /util | |
parent | f4174ddaa431ea8fccfda3e0efa66a34b46896d5 (diff) | |
download | chrome-ec-2dcfd2446cbc0133d1351c018956c46717751e65.tar.gz |
flash: Add ROLLBACK flash region, that can be protected separately
ROLLBACK region will be used to store rollback information, and
can be protected independently of RW (it can only be protected when
RO is protected, though).
This is only supported on stm32f0 currently.
BRANCH=none
BUG=chrome-os-partner:61671
TEST=on hammer (stm32f072)
flashinfo => RO+RW not protected
flashwp true; reboot => only RO protected
flashwp all; reboot => RO+RW+RB protected
flashwp noall; reboot => only RO protected
flashwp rw; reboot => only RO+RW protected
flashwp rb; reboot => RO+RW+RB protected
flashwp norb; reboot => RO+RW protected
flashwp all; reboot => RO+RW+RB protected
flashwp norw; reboot => RO+RB protected
TEST=on reef, rb/norb commands not available
Change-Id: I45ffc66d91cf3699ecff025e5114c59a73dc8274
Reviewed-on: https://chromium-review.googlesource.com/430519
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/ectool.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/ectool.c b/util/ectool.c index f2bf6662ce..5180a1a85b 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -909,12 +909,16 @@ static void print_flash_protect_flags(const char *desc, uint32_t flags) printf(" ro_at_boot"); if (flags & EC_FLASH_PROTECT_RW_AT_BOOT) printf(" rw_at_boot"); + if (flags & EC_FLASH_PROTECT_ROLLBACK_AT_BOOT) + printf(" rollback_at_boot"); if (flags & EC_FLASH_PROTECT_ALL_AT_BOOT) printf(" all_at_boot"); if (flags & EC_FLASH_PROTECT_RO_NOW) printf(" ro_now"); if (flags & EC_FLASH_PROTECT_RW_NOW) printf(" rw_now"); + if (flags & EC_FLASH_PROTECT_ROLLBACK_NOW) + printf(" rollback_now"); if (flags & EC_FLASH_PROTECT_ALL_NOW) printf(" all_now"); if (flags & EC_FLASH_PROTECT_ERROR_STUCK) |