[coreboot-gerrit] Patch set updated for coreboot: 443b971 vboot: use out_flags to indicate dev mode

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Tue Nov 26 19:31:51 CET 2013

Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4218


commit 443b971cf6cb523a37f2e360ff2bf7727d7eaa92
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Tue Jun 4 08:57:54 2013 -0500

    vboot: use out_flags to indicate dev mode
    In order to make the proper decision on loading the
    option rom or not the developer mode setting needs to be
    known. Under early firmware selection it is possible to know
    the state of developer mode by a flag in out flags. Use this
    flag when early firmware selection is being employed to determine
    if developer mode is enabled or not.
    Change-Id: I9c226d368e92ddf8f14ce4dcde00da144de2a5f3
    Signed-off-by: Aaron Durbin <adurbin at chromium.org>
    Reviewed-on: https://gerrit.chromium.org/gerrit/57380
    Reviewed-by: Duncan Laurie <dlaurie at chromium.org>
 src/vendorcode/google/chromeos/chromeos.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/src/vendorcode/google/chromeos/chromeos.c b/src/vendorcode/google/chromeos/chromeos.c
index 6f1fe72..c2cc0e1 100644
--- a/src/vendorcode/google/chromeos/chromeos.c
+++ b/src/vendorcode/google/chromeos/chromeos.c
@@ -26,9 +26,28 @@
 #include <cbmem.h>
 #include <console/console.h>
+static int vboot_enable_developer(void)
+	struct vboot_handoff *vbho;
+	vbho = cbmem_find(CBMEM_ID_VBOOT_HANDOFF);
+	if (vbho == NULL) {
+		printk(BIOS_ERR, "%s: Couldn't find vboot_handoff structure!\n",
+		        __func__);
+		return 0;
+	}
+	return !!(vbho->init_params.out_flags & VB_INIT_OUT_ENABLE_DEVELOPER);
+static inline int vboot_enable_developer(void) { return 0; }
 int developer_mode_enabled(void)
-	return get_developer_mode_switch();
+	return get_developer_mode_switch() || vboot_enable_developer();
 int recovery_mode_enabled(void)

More information about the coreboot-gerrit mailing list