Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp730583rwl; Wed, 5 Apr 2023 07:04:22 -0700 (PDT) X-Google-Smtp-Source: AKy350alpXcQI1WVUwFgzgnQLz++fuj8WArdRTQlJclOLO4acbw1AiQMoS0FGs7qeJhuCeeZTNCU X-Received: by 2002:a17:907:a28c:b0:949:9899:a52e with SMTP id rd12-20020a170907a28c00b009499899a52emr469377ejc.8.1680703462116; Wed, 05 Apr 2023 07:04:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680703462; cv=none; d=google.com; s=arc-20160816; b=nTS94ZOqyOpGb2KmhrG9imx3IErlVG74TPVmhzX1pZvJxlVNk7zoO5Wdrf+uW2GplH UIvTwEmXzf/7wANya07xvuQyQYTEyub7uHxKzsD2hyZCHjpoodeHtloZwxJKDcr5wx9z xMhVtbk6Q+vmyv/EAZbrWz2UXnfkENWmcsIafBdJBkH3UyL/97v23+IAaOwT/fmr+PTA BIzyd4SMFHqVwUHWXH7pwG4XEF64bU1BTfHkNJDuemPKFhV0ZSAjtcwu4GjWJP6EvFmp baKq9eeqLqZv9tXAOZCVPMW0ukmuOj6cb2SVKfTCmDRhllonMXb6/z3QGGDXGsp6P9Yg yHYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=eVnSb1iZ+x+TEkKcjlvDcIH4gcExH03B4IwDgX1wYs4=; b=bkOK+yAKRM8iS4vVq+R9Ak24uwek8KaPkwejyziUOQSO9+aTKzt7vSoxOTByDm3QjP UC/BjRH0ugAKJ2scZWVU9k5NJ6Z2ycq685JGNfO4YEBsHQQaHBRh6YS4xmQ5XIIBpZl3 cC+NUgDN9Df7a7nJ76tmS5zsa7PntUB5RbqHXxm0fv7r5pALghBX698K3IsvhUp2/3uI +IgL8cLoKRLNltaItvwOYzhn17Z34BymJH8U8XIYgqRkUIyzoogBZn9bXuVQgganlxAH BOB2JLLG2avjZXvMJWArcbSHcWgnVAOMP72iZYyME6pKNfb9jtKiz6pC0IgusDeTMp/A KIng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d22-20020aa7d5d6000000b005021f0d5761si13047034eds.680.2023.04.05.07.03.55; Wed, 05 Apr 2023 07:04:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238146AbjDEOAo (ORCPT + 99 others); Wed, 5 Apr 2023 10:00:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237980AbjDEOAl (ORCPT ); Wed, 5 Apr 2023 10:00:41 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D961AE5D; Wed, 5 Apr 2023 07:00:39 -0700 (PDT) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.1.0) id 6ad874797a78371e; Wed, 5 Apr 2023 16:00:38 +0200 Received: from kreacher.localnet (unknown [213.134.163.219]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 7E7D81B4EA57; Wed, 5 Apr 2023 16:00:37 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 31/32] ACPICA: add os specific support for Zephyr RTOS Date: Wed, 05 Apr 2023 15:59:00 +0200 Message-ID: <6519395.G0QQBjFxQf@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Najumon 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: https://github.com/acpica/acpica/commit/463d30f0 Signed-off-by: Najumon Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/platform/acenv.h | 2 ++ include/acpi/platform/aczephyr.h | 48 ++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 include/acpi/platform/aczephyr.h diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 0fa7bbf85c83..337ffa931ee8 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h @@ -209,6 +209,8 @@ #elif defined(_AED_EFI) || defined(_GNU_EFI) || defined(_EDK2_EFI) #include "acefi.h" +#elif defined(__ZEPHYR__) +#include "aczephyr.h" #else /* Unknown environment */ diff --git a/include/acpi/platform/aczephyr.h b/include/acpi/platform/aczephyr.h new file mode 100644 index 000000000000..2f0d30c3c5fd --- /dev/null +++ b/include/acpi/platform/aczephyr.h @@ -0,0 +1,48 @@ +/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ +/****************************************************************************** + * + * Module Name: aczephyr.h - OS specific defines, etc. + * + * Copyright (C) 2000 - 2023, Intel Corp. + * + *****************************************************************************/ + +#ifndef __ACZEPHYR_H__ +#define __ACZEPHYR_H__ + +#define SEEK_SET FS_SEEK_SET +#define SEEK_END FS_SEEK_END + +#define ACPI_MACHINE_WIDTH 64 + +#define ACPI_NO_ERROR_MESSAGES +#undef ACPI_DEBUG_OUTPUT +#define ACPI_USE_SYSTEM_CLIBRARY +#undef ACPI_DBG_TRACK_ALLOCATIONS +#define ACPI_SINGLE_THREADED +#define ACPI_USE_NATIVE_RSDP_POINTER + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/****************************************************************************** + * + * FUNCTION: acpi_enable_dbg_print + * + * PARAMETERS: Enable, - Enable/Disable debug print + * + * RETURN: None + * + * DESCRIPTION: Enable/disable debug print + * + *****************************************************************************/ + +void acpi_enable_dbg_print(bool enable); +#endif -- 2.35.3