summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2018-08-20 14:28:55 -0600
committerchrome-bot <chrome-bot@chromium.org>2018-09-05 16:11:21 -0700
commit90ee96f5c76a78aad8fddbd8eb7f9c6035d69996 (patch)
treeb8d4713f4716d41f128000b3f264416898ae8b11
parent025593e7362a5aff6497ccdb421a73a0d8bcb329 (diff)
downloadvboot-90ee96f5c76a78aad8fddbd8eb7f9c6035d69996.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>
-rw-r--r--firmware/lib/vboot_ui.c5
-rw-r--r--firmware/lib/vboot_ui_menu.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/firmware/lib/vboot_ui.c b/firmware/lib/vboot_ui.c
index 640c4ff8..470e1500 100644
--- a/firmware/lib/vboot_ui.c
+++ b/firmware/lib/vboot_ui.c
@@ -153,6 +153,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"
@@ -360,6 +363,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 c050ec8e..8cd65af6 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());