diff options
author | Aaron Durbin <adurbin@chromium.org> | 2015-05-08 15:54:31 -0500 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2015-05-11 18:36:39 +0200 |
commit | e385b37126952c824c9d729882c29d10dbf675d7 (patch) | |
tree | 39a3b50f3327bc1c1baadb13ac81e254511819e7 /src/vendorcode | |
parent | bc40933e40cf843e2b8f5e2228e9310a7dc84ed3 (diff) | |
download | coreboot-e385b37126952c824c9d729882c29d10dbf675d7.tar.xz |
chromeos: add missing vboot functions
Somewhere along the development path the following
vboot functions were dropped:
int vboot_enable_developer(void)
int vboot_enable_recovery(void)
Add them back, but also refactor the flag extraction
so as not duplicate all that same logic.
Change-Id: Id58f3b99f29caeff98b2d3111cfa28241d15b54f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/10151
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/vendorcode')
-rw-r--r-- | src/vendorcode/google/chromeos/chromeos.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/vendorcode/google/chromeos/chromeos.c b/src/vendorcode/google/chromeos/chromeos.c index fb72673eb3..1e49bd14ee 100644 --- a/src/vendorcode/google/chromeos/chromeos.c +++ b/src/vendorcode/google/chromeos/chromeos.c @@ -26,7 +26,7 @@ #include <console/console.h> #include "vboot_handoff.h" -int vboot_skip_display_init(void) +static int vboot_handoff_flag(uint32_t flag) { struct vboot_handoff *vbho; @@ -35,7 +35,22 @@ int vboot_skip_display_init(void) if (vbho == NULL) return 0; - return !(vbho->init_params.out_flags & VB_INIT_OUT_ENABLE_DISPLAY); + return !!(vbho->init_params.out_flags & flag); +} + +int vboot_skip_display_init(void) +{ + return !vboot_handoff_flag(VB_INIT_OUT_ENABLE_DISPLAY); +} + +int vboot_enable_developer(void) +{ + return vboot_handoff_flag(VB_INIT_OUT_ENABLE_DEVELOPER); +} + +int vboot_enable_recovery(void) +{ + return vboot_handoff_flag(VB_INIT_OUT_ENABLE_RECOVERY); } int __attribute__((weak)) clear_recovery_mode_switch(void) |