summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2017-02-14 19:31:25 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-02-18 17:26:59 -0800
commit4ed404432904c3f8e6c9d64e8bb306daf3c687f5 (patch)
tree7b524aceeb143d5ed9a2bd120978c50cac8dd9db /include
parent2062c99cd2bfe1642433b2cae33c617e02c27cdd (diff)
downloadchrome-ec-4ed404432904c3f8e6c9d64e8bb306daf3c687f5.tar.gz
cr50: Decrement retry counter on manual reboots.
Currently, manually triggered reboots cause the retry counter to be incremented. However, if the system is responsive enough to process the reboot commands from either the console or TPM vendor command, we can assume that the image is "ok". This commit changes the Cr50 behaviour to decrement the retry counter when a reboot is issued on the console or the TPM vendor command is received. BUG=chrome-os-partner:62687 BRANCH=None TEST=Flash cr50. Flash an older image in the other slot. Enter the reboot command on the console over 10 times and verify that retry counter never exceeds RW_BOOT_MAX_RETRY_COUNT and older image is never executed. CQ-DEPEND=CL:444264 Change-Id: Ic35bdc63c4141834584a00a7ecceab2abe8dfc21 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/443330 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/system.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/system.h b/include/system.h
index 9cb04844ed..50d1e29609 100644
--- a/include/system.h
+++ b/include/system.h
@@ -221,17 +221,21 @@ const char *system_get_build_info(void);
* Hard reset. Cuts power to the entire system. If not present, does a soft
* reset which just resets the core and on-chip peripherals.
*/
-#define SYSTEM_RESET_HARD (1 << 0)
+#define SYSTEM_RESET_HARD (1 << 0)
/*
* Preserve existing reset flags. Used by flash pre-init when it discovers it
* needs to do a hard reset to clear write protect registers.
*/
-#define SYSTEM_RESET_PRESERVE_FLAGS (1 << 1)
+#define SYSTEM_RESET_PRESERVE_FLAGS (1 << 1)
/*
* Leave AP off on next reboot, instead of powering it on to do EC software
* sync.
*/
-#define SYSTEM_RESET_LEAVE_AP_OFF (1 << 2)
+#define SYSTEM_RESET_LEAVE_AP_OFF (1 << 2)
+/*
+ * Indicate that this was a manually triggered reset.
+ */
+#define SYSTEM_RESET_MANUALLY_TRIGGERED (1 << 3)
/**
* Reset the system.