summaryrefslogtreecommitdiff
path: root/common/vboot
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2020-05-13 18:23:52 -0700
committerCommit Bot <commit-bot@chromium.org>2020-05-14 08:38:15 +0000
commit63a8d07fbc74c8a141a8d30f56434846d8e5af08 (patch)
treec66d71335650f89d4a945308cb84f1f27c6f7095 /common/vboot
parentb70e2768c856641e91205fdb50b20a4147b2a7e2 (diff)
downloadchrome-ec-63a8d07fbc74c8a141a8d30f56434846d8e5af08.tar.gz
system: Add EC_RESET_FLAG_EFS
This patch adds EC_RESET_FLAG_EFS. It indicates EC jumped to RW by successfully running EFS. system_jumped_late can be used to avoid running some code twice (once in RO and again in RW). Such code is currently (wrongly) guarded by system_jumped_to_this_image. BUG=b:156101251, chromium:1072743 BRANCH=none TEST=Verified the bug is fixed. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I58fc18510b2f95dfd116cbacba09875cb7cf5051 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2200245
Diffstat (limited to 'common/vboot')
-rw-r--r--common/vboot/efs2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/vboot/efs2.c b/common/vboot/efs2.c
index 29ad42995f..3e949455fd 100644
--- a/common/vboot/efs2.c
+++ b/common/vboot/efs2.c
@@ -209,8 +209,11 @@ static void verify_and_jump(void)
enable_pd();
break;
case CR50_COMM_SUCCESS:
+ system_set_reset_flags(
+ system_get_reset_flags() | EC_RESET_FLAG_EFS);
rv = system_run_image_copy(EC_IMAGE_RW);
CPRINTS("Failed to jump (0x%x)", rv);
+ system_clear_reset_flags(EC_RESET_FLAG_EFS);
show_critical_error();
break;
default: