diff options
author | Raul E Rangel <rrangel@chromium.org> | 2018-08-20 14:28:55 -0600 |
---|---|---|
committer | Martin Roth <martinroth@chromium.org> | 2018-10-23 22:33:31 +0000 |
commit | 3f67b7c5a13df1bec3062e9cfe1d35679df6b2c1 (patch) | |
tree | 055b064ac76007e412d03f65015d767ee0a4298f | |
parent | 6e5920faa9bb41f9a99b5f6a4efa1d8ae1e99eb4 (diff) | |
download | vboot-3f67b7c5a13df1bec3062e9cfe1d35679df6b2c1.tar.gz |
firmware/lib/vboot_ui: Add a VbExSleepMs to the developer mode UIs
This won't have any real power savings until the APIC delay is merged
and enabled.
BUG=b:109749762
BRANCH=none
TEST=Booted grunt and made sure the developer screens still worked.
Change-Id: I7d75198771946415fa6a8fa69dff024d87ba5ef0
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1182190
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1297018
Reviewed-by: Martin Roth <martinroth@chromium.org>
Tested-by: Martin Roth <martinroth@chromium.org>
-rw-r--r-- | firmware/lib/vboot_ui.c | 5 | ||||
-rw-r--r-- | firmware/lib/vboot_ui_menu.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/firmware/lib/vboot_ui.c b/firmware/lib/vboot_ui.c index d5e29281..289e0009 100644 --- a/firmware/lib/vboot_ui.c +++ b/firmware/lib/vboot_ui.c @@ -181,6 +181,9 @@ int VbUserConfirms(struct vb2_context *ctx, uint32_t confirm_flags) return -1; } +/* Delay in developer ui */ +#define DEV_KEY_DELAY 20 /* Check keys every 20ms */ + static const char dev_disable_msg[] = "Developer mode is disabled on this device by system policy.\n" "For more information, see http://dev.chromium.org/chromium-os/fwmp\n" @@ -394,6 +397,8 @@ VbError_t vb2_developer_ui(struct vb2_context *ctx) VbCheckDisplayKey(ctx, key); break; } + + VbExSleepMs(DEV_KEY_DELAY); } while(vb2_audio_looping()); fallout: diff --git a/firmware/lib/vboot_ui_menu.c b/firmware/lib/vboot_ui_menu.c index daed42f0..3a9d9e52 100644 --- a/firmware/lib/vboot_ui_menu.c +++ b/firmware/lib/vboot_ui_menu.c @@ -633,6 +633,8 @@ static VbError_t vb2_handle_menu_input(struct vb2_context *ctx, return VBERROR_KEEP_LOOPING; } +/* Delay in developer menu */ +#define DEV_KEY_DELAY 20 /* Check keys every 20ms */ /** * Main function that handles developer warning menu functionality * @@ -707,6 +709,8 @@ static VbError_t vb2_developer_menu(struct vb2_context *ctx) if (key != 0) vb2_audio_start(ctx); + VbExSleepMs(DEV_KEY_DELAY); + /* If dev mode was disabled, loop forever (never timeout) */ } while(disable_dev_boot ? 1 : vb2_audio_looping()); |