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

Function vboot_run_logic

src/security/vboot/vboot_loader.c:59–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59void vboot_run_logic(void)
60{
61 if (verification_should_run()) {
62 /* Note: this path is not used for VBOOT_RETURN_FROM_VERSTAGE */
63 verstage_main();
64 after_verstage();
65 } else if (verstage_should_load()) {
66 struct prog verstage =
67 PROG_INIT(PROG_VERSTAGE,
68 CONFIG_CBFS_PREFIX "/verstage");
69
70 printk(BIOS_DEBUG, "VBOOT: Loading verstage.\n");
71
72 timestamp_add_now(TS_COPYVER_START);
73 if (cbfs_prog_stage_load(&verstage))
74 die("failed to load verstage");
75 timestamp_add_now(TS_COPYVER_END);
76
77 /* verify and select a slot */
78 prog_run(&verstage);
79
80 /* This is not actually possible to hit this condition at
81 * runtime, but this provides a hint to the compiler for dead
82 * code elimination below. */
83 if (!CONFIG(VBOOT_RETURN_FROM_VERSTAGE))
84 return;
85
86 after_verstage();
87 }
88}
89
90const struct cbfs_boot_device *vboot_get_cbfs_boot_device(void)
91{

Callers

nothing calls this directly

Calls 9

verification_should_runFunction · 0.85
verstage_mainFunction · 0.85
after_verstageFunction · 0.85
verstage_should_loadFunction · 0.85
cbfs_prog_stage_loadFunction · 0.85
prog_runFunction · 0.85
printkFunction · 0.50
timestamp_add_nowFunction · 0.50
dieFunction · 0.50

Tested by

no test coverage detected