#pragma once
#include <sys/efi.h>
#include <machine/metadata.h>
typedef void (*efi_map_entry_cb)(struct efi_md *, void *argp);
struct preloaded_file;
bool efi_read_from_pa(uint64_t pa, uint32_t map_size, uint32_t desc_size, uint32_t vers);
void efi_read_from_sysfs(void);
void efi_set_systbl(uint64_t tbl);
void foreach_efi_map_entry(struct efi_map_header *efihdr, efi_map_entry_cb cb, void *argp);
void print_efi_map(struct efi_map_header *efihdr);
void efi_bi_loadsmap(struct preloaded_file *kfp);
extern uint32_t efi_map_size;
extern vm_paddr_t efi_map_phys_src;
extern vm_paddr_t efi_map_phys_dst;