Skip to content

Commit beadd51

Browse files
najumon1980rafaeljw
authored andcommitted
ACPICA: add os specific support for Zephyr RTOS
ACPICA commit 463d30f0a8edc5dccad20c2d189dc55111d51aae The acpica will be integrated as module into Zephyr project for enable acpi bus driver. This patch is for enable os specific support layer for Zephyr. Link: acpica/acpica@463d30f0 Signed-off-by: Najumon <najumon.ba@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent ae5a0ec commit beadd51

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

include/acpi/platform/acenv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@
209209
#elif defined(_AED_EFI) || defined(_GNU_EFI) || defined(_EDK2_EFI)
210210
#include "acefi.h"
211211

212+
#elif defined(__ZEPHYR__)
213+
#include "aczephyr.h"
212214
#else
213215

214216
/* Unknown environment */

include/acpi/platform/aczephyr.h

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2+
/******************************************************************************
3+
*
4+
* Module Name: aczephyr.h - OS specific defines, etc.
5+
*
6+
* Copyright (C) 2000 - 2023, Intel Corp.
7+
*
8+
*****************************************************************************/
9+
10+
#ifndef __ACZEPHYR_H__
11+
#define __ACZEPHYR_H__
12+
13+
#define SEEK_SET FS_SEEK_SET
14+
#define SEEK_END FS_SEEK_END
15+
16+
#define ACPI_MACHINE_WIDTH 64
17+
18+
#define ACPI_NO_ERROR_MESSAGES
19+
#undef ACPI_DEBUG_OUTPUT
20+
#define ACPI_USE_SYSTEM_CLIBRARY
21+
#undef ACPI_DBG_TRACK_ALLOCATIONS
22+
#define ACPI_SINGLE_THREADED
23+
#define ACPI_USE_NATIVE_RSDP_POINTER
24+
25+
#include <zephyr/kernel.h>
26+
#include <zephyr/device.h>
27+
#include <stdio.h>
28+
#include <stdlib.h>
29+
#include <string.h>
30+
#include <ctype.h>
31+
#include <zephyr/fs/fs.h>
32+
#include <zephyr/sys/printk.h>
33+
#include <zephyr/sys/__assert.h>
34+
35+
/******************************************************************************
36+
*
37+
* FUNCTION: acpi_enable_dbg_print
38+
*
39+
* PARAMETERS: Enable, - Enable/Disable debug print
40+
*
41+
* RETURN: None
42+
*
43+
* DESCRIPTION: Enable/disable debug print
44+
*
45+
*****************************************************************************/
46+
47+
void acpi_enable_dbg_print(bool enable);
48+
#endif

0 commit comments

Comments
 (0)