summaryrefslogtreecommitdiff
path: root/lib/efi/efi_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/efi/efi_info.c')
-rw-r--r--lib/efi/efi_info.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/lib/efi/efi_info.c b/lib/efi/efi_info.c
deleted file mode 100644
index 5b564c5651d..00000000000
--- a/lib/efi/efi_info.c
+++ /dev/null
@@ -1,46 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (c) 2015 Google, Inc
- *
- * Access to the EFI information table
- */
-
-#include <efi.h>
-#include <errno.h>
-#include <mapmem.h>
-#include <asm/global_data.h>
-
-int efi_info_get(enum efi_entry_t type, void **datap, int *sizep)
-{
- struct efi_entry_hdr *entry;
- struct efi_info_hdr *info;
- int ret;
-
- if (!gd->arch.table)
- return -ENODATA;
-
- info = map_sysmem(gd->arch.table, 0);
- if (info->version != EFI_TABLE_VERSION) {
- ret = -EPROTONOSUPPORT;
- goto err;
- }
-
- entry = (struct efi_entry_hdr *)((ulong)info + info->hdr_size);
- while (entry->type != EFIET_END) {
- if (entry->type == type) {
- if (entry->addr)
- *datap = map_sysmem(entry->addr, entry->size);
- else
- *datap = entry + 1;
- *sizep = entry->size;
- return 0;
- }
- entry = (struct efi_entry_hdr *)((ulong)entry + entry->link);
- }
-
- ret = -ENOENT;
-err:
- unmap_sysmem(info);
-
- return ret;
-}