1 /* 2 * Copyright (c) 2020 Intel Corporation 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_ARCH_X86_INCLUDE_EFI_H_ 8 #define ZEPHYR_ARCH_X86_INCLUDE_EFI_H_ 9 10 /* Boot type value (see prep_c.c) */ 11 #define EFI_BOOT_TYPE 2 12 13 #ifndef _ASMLANGUAGE 14 15 struct efi_boot_arg { 16 void *efi_systab; /* EFI system table */ 17 unsigned long long efi_cr3; /* EFI page table */ 18 void *acpi_rsdp; 19 }; 20 21 #if defined(CONFIG_X86_EFI) 22 23 /** @brief Initialize usage of EFI gathered information 24 * 25 * @param efi_arg The given pointer to EFI prepared boot argument 26 */ 27 void efi_init(struct efi_boot_arg *efi_arg); 28 29 /** @brief Get the ACPI RSDP table pointer from EFI boot argument 30 * 31 * @return A valid pointer to ACPI RSDP table or NULL otherwise. 32 */ 33 void *efi_get_acpi_rsdp(void); 34 35 #else /* CONFIG_X86_EFI */ 36 37 #define efi_init(...) 38 #define efi_get_acpi_rsdp(...) NULL 39 40 #endif /* CONFIG_X86_EFI */ 41 42 #endif /* _ASMLANGUAGE */ 43 44 #endif /* ZEPHYR_ARCH_X86_INCLUDE_EFI_H_ */ 45