summaryrefslogtreecommitdiff
path: root/firmware/lib
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2019-03-01 14:23:30 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-09 01:18:53 -0800
commit9e53b92e50165b777111f159daa2b4e3b3c8b355 (patch)
treebd354022acf50dafa0da42ca6e0f0590a0a2f3c9 /firmware/lib
parente20d92ab46a9a60925ede8892c59eba10b34c4d1 (diff)
downloadvboot-9e53b92e50165b777111f159daa2b4e3b3c8b355.tar.gz
vboot_display: Add full_info parameter to VbExDisplayDebugInfo()factory-atlas-11907.Bfactory-atlas-11907.11.B
VbExDisplayDebugInfo() was invented for the TAB display that dumps a whole lot of possibly interesting debug data to the screen. Since some debug data is only available to the calling firmware, the convention has always been that the calling firmware is supposed to append any of its own debug data it thinks may be relevant to the output. Later, the function was reused to print small info messages that give the user a hint what went wrong when a Ctrl+U or Ctrl+L fails (unlocalized, of course, but better than nothing). The calling firmware is not aware of this new use case, so every time vboot prints a "WARNING: Ctrl+L not enabled" sort of message on the screen, depthcharge also dumps the firmware IDs and TPM state below it. This patch introduces a new parameter to the function to make the two differing use cases clear to the calling firmware. CQ-DEPEND=CL:1496903 BRANCH=None BUG=None TEST=with other patches Change-Id: I52a1e764189508130fea562ad6d53bcefb1fce64 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1497038
Diffstat (limited to 'firmware/lib')
-rw-r--r--firmware/lib/vboot_display.c2
-rw-r--r--firmware/lib/vboot_ui.c2
-rw-r--r--firmware/lib/vboot_ui_common.c4
-rw-r--r--firmware/lib/vboot_ui_menu.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/firmware/lib/vboot_display.c b/firmware/lib/vboot_display.c
index 49c5331d..c7094254 100644
--- a/firmware/lib/vboot_display.c
+++ b/firmware/lib/vboot_display.c
@@ -405,7 +405,7 @@ VbError_t VbDisplayDebugInfo(struct vb2_context *ctx)
buf[DEBUG_INFO_SIZE - 1] = '\0';
VB2_DEBUG("[TAB] Debug Info:\n%s", buf);
- return VbExDisplayDebugInfo(buf);
+ return VbExDisplayDebugInfo(buf, 1);
}
#define MAGIC_WORD_LEN 5
diff --git a/firmware/lib/vboot_ui.c b/firmware/lib/vboot_ui.c
index dea6e039..3fb2ce63 100644
--- a/firmware/lib/vboot_ui.c
+++ b/firmware/lib/vboot_ui.c
@@ -422,7 +422,7 @@ VbError_t vb2_developer_ui(struct vb2_context *ctx)
VB2_DEBUG("dev_disable_boot is set\n");
VbDisplayScreen(ctx,
VB_SCREEN_DEVELOPER_TO_NORM, 0, NULL);
- VbExDisplayDebugInfo(dev_disable_msg);
+ VbExDisplayDebugInfo(dev_disable_msg, 0);
/* Ignore space in VbUserConfirms()... */
switch (VbUserConfirms(ctx, 0)) {
diff --git a/firmware/lib/vboot_ui_common.c b/firmware/lib/vboot_ui_common.c
index af9c4951..b15bf29d 100644
--- a/firmware/lib/vboot_ui_common.c
+++ b/firmware/lib/vboot_ui_common.c
@@ -35,7 +35,7 @@ void vb2_error_notify(const char *print_msg,
enum vb2_beep_type beep)
{
if (print_msg)
- VbExDisplayDebugInfo(print_msg);
+ VbExDisplayDebugInfo(print_msg, 0);
if (!log_msg)
log_msg = print_msg;
if (log_msg)
@@ -60,7 +60,7 @@ void vb2_error_no_altfw(void)
VB2_DEBUG("Legacy boot is disabled\n");
VbExDisplayDebugInfo("WARNING: Booting legacy BIOS has not been "
"enabled. Refer to the developer-mode "
- "documentation for details.\n");
+ "documentation for details.\n", 0);
vb2_error_beep(VB_BEEP_NOT_ALLOWED);
}
diff --git a/firmware/lib/vboot_ui_menu.c b/firmware/lib/vboot_ui_menu.c
index 39b00d6f..96a24e0e 100644
--- a/firmware/lib/vboot_ui_menu.c
+++ b/firmware/lib/vboot_ui_menu.c
@@ -345,7 +345,7 @@ static VbError_t altfw_action(struct vb2_context *ctx)
vb2_run_altfw(current_menu_idx + 1);
vb2_flash_screen(ctx);
VB2_DEBUG(no_legacy);
- VbExDisplayDebugInfo(no_legacy);
+ VbExDisplayDebugInfo(no_legacy, 0);
return VBERROR_KEEP_LOOPING;
}
@@ -775,7 +775,7 @@ static VbError_t vb2_developer_menu(struct vb2_context *ctx)
/* Make sure user knows dev mode disabled */
if (disable_dev_boot)
- VbExDisplayDebugInfo(dev_disable_msg);
+ VbExDisplayDebugInfo(dev_disable_msg, 0);
switch (key) {
case VB_BUTTON_VOL_DOWN_LONG_PRESS: