From 0249b50dd2c27b1c1831bb679bbbf86ec2cf2d3e Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Sun, 8 Jul 2012 14:43:25 -0700 Subject: [PATCH] Jumping to same image as currently running shouldn't reboot. BUG=chrome-os-partner:11147 TEST=manual sysjump RO -> does not reboot/jump (no op) sysjump A -> jumps to A sysjump A -> does not reboot/jump (no op) Signed-off-by: Randall Spangler Change-Id: I3f1c9613237242b3cfd502127fb5b461f8d0fb22 Reviewed-on: https://gerrit.chromium.org/gerrit/26899 Commit-Ready: Randall Spangler Reviewed-by: Randall Spangler Tested-by: Randall Spangler --- common/system_common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/system_common.c b/common/system_common.c index f65908a673..141abcfdb7 100644 --- a/common/system_common.c +++ b/common/system_common.c @@ -330,6 +330,10 @@ int system_run_image_copy(enum system_image_copy_t copy) uint32_t base; uint32_t init_addr; + /* If system is already running the requested image, done */ + if (system_get_image_copy() == copy) + return EC_SUCCESS; + if (system_is_locked()) { /* System is locked, so disallow jumping between images unless * this is the initial jump from RO to RW code. */