diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2012-01-18 11:25:22 -0800 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-01-18 13:15:45 -0800 |
commit | 25381875e1b8e230a7bbfe59470d796826056319 (patch) | |
tree | fbd30f2197cd57c398774e9f81274e6cfab2740c | |
parent | bd00c622e4249b67087a81adb1978a661c7ef8c9 (diff) | |
download | vboot-25381875e1b8e230a7bbfe59470d796826056319.tar.gz |
Acknowledge Ctrl+U faster
When the user hits Ctrl+U on the dev screen, we used to change the
screen only after we enumerate the USB devices, load the kernel from USB
mass storage and boot it (about 4 seconds on the current firmware).
Let's blank the screen earlier to show we got the key press.
BUG=chrome-os-partner:7563
TEST=on a Stumpy in developer, hit Ctrl+U on the dev screen with an
invalid key, then a valid key. Check which screen are displayed and how
long it takes to get a new display after the key strokes.
Change-Id: Ifc73b56055bcd50360d71c1cb6dee052d0fdf9aa
Reviewed-on: https://gerrit.chromium.org/gerrit/14395
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | firmware/lib/vboot_api_kernel.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c index 5dd5609c..35cdbcdb 100644 --- a/firmware/lib/vboot_api_kernel.c +++ b/firmware/lib/vboot_api_kernel.c @@ -156,19 +156,25 @@ VbError_t VbBootDeveloper(VbCommonParams* cparams, LoadKernelParams* p) { VbExBeep(120, 400); VbExSleepMs(120); VbExBeep(120, 400); - } else if (VBERROR_SUCCESS == - VbTryLoadKernel(cparams, p, VB_DISK_FLAG_REMOVABLE)) { - VBDEBUG(("VbBootDeveloper() - booting USB\n")); - VbAudioClose(audio); - return VBERROR_SUCCESS; } else { - VBDEBUG(("VbBootDeveloper() - no kernel found on USB\n")); - VbExBeep(250, 200); - VbExSleepMs(120); - /* Clear recovery requests from failed kernel loading, so - * that powering off at this point doesn't put us into - * recovery mode. */ - VbSetRecoveryRequest(VBNV_RECOVERY_NOT_REQUESTED); + /* Clear the screen to show we get the Ctrl+U key press. */ + VbDisplayScreen(cparams, VB_SCREEN_BLANK, 0, &vnc); + if (VBERROR_SUCCESS == + VbTryLoadKernel(cparams, p, VB_DISK_FLAG_REMOVABLE)) { + VBDEBUG(("VbBootDeveloper() - booting USB\n")); + VbAudioClose(audio); + return VBERROR_SUCCESS; + } else { + VBDEBUG(("VbBootDeveloper() - no kernel found on USB\n")); + VbExBeep(250, 200); + VbExSleepMs(120); + /* Clear recovery requests from failed kernel loading, so + * that powering off at this point doesn't put us into + * recovery mode. */ + VbSetRecoveryRequest(VBNV_RECOVERY_NOT_REQUESTED); + /* Show the dev mode warning screen again */ + VbDisplayScreen(cparams, VB_SCREEN_DEVELOPER_WARNING, 0, &vnc); + } } break; default: |