1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <boot/coreboot_tables.h>
4 #include <console/console.h>
9 void lb_efi_fw_info(struct lb_header
*header
)
12 struct lb_efi_fw_info
*fw_info
;
14 if (parse_uuid(guid
, CONFIG_DRIVERS_EFI_MAIN_FW_GUID
)) {
15 printk(BIOS_ERR
, "%s(): failed to parse firmware's GUID: '%s'\n", __func__
,
16 CONFIG_DRIVERS_EFI_MAIN_FW_GUID
);
20 fw_info
= (struct lb_efi_fw_info
*)lb_new_record(header
);
21 fw_info
->tag
= LB_TAG_EFI_FW_INFO
;
22 fw_info
->size
= sizeof(*fw_info
);
24 memcpy(fw_info
->guid
, guid
, sizeof(guid
));
25 fw_info
->version
= CONFIG_DRIVERS_EFI_MAIN_FW_VERSION
;
26 fw_info
->lowest_supported_version
= CONFIG_DRIVERS_EFI_MAIN_FW_LSV
;
27 fw_info
->fw_size
= CONFIG_ROM_SIZE
;