From dc6b642b47168a09fa1702092961595ab0674c03 Mon Sep 17 00:00:00 2001 From: Che-Liang Chiou Date: Mon, 2 Jul 2012 14:49:23 +0800 Subject: Set/clear developer mode flag in VbInit output This would allow caller of VbInit know if vboot is on developer mode. Signed-off-by: Che-Liang Chiou BUG=chrome-os-partner:10947 TEST=Snow U-Boot successfully read the correct value of the flag Change-Id: If1d88975892045467f5ab9d00b00ed53765b83f1 Reviewed-on: https://gerrit.chromium.org/gerrit/26557 Reviewed-by: Tom Wai-Hong Tam Commit-Ready: Che-Liang Chiou Tested-by: Che-Liang Chiou --- firmware/include/vboot_api.h | 2 ++ firmware/lib/vboot_api_init.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h index 5f11313d..c947d2a3 100644 --- a/firmware/include/vboot_api.h +++ b/firmware/include/vboot_api.h @@ -196,6 +196,8 @@ typedef struct VbCommonParams { #define VB_INIT_OUT_ENABLE_OPROM 0x00000020 /* BIOS may be asked to boot something other than ChromeOS */ #define VB_INIT_OUT_ENABLE_ALTERNATE_OS 0x00000040 +/* Enable developer path. */ +#define VB_INIT_OUT_ENABLE_DEVELOPER 0x00000080 /* Data only used by VbInit() */ diff --git a/firmware/lib/vboot_api_init.c b/firmware/lib/vboot_api_init.c index 4c5eb642..8581d898 100644 --- a/firmware/lib/vboot_api_init.c +++ b/firmware/lib/vboot_api_init.c @@ -197,7 +197,8 @@ VbError_t VbInit(VbCommonParams* cparams, VbInitParams* iparams) { } else if (is_dev) { /* Developer switch is on, so need to support dev mode */ - iparams->out_flags |= (VB_INIT_OUT_CLEAR_RAM | + iparams->out_flags |= (VB_INIT_OUT_ENABLE_DEVELOPER | + VB_INIT_OUT_CLEAR_RAM | VB_INIT_OUT_ENABLE_DISPLAY | VB_INIT_OUT_ENABLE_USB_STORAGE); /* ... which may or may not include custom OSes */ -- cgit v1.2.1