[coreboot-gerrit] New patch to review for coreboot: chromeos: vboot_handoff_flag fallback value
Paul Kocialkowski (contact@paulk.fr)
gerrit at coreboot.org
Sun Aug 9 10:30:36 CEST 2015
Paul Kocialkowski (contact at paulk.fr) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11144
-gerrit
commit 7a5ab2b45de46426164e08b7630ec6613e113316
Author: Paul Kocialkowski <contact at paulk.fr>
Date: Sun Aug 9 10:28:04 2015 +0200
chromeos: vboot_handoff_flag fallback value
vboot_handoff_flag shouldn't always return 0 when vboot handoff data is not
found, instead, it should be fed with a fallback value that is used when vboot
handoff data is missing. This way, each calls registers a fallback value that
implements the default behaviour when not using vboot.
This allows setting up the display when vboot is not enabled.
Change-Id: Icd986a37c8006acd92ad12ae136f721e1063ad95
Signed-off-by: Paul Kocialkowski <contact at paulk.fr>
---
src/vendorcode/google/chromeos/chromeos.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/vendorcode/google/chromeos/chromeos.c b/src/vendorcode/google/chromeos/chromeos.c
index 0737267..6b6b9c0 100644
--- a/src/vendorcode/google/chromeos/chromeos.c
+++ b/src/vendorcode/google/chromeos/chromeos.c
@@ -26,31 +26,31 @@
#include <console/console.h>
#include "vboot_handoff.h"
-static int vboot_handoff_flag(uint32_t flag)
+static int vboot_handoff_flag(uint32_t flag, int fallback)
{
struct vboot_handoff *vbho;
vbho = cbmem_find(CBMEM_ID_VBOOT_HANDOFF);
if (vbho == NULL)
- return 0;
+ return fallback;
return !!(vbho->init_params.out_flags & flag);
}
int vboot_skip_display_init(void)
{
- return !vboot_handoff_flag(VB_INIT_OUT_ENABLE_DISPLAY);
+ return !vboot_handoff_flag(VB_INIT_OUT_ENABLE_DISPLAY, 1);
}
int vboot_enable_developer(void)
{
- return vboot_handoff_flag(VB_INIT_OUT_ENABLE_DEVELOPER);
+ return vboot_handoff_flag(VB_INIT_OUT_ENABLE_DEVELOPER, 0);
}
int vboot_enable_recovery(void)
{
- return vboot_handoff_flag(VB_INIT_OUT_ENABLE_RECOVERY);
+ return vboot_handoff_flag(VB_INIT_OUT_ENABLE_RECOVERY, 0);
}
int __attribute__((weak)) clear_recovery_mode_switch(void)
More information about the coreboot-gerrit
mailing list