/* SPDX-License-Identifier: BSD-3-Clause */ #include #include #include #include #include #include #include #include #include struct vb2_context *vboot_get_context(void) { static struct vb2_context *ctx; if (ctx) return ctx; die_if(lib_sysinfo.vboot_workbuf == 0, "vboot workbuf pointer is not set\n"); /* Use the firmware verification workbuf from coreboot. */ vb2_error_t rv = vb2api_reinit(phys_to_virt(lib_sysinfo.vboot_workbuf), &ctx); die_if(rv, "vboot workbuf could not be initialized, error: %#x\n", rv); return ctx; }