From patchwork Tue May 21 21:10:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zaid Alali X-Patchwork-Id: 13669744 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2120.outbound.protection.outlook.com [40.107.92.120]) (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 21F5014B943; Tue, 21 May 2024 21:11:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.120 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716325870; cv=fail; b=q5M3dyQ/IyzUTVYASkodQHl3/kK9q3Rfsm9WESylE+FWSrzdLCHP8PtJLZZqOh0EsztauH+TNVg52brrnMW1MvSHy4thILzmrTbACQOCVmsx4M92oGWfPmu8FpYStvDaxgNIqzZfLnDDB9H09qvUXh5c8CKu1EMZQZeM73uSLAc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716325870; c=relaxed/simple; bh=+d5xcI0Ilcd8r/y7RedeJ9DnaU14cJBRP1qcbPJh0+E=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=hCZyHcNtDOZjxlDg6qkmk/8xhvqupGW4eIvwKtY7KDlOJyPo94NPiTyhGvxryXh9t5KZqK2QCqn0CwzKtc2gyHxygWN1Tm/Og/HgLJLnQn0QQ41hkPwr1jgE6/iAuhEo+3SwJJ50+4bxwBN9WNHhW5e30K5cJkGsabAtQtBGsIo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=os.amperecomputing.com; spf=pass smtp.mailfrom=os.amperecomputing.com; dkim=pass (1024-bit key) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.b=eoO0kvF3; arc=fail smtp.client-ip=40.107.92.120 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=os.amperecomputing.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=os.amperecomputing.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.b="eoO0kvF3" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BbhTIeCaWvoZDgkemAl2kKtyZXyfrpqgcxZSDCxTrLxdhBthUcxdGFA5sDaiJuxm8vPglf+3qoQqejZgiCk0mZywCM0I7NB4uenJF4/hiKlXZ+2+AsrX+lnZCUCTc1sZJaInHGtLPR7RuDRxUxHlVng7ttaThAASJHT7CjIgqq+/X98wnmXuuvWY/PfciJLlPjHlDKvuNJetfXjawGyqgJ7NDXMtSNb/jC+/nfrl1gXbKwbcei3PSH+U4EG9M8JzG/fYxTqkHNqoA8Gf5Kwtp/DsD8tJuPi9Q4i26ZX67GhKo2seJRuZBcFudP3kQEC9HYVhpoWhiz0aRIgidkcVzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FgCBw+/T2xaPa3/BxR5tMfRjnio5A7CpTBjc/NzfajE=; b=f+PchoNba5lf805oPEx6+COi9+EEgvKS15doFHgSYuvlw1IACL8QHdX2hH2Br56RLGN1TpHwGdXE07Uxo7rPR8YGx8tXiD6n773VcrW5hPsbiX0O0qsR5PP3oO61CscNe/YHHsbTiAkDOPfRaYMjGaAhvBVMn5t9s4kSXeLIsMTuu6lHNEoY8P7zgF/g8TeEwkw/ftXFMr+MXC2KIbs8GX2nzH7VX1eqv5+Vriq8a/js0LvMx81OnMhR1w45Oo7mfY3h0rM1+oT4B2bnjJsHPLKd+9ZLtgeoGOq75g4EU4zMWVnPSRhYqQA+ipgcFC1VMOrV1/zIltn59h4rD8TwpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FgCBw+/T2xaPa3/BxR5tMfRjnio5A7CpTBjc/NzfajE=; b=eoO0kvF3KJInwtbtKdGQWHBlBTy6Nk0CyiELXbR77GLOUVIA7pOijEaI3hs92dUJxLWNW6SGn+QEzs2lvdKHcRrOITGgEWGNJQ4nf+y21LF5pDmMdDAEAVf68spNmZLo5w5M6M/cQqhzqHjnel60jTazGfHmptRgpaBVdMFUmT8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from SN7PR01MB7903.prod.exchangelabs.com (2603:10b6:806:34f::17) by MW6PR01MB8627.prod.exchangelabs.com (2603:10b6:303:23e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.35; Tue, 21 May 2024 21:11:01 +0000 Received: from SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f]) by SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f%3]) with mapi id 15.20.7587.035; Tue, 21 May 2024 21:11:01 +0000 From: Zaid Alali To: rafael@kernel.org, lenb@kernel.org, james.morse@arm.com, tony.luck@intel.com, bp@alien8.de, robert.moore@intel.com, Jonathan.Cameron@huawei.com, Benjamin.Cheatham@amd.com, dan.j.williams@intel.com, arnd@arndb.de, Avadhut.Naik@amd.com, u.kleine-koenig@pengutronix.de, john.allen@amd.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linux.dev Subject: [RFC PATCH v2 5/8] ACPI: APEI: EINJ: Add einjv2 extension struct Date: Tue, 21 May 2024 14:10:33 -0700 Message-Id: <20240521211036.227674-6-zaidal@os.amperecomputing.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521211036.227674-1-zaidal@os.amperecomputing.com> References: <20240521211036.227674-1-zaidal@os.amperecomputing.com> X-ClientProxiedBy: MW4PR04CA0187.namprd04.prod.outlook.com (2603:10b6:303:86::12) To SN7PR01MB7903.prod.exchangelabs.com (2603:10b6:806:34f::17) Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR01MB7903:EE_|MW6PR01MB8627:EE_ X-MS-Office365-Filtering-Correlation-Id: 80987ad7-2364-4a3b-d56c-08dc79da84b8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|1800799015|366007|52116005|376005|38350700005|921011; X-Microsoft-Antispam-Message-Info: Rk4IqrF+5N3sfSXqen/W11x0Ostg3zszO7hIumErOsRnE9tK6fRsi3rQIJwMJjrr+2FB2BL5u999SMncf8+05R/D1p2ZkBWYKeoW8SpskI7r6XaI9NQzmU+W6Uq6tH22Hzie9SbS/qzWOme2Dijd7zlTWXB8PL1oYM2akBjwGfRliR2jh4FuNEfxTsaSHxiBLsFhj+avd2+W8at+wx4ALVv+041dyjCQPocfNWPtS2cGAgNulGR6mUerclgPV2kCP4FtC3wmdcspw5SIIx7K9mXb8dLWWA+SlXevw5Vv0UOwesqMBnDCe6U37u5swHRS1/8S+FEe9MyU61QyC08FxedJP4ZT5pppAyhUqyAH90PNqdx1ko7HLfmW7VsSpF6UlhTy2QQ5sQfGE0ecUDDUdzEKJmUBFjGihP7QjPhRjtAYkOTwwH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52116005)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ao6Bc9doaY8M2HelZoDYNuZgkz0DtQzj7P+iXldLYbM1IRMf4JpRhLLITf29E7fAhXxeLgdiI/YMplewrhAgoSFBhm0d+WBzRx4gYBRykjDbaayK75updFtOnVVQqVflhfK8njmUWhxJoQU3/PL3dp6qTn/q7S9GphcIjOqOO0apFug8qCBOWqznxDL5yfz31mXJCUpTlDGSA6KJF4FA5SuSghjCWqnjMC4vYcJVCmqf/85yv/qB4ijVqCcNmB1SRffg5oDsXjYNBS4Xz+n/vhJM9kA7mHMSpM98Cs202FZE6pSPmkVl7iAWpjbJKwjEHwc59FEC0qADeheN2FAZB6pfEkckrPkgVurB/7au4dl07tR0xbwmj4g6KYB3GdO/JfLaVB4bRFTGqiJYkfhHEeic1aay5bSoeWS+CRVvAR+WR1s+r/TbcriS3YC+p3R5a1FX+tlrM5EqfyvmrLaK/RpDB1BJwUbC5/bg1SwdU9UK5xak5AouD08XCAJKXg8lUMQvYpHQgxcvtJXPxyDWvF9TkndD2CdVXxFO1Idxd7XVmFagfTX3FlYKYnaXzN1RzYSzwjXbVPpLrEO45EeJ3VC1JllYzuMuw697mXnFsKKacyv/VMEPWmdCVBUIZ/DHesI0rzoCii29uopP/PgUVaU5GFB6LPWi3jpU8UvPG9He5wlMRPoK/9spj0Wgu5ZbRe/xZbzcG8WGlnYJbyzZV6sTlYvp8qLXJW4WvcJ1avqs+xiwUjFxRLoMKHNm6q2b74BMg7VqW8HJKB7QtFhziQb4YtJDTEnlM7gAvUMd+Dd13GHkHlQVJP/VZ1x2AjhMDX0981HBvbLQTX226ileJq+fEbu9Qzswj0sPWS07xJTgOel9F/x4uNlcaScPSqqzFw7idNnYctb8tpPwqiBh2IUg1Q9Gf2nlPaJOPOQDa3DLC6oKgQyiVVBFnCDbMabhAgk1tbJkPmM6l0JhJoWuO+P33LWNqLRpO66Tr0p/npdphjR7qLxP9HfuEHOxKLw58a10DiZ6k7bAPeTxnNaGdTVGcqZcVM/IU5M8qfn9VUFjJXXXhFAiD7FVzZIoA6Xjlld9+LRHIJU6+kCU6yjB1rxso5NNS4qwHANUlZD0RyXY4pWg+3fdK2SYIsAe7CYPR7vgHoDUgh+Ox/d/A5V8Ytrzhfq9ADeh1ZUv3NdBV2thgTcS5pH+Zad0DGpOxva/F07RlawwIjWPKGqDS0Pc/0+kd991swlfxP2Flvs+V1U1CDw7p0OE85MQCY8ADKVEdyKmvcShfdKe+z5fIxYWplKGBN8bsC7cuDoTOoOKhxnhnIT8PqX1iOL4Eq/Z4Yr662T1kqLo6R+x9vPa3FrP2YX7Gn7Yn9hBcvt1pl/VGCOAD66Ca3t0wb90skMCs7oOzkBmsh3FcfLPC5qEsgwJwdjk+gnjZLysClfFB+A3V7L7UsVERj6cbYaSXXXthTTOo2mJgWxpjGwlp+G1g1iiPvVTtIR35rxdE9vaUHqxxL/xHkP56UmuzUrQvbTseWjUhXVU/nuiFr3kqeudcD65wBMMAiHixg5v0wM283rrgV6+XjSa0L1ZZu+1GT93dJ/AiEZq/ubQdExo+zrQZ8mFsHLrjhbOY5J8KPqa4LnhEe0= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 80987ad7-2364-4a3b-d56c-08dc79da84b8 X-MS-Exchange-CrossTenant-AuthSource: SN7PR01MB7903.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2024 21:11:01.8037 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IBRbTqLiE9GNfFLOLmxeg1gN3vllAYwVvC+b2ID1K6F//GI8lg0wrINKEmrD3Oji+pHLPNWksHi5x+jhL9EyFQk4FqXz9z4aepij72+IQPyiSkJ2sKGPsgQHUhBRf2S+ X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR01MB8627 Add einjv2 extension struct and EINJv2 error types to prepare the driver for EINJv2 support. ACPI specifications(1) enables EINJv2 by extending set_error_type_with_address strcut. Signed-off-by: Zaid Alali --- drivers/acpi/apei/einj-core.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/acpi/apei/einj-core.c b/drivers/acpi/apei/einj-core.c index cc5ad1f45ea4..2021bea02996 100644 --- a/drivers/acpi/apei/einj-core.c +++ b/drivers/acpi/apei/einj-core.c @@ -50,6 +50,28 @@ */ static int acpi5; +struct syndrome_array { + union { + u32 acpi_id; + u32 device_id; + u32 pcie_sbdf; + u8 fru_id[16]; + } comp_id; + union { + u32 proc_synd; + u32 mem_synd; + u32 pcie_synd; + u8 vendor_synd[16]; + } comp_synd; +}; + +struct einjv2_extension_struct { + u32 length; + u16 revision; + u16 component_arr_count; + struct syndrome_array component_arr[]; +}; + struct set_error_type_with_address { u32 type; u32 vendor_extension; @@ -58,6 +80,7 @@ struct set_error_type_with_address { u64 memory_address; u64 memory_address_range; u32 pcie_sbdf; + struct einjv2_extension_struct einjv2_struct; }; enum { SETWA_FLAGS_APICID = 1,