2 * Copyright (c) 2015 Google, Inc
4 * SPDX-License-Identifier: GPL-2.0+
6 * Access to the EFI information table
14 int efi_info_get(enum efi_entry_t type, void **datap, int *sizep)
16 struct efi_entry_hdr *entry;
17 struct efi_info_hdr *info;
23 info = map_sysmem(gd->arch.table, 0);
24 if (info->version != EFI_TABLE_VERSION) {
25 ret = -EPROTONOSUPPORT;
29 entry = (struct efi_entry_hdr *)((ulong)info + info->hdr_size);
30 while (entry->type != EFIET_END) {
31 if (entry->type == type) {
33 *datap = map_sysmem(entry->addr, entry->size);
39 entry = (struct efi_entry_hdr *)((ulong)entry + entry->link);