summaryrefslogtreecommitdiff
path: root/common/system.c
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2020-05-22 13:36:13 -0700
committerCommit Bot <commit-bot@chromium.org>2020-05-23 04:14:45 +0000
commite833bdec81b97859b4d2ff6dca20701358621d1a (patch)
tree8fa31d14734759c35ccb7cf2c1877ff57ecd554a /common/system.c
parent225f7add0e5ae94bf80ec95003202793c89a707d (diff)
downloadchrome-ec-e833bdec81b97859b4d2ff6dca20701358621d1a.tar.gz
system: Don't check reset_flags to detect sysjump
Currently, system_common_pre_init checks if reset_flags is zero or not to determine whether it's running after sysjump or not. This used to be a valid condition because reset flags in NVMEM are cleared by RO after they're read. This is not the case for CONFIG_POWER_BUTTON_INIT_IDLE because it clears every flag except AP_IDLE in case the system loses the power again. This is causing boards with CONFIG_POWER_BUTTON_INIT_IDLE fail to detect sysjump (because system_common_pre_init sees a non-zero value in the reset flag). This patch removes the check. system_common_pre_init will continue to check the magic value in the jump data. The jump data magic is always set before sysjump and cleared after sysjump. So, this check is sufficient and necessary to detect sysjump. BUG=b:154778457 BRANCH=none TEST=Verify test_that suite:faft_bios passes. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: Ib5b8dca02dbf414f5168050e5755c993285bf791 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2213732 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'common/system.c')
-rw-r--r--common/system.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/common/system.c b/common/system.c
index a38a14a103..8e3f591db7 100644
--- a/common/system.c
+++ b/common/system.c
@@ -802,13 +802,9 @@ void system_common_pre_init(void)
jdata = (struct jump_data *)(addr - sizeof(struct jump_data));
/*
- * Check jump data if this is a jump between images. Jumps all show up
- * as an unknown reset reason, because we jumped directly from one
- * image to another without actually triggering a chip reset.
+ * Check jump data if this is a jump between images.
*/
- if (jdata->magic == JUMP_DATA_MAGIC &&
- jdata->version >= 1 &&
- reset_flags == 0) {
+ if (jdata->magic == JUMP_DATA_MAGIC && jdata->version >= 1) {
/* Change in jump data struct size between the previous image
* and this one. */
int delta;