Make vboot ignore power button shutdown requests if the button had continuously been pressed since boot |
|||||
Issue descriptionAccording to Danny, a firmware testing policy change now requires us to support manual recovery mode entry where the user holds down Esc+Refresh+Power until the screen appears on future devices: https://testtracker.googleplex.com/testplans/testcase/detail/413773?id=382&revision=271 On some boards the power button is piped through the EC to the AP, and the EC explicitly inhibits it in this case. But on others, the AP has direct access to the power button state. On these devices, depthcharge will read that state as soon as the vboot UI loop starts running in recovery mode and immediately react with a shutdown if it is pressed. This means that the recovery screen will blink for a split second before the device shuts off again. We need a simple vboot change that calls VbExIsShutdownRequested() once at the start of VbSelectAndLoadKernel(), stores the state of the VB_SHUTDOWN_REQUEST_POWER_BUTTON flag, and uses that to inhibit future VbWantShutdown() tests until we have read it as 0 at least once. Assigning to Stefan for triage. This should be fixed before the next device that is wired like this branches.
,
Dec 2 2016
,
Mar 31 2017
,
Oct 2
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/00d4be66721b24903f977e770148179035254e19 commit 00d4be66721b24903f977e770148179035254e19 Author: Edward Hill <ecgh@chromium.org> Date: Tue Oct 02 20:23:08 2018 Ignore power button if held on startup Ignore a power button push until after we have seen it released, to avoid shutting down immediately if the power button is held down on startup. BUG=b:116819414, chromium:670492 BRANCH=grunt TEST=manual: 1) Press and hold esc+refresh+power. 2) Depthcharge shows INSERT screen and does not power off. 3) Release esc+refresh+power. 4) Press and release power. 5) Depthcharge powers off. TEST=test_that --fast -b grunt $grunt_ip firmware_ECLidShutdown TEST=FEATURES=test emerge-grunt --nodeps vboot_reference Change-Id: I7421a4b1a1b8a7894f0e7d1c7927ffc52d9faac0 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1256023 Reviewed-by: Raul E Rangel <rrangel@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> [modify] https://crrev.com/00d4be66721b24903f977e770148179035254e19/tests/vboot_api_kernel2_tests.c [modify] https://crrev.com/00d4be66721b24903f977e770148179035254e19/firmware/lib/vboot_ui.c
,
Oct 2
Thanks for the fix!
,
Oct 5
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/5536c751eda9e729c95310443f81767c13fd125e commit 5536c751eda9e729c95310443f81767c13fd125e Author: Edward Hill <ecgh@chromium.org> Date: Fri Oct 05 02:11:10 2018 Ignore power button if held on startup Ignore a power button push until after we have seen it released, to avoid shutting down immediately if the power button is held down on startup. BUG=b:116819414, chromium:670492 BRANCH=grunt TEST=manual: 1) Press and hold esc+refresh+power. 2) Depthcharge shows INSERT screen and does not power off. 3) Release esc+refresh+power. 4) Press and release power. 5) Depthcharge powers off. TEST=test_that --fast -b grunt $grunt_ip firmware_ECLidShutdown TEST=FEATURES=test emerge-grunt --nodeps vboot_reference Change-Id: I7421a4b1a1b8a7894f0e7d1c7927ffc52d9faac0 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1256023 Reviewed-by: Raul E Rangel <rrangel@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> (cherry picked from commit 00d4be66721b24903f977e770148179035254e19) Reviewed-on: https://chromium-review.googlesource.com/c/1263029 Reviewed-by: Martin Roth <martinroth@chromium.org> Tested-by: Martin Roth <martinroth@chromium.org> [modify] https://crrev.com/5536c751eda9e729c95310443f81767c13fd125e/tests/vboot_api_kernel2_tests.c [modify] https://crrev.com/5536c751eda9e729c95310443f81767c13fd125e/firmware/lib/vboot_ui.c |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by dchan@chromium.org
, Dec 2 2016