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

Function vboot_get_context

src/security/vboot/common.c:29–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29struct vb2_context *vboot_get_context(void)
30{
31 void *wb;
32 vb2_error_t rv;
33
34 /* Return if context has already been initialized/restored. */
35 if (vboot_ctx)
36 return vboot_ctx;
37
38 wb = vboot_get_workbuf();
39
40 /* Restore context from a previous stage. */
41 if (vboot_logic_executed()) {
42 rv = vb2api_reinit(wb, &vboot_ctx);
43 if (rv != VB2_SUCCESS)
44 die("%s: vb2api_reinit returned %#x\n", __func__, rv);
45 return vboot_ctx;
46 }
47
48 assert(verification_should_run());
49
50 /* Initialize vb2_shared_data and friends. */
51 rv = vb2api_init(wb, VB2_FIRMWARE_WORKBUF_RECOMMENDED_SIZE, &vboot_ctx);
52 assert(rv == VB2_SUCCESS);
53
54 return vboot_ctx;
55}
56
57int vboot_locate_firmware(struct vb2_context *ctx, struct region_device *fw)
58{

Callers 15

vbnv_udc_enable_flagFunction · 0.70
vbnv_initFunction · 0.70
vboot_is_gbb_flag_setFunction · 0.70
vboot_hwcrypto_allowedFunction · 0.70
verstage_mainFunction · 0.70
vboot_sync_ecFunction · 0.70
after_verstageFunction · 0.70

Calls 4

vboot_get_workbufFunction · 0.85
vboot_logic_executedFunction · 0.85
verification_should_runFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected