mb/google/brya: Create rull variant
[coreboot2.git] / src / drivers / efi / info.c
blobfc1cfea573bbdb7c71e873251f933904d282eb0e
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <boot/coreboot_tables.h>
4 #include <console/console.h>
5 #include <stdint.h>
6 #include <string.h>
7 #include <uuid.h>
9 void lb_efi_fw_info(struct lb_header *header)
11 uint8_t guid[16];
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);
17 return;
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;