summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShelley Chen <shchen@chromium.org>2016-12-28 14:54:15 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-01-18 22:51:49 -0800
commit1a03740bb094585a6aeba7c1bd83077d5f219c9f (patch)
treedc5bad933debed819785a3a7b2898faf94aede09
parent1ceb361d6059a8222d663e7e3bb975de9bf856fa (diff)
downloadvboot-stabilize-fsi-9202.5.0.B.tar.gz
BUG=chrome-os-partner:61275 BRANCH=None TEST=compile depthcharge with inflags=VB_SALK_INFLAGS_ENABLE_DETACHABLE_UI and run. Change-Id: I4c2351feef51bbf88fefd37986de6f853cd1942e Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/424091 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--firmware/include/vboot_api.h9
-rw-r--r--firmware/lib/vboot_api_kernel.c10
2 files changed, 16 insertions, 3 deletions
diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h
index f127ab8e..d57f98d0 100644
--- a/firmware/include/vboot_api.h
+++ b/firmware/include/vboot_api.h
@@ -339,6 +339,8 @@ typedef struct VbSelectAndLoadKernelParams {
void *kernel_buffer;
/* Size of kernel buffer in bytes */
uint32_t kernel_buffer_size;
+ /* input flags. Currently used for detachables */
+ uint32_t inflags;
/*
* Outputs from VbSelectAndLoadKernel(); valid only if it returns
@@ -354,7 +356,7 @@ typedef struct VbSelectAndLoadKernelParams {
uint32_t bootloader_size;
/* UniquePartitionGuid for boot partition */
uint8_t partition_guid[16];
- /* Flags passed in by signer */
+ /* Flags set by signer */
uint32_t flags;
/*
* TODO: in H2C, all that pretty much just gets passed to the
@@ -364,6 +366,11 @@ typedef struct VbSelectAndLoadKernelParams {
*/
} VbSelectAndLoadKernelParams;
+/* Flag to indicate using detachable menu ui (arrow up/down+power)
+ * instead of traditional FW screens with ctrl+D, ctrl+U, etc.
+ */
+#define VB_SALK_INFLAGS_ENABLE_DETACHABLE_UI (1 << 0)
+
/**
* Select and loads the kernel.
*
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
index f2f39661..53c08b35 100644
--- a/firmware/lib/vboot_api_kernel.c
+++ b/firmware/lib/vboot_api_kernel.c
@@ -427,11 +427,17 @@ VbError_t VbSelectAndLoadKernel(VbCommonParams *cparams,
/* Select boot path */
if (shared->recovery_reason) {
/* Recovery boot. This has UI. */
- retval = VbBootRecovery(&ctx, cparams);
+ if (kparams->inflags & VB_SALK_INFLAGS_ENABLE_DETACHABLE_UI)
+ retval = VbBootRecoveryMenu(&ctx, cparams);
+ else
+ retval = VbBootRecovery(&ctx, cparams);
VbExEcEnteringMode(0, VB_EC_RECOVERY);
} else if (shared->flags & VBSD_BOOT_DEV_SWITCH_ON) {
/* Developer boot. This has UI. */
- retval = VbBootDeveloper(&ctx, cparams);
+ if (kparams->inflags & VB_SALK_INFLAGS_ENABLE_DETACHABLE_UI)
+ retval = VbBootDeveloperMenu(&ctx, cparams);
+ else
+ retval = VbBootDeveloper(&ctx, cparams);
VbExEcEnteringMode(0, VB_EC_DEVELOPER);
} else {
/* Normal boot */