summaryrefslogtreecommitdiff
path: root/src/security/vboot/vboot_common.h
diff options
context:
space:
mode:
authorWim Vervoorn <wvervoorn@eltan.com>2019-11-01 10:22:22 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-11-05 15:03:44 +0000
commit1058dd84f06fa2fcbdd99eb99da07dccdf5b9722 (patch)
treeba7a35d891d204c81658fc6d1fb0de05e6ee94a3 /src/security/vboot/vboot_common.h
parent397ce3c45fc8d2469c07565879c09d8fb00626ec (diff)
downloadcoreboot-1058dd84f06fa2fcbdd99eb99da07dccdf5b9722.tar.xz
security/vboot: Removed vboot_prepare from vboot_locator
When prog_locate() is called in the stage VBOOT is starting from and the image to be loaded is not the target image vboot_prepare() may be called too early. To prevent this vboot_prepare() is removed from the vboot_locator structure. This allows more control over the start of the vboot logic. To clarify the change the vboot_prepare() has been renamed to vboot_run_logic() and calls to initialize vboot have been added at the following places: postcar_loader: when VBOOT starts in ROMSTAGE romstage_loader: when VBOOT starts in BOOTBLOCK ramstage_loader: when VBOOT starts in ROMSTAGE BUG=N/A TEST=tested on facebook fbg1701 Change-Id: Id5e8fd78458c09dd3896bfd142bd49c2c3d686df Signed-off-by: Wim Vervoorn <wvervoorn@eltan.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36543 Reviewed-by: Frans Hendriks <fhendriks@eltan.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/security/vboot/vboot_common.h')
-rw-r--r--src/security/vboot/vboot_common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/security/vboot/vboot_common.h b/src/security/vboot/vboot_common.h
index 8aadf9e420..42b4a6b59b 100644
--- a/src/security/vboot/vboot_common.h
+++ b/src/security/vboot/vboot_common.h
@@ -76,12 +76,14 @@ int vboot_developer_mode_enabled(void);
int vboot_recovery_mode_enabled(void);
int vboot_recovery_mode_memory_retrain(void);
int vboot_can_enable_udc(void);
+void vboot_run_logic(void);
#else /* !CONFIG_VBOOT */
static inline int vboot_developer_mode_enabled(void) { return 0; }
static inline int vboot_recovery_mode_enabled(void) { return 0; }
static inline int vboot_recovery_mode_memory_retrain(void) { return 0; }
/* If VBOOT is not enabled, we are okay enabling USB device controller (UDC). */
static inline int vboot_can_enable_udc(void) { return 1; }
+static inline void vboot_run_logic(void) {}
#endif
#endif /* __VBOOT_VBOOT_COMMON_H__ */