MCPcopy Create free account
hub / github.com/coreboot/coreboot / vboot_logic_executed

Function vboot_logic_executed

src/security/vboot/misc.h:63–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63static inline int vboot_logic_executed(void)
64{
65 extern int vboot_executed; /* should not be globally accessible */
66
67 /* If we are in the stage that runs verification, or in the stage that
68 both loads the verstage and is returned to from it afterwards, we
69 need to check a global to see if verification has run. */
70 if (verification_should_run() ||
71 (verstage_should_load() && CONFIG(VBOOT_RETURN_FROM_VERSTAGE)))
72 return vboot_executed;
73
74 if (CONFIG(VBOOT_STARTS_IN_BOOTBLOCK)) {
75 /* All other stages are "after the bootblock" */
76 return !ENV_BOOTBLOCK;
77 } else if (CONFIG(VBOOT_STARTS_IN_ROMSTAGE)) {
78 /* Post-RAM stages are "after the romstage" */
79 return !ENV_ROMSTAGE_OR_BEFORE;
80 } else if (CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)) {
81 return !ENV_SEPARATE_VERSTAGE;
82 } else {
83 dead_code();
84 }
85}
86
87static inline bool vboot_hwcrypto_allowed(void)
88{

Callers 5

vboot_hwcrypto_allowedFunction · 0.85
vboot_get_contextFunction · 0.85
tspi_tpm_is_setupFunction · 0.85
cbfs_file_hash_mismatchFunction · 0.85

Calls 2

verification_should_runFunction · 0.85
verstage_should_loadFunction · 0.85

Tested by

no test coverage detected