From patchwork Wed Apr 5 13:59:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79637 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp343311vqo; Wed, 5 Apr 2023 07:18:47 -0700 (PDT) X-Google-Smtp-Source: AKy350YyctHY3am6XD9QFbpgLcwKu1EyQSTrjE4H04PotSyh2picHp9yiq3xw+u2Pak6m8H+8IdB X-Received: by 2002:a17:90b:4d09:b0:241:c25:14c0 with SMTP id mw9-20020a17090b4d0900b002410c2514c0mr6818056pjb.24.1680704327532; Wed, 05 Apr 2023 07:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704327; cv=none; d=google.com; s=arc-20160816; b=PoX5cO7Bxf0nRyocWvYQ1RiKdqgd7rRRVM9aP98tXhcpkzGJIH/TQSWHEPK0UKqUnz iHrSonLiQDX1gjlNqrj3BJtT3G15VAyIEJMBoYsNexXMZPvzGgp1gSo7hikOtaPhm2KV GDc3UEu9wPdEjoyBkSuDkklUqxMXnrUSCY5W5tNWpazdx7kOJpgF7/KXhwV8cO7sRqcu AFPugtDRbqUcwftDzgju87OQCH1XrRLlPUMKPzZCjyCsTbb8xeyG1zRqmbjXHWTEVIE4 Vjm4H0t4gBR4hsoyLdziYcVPn1OqwjoaFPcEh7fbBamGLwrr5VkBofxB3XH2rj9P9Uk4 Vt4w== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y15-20020a17090abd0f00b002340f45c0ffsi1418663pjr.90.2023.04.05.07.18.34; Wed, 05 Apr 2023 07:18:47 -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 S238153AbjDEOAp (ORCPT + 99 others); Wed, 5 Apr 2023 10:00:45 -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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346220954676751?= X-GMAIL-MSGID: =?utf-8?q?1762346220954676751?= 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