1 /*
2  * Copyright (c) 2023 Intel Corporation
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 #include <zephyr/arch/x86/efi.h>
7 #include <zephyr/arch/x86/legacy_bios.h>
8 
9 #ifndef ZEPHYR_ARCH_X86_INCLUDE_X86_ACPI_H_
10 #define ZEPHYR_ARCH_X86_INCLUDE_X86_ACPI_H_
11 
12 #if defined(CONFIG_X86_EFI)
acpi_rsdp_get(void)13 static inline void *acpi_rsdp_get(void)
14 {
15 	void *rsdp = efi_get_acpi_rsdp();
16 
17 	if (!rsdp) {
18 		rsdp = bios_acpi_rsdp_get();
19 	}
20 
21 	return rsdp;
22 }
23 #else
acpi_rsdp_get(void)24 static inline void *acpi_rsdp_get(void)
25 {
26 	return bios_acpi_rsdp_get();
27 }
28 #endif /* CONFIG_X86_EFI */
29 #endif /* ZEPHYR_ARCH_X86_INCLUDE_X86_ACPI_H_ */
30