1 #ifndef EFI_EFI_H 2 #define EFI_EFI_H 3 4 #include <asm/efibind.h> 5 #include <efi/efidef.h> 6 #include <efi/efierr.h> 7 #include <efi/eficon.h> 8 #include <efi/efidevp.h> 9 #include <efi/eficapsule.h> 10 #include <efi/efiapi.h> 11 #include <xen/efi.h> 12 #include <xen/mm.h> 13 #include <xen/spinlock.h> 14 #include <asm/page.h> 15 16 struct efi_pci_rom { 17 const struct efi_pci_rom *next; 18 u16 vendor, devid, segment; 19 u8 bus, devfn; 20 unsigned long size; 21 unsigned char data[]; 22 }; 23 24 extern unsigned int efi_num_ct; 25 extern const EFI_CONFIGURATION_TABLE *efi_ct; 26 27 extern unsigned int efi_version, efi_fw_revision; 28 extern const CHAR16 *efi_fw_vendor; 29 30 extern const EFI_RUNTIME_SERVICES *efi_rs; 31 32 extern UINTN efi_memmap_size, efi_mdesc_size; 33 extern void *efi_memmap; 34 35 #ifdef CONFIG_X86 36 extern mfn_t efi_l4_mfn; 37 #endif 38 39 extern const struct efi_pci_rom *efi_pci_roms; 40 41 extern UINT64 efi_boot_max_var_store_size, efi_boot_remain_var_store_size, 42 efi_boot_max_var_size; 43 44 extern UINT64 efi_apple_properties_addr; 45 extern UINTN efi_apple_properties_len; 46 47 void noreturn blexit(const CHAR16 *str); 48 49 const CHAR16 *wmemchr(const CHAR16 *s, CHAR16 c, UINTN n); 50 51 /* EFI boot allocator. */ 52 void *ebmalloc(size_t size); 53 void free_ebmalloc_unused_mem(void); 54 55 const void *pe_find_section(const void *image, const UINTN image_size, 56 const CHAR16 *section_name, UINTN *size_out); 57 58 #endif /* EFI_EFI_H */ 59