From patchwork Fri Sep 15 17:28:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiju Jose X-Patchwork-Id: 13387309 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27A0BEED61B for ; Fri, 15 Sep 2023 17:29:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 76F8E6B0383; Fri, 15 Sep 2023 13:29:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 720F96B0385; Fri, 15 Sep 2023 13:29:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5996C6B0386; Fri, 15 Sep 2023 13:29:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 4759D6B0383 for ; Fri, 15 Sep 2023 13:29:12 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 252221406D2 for ; Fri, 15 Sep 2023 17:29:12 +0000 (UTC) X-FDA: 81239517744.23.E71FCEB Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf08.hostedemail.com (Postfix) with ESMTP id 21B5D160015 for ; Fri, 15 Sep 2023 17:29:09 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf08.hostedemail.com: domain of shiju.jose@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=shiju.jose@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694798950; a=rsa-sha256; cv=none; b=deSFGfS6PVn9hJHO7oGe3pXFZqB/GHqAVQcKYNaJo0fQE/e3f9QudQyTnqR/SSAzAtouiy LKnXM5/jMIvfYH8Rl+BoN2UB4XgqVGvSAou755xoWfaxDqgSl5LAWga0DNzp52dRAYzjxh D3TFOLWR06MZ4qoycFUNpjqhQMZ5Fgc= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf08.hostedemail.com: domain of shiju.jose@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=shiju.jose@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694798950; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IzZm5K2ulhd199kMKUqoL2s0hOvcRcqzGto+EAot46U=; b=5d50CIcLsp/TEWyTZ4WO/dh1QC3+XVkwRRDO6QxPC2ImLyyIxpqRNDyS7rwGEJMM/NUjXh VROFNaYKJjuhax/rR9IcZeRutvvUZc/UWLW4LztuDeDxE801B6Qi+KagG3bJT4vxnchELM IRB19DAheioC8cEpxzsLuG2XQmOplE4= Received: from lhrpeml500006.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4RnLkg43fGz6K6Pc; Sat, 16 Sep 2023 01:28:27 +0800 (CST) Received: from SecurePC30232.china.huawei.com (10.122.247.234) by lhrpeml500006.china.huawei.com (7.191.161.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 15 Sep 2023 18:29:07 +0100 From: To: , , CC: , , , , , , , , , , , , , , , , , , , , , Subject: [RFC PATCH 7/9] ACPICA: ACPI 6.5: Add support for RAS2 table Date: Sat, 16 Sep 2023 01:28:16 +0800 Message-ID: <20230915172818.761-8-shiju.jose@huawei.com> X-Mailer: git-send-email 2.35.1.windows.2 In-Reply-To: <20230915172818.761-1-shiju.jose@huawei.com> References: <20230915172818.761-1-shiju.jose@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.122.247.234] X-ClientProxiedBy: lhrpeml500001.china.huawei.com (7.191.163.213) To lhrpeml500006.china.huawei.com (7.191.161.198) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 21B5D160015 X-Stat-Signature: gfpm813cepmnokwom4s43ipdi95jfsux X-Rspam-User: X-HE-Tag: 1694798949-806391 X-HE-Meta: U2FsdGVkX1+wFTTmi7ov35sVVPapkZwGUgGuj6Fq+UdMokPjkEysrMHMTVScGC6rRuAdfJPon+edOcASfq1lRRYgwb6rm2Rg+g8u7D4xMbExOBM3U7xgnZV8imqwDE/CsFUh48zUfd7gELIYqXC76jc5lliL/f2Bci99vmHUVg0TP0lqReB+0H24mbxN5lF+avCNPnOQG3L0txRn2GHP1Ly8xMjJhnLkMUlWkhmvbWAUsAa6DmKAE7dgkwQRG0OTQCkoSGULZ71QFCJvdHjYB3lI3K/38SokFHDMbpAIH665VJNMi8uh4EhI20Bx+VUA7Qhnx4WsTlLDE+DiJSo60C/1W041/GNb6Wv6LzcDavp6/c/rmpQmzVfNnZoMpW8bntFQ+SMrBAX44seMy+8p03i6KzB6QlcF74COEBul6YNFSuDPUVfAl8a+1/LLKMcyoOlCzRiIIwj3WAzJwgp3qg9jDFdHOjEIlWaYEcP8n2tpN6flPJ1AxxOZfT3UutdsiDTMp2gDtKWR57q+GZ5Q5RMcYAGdWpRSakcPWrWM8pzNjgp6jEVUbQaN6g1S0dV0OJyPLR4WnrIKCLzzFJmsxXyZ9sVevpRXbCk9Q+ERPQ6++5eGdHc7Bkvq0fW1lAbKCX5FWBBa0/nJ4V5jepkrwiS6sSiX4ZxjL93G1IYDOTSNO7bLiBqAcYfzRBmAifvHuGM36u5FtwaAg0al01JBVS5eSTHwLQOooyWzyjaN6/8J7U/3qww1n+Qw5kcZMeQj8E65X+TxLWa8ijGeuU1fwu6X/Ilr5cverQfuUpSShSu1RxAcAmVjbMhdOINwURSy5mboYcdvNK2gULRwcrVQJX7w7t+jxRBb7i1LdC7GEcDhFAq3MVwZR0Ml93hQE/3UsOU7G8/GGQ1SJat4CmB4aLq/ref60tqiM3kJTwMC3BxzdDt7re4qBcRmqp6SyO/RVcyPqJt6leekSIm5uK4 5RFSOyca n3yndHzt4nICr3yJWgBzTecyJ/D4wtCQFCX8xmh0KBGr7qmsmC6RrmmBmMhiPIg+5z79Y8Cn7ZPaQ/3oroIn/u4Poa5GeIp3BmQiytFsHm/GLS6gc0yA7rhhqn7asg4d8BmWHYv59xEAMuNEh1Y1m1a0wZBhX+wdpEewC X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Shiju Jose Add support for ACPI RAS2 feature table(RAS2) defined in the ACPI 6.5 Specification & upwards revision, section 5.2.21. The RAS2 table provides interfaces for platform RAS features. RAS2 offers the same services as RASF, but is more scalable than the latter. RAS2 supports independent RAS controls and capabilities for a given RAS feature for multiple instances of the same component in a given system. The platform can support either RAS2 or RASF but not both. Link: https://github.com/acpica/acpica/pull/892 Signed-off-by: Shiju Jose --- include/acpi/actbl2.h | 55 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 3751ae69432f..41e77cacc5c6 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -47,6 +47,7 @@ #define ACPI_SIG_PPTT "PPTT" /* Processor Properties Topology Table */ #define ACPI_SIG_PRMT "PRMT" /* Platform Runtime Mechanism Table */ #define ACPI_SIG_RASF "RASF" /* RAS Feature table */ +#define ACPI_SIG_RAS2 "RAS2" /* RAS2 Feature table */ #define ACPI_SIG_RGRT "RGRT" /* Regulatory Graphics Resource Table */ #define ACPI_SIG_RHCT "RHCT" /* RISC-V Hart Capabilities Table */ #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ @@ -2743,6 +2744,60 @@ enum acpi_rasf_status { #define ACPI_RASF_ERROR (1<<2) #define ACPI_RASF_STATUS (0x1F<<3) +/******************************************************************************* + * + * RAS2 - RAS2 Feature Table (ACPI 6.5) + * Version 2 + * + * + ******************************************************************************/ + +struct acpi_table_ras2 { + struct acpi_table_header header; /* Common ACPI table header */ + u16 reserved; + u16 num_pcc_descs; +}; + +/* + * RAS2 Platform Communication Channel Descriptor + */ + +struct acpi_ras2_pcc_desc { + u8 channel_id; + u16 reserved; + u8 feature_type; + u32 instance; +}; + +/* + * RAS2 Platform Communication Channel Shared Memory Region + */ + +struct acpi_ras2_shared_memory { + u32 signature; + u16 command; + u16 status; + u16 version; + u8 features[16]; + u8 set_capabilities[16]; + u16 num_parameter_blocks; + u32 set_capabilities_status; +}; + +/* + * RAS2 Parameter Block Structure for PATROL_SCRUB + */ + +struct acpi_ras2_patrol_scrub_parameter { + struct acpi_rasf_parameter_block header; + u16 patrol_scrub_command; + u64 requested_address_range[2]; + u64 actual_address_range[2]; + u32 flags; + u32 scrub_params_out; + u32 scrub_params_in; +}; + /******************************************************************************* * * RGRT - Regulatory Graphics Resource Table