summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-06-10 12:31:00 -0700
committerChromeBot <chrome-bot@google.com>2013-06-12 09:22:32 -0700
commit19c996909d8cae46ee3ee6d4319abd9f72ab53e1 (patch)
tree3eb6828bc4752042d11670afe332648cea8b9909
parent534723a6519267461855441279b321e6fc1e4e90 (diff)
downloadvboot-19c996909d8cae46ee3ee6d4319abd9f72ab53e1.tar.gz
EC software sync no longer checks for shutdown requested
This means that in normal mode the system will boot all the way to the OS before shutting down. In developer or recovery modes, the BIOS screens will still check for shutdown requested and shut down if so. This is necessary in developer mode for security reasons, and because there's no guarantee that a dev OS will still pay attention to the lid switch. BUG=chrome-os-partner:17521 BRANCH=spring TEST=make runtests; unit tests pass Change-Id: I0698b659ad0febcf73043f1e8c5b98681c1bc5ba Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58109
-rw-r--r--firmware/lib/vboot_api_kernel.c34
-rw-r--r--tests/vboot_api_kernel3_tests.c8
2 files changed, 5 insertions, 37 deletions
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
index 3f1dfc5c..a1d83b11 100644
--- a/firmware/lib/vboot_api_kernel.c
+++ b/firmware/lib/vboot_api_kernel.c
@@ -609,18 +609,6 @@ VbError_t VbEcSoftwareSync(VbCommonParams *cparams)
}
VBDEBUG(("VbEcSoftwareSync() in RO-Normal; EC-RO\n"));
-
- /*
- * If shutdown is requested, just power the AP back off. This
- * covers the case where the lid is closed when then system
- * boots.
- */
- if (VbExIsShutdownRequested()) {
- VBDEBUG(("VbEcSoftwareSync() "
- "sees shutdown-requested\n"));
- return VBERROR_SHUTDOWN_REQUESTED;
- }
-
return VBERROR_SUCCESS;
}
@@ -745,18 +733,6 @@ VbError_t VbEcSoftwareSync(VbCommonParams *cparams)
}
VBDEBUG(("VbEcSoftwareSync() in EC-RW and it matches\n"));
-
- /*
- * If shutdown is requested, just power the AP back off. This
- * covers the case where the lid is closed when then system
- * boots.
- */
- if (VbExIsShutdownRequested()) {
- VBDEBUG(("VbEcSoftwareSync() "
- "sees shutdown-requested\n"));
- return VBERROR_SHUTDOWN_REQUESTED;
- }
-
return VBERROR_SUCCESS;
}
@@ -814,16 +790,6 @@ VbError_t VbEcSoftwareSync(VbCommonParams *cparams)
}
VBDEBUG(("VbEcSoftwareSync() in RW; done\n"));
-
- /*
- * If shutdown is requested, just power the AP back off. This covers
- * the case where the lid is closed when then system boots.
- */
- if (VbExIsShutdownRequested()) {
- VBDEBUG(("VbEcSoftwareSync() sees shutdown-requested\n"));
- return VBERROR_SHUTDOWN_REQUESTED;
- }
-
return VBERROR_SUCCESS;
}
diff --git a/tests/vboot_api_kernel3_tests.c b/tests/vboot_api_kernel3_tests.c
index 5b69845d..d8851252 100644
--- a/tests/vboot_api_kernel3_tests.c
+++ b/tests/vboot_api_kernel3_tests.c
@@ -245,10 +245,11 @@ static void VbSoftwareSyncTest(void)
test_ssync(VBERROR_SIMULATED,
VBNV_RECOVERY_EC_PROTECT, "Protect error");
+ /* No longer check for shutdown requested */
ResetMocks();
shared->flags |= VBSD_LF_USE_RO_NORMAL;
shutdown_request_calls_left = 0;
- test_ssync(VBERROR_SHUTDOWN_REQUESTED, 0, "AP-RO shutdown requested");
+ test_ssync(0, 0, "AP-RO shutdown requested");
/* Calculate hashes */
ResetMocks();
@@ -344,15 +345,16 @@ static void VbSoftwareSyncTest(void)
test_ssync(VBERROR_SIMULATED,
VBNV_RECOVERY_EC_PROTECT, "Protect error");
+ /* No longer check for shutdown requested */
ResetMocks();
shutdown_request_calls_left = 0;
- test_ssync(VBERROR_SHUTDOWN_REQUESTED, 0,
+ test_ssync(0, 0,
"AP-RW, EC-RO -> EC-RW shutdown requested");
ResetMocks();
mock_in_rw = 1;
shutdown_request_calls_left = 0;
- test_ssync(VBERROR_SHUTDOWN_REQUESTED, 0, "AP-RW shutdown requested");
+ test_ssync(0, 0, "AP-RW shutdown requested");
}
int main(void)