summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/lib/include/vboot_kernel.h20
-rw-r--r--firmware/lib/include/vboot_ui_legacy_common.h (renamed from firmware/lib/include/vboot_ui_common.h)2
-rw-r--r--firmware/lib/include/vboot_ui_legacy_menu_private.h (renamed from firmware/lib/include/vboot_ui_menu_private.h)9
-rw-r--r--firmware/lib/include/vboot_ui_legacy_wilco.h (renamed from firmware/lib/include/vboot_ui_wilco.h)0
-rw-r--r--firmware/lib/vboot_api_kernel.c10
-rw-r--r--firmware/lib/vboot_ui_legacy_clamshell.c (renamed from firmware/lib/vboot_ui.c)62
-rw-r--r--firmware/lib/vboot_ui_legacy_common.c (renamed from firmware/lib/vboot_ui_common.c)2
-rw-r--r--firmware/lib/vboot_ui_legacy_menu.c (renamed from firmware/lib/vboot_ui_menu.c)14
-rw-r--r--firmware/lib/vboot_ui_legacy_wilco.c (renamed from firmware/lib/vboot_ui_wilco.c)4
9 files changed, 61 insertions, 62 deletions
diff --git a/firmware/lib/include/vboot_kernel.h b/firmware/lib/include/vboot_kernel.h
index 567c10ad..c147c316 100644
--- a/firmware/lib/include/vboot_kernel.h
+++ b/firmware/lib/include/vboot_kernel.h
@@ -54,29 +54,29 @@ int VbUserConfirms(struct vb2_context *ctx, uint32_t confirm_flags);
vb2_error_t VbBootNormal(struct vb2_context *ctx);
/**
- * Handle a developer-mode boot.
+ * Handle a developer-mode boot using legacy clamshell UI.
*/
-vb2_error_t VbBootDeveloper(struct vb2_context *ctx);
+vb2_error_t VbBootDeveloperLegacyClamshell(struct vb2_context *ctx);
/**
- * Handle a diagnostic-mode boot.
+ * Handle a diagnostic-mode boot using legacy clamshell UI.
*/
-vb2_error_t VbBootDiagnostic(struct vb2_context *ctx);
+vb2_error_t VbBootDiagnosticLegacyClamshell(struct vb2_context *ctx);
/**
- * Handle a recovery-mode boot.
+ * Handle a recovery-mode boot using legacy clamshell UI.
*/
-vb2_error_t VbBootRecovery(struct vb2_context *ctx);
+vb2_error_t VbBootRecoveryLegacyClamshell(struct vb2_context *ctx);
/**
- * Handle a developer-mode boot using detachable menu ui
+ * Handle a developer-mode boot using legacy menu UI.
*/
-vb2_error_t VbBootDeveloperMenu(struct vb2_context *ctx);
+vb2_error_t VbBootDeveloperLegacyMenu(struct vb2_context *ctx);
/**
- * Handle a recovery-mode boot using detachable menu ui
+ * Handle a recovery-mode boot using legacy menu UI.
*/
-vb2_error_t VbBootRecoveryMenu(struct vb2_context *ctx);
+vb2_error_t VbBootRecoveryLegacyMenu(struct vb2_context *ctx);
/**
* Writes modified secdata spaces and nvdata.
diff --git a/firmware/lib/include/vboot_ui_common.h b/firmware/lib/include/vboot_ui_legacy_common.h
index 2587980b..ae081ae1 100644
--- a/firmware/lib/include/vboot_ui_common.h
+++ b/firmware/lib/include/vboot_ui_legacy_common.h
@@ -2,7 +2,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
- * Common code used by both vboot_ui and vboot_ui_menu.
+ * Common code used by both legacy_clamshell_ui and legacy_menu_ui.
*/
#ifndef VBOOT_REFERENCE_VBOOT_UI_COMMON_H_
diff --git a/firmware/lib/include/vboot_ui_menu_private.h b/firmware/lib/include/vboot_ui_legacy_menu_private.h
index 09688b48..76edd655 100644
--- a/firmware/lib/include/vboot_ui_menu_private.h
+++ b/firmware/lib/include/vboot_ui_legacy_menu_private.h
@@ -2,11 +2,12 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
- * Private declarations for vboot_ui_menu.c. Defined here for easier testing.
+ * Private declarations for vboot_ui_legacy_menu.c. Defined here for easier
+ * testing.
*/
-#ifndef VBOOT_REFERENCE_VBOOT_UI_MENU_PRIVATE_H_
-#define VBOOT_REFERENCE_VBOOT_UI_MENU_PRIVATE_H_
+#ifndef VBOOT_REFERENCE_VBOOT_UI_LEGACY_MENU_PRIVATE_H_
+#define VBOOT_REFERENCE_VBOOT_UI_LEGACY_MENU_PRIVATE_H_
#include "2api.h"
#include "vboot_api.h"
@@ -90,4 +91,4 @@ typedef enum _VB_OPTIONS_MENU {
VB_OPTIONS_COUNT,
} VB_OPTIONS_MENU;
-#endif /* VBOOT_REFERENCE_VBOOT_UI_MENU_PRIVATE_H_ */
+#endif /* VBOOT_REFERENCE_VBOOT_UI_LEGACY_MENU_PRIVATE_H_ */
diff --git a/firmware/lib/include/vboot_ui_wilco.h b/firmware/lib/include/vboot_ui_legacy_wilco.h
index d6b77965..d6b77965 100644
--- a/firmware/lib/include/vboot_ui_wilco.h
+++ b/firmware/lib/include/vboot_ui_legacy_wilco.h
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
index 1c7d974c..57a827cb 100644
--- a/firmware/lib/vboot_api_kernel.c
+++ b/firmware/lib/vboot_api_kernel.c
@@ -397,9 +397,9 @@ vb2_error_t VbSelectAndLoadKernel(struct vb2_context *ctx,
/* Recovery boot. This has UI. */
if (LEGACY_MENU_UI)
- rv = VbBootRecoveryMenu(ctx);
+ rv = VbBootRecoveryLegacyMenu(ctx);
else
- rv = VbBootRecovery(ctx);
+ rv = VbBootRecoveryLegacyClamshell(ctx);
} else if (DIAGNOSTIC_UI && vb2_nv_get(ctx, VB2_NV_DIAG_REQUEST)) {
vb2_nv_set(ctx, VB2_NV_DIAG_REQUEST, 0);
@@ -409,7 +409,7 @@ vb2_error_t VbSelectAndLoadKernel(struct vb2_context *ctx,
* needed. This mode is also 1-shot so it's placed
* before developer mode.
*/
- rv = VbBootDiagnostic(ctx);
+ rv = VbBootDiagnosticLegacyClamshell(ctx);
/*
* The diagnostic menu should either boot a rom, or
* return either of reboot or shutdown. The following
@@ -420,9 +420,9 @@ vb2_error_t VbSelectAndLoadKernel(struct vb2_context *ctx,
} else if (ctx->flags & VB2_CONTEXT_DEVELOPER_MODE) {
/* Developer boot. This has UI. */
if (LEGACY_MENU_UI)
- rv = VbBootDeveloperMenu(ctx);
+ rv = VbBootDeveloperLegacyMenu(ctx);
else
- rv = VbBootDeveloper(ctx);
+ rv = VbBootDeveloperLegacyClamshell(ctx);
} else {
/* Normal boot */
rv = VbBootNormal(ctx);
diff --git a/firmware/lib/vboot_ui.c b/firmware/lib/vboot_ui_legacy_clamshell.c
index 1d8e5e5d..cc0c4175 100644
--- a/firmware/lib/vboot_ui.c
+++ b/firmware/lib/vboot_ui_legacy_clamshell.c
@@ -21,17 +21,17 @@
#include "vboot_kernel.h"
#include "vboot_struct.h"
#include "vboot_test.h"
-#include "vboot_ui_common.h"
-#include "vboot_ui_wilco.h"
+#include "vboot_ui_legacy_common.h"
+#include "vboot_ui_legacy_wilco.h"
static vb2_error_t VbTryUsb(struct vb2_context *ctx)
{
int retval = VbTryLoadKernel(ctx, VB_DISK_FLAG_REMOVABLE);
if (VB2_SUCCESS == retval) {
- VB2_DEBUG("VbBootDeveloper() - booting USB\n");
+ VB2_DEBUG("developer UI - booting USB\n");
} else {
vb2_error_notify("Could not boot from USB\n",
- "VbBootDeveloper() - no kernel found on USB\n",
+ "developer UI - no kernel found on USB\n",
VB_BEEP_FAILED);
}
return retval;
@@ -134,7 +134,7 @@ static vb2_error_t vb2_altfw_ui(struct vb2_context *ctx)
uint32_t key = VbExKeyboardRead();
if (vb2_want_shutdown(ctx, key)) {
- VB2_DEBUG("VbBootDeveloper() - shutdown requested!\n");
+ VB2_DEBUG("developer UI - shutdown requested!\n");
return VBERROR_SHUTDOWN_REQUESTED;
}
switch (key) {
@@ -143,15 +143,14 @@ static vb2_error_t vb2_altfw_ui(struct vb2_context *ctx)
break;
case VB_KEY_ESC:
/* Escape pressed - return to developer screen */
- VB2_DEBUG("VbBootDeveloper() - user pressed Esc:"
+ VB2_DEBUG("developer UI - user pressed Esc; "
"exit to Developer screen\n");
active = 0;
break;
/* We allow selection of the default '0' bootloader here */
case '0'...'9':
- VB2_DEBUG("VbBootDeveloper() - "
- "user pressed key '%c': Boot alternative "
- "firmware\n", key);
+ VB2_DEBUG("developer UI - user pressed key '%c';"
+ "Boot alternative firmware\n", key);
/*
* This will not return if successful. Drop out to
* developer mode on failure.
@@ -160,7 +159,7 @@ static vb2_error_t vb2_altfw_ui(struct vb2_context *ctx)
active = 0;
break;
default:
- VB2_DEBUG("VbBootDeveloper() - pressed key %#x\n", key);
+ VB2_DEBUG("developer UI - pressed key %#x\n", key);
VbCheckDisplayKey(ctx, key, NULL);
break;
}
@@ -254,7 +253,7 @@ static vb2_error_t vb2_developer_ui(struct vb2_context *ctx)
if ((ctx->flags & VB2_CONTEXT_VENDOR_DATA_SETTABLE) &&
VENDOR_DATA_LENGTH > 0) {
vb2_error_t ret;
- VB2_DEBUG("VbBootDeveloper() - Vendor data not set\n");
+ VB2_DEBUG("developer UI - Vendor data not set\n");
ret = vb2_vendor_data_ui(ctx);
if (ret)
return ret;
@@ -270,7 +269,7 @@ static vb2_error_t vb2_developer_ui(struct vb2_context *ctx)
do {
uint32_t key = VbExKeyboardRead();
if (vb2_want_shutdown(ctx, key)) {
- VB2_DEBUG("VbBootDeveloper() - shutdown requested!\n");
+ VB2_DEBUG("developer UI - shutdown requested!\n");
return VBERROR_SHUTDOWN_REQUESTED;
}
@@ -327,13 +326,13 @@ static vb2_error_t vb2_developer_ui(struct vb2_context *ctx)
break;
case VB_KEY_CTRL('D'):
/* Ctrl+D = dismiss warning; advance to timeout */
- VB2_DEBUG("VbBootDeveloper() - "
- "user pressed Ctrl+D; skip delay\n");
+ VB2_DEBUG("developer UI - user pressed Ctrl+D; "
+ "skip delay\n");
ctrl_d_pressed = 1;
goto fallout;
case VB_KEY_CTRL('L'):
- VB2_DEBUG("VbBootDeveloper() - "
- "user pressed Ctrl+L; Try alt firmware\n");
+ VB2_DEBUG("developer UI - user pressed Ctrl+L; "
+ "Try alt firmware\n");
if (allow_legacy) {
vb2_error_t ret;
@@ -351,15 +350,15 @@ static vb2_error_t vb2_developer_ui(struct vb2_context *ctx)
*/
case VB_KEY_CTRL('U'):
/* Ctrl+U = try USB boot, or beep if failure */
- VB2_DEBUG("VbBootDeveloper() - "
- "user pressed Ctrl+U; try USB\n");
+ VB2_DEBUG("developer UI - user pressed Ctrl+U; "
+ "try USB\n");
if (!allow_usb) {
vb2_error_notify(
"WARNING: Booting from external media "
"(USB/SD) has not been enabled. Refer "
"to the developer-mode documentation "
"for details.\n",
- "VbBootDeveloper() - "
+ "developer UI - "
"USB booting is disabled\n",
VB_BEEP_NOT_ALLOWED);
} else {
@@ -380,13 +379,12 @@ static vb2_error_t vb2_developer_ui(struct vb2_context *ctx)
break;
/* We allow selection of the default '0' bootloader here */
case '0'...'9':
- VB2_DEBUG("VbBootDeveloper() - "
- "user pressed key '%c': Boot alternative "
- "firmware\n", key);
+ VB2_DEBUG("developer UI - user pressed key '%c'; "
+ "Boot alternative firmware\n", key);
vb2_try_altfw(ctx, allow_legacy, key - '0');
break;
default:
- VB2_DEBUG("VbBootDeveloper() - pressed key %#x\n", key);
+ VB2_DEBUG("developer UI - pressed key %#x\n", key);
VbCheckDisplayKey(ctx, key, NULL);
break;
}
@@ -398,7 +396,7 @@ static vb2_error_t vb2_developer_ui(struct vb2_context *ctx)
/* If defaulting to legacy boot, try that unless Ctrl+D was pressed */
if (use_legacy && !ctrl_d_pressed) {
- VB2_DEBUG("VbBootDeveloper() - defaulting to legacy\n");
+ VB2_DEBUG("developer UI - defaulting to legacy\n");
vb2_try_altfw(ctx, allow_legacy, 0);
}
@@ -409,11 +407,11 @@ static vb2_error_t vb2_developer_ui(struct vb2_context *ctx)
}
/* Timeout or Ctrl+D; attempt loading from fixed disk */
- VB2_DEBUG("VbBootDeveloper() - trying fixed disk\n");
+ VB2_DEBUG("developer UI - trying fixed disk\n");
return VbTryLoadKernel(ctx, VB_DISK_FLAG_FIXED);
}
-vb2_error_t VbBootDeveloper(struct vb2_context *ctx)
+vb2_error_t VbBootDeveloperLegacyClamshell(struct vb2_context *ctx)
{
vb2_reset_power_button();
vb2_error_t retval = vb2_developer_ui(ctx);
@@ -421,7 +419,7 @@ vb2_error_t VbBootDeveloper(struct vb2_context *ctx)
return retval;
}
-vb2_error_t VbBootDiagnostic(struct vb2_context *ctx)
+vb2_error_t VbBootDiagnosticLegacyClamshell(struct vb2_context *ctx)
{
vb2_reset_power_button();
vb2_error_t retval = vb2_diagnostics_ui(ctx);
@@ -439,7 +437,7 @@ static vb2_error_t recovery_ui(struct vb2_context *ctx)
const char recovery_pressed_msg[] =
"^D but recovery switch is pressed\n";
- VB2_DEBUG("VbBootRecovery() start\n");
+ VB2_DEBUG("recovery UI - start\n");
if (!vb2_allow_recovery(ctx)) {
/*
@@ -450,7 +448,7 @@ static vb2_error_t recovery_ui(struct vb2_context *ctx)
* back here, thus, we won't be able to give a user a chance to
* reboot to workaround a boot hiccup.
*/
- VB2_DEBUG("VbBootRecovery() saving recovery reason (%#x)\n",
+ VB2_DEBUG("recovery UI - saving recovery reason (%#x)\n",
sd->recovery_reason);
vb2_nv_set(ctx, VB2_NV_RECOVERY_SUBCODE, sd->recovery_reason);
@@ -462,7 +460,7 @@ static vb2_error_t recovery_ui(struct vb2_context *ctx)
vb2_commit_data(ctx);
VbDisplayScreen(ctx, VB_SCREEN_OS_BROKEN, 0, NULL);
- VB2_DEBUG("VbBootRecovery() waiting for manual recovery\n");
+ VB2_DEBUG("recovery UI - waiting for manual recovery\n");
while (1) {
key = VbExKeyboardRead();
VbCheckDisplayKey(ctx, key, NULL);
@@ -477,7 +475,7 @@ static vb2_error_t recovery_ui(struct vb2_context *ctx)
}
/* Loop and wait for a recovery image */
- VB2_DEBUG("VbBootRecovery() waiting for a recovery image\n");
+ VB2_DEBUG("recovery UI - waiting for a recovery image\n");
while (1) {
retval = VbTryLoadKernel(ctx, VB_DISK_FLAG_REMOVABLE);
@@ -550,7 +548,7 @@ static vb2_error_t recovery_ui(struct vb2_context *ctx)
return VB2_SUCCESS;
}
-vb2_error_t VbBootRecovery(struct vb2_context *ctx)
+vb2_error_t VbBootRecoveryLegacyClamshell(struct vb2_context *ctx)
{
vb2_error_t retval = recovery_ui(ctx);
VbDisplayScreen(ctx, VB_SCREEN_BLANK, 0, NULL);
diff --git a/firmware/lib/vboot_ui_common.c b/firmware/lib/vboot_ui_legacy_common.c
index 65f3b368..8b6a1799 100644
--- a/firmware/lib/vboot_ui_common.c
+++ b/firmware/lib/vboot_ui_legacy_common.c
@@ -11,7 +11,7 @@
#include "vboot_api.h"
#include "vboot_kernel.h"
#include "vboot_test.h"
-#include "vboot_ui_common.h"
+#include "vboot_ui_legacy_common.h"
static enum {
POWER_BUTTON_HELD_SINCE_BOOT = 0,
diff --git a/firmware/lib/vboot_ui_menu.c b/firmware/lib/vboot_ui_legacy_menu.c
index 8b6ed18e..2635a7f3 100644
--- a/firmware/lib/vboot_ui_menu.c
+++ b/firmware/lib/vboot_ui_legacy_menu.c
@@ -19,8 +19,8 @@
#include "vboot_display.h"
#include "vboot_kernel.h"
#include "vboot_struct.h"
-#include "vboot_ui_common.h"
-#include "vboot_ui_menu_private.h"
+#include "vboot_ui_legacy_common.h"
+#include "vboot_ui_legacy_menu_private.h"
static const char dev_disable_msg[] =
"Developer mode is disabled on this device by system policy.\n"
@@ -732,7 +732,7 @@ static vb2_error_t vb2_init_menus(struct vb2_context *ctx)
* @param ctx Vboot2 context
* @return VB2_SUCCESS, or non-zero error code if error.
*/
-static vb2_error_t vb2_developer_menu(struct vb2_context *ctx)
+static vb2_error_t vb2_developer_legacy_menu(struct vb2_context *ctx)
{
struct vb2_gbb_header *gbb = vb2_get_gbb(ctx);
vb2_error_t ret;
@@ -789,7 +789,7 @@ static vb2_error_t vb2_developer_menu(struct vb2_context *ctx)
break;
/* We allow selection of the default '0' bootloader here */
case '0'...'9':
- VB2_DEBUG("VbBootDeveloper() - "
+ VB2_DEBUG("developer UI - "
"user pressed key '%c': Boot alternative "
"firmware\n", key);
vb2_try_altfw(ctx, altfw_allowed, key - '0');
@@ -824,12 +824,12 @@ static vb2_error_t vb2_developer_menu(struct vb2_context *ctx)
}
/* Developer mode entry point. */
-vb2_error_t VbBootDeveloperMenu(struct vb2_context *ctx)
+vb2_error_t VbBootDeveloperLegacyMenu(struct vb2_context *ctx)
{
vb2_error_t retval = vb2_init_menus(ctx);
if (VB2_SUCCESS != retval)
return retval;
- retval = vb2_developer_menu(ctx);
+ retval = vb2_developer_legacy_menu(ctx);
VbDisplayScreen(ctx, VB_SCREEN_BLANK, 0, NULL);
return retval;
}
@@ -905,7 +905,7 @@ static vb2_error_t recovery_ui(struct vb2_context *ctx)
}
/* Recovery mode entry point. */
-vb2_error_t VbBootRecoveryMenu(struct vb2_context *ctx)
+vb2_error_t VbBootRecoveryLegacyMenu(struct vb2_context *ctx)
{
vb2_error_t retval = vb2_init_menus(ctx);
if (VB2_SUCCESS != retval)
diff --git a/firmware/lib/vboot_ui_wilco.c b/firmware/lib/vboot_ui_legacy_wilco.c
index ff4e229e..b814c249 100644
--- a/firmware/lib/vboot_ui_wilco.c
+++ b/firmware/lib/vboot_ui_legacy_wilco.c
@@ -11,8 +11,8 @@
#include "2sysincludes.h"
#include "vboot_api.h"
#include "vboot_display.h"
-#include "vboot_ui_common.h"
-#include "vboot_ui_wilco.h"
+#include "vboot_ui_legacy_common.h"
+#include "vboot_ui_legacy_wilco.h"
static inline int is_vowel(uint32_t key)
{