summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2016-07-22 06:59:40 -0700
committerFurquan Shaikh <furquan@google.com>2016-07-25 18:55:35 +0200
commita6c5ddd595e145ffd091a9fcadb5e0ffbf0fa8d1 (patch)
tree1e5355202ab90185b8ab4ecf1cc75ae1f66bd9ba /src/lib
parent610a33a7f4d8c46df63373477a9b19563189acea (diff)
downloadcoreboot-a6c5ddd595e145ffd091a9fcadb5e0ffbf0fa8d1.tar.xz
vboot: Clean up vboot code
1. Remove unused functions/structures. 2. Add checks for NULL return values. 3. Change prefixes to vb2 instead of vboot for functions used internally within vboot2/ 4. Get rid of vboot_handoff.h file and move the structure definition to vboot_common.h 5. Rename all functions using handoff structure to have prefix vboot_handoff_*. All the handoff functions can be run _only_ after cbmem is online. 6. Organize vboot_common.h content according to different functionalities. BUG=chrome-os-partner:55431 Change-Id: I4c07d50327d88cddbdfbb0b6f82c264e2b8620eb Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/15799 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/bootmode.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/bootmode.c b/src/lib/bootmode.c
index 15f7a5a5e5..c69502691a 100644
--- a/src/lib/bootmode.c
+++ b/src/lib/bootmode.c
@@ -23,7 +23,7 @@ int developer_mode_enabled(void)
if (get_developer_mode_switch())
return 1;
#if CONFIG_VBOOT_VERIFY_FIRMWARE
- if (vboot_enable_developer())
+ if (vboot_handoff_check_developer_flag())
return 1;
#endif
return 0;
@@ -36,7 +36,7 @@ int developer_mode_enabled(void)
*
* If shared recovery reason is set:
* - before VbInit then get_recovery_mode_from_vbnv() is true
- * - after VbInit then vboot_enable_recovery() is true
+ * - after VbInit then vboot_handoff_check_recovery_flag() is true
*
* Otherwise the mainboard handler for get_recovery_mode_switch()
* will detect recovery mode initiated by the EC.
@@ -50,7 +50,7 @@ int recovery_mode_enabled(void)
return 1;
#endif
#if CONFIG_VBOOT_VERIFY_FIRMWARE
- if (vboot_enable_recovery())
+ if (vboot_handoff_check_recovery_flag())
return 1;
#endif
return 0;
@@ -75,9 +75,9 @@ void gfx_set_init_done(int done)
int display_init_required(void)
{
- /* For Chrome OS always honor vboot_skip_display_init(). */
+ /* For Chrome OS always honor vboot_handoff_skip_display_init(). */
if (IS_ENABLED(CONFIG_CHROMEOS))
- return !vboot_skip_display_init();
+ return !vboot_handoff_skip_display_init();
/* By default always initialize display. */
return 1;