Received: by 2002:ab2:7041:0:b0:1f4:bcc8:f211 with SMTP id x1csp213491lql; Fri, 12 Apr 2024 08:15:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWkvwsTEB/Sn+xdaaqOJvGlbiNHvaalf/xh+kP4tBpkjVL2jh/Zgj8CCcYPY4+iuiz+Q4edO3eyNebR6owzGyaWwqA4e55i+yAHcVZYkA== X-Google-Smtp-Source: AGHT+IESjtvfoIp8c3pT1Js06pGOb8LsXS2opwfS6S0VSTMxnweHW5JMrqTBw1/5UBVuKOcPm/fj X-Received: by 2002:a17:906:acf:b0:a52:2e53:b041 with SMTP id z15-20020a1709060acf00b00a522e53b041mr1754472ejf.65.1712934947618; Fri, 12 Apr 2024 08:15:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712934947; cv=pass; d=google.com; s=arc-20160816; b=iXS4uK5l74HvHl6+2Ivkz3LNKDo+kwhedWwHjqMrLPa3MprNw0XwyVXSHzwT9PLrH5 hOWd9UPUbupCWGgeJxlqC1W+NRRwmOQbFqLm8ZdcbkGoLMJq1sOPWlm/LqS9qVtGi8Zy WFytElozyB2XvoMpXzM4hw8ICOw+adr7SRUN6lQzj/by/lu06jyxV2WFVl7PB4oYc/PA DdRXMHsNVZENz513JYfTKWSHeB/QD3m4z/EOGB15IT5ohk6fNzhUGptU7PFgIcz9E69X l6T0Yq5vTtdk/n6DJgWhMy10bfMarV54qkucb6U6M47ueGQXQ3TILcKy2bOK4Xl3MzaT uS7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ORJenG+BdSoBtlrZJaOI5ruzTspI3Whj6f08rN4u7Zw=; fh=9nwRopHxyVgRW5VsWcX5PqyjsRn0wIZwejY5TUrUef0=; b=H+oAWUW40eLvWVHJxSLkJPbwTx4h6FMhbN/5w93hTXB8MwigQW2qneEPNwVF2wjqoR 6MiFVsFHd3jioOFNZhaTe/zqlZvqfN4KrDemxRRCGKaFI6QVLY9CsGnS4H2WTHEuKdx6 Q2WRV2N9zSAD8ttJHcTxtl1SPYaLvI27KmQkFs2qzI0lFo5hfhtZJoz8MfQkObSPTe/Z wsJNCYtPYnBhNAdwuYqrgbV/ue26DDLbWPW2FGX1QeG1C/YhOTLeUCW887L5PjoZ9FKN 3ONcqSvjJx1HUpMGO86SWB2RnbdPwyUOClSahZPSaMR6jzT+3vIWnKelzy3AjQbOSZHB GZAw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rjwysocki.net header.s=dkim header.b=cVytqs01; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net dkim=pass dkdomain=rjwysocki.net); spf=pass (google.com: domain of linux-kernel+bounces-142914-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142914-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id di18-20020a170906731200b00a51bc19eba2si1815576ejc.386.2024.04.12.08.15.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 08:15:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142914-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@rjwysocki.net header.s=dkim header.b=cVytqs01; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net dkim=pass dkdomain=rjwysocki.net); spf=pass (google.com: domain of linux-kernel+bounces-142914-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142914-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2A3971F2145C for ; Fri, 12 Apr 2024 15:15:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C16E14A4C5; Fri, 12 Apr 2024 15:13:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b="cVytqs01" Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E66F9148FE7; Fri, 12 Apr 2024 15:13:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.96.170.134 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712934807; cv=none; b=LsnhMlKZfR89EVmyXQSTE3qwo3/Y5SpMe8pLSn2pQM0IhtWPcbW3mUDfCMmk4wNFikF9n0EsQKePvg/LIzNTTxdo5jcdgQUiBk4HHEK2Dem0+rWmp6/7DiEMq2XcXxatjjRPZaF+SxvOlM1yU60CYg/H6xNHznlUbKk35asPYbY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712934807; c=relaxed/simple; bh=cVGtdaiupYjV8guLODOd/qTyWi620xz/uwHunw1pD5Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Q9HzqkiJF93WiUSRAlumDniWmKMlcFH/fXp2ofqRt1pQFT2mh7nvYpwN/h/xIuixBPhiYpDmYA7atYlCGn9Ze/zZjUmO9hES2ZbovKQ6l8bRtzW7h9gFWBC5h0zCEtBlNkElpt3NfEjntYMhi1lzXtB56lLpzNofjLsD49Sg3PQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net; spf=pass smtp.mailfrom=rjwysocki.net; dkim=pass (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b=cVytqs01; arc=none smtp.client-ip=79.96.170.134 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rjwysocki.net 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 6.0.0) id 49711fe95accb72e; Fri, 12 Apr 2024 17:13:22 +0200 Received: from kreacher.localnet (unknown [195.136.19.94]) (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 cloudserver094114.home.pl (Postfix) with ESMTPSA id 6194566CC48; Fri, 12 Apr 2024 17:13:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rjwysocki.net; s=dkim; t=1712934802; bh=cVGtdaiupYjV8guLODOd/qTyWi620xz/uwHunw1pD5Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=cVytqs01jJrVM6XHYQmvy5ShTl6BdjSEGVwN+H9WUVonuScSltq4L7UjfMMLFTbue Phk9lDWE/tWjbnHS/HWbMev6N1WMWcfq07psXMlY+yQvD0DsTVBn2haIFAVypba+ux qgHMfIBMEjKuO8lI05DFMGqu1ajelH2zlWFOkDCtDhuwXyCuC5Ih6mQ52ALxHQ6VPy M1s+AnNYrM+NawvUxxPt+pJwAAAhdGJ+evu8tagXC5+R3bCtKHx35AdODef1h/KmIV wD1+SNE7u2/cL8A0VxDwhxqX1yrAV1Neid/8zWruR9aNwIuDtV4RDAd7kNDjUKDdG8 BGyVTUD8iaFlA== From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore , Saket Dumbre Subject: [PATCH v1 02/12] ACPICA: ACPI 6.5: RAS2: Add support for RAS2 table Date: Fri, 12 Apr 2024 17:05:03 +0200 Message-ID: <1893131.tdWV9SEqCh@kreacher> In-Reply-To: <4920972.31r3eYUQgx@kreacher> References: <4920972.31r3eYUQgx@kreacher> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrudeiuddgkeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepudelhedrudefiedrudelrdelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleehrddufeeirdduledrleegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeegpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhmpdhrtghpthhtohepshgrkhgvthdrughumhgsrhgv sehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=4 Fuz1=4 Fuz2=4 From: Shiju Jose ACPICA commit c581606cf49b7574d29c02b1a3bc144650375e32 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/commit/c581606c Signed-off-by: Shiju Jose Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl2.h | 129 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 9775384d61c6..64a3f9ae2641 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 */ @@ -2751,6 +2752,134 @@ enum acpi_rasf_status { #define ACPI_RASF_ERROR (1<<2) #define ACPI_RASF_STATUS (0x1F<<3) +/******************************************************************************* + * + * RAS2 - RAS2 Feature Table (ACPI 6.5) + * Version 1 + * + * + ******************************************************************************/ + +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_parameter_block { + u16 type; + u16 version; + u16 length; +}; + +/* RAS2 Parameter Block Structure for PATROL_SCRUB */ + +struct acpi_ras2_patrol_scrub_parameter { + struct acpi_ras2_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; +}; + +/* Masks for Flags field above */ + +#define ACPI_RAS2_SCRUBBER_RUNNING 1 + +/* RAS2 Parameter Block Structure for LA2PA_TRANSLATION */ + +struct acpi_ras2_la2pa_translation_parameter { + struct acpi_ras2_parameter_block header; + u16 addr_translation_command; + u64 sub_inst_id; + u64 logical_address; + u64 physical_address; + u32 status; +}; + +/* Channel Commands */ + +enum acpi_ras2_commands { + ACPI_RAS2_EXECUTE_RAS2_COMMAND = 1 +}; + +/* Platform RAS2 Features */ + +enum acpi_ras2_features { + ACPI_RAS2_PATROL_SCRUB_SUPPORTED = 0, + ACPI_RAS2_LA2PA_TRANSLATION = 1 +}; + +/* RAS2 Patrol Scrub Commands */ + +enum acpi_ras2_patrol_scrub_commands { + ACPI_RAS2_GET_PATROL_PARAMETERS = 1, + ACPI_RAS2_START_PATROL_SCRUBBER = 2, + ACPI_RAS2_STOP_PATROL_SCRUBBER = 3 +}; + +/* RAS2 LA2PA Translation Commands */ + +enum acpi_ras2_la2_pa_translation_commands { + ACPI_RAS2_GET_LA2PA_TRANSLATION = 1, +}; + +/* RAS2 LA2PA Translation Status values */ + +enum acpi_ras2_la2_pa_translation_status { + ACPI_RAS2_LA2PA_TRANSLATION_SUCCESS = 0, + ACPI_RAS2_LA2PA_TRANSLATION_FAIL = 1, +}; + +/* Channel Command flags */ + +#define ACPI_RAS2_GENERATE_SCI (1<<15) + +/* Status values */ + +enum acpi_ras2_status { + ACPI_RAS2_SUCCESS = 0, + ACPI_RAS2_NOT_VALID = 1, + ACPI_RAS2_NOT_SUPPORTED = 2, + ACPI_RAS2_BUSY = 3, + ACPI_RAS2_FAILED = 4, + ACPI_RAS2_ABORTED = 5, + ACPI_RAS2_INVALID_DATA = 6 +}; + +/* Status flags */ + +#define ACPI_RAS2_COMMAND_COMPLETE (1) +#define ACPI_RAS2_SCI_DOORBELL (1<<1) +#define ACPI_RAS2_ERROR (1<<2) +#define ACPI_RAS2_STATUS (0x1F<<3) + /******************************************************************************* * * RGRT - Regulatory Graphics Resource Table -- 2.35.3