summaryrefslogtreecommitdiff
path: root/firmware/lib/vboot_api_kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/lib/vboot_api_kernel.c')
-rw-r--r--firmware/lib/vboot_api_kernel.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
index eeabde8e..a910b552 100644
--- a/firmware/lib/vboot_api_kernel.c
+++ b/firmware/lib/vboot_api_kernel.c
@@ -240,18 +240,20 @@ vb2_error_t VbSelectAndLoadKernel(struct vb2_context *ctx,
} else {
VB2_TRY(VbBootRecoveryLegacyClamshell(ctx));
}
- } else if (DIAGNOSTIC_UI && !MENU_UI &&
- vb2api_diagnostic_ui_enabled(ctx) &&
+ } else if (DIAGNOSTIC_UI && vb2api_diagnostic_ui_enabled(ctx) &&
vb2_nv_get(ctx, VB2_NV_DIAG_REQUEST)) {
vb2_nv_set(ctx, VB2_NV_DIAG_REQUEST, 0);
- /*
- * Diagnostic boot. This has a UI but only power button
- * is used for input so no detachable-specific UI is
- * needed. This mode is also 1-shot so it's placed
- * before developer mode.
- */
- VB2_TRY(VbBootDiagnosticLegacyClamshell(ctx));
+ /* Diagnostic boot. This has UI. */
+ if (MENU_UI)
+ VB2_TRY(vb2_diagnostic_menu(ctx));
+ else
+ /*
+ * Only power button is used for input so no
+ * detachable-specific UI is needed. This mode is also
+ * 1-shot so it's placed before developer mode.
+ */
+ VB2_TRY(VbBootDiagnosticLegacyClamshell(ctx));
/*
* The diagnostic menu should either boot a rom, or
* return either of reboot or shutdown.