From 4ed404432904c3f8e6c9d64e8bb306daf3c687f5 Mon Sep 17 00:00:00 2001 From: Aseda Aboagye Date: Tue, 14 Feb 2017 19:31:25 -0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/443330 Commit-Ready: Aseda Aboagye Tested-by: Aseda Aboagye Reviewed-by: Vadim Bendebury --- common/system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/system.c') diff --git a/common/system.c b/common/system.c index ddabe3aa3c..25acdbf544 100644 --- a/common/system.c +++ b/common/system.c @@ -1042,7 +1042,7 @@ DECLARE_CONSOLE_COMMAND(sysjump, command_sysjump, static int command_reboot(int argc, char **argv) { - int flags = 0; + int flags = SYSTEM_RESET_MANUALLY_TRIGGERED; int i; for (i = 1; i < argc; i++) { -- cgit v1.2.1