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 <rspangler@chromium.org>

Change-Id: I3f1c9613237242b3cfd502127fb5b461f8d0fb22
Reviewed-on: https://gerrit.chromium.org/gerrit/26899
Commit-Ready: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
Randall Spangler
2012-07-08 14:43:25 -07:00
committed by Gerrit
parent 0b69d0fd57
commit 0249b50dd2

View File

@@ -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. */