Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
x86_acpi_osal.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
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)
13static 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
24static inline void *acpi_rsdp_get(void)
25{
26 return bios_acpi_rsdp_get();
27}
28#endif /* CONFIG_X86_EFI */
29
30static inline uint64_t acpi_timer_get(void)
31{
32 return z_tsc_read();
33}
34#endif /* ZEPHYR_ARCH_X86_INCLUDE_X86_ACPI_H_ */
#define efi_get_acpi_rsdp(...)
Definition: efi.h:38
void * bios_acpi_rsdp_get(void)
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91
static uint64_t acpi_timer_get(void)
Definition: x86_acpi_osal.h:30
static void * acpi_rsdp_get(void)
Definition: x86_acpi_osal.h:24