summaryrefslogtreecommitdiff
path: root/chip
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2016-12-08 18:21:45 -0800
committerchrome-bot <chrome-bot@chromium.org>2016-12-09 21:48:46 -0800
commit1b5bb68b8b70503eaaf8ad822cf7b4187f275093 (patch)
treec2df2e5dd192326984b27d71c462e4f8c50be714 /chip
parentb19c81b0b622df55583e920c9d9bc041e90dbcf3 (diff)
downloadchrome-ec-1b5bb68b8b70503eaaf8ad822cf7b4187f275093.tar.gz
g: remove the impact of deep sleep resumes from the rolling reboot count
Deep sleep needs to be considered a normal behavior and should not add to the rollback count. This change subtracts one from the reset count when the system sees that it just resumed from deep sleep. Ideally the rollback counter would be able to verify the TPM functionality and detect rolling reboots. With this change the rollback counter will only be able to detect rolling reboots, but it fixes the false positives for rolling reboots we were seeing before. BUG=chrome-os-partner:60449 BRANCH=none TEST=manual check the reset counter turn off the AP wait for cr50 to enter deep sleep plug in suzyq check it resumes from deep sleep and that the reset counter still has the same value Change-Id: Ie8490c29636403b409b2a3f0912a5b312d23bc24 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/418321 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r--chip/g/system.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/chip/g/system.c b/chip/g/system.c
index 61129984d4..85fcf63774 100644
--- a/chip/g/system.c
+++ b/chip/g/system.c
@@ -34,6 +34,8 @@ static void check_reset_cause(void)
/* This register is cleared by reading it */
uint32_t g_exitpd = GR_PMU_EXITPD_SRC;
+ flags |= RESET_FLAG_HIBERNATE;
+
if (g_exitpd & GC_PMU_EXITPD_SRC_PIN_PD_EXIT_MASK)
flags |= RESET_FLAG_WAKE_PIN;
if (g_exitpd & GC_PMU_EXITPD_SRC_UTMI_SUSPEND_N_MASK)