diff options
-rw-r--r-- | firmware/lib/vboot_api_kernel.c | 5 | ||||
-rw-r--r-- | firmware/lib/vboot_display.c | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c index 35cdbcdb..8ed22cbf 100644 --- a/firmware/lib/vboot_api_kernel.c +++ b/firmware/lib/vboot_api_kernel.c @@ -127,8 +127,11 @@ VbError_t VbBootDeveloper(VbCommonParams* cparams, LoadKernelParams* p) { do { uint32_t key; - if (VbExIsShutdownRequested()) + if (VbExIsShutdownRequested()) { + VBDEBUG(("VbBootDeveloper() - shutdown is requested!\n")); + VbAudioClose(audio); return VBERROR_SHUTDOWN_REQUESTED; + } key = VbExKeyboardRead(); switch (key) { diff --git a/firmware/lib/vboot_display.c b/firmware/lib/vboot_display.c index 7ec0c409..5e705c7e 100644 --- a/firmware/lib/vboot_display.c +++ b/firmware/lib/vboot_display.c @@ -605,6 +605,14 @@ VbError_t VbCheckDisplayKey(VbCommonParams* cparams, uint32_t key, loc = (loc > 0 ? loc - 1 : count - 1); VBDEBUG(("VbCheckDisplayKey() - change localization to %d\n", (int)loc)); VbNvSet(vncptr, VBNV_LOCALIZATION_INDEX, loc); + /* Workaround for coreboot on x86, which will power off asynchronously + * without giving us a chance to react. This is not an example of the Right + * Way to do things. See chrome-os-partner:7689, and the commit message + * that made this change. + */ + VbNvTeardown(vncptr); /* really only computes checksum */ + if (vncptr->raw_changed) + VbExNvStorageWrite(vncptr->raw); /* Force redraw of current screen */ return VbDisplayScreen(cparams, disp_current_screen, 1, vncptr); |