8 extern void efi_init(void);
13 #define efi_call_virt(f, ...) \
18 kernel_neon_begin(); \
20 __f = efi.systab->runtime->f; \
21 __s = __f(__VA_ARGS__); \
22 efi_virtmap_unload(); \
27 #define __efi_call_virt(f, ...) \
31 kernel_neon_begin(); \
33 __f = efi.systab->runtime->f; \
35 efi_virtmap_unload(); \
39 /* arch specific definitions used by the stub code */
42 * AArch64 requires the DTB to be 8-byte aligned in the first 512MiB from
43 * start of kernel and may not cross a 2MiB boundary. We set alignment to
44 * 2MiB so we know it won't cross a 2MiB boundary.
46 #define EFI_FDT_ALIGN SZ_2M /* used by allocate_new_fdt_and_exit_boot() */
47 #define MAX_FDT_OFFSET SZ_512M
49 #define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__)
51 #define EFI_ALLOC_ALIGN SZ_64K
54 * On ARM systems, virtually remapped UEFI runtime services are set up in two
56 * - The stub retrieves the final version of the memory map from UEFI, populates
57 * the virt_addr fields and calls the SetVirtualAddressMap() [SVAM] runtime
58 * service to communicate the new mapping to the firmware (Note that the new
59 * mapping is not live at this time)
60 * - During an early initcall(), the EFI system table is permanently remapped
61 * and the virtual remapping of the UEFI Runtime Services regions is loaded
62 * into a private set of page tables. If this all succeeds, the Runtime
63 * Services are enabled and the EFI_RUNTIME_SERVICES bit set.
66 void efi_virtmap_load(void);
67 void efi_virtmap_unload(void);
69 #endif /* _ASM_EFI_H */