From nobody Tue Nov 26 00:21:09 2024 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 E5DA6149E1A; Tue, 21 May 2024 21:11:00 +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=1716325862; cv=fail; b=quHub9Uo2hYYrdRrh6B+cd1HsGiFkm1h8WCh2UOML16taKZ2RxzzFEmbOfNe/WzjszAsco1HWT+br2/yvHKkHE3GSOlvhIEv9Pe1trZmdr0BtCtfwJLSJ6uamMxzBJXyeZCSCO18xtfJ29/XY/VaTsZOb44+XgkvBEbRJBXCRps= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716325862; c=relaxed/simple; bh=KdYbHmPQn0r5IN9g+9D4d/3Z4D3B2WoLS6s2/FqktYs=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ZSQIQFT5JJYEc5egSyob+Yk9czUybOn/0Ebyrb8r4NSBsh1khiYwDRnXf9m/zW2fNsENmgQoQTjnh5HVeF260jxQJ6CcyPzlof+DuvLPqPqTUzyTasJjeFaj4Ttb2j7fm6a2A8R1soTZ4Hg86fWECqopi/hvzU3JZ5iBzCJC/sE= 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=gXnj9HQD; 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="gXnj9HQD" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZCAyIKefq6VBellcxFZQWTAZhEz1g9VGMHpaRSs3dod6V4vnYwen2NhLyC/jfAqJfGLi4V+5naXTiC/31ca0exNztfpLHD8MpYmof3UnafVhhdK4z894HWxxFvcpCHbe5kLlbkWRMJj6EE5oWQEUso5Xv5hD+DjtJwBmyy9QDhFfFckF3EtQ0TS6yMAr5glc7x7wEmjiiWYc7em+IDhqxzDqHK/5k/WpImjcNyQnDv1IB4H1YhkZjr6J7DZyg/eHmz/ekgRYxjn4X0xnUYp3PfYghAoREaB3R77cL+jvGM6CpcgHBQm482AKXcFZztItZ68aj+ki1kg35suHcs4pBw== 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=paywM29wLpewYuxgXs7op7rkpL3ktbDNrtpblXwJ0nc=; b=fvRpUpyplWaasrhTZ3d3s4DURn9SVX1EynRm5LCbQtNNft523QjgoVT4FIbGLBZcepx8LR0Pruf0rIHgZT0+6SxQhFEFFO9rQJokjoa4QPItJ4ULi4K06DmeUuq+mWrDsLfQgMHq1w+gKm+p5XCSDo12uR0/0WZESD1yTVNdg0RFD+KTrVpQP9ToiLm08uLSe1wWK2YRlfAqQxLTi6zzidhWJRsByeVxPFc7uxmhaxw4eiR4nIcVeSSZuzIVfClxD3A1j2P0RTNWIz+uGwDU47Jr8QiR6zC03P9MWZ9d8kVpvbsGd32A4Z0ReXCxh8Y+ixPvNeY9IlreIHYSXsvUxQ== 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=paywM29wLpewYuxgXs7op7rkpL3ktbDNrtpblXwJ0nc=; b=gXnj9HQDpbvmG5U9L1bBJcOvHiLgFp14psqu87TPir3rB2Mj1Y6n799VxMJium+qKD3uOpdJuCf1USDnUqLULgHyTmeMC5aJs/zU4gEfAx50ohx0jndATjxlzW3wzrqSRIyFdhGsAtW5+sh+n1tAnLwFo5v+l+QxdkypxgJLobU= 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:10:55 +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:10:55 +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 1/8] ACPICA: Update values to hex to follow ACPI specs Date: Tue, 21 May 2024 14:10:29 -0700 Message-Id: <20240521211036.227674-2-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> Content-Transfer-Encoding: quoted-printable 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-kernel@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: c1f185f3-a499-4057-d298-08dc79da8130 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: =?us-ascii?Q?ZcZDtA+LI2i4sicReQMHXSuyblrK7tKNLmeHoBCiXjhtQbXO1d8bg/VMW++A?= =?us-ascii?Q?8kYDCNl3syHqRlVdesq4DpSnW2pDmrfsK2fC6gEIxekqYrwvDxcdXd7tjn+g?= =?us-ascii?Q?64m8tLJpvgaq4AxqPbH8sg7XS0D8LctNt7GwpcsPnnIWV8yaWyF2+Cs72Z8X?= =?us-ascii?Q?PPmDa3ZmCgbk+MZ+rJkGBNbLPUXwbfipvZ8D0vLwE38x6sJQyVfa/JL9dJT4?= =?us-ascii?Q?rSC2VdxzPclgaRrMeLNe49TfH7m9Kw4MdkgNiPVW70CT7c0zyNKsI3nx37aa?= =?us-ascii?Q?AzZy7DPbwurfypCoj+yyqFAQ4fkNTRmZHlddZ9llakW9+KOU2RFlLqf6pDsG?= =?us-ascii?Q?KTledyxXpC8Y1c2y6Zj8M7OigqOwgFbBkYJbKRyN22b2iEE5UBQ9K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9gqA3qmvFpW8M2MwA81hucGZaFcctJCuSjVB4IVw3kRmqdN?= =?us-ascii?Q?XWo=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR01MB7903.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(1800799015)(366007)(52116005)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?e4vmszBxHLzl4xs0c0Nb2/T8YdkJfl5vBrznPNhOsTyfJT964OoD+zAqCcjT?= =?us-ascii?Q?ct3sknTINLFwgeAl9Ss6U7QRhP+b5J4TmvO9EMxv+HeNeBBZjGYiQAKXB/3G?= =?us-ascii?Q?D5g+qd7eyrfK7W+sINVkEyQrB4BtV2VWVM4QuNySe58/WDw85PxAQjDcjGHS?= =?us-ascii?Q?IxcpLgOuiEf1umCf16uZt8XTVUtPwOkf9z4Yw7XXKnj4KENYALvXcW6kUyQp?= =?us-ascii?Q?SQM50OjH6hocdB04v75cpFbbD4KeIqcdtf2pUW3KiNzyrPD3IeJ53DDUhf68?= =?us-ascii?Q?r4eAR5lESGeZ5qW2kGQjt2qF/LH89rCUkkD4QMB3hQ+QT5iNAlxva73FX7LQ?= =?us-ascii?Q?8WxU072bScsEe/ejjVpBuq0ZU8VFt6xpP+wP4erTjGJKHVm3I5ThRfMjxcEd?= =?us-ascii?Q?svv+LmT9uaBzbvqbMKHTIcQF1x1a9HVQVetEivceC2ZwTLcj8kFCZKtEdPYR?= =?us-ascii?Q?9HUjOyZ/7ZAi9vaiMyqX4TOb9OGipqwuyVi1mGFWakJOZk6uLVH8UIaLIK20?= =?us-ascii?Q?LAAdZrryMw0KehowuGNMVAf+3Gt0b1t3gN6IqnnlpVtSsFGHmvD2xIh6oRcp?= =?us-ascii?Q?YPWkEdw818i9LuFVzkVOL5Qi7l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?UP1fIJC50xlp9GC2tFBSfwOVLKTJeNQFvUnNsXE4vvLLf2owB1LR46Oyo/3l?= =?us-ascii?Q?LXrnljotR72X9RMtXR7S4XKOMCPoJx2fxnP+1J2gUVG4MP72qAvos5x4eqg8?= =?us-ascii?Q?Gap2rZF2mstGb/wjV8ZEmCo=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1f185f3-a499-4057-d298-08dc79da8130 X-MS-Exchange-CrossTenant-AuthSource: SN7PR01MB7903.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2024 21:10:55.8137 (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: JBdjdUf1j/balEDDIj6Ze1OdC+3zQAjIUjZ8iT+ynYpW+lqwWFhI9+rGaS+mZKUxKJiqWCnOjjMPFe9hvVdJsvp1NykfS41msP94MNPW+wpg7OeqkAJl56occlDTYhh+ X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR01MB8627 Content-Type: text/plain; charset="utf-8" ACPI specs(1) define Error Injection Actions in hex values. This commit intends to update values from decimal to hex to be consistent with ACPI specs. This commit and the following one are not to be merged and will come form ACPICA project(2). (1) https://uefi.org/specs/ACPI/6.5/18_Platform_Error_Interfaces.html (2) https://lore.kernel.org/acpica-devel/20240514184150.6285-1-zaidal@os.am= perecomputing.com/ Signed-off-by: Zaid Alali --- include/acpi/actbl1.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 841ef9f22795..b321d481b09a 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -1017,18 +1017,18 @@ struct acpi_einj_entry { /* Values for Action field above */ =20 enum acpi_einj_actions { - ACPI_EINJ_BEGIN_OPERATION =3D 0, - ACPI_EINJ_GET_TRIGGER_TABLE =3D 1, - ACPI_EINJ_SET_ERROR_TYPE =3D 2, - ACPI_EINJ_GET_ERROR_TYPE =3D 3, - ACPI_EINJ_END_OPERATION =3D 4, - ACPI_EINJ_EXECUTE_OPERATION =3D 5, - ACPI_EINJ_CHECK_BUSY_STATUS =3D 6, - ACPI_EINJ_GET_COMMAND_STATUS =3D 7, - ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS =3D 8, - ACPI_EINJ_GET_EXECUTE_TIMINGS =3D 9, - ACPI_EINJ_ACTION_RESERVED =3D 10, /* 10 and greater are reserved */ - ACPI_EINJ_TRIGGER_ERROR =3D 0xFF /* Except for this value */ + ACPI_EINJ_BEGIN_OPERATION =3D 0x0, + ACPI_EINJ_GET_TRIGGER_TABLE =3D 0x1, + ACPI_EINJ_SET_ERROR_TYPE =3D 0x2, + ACPI_EINJ_GET_ERROR_TYPE =3D 0x3, + ACPI_EINJ_END_OPERATION =3D 0x4, + ACPI_EINJ_EXECUTE_OPERATION =3D 0x5, + ACPI_EINJ_CHECK_BUSY_STATUS =3D 0x6, + ACPI_EINJ_GET_COMMAND_STATUS =3D 0x7, + ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS =3D 0x8, + ACPI_EINJ_GET_EXECUTE_TIMINGS =3D 0x9, + ACPI_EINJ_ACTION_RESERVED =3D 0xA, /* 0xA and greater are reserved */ + ACPI_EINJ_TRIGGER_ERROR =3D 0xFF /* Except for this value */ }; =20 /* Values for Instruction field above */ --=20 2.34.1 From nobody Tue Nov 26 00:21:09 2024 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 E782B14A617; Tue, 21 May 2024 21:11:02 +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=1716325864; cv=fail; b=NNNeuyZV279tzutCE1i55M77+VHbv7Hlk2/8TIVKkHLaczMl1Dq3i+j1qw8KsPW2NiKkf0w74jg/7Uz7nn/6OUvuiU5ONXjbcW4iXBwYHB0Q5Fn+l11TiQP5cmRF7jY9MU2E40FCbhGw+Xze9ytKnCKGfEmDN5rijs1wEKSfZzg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716325864; c=relaxed/simple; bh=PBtmXRPcHhJ8QTun7ebiAxEzdc6Y44RSGtRrez5j5zU=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=UuMgePLvm43hpB7b8Wq+5CQxSx1uyhFT3iJ+tLCict5qO5W4IfFGMvFxdeplMkXI5j44NnoTgeBfcSOjSlKRnwaxfbffWYdjjGfvnaI+2Wtb9IKngXwJVDea7aAzZxpmxj+oPLmS4r7fyYNZWaetoJQ2pfziryU8LE9DjlGODhs= 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=ZKYUYZIw; 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="ZKYUYZIw" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DCM31qBQfuSYvLyku1kiBZxKiWpZouvNsA/WL5430d2ogwN+mMWVhCK9B2OWVFJFrMniZKVI8KU87bMAHIxHyfchSkR+yEnqGL5+a70uKjMgahQzVYuRzzL5sWhFrB06Sp6KEkCzuGlpXB/7LQKkmn0K6wsHuKsi6ZGgo7etrPh22vPnCggXLSMmHHk4Gk8yXeu5CX0n5cPmb7ApJJPbkyhmdEsAIBYuRHkawqqqCzMIoMqjRExoZWkM0yuYNmCJYTnOeahrTXrgPAN8rySBCO1Y3ANyGrFCXaD8JPD9OIQ9p6gG8DrBgPbJqS8GC2UYcrnTODSqreJp/Les1yzk7Q== 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=b4foFUEueSBABzFcfkV68h9/Shi4TGvG61dUWODqFAY=; b=lTrJ4BGsGXoRjuSonmTAZ+MESv1ph7bVGif/ckpYRir66ZKUHK2eWNNrSk2erwd7EZvU4Eo8cBd7FHjqBLY4qhl17CjhvLLjcecea+VF8uadukwg56TePrr7meTi3zQ9Vlgql9DWyX2MG2Vm76QJlNCivwyOajc/euu4ldrazkxjHVTxrKE2cARp0rIThIMV/dfeTJYD5D1OGysCGtoyAzZz+mmA0l8E92owVWb/fBKUe+tvKVmpJIfc5WTuiC0q6aQjLHcTKzBTUvq73wjE20vECPgc0iS2XozTkmAEb2pm29tZ09bcrP//Ooibp9YENhISsjlNi/m9qJqsddpnWw== 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=b4foFUEueSBABzFcfkV68h9/Shi4TGvG61dUWODqFAY=; b=ZKYUYZIwWD5Z+5uc7HQEfnqwmXZDh9dTkudEw5D/YK1fm2oXv7Qi42RNG0F1eap8ANmLO9Xs/1JZR2OBQ30XQ7RSU0MvxBheHB99YGgOxLijlw43GUHbx5WF0QxPW8sK+pYjwOT9MGiBR3tL84bdDTx5e0rEzjF9ECf/uLTG708= 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:10:57 +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:10:57 +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 2/8] ACPICA: Add EINJv2 get error type action Date: Tue, 21 May 2024 14:10:30 -0700 Message-Id: <20240521211036.227674-3-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> Content-Transfer-Encoding: quoted-printable 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-kernel@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: 338fd137-cca5-4803-a178-08dc79da820e 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: =?us-ascii?Q?rPtgsjfc+GXDtZIm2SwstA/ajYOXGesXjphwI6mcwUWkXeXQMlBW4zn2jZ6y?= =?us-ascii?Q?HUGKFCODQqZpPUoTgrHOuPiA9eYtyaw3tJi1xjbu2NWK5ISruD/I0hyJ2WsC?= =?us-ascii?Q?+dN0fz6gUq3p3K55urEvNayMxwFZ0W+PlrkBTR97GwSpMxtH430A339/hKnD?= =?us-ascii?Q?yaqFW8dV97KEZLcVNswrytVHMtHHSEOoIXjRKbmKKZ8oaNSve/ugWu253SXa?= =?us-ascii?Q?wWphZxji0bkXjVA0Wci/peJnFOQTDJ3dNV3lxrNEAH4Gyc35121NGDCm4aOC?= =?us-ascii?Q?poS4OeTJkZ0LSe0lPFSQQDdRIzaDM8WaQkpZsB982L5BYd79EfhDHm12v8Go?= =?us-ascii?Q?jsz96xMJKrDCC9nXHGPfaaE8DoF0fDIZDbdS5EJRmPE1qDOxKZY+uBfYpZeJ?= =?us-ascii?Q?0Od73CGXLsO0qYsK0RaEuZyEH3hyyRSH+oi3Kx86ZCAAP+IY67xAEeSnQCah?= =?us-ascii?Q?uUN2MkYayf28RrntTRkeayNSozuSiWVCXwfaQvvJJJK2Y9kZTyUU/iNk/p/3?= =?us-ascii?Q?cGOt4UgAk05J2buW4cWi6dehhxQREXiwUWgnaq6gZq/uKDCWY5MPv2oEAIR5?= =?us-ascii?Q?WczJH/g86QPrOemrbV8cEBElr4gCSuVyS8OX23DiND08JNSbz1kI12bAhlB2?= =?us-ascii?Q?m7q2lX0f4S/NwR1ROfnqCWA8+P2Q5N+5zv82jBHVFwek3kPf7xna/1ACmKQf?= =?us-ascii?Q?ks2yiqnoxYyonJG5qk1gsWnyhsBfjXFCka4Axrtnjv7K1ylD9aNvyZnFdkB2?= =?us-ascii?Q?aGgZP0hpNkVIJLUqAmLvGzUYBHVhMHcFfnxwVxIR7diDY0wUU2an6H25AY+O?= =?us-ascii?Q?fFa6IORD8d8soloM+MYib7ciJi2+ln8A7ij4BBxrj3TxBHwXm/xytsdARB6y?= =?us-ascii?Q?0ll/gj7cwCFGOj+HIUBo03PIPBfY1kQ/vLcbB/4kl+NEwOB8xN/Vuo+0lRb+?= =?us-ascii?Q?6bXzzWxCk0lmHHEmUxas9iRC2JcTT0xTgbXv8kMjlFKSq4/z+xitj2JQC8BX?= =?us-ascii?Q?zD9LcBfQgslYMRSLG9ad/EEOumCGWzOciBQ+t5/3ocAsuwDsdy7pzyllU3ev?= =?us-ascii?Q?ipPf2xLja412XOhk6mGZBVAxTVxR8BuRmgxUIIYdPpHx4rhjN6eLThobHBpP?= =?us-ascii?Q?b5cqrwTB4YY3wnGakXMDQCB/JCzuMs+dxHMUIfR+2qOyZpj1tPy4oC+XDgMM?= =?us-ascii?Q?KShIQNGN5t3vMQZqRrinSNCfbhSgm0Ju7sPH3gIbAqhwbGwcha9f48xO2IHv?= =?us-ascii?Q?ha6jHblPdNicjybBDv0cGCZjkwlhY/pKvmTRBnKxTyykCd6rZFteECrEABCz?= =?us-ascii?Q?wXghDS3o+2tdcp7YncUMnC4U?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR01MB7903.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(1800799015)(366007)(52116005)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Jg1TINbj36l2orD7NZsX21h5zpAxMxsrcDdvhAV4UgwKAINstyAzI0M1TV0R?= =?us-ascii?Q?W7oGjAcmezSAlC2NBFypAqIbJ0duR/hnG52ZitxWrfIokjcES4udOUlYSY0T?= =?us-ascii?Q?s0I+bF9i5HyT7FmJZEF1Aa2e1yOWo6iDHmTKMlS3CMtK+RuocNVN+8KvS7tK?= =?us-ascii?Q?r6fcgob+96VZ3hN5xqaohyVE//kB72tPhJ++wStdiuVJKaMdJVFcd2ItxwQj?= =?us-ascii?Q?e6p2Dx+uuVJz0FmEXn1PKNbnsJ4TOrHcyCOP9qzRcAIDf2dsguQXA7OtsE8j?= =?us-ascii?Q?9JeNj3ZaHMkDJmmLQYnaiBA04RrU2ZAVlqOg/Z9c0nLYaKVw17x1F37l6TFq?= =?us-ascii?Q?ASZf8WbG3jEKFAiQJ2L2Kx9Qv1InkVaLt9YLpAPUZCPxjVG0qOEXfxH6S9jP?= =?us-ascii?Q?DgdOyadNyrRouNHt1bWCLpq1tamH8tvZ1lvuhfza0ZMXfn/UIrF2j+OeFGMt?= =?us-ascii?Q?aKtgSkB2QvjE9pg3AsXljmxDYmEdIYVoyavdqXd/MACJfn2fBlP+prEhZm9s?= =?us-ascii?Q?a/p6UgRnGj8RQRUJMYho4iijGTJM9r/4OVqYaq9KC0dZX/lSbMAa4kfvUQD0?= =?us-ascii?Q?rPJkT4T/zSlrOg2FRqlgLYE+ZGz7GAxunOAGWLle/nHhTDYx46o9NIu1AVLr?= =?us-ascii?Q?8znWtjlScwSlVx85nXl8JCFT/1WT223rS3NfiMQHm4dk5mfl3VBfyh2TTvSS?= =?us-ascii?Q?7Scj3ftXdiypWIXO7ksJZVuqiM7z7olHJLpEOmzt8Gimdycwgd3q+kX3UIFR?= =?us-ascii?Q?+AEh6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puting.com X-MS-Exchange-CrossTenant-Network-Message-Id: 338fd137-cca5-4803-a178-08dc79da820e X-MS-Exchange-CrossTenant-AuthSource: SN7PR01MB7903.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2024 21:10:57.3398 (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: tDWp05Nz6VXaYlgBRQ1KS1QW0oL9uTVNKJyVeM3weY52W0WPnM9+6ou2BKzLbeLeokdV/gJPWpnO7ezAHD+NEG8+BopWciJQQuW3nqwWAE0l55g16Y0oL9EANfNmQxVd X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR01MB8627 Content-Type: text/plain; charset="utf-8" This commit adds EINJV2_GET_ERROR_TYPE as defined in the proposed specs(1)(2). Proposed ACPI spces for EINJv2: (1) https://bugzilla.tianocore.org/show_bug.cgi?id=3D4615 (2) https://bugzilla.tianocore.org/attachment.cgi?id=3D1446 This commit is not a direct merge, it will come from ACPICA project(3). (3) https://lore.kernel.org/acpica-devel/20240514184150.6285-2-zaidal@os.am= perecomputing.com/ Signed-off-by: Zaid Alali --- include/acpi/actbl1.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index b321d481b09a..35a90a92276e 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -1027,7 +1027,8 @@ enum acpi_einj_actions { ACPI_EINJ_GET_COMMAND_STATUS =3D 0x7, ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS =3D 0x8, ACPI_EINJ_GET_EXECUTE_TIMINGS =3D 0x9, - ACPI_EINJ_ACTION_RESERVED =3D 0xA, /* 0xA and greater are reserved */ + ACPI_EINJV2_GET_ERROR_TYPE =3D 0x11, + ACPI_EINJ_ACTION_RESERVED =3D 0x12, /* 0x12 and greater are reserved */ ACPI_EINJ_TRIGGER_ERROR =3D 0xFF /* Except for this value */ }; =20 --=20 2.34.1 From nobody Tue Nov 26 00:21:09 2024 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 DD28B14AD22; Tue, 21 May 2024 21:11:04 +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=1716325866; cv=fail; b=VqKTRRZSJTFZP2q9dqgQuXry1+Nqvuimpl/0QU3SHHW8mhpzcDqXjcn9aIaGSY9K+pWJ+cDHjekNykxqZ32G5L5mJRtp1V7F7udrqzIf+m2F+0Sb6qAlUaGe6jv0z5xpco6m7buZidA5USJy3fSCC0200yhM2vdVYvxi/mQleSo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716325866; c=relaxed/simple; bh=uq4IcG5HCUE6QdyCtbz4oaLKnF3G+5PpH4r1x4ry7mE=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=BFeDUp3ijmi9gzk2gfvTSrcIZmaF/JX0XGTSEASPlyUJ+Gu7viLN3cccpPKe0+DE2pScOK/OK5LksX/d5yfZz6JG/mekHWJwPo68JUtKlHmPSu+sbOPfgNZpFZxjRXOSyqY6ASoXZXqZwZyDeyBN6EJ2H+GAWNRpCe2Bk2zS4V4= 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=IC2O5HyL; 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="IC2O5HyL" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SV+2ey1qVQJg2+n74RL2+vxnAKtuvEohSLq8KtLx/gVbO+YyI+Dbu6HJ5xXl7uDOQ28ao1PfozehTzm/FNiEdAuFrJ7Eg6+K96rtq/TGE/+7cAhUBOMPOIcSN8Zy73LbHUj/JrE5ZYKN4nCp/3dbqBZvzHwBrHw229jiwi5ZfiYXeeNf3bvHgtVCEwhZrpzjBwa50rbH76Oq3lbobA4oOsz9ieVMbtvFdxlrDZlWt10GoUmrafdPj2+KprQuF8kZzDCy1wcG1FzYcDHzBTvDOB7FyaaAjrULtYOmF2E3cdi1zMt/JkZ/JnJrEU/UOlJXOsHarg6nYS4FJO7vaW9qWw== 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=cwjgzv4Ksp5Toqvjs3j2OOVbu3Qc9B3qpD9jb0eEpIg=; b=WVzGmeWkl+I0YrSEgP0Mye+zIXyD6lo19wkfdTbz8Ygz2kaASkCT02y/emHd2p3fa6ghPW0jGFAapkZOI38opSUmQ57BlJfFxN/QOO360yGkDM99AvaD4zNsssoqVQWT5WwM9SAzWeD83qaVgel8m4oJOiJfZqmbRIa//i/PZJ59CSOLrDB9zXE2pVG/uB1Cbs1zK9qNw4aF+XeMVvJzIKOVquTaD6LwbMjidzQHB0VjKwZl6cMSiXoT8vcnpsbpT9x78xGDnVK8tuY/xXa1pD3O9JOsFqWC3HJ2g/DxNSPNlN8REI3Lrjicda9iIUotItszdSpDyyPnUpBIw+RG2Q== 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=cwjgzv4Ksp5Toqvjs3j2OOVbu3Qc9B3qpD9jb0eEpIg=; b=IC2O5HyL/TUJdLl8W2OhpVSmgqDImni7pFWI40ZP2Zta3M4/WDuxh0BiarpzDXEdTxDFlYmocagEDw2KJw646qxYN9pd2sbEEU8CL8ibBnC4xKqvWqn6Wyr1N2IgA3ScsuaycgzqWyerqHMGsmfk4Fufi0rePp3qK9WGilxbshw= 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:10:58 +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:10:58 +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 3/8] ACPI: APEI: EINJ: Remove redundant calls to einj_get_available_error_type Date: Tue, 21 May 2024 14:10:31 -0700 Message-Id: <20240521211036.227674-4-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> Content-Transfer-Encoding: quoted-printable 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-kernel@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: 4ff43bb5-8961-4345-07f8-08dc79da82f5 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: =?us-ascii?Q?Tb+bNbfhamn2r7c3cCktcPhfvubbPGG83EwUrSAt5STzNV9zGzZAT6dNW8Yn?= =?us-ascii?Q?l4o3V2xRVd9nkOiL5M73gzcCeEn2h8kMAxc8j7aBL1TesqhD/DAqn3cq6ixt?= =?us-ascii?Q?rJexEdxXo3v+LexYn8ex2QB+WaFIs9gYWqprKbXKywdb3ZtVsjnQKjQWm0Wi?= =?us-ascii?Q?LC8kjQSQJmA1R4K4nD4zCSc/P/witW9ZuI/I9xi5Ml4AWBaFKViQOMgEELFq?= =?us-ascii?Q?wjb+JzGR4FCqcZQa+o/l53z1TqZgOqXRe1J0ry6tigj5n+Knxj49yVpUuwx7?= =?us-ascii?Q?rX49af2bombLkZwp1m2jfPxldNlSqmd7OHdkaZhznxdO3LsOY5qcuK6eTvdE?= =?us-ascii?Q?me1coXdx60eRFGH4RaqsNt2X24Y4R6680rTnl7zl1HxIeAih3exo/6c6iTEF?= =?us-ascii?Q?6R3I36WWAPtJW/OMaLZioM/rSffGmimykafE9ey55d7rR2n6x4Rbdz1HFl4k?= =?us-ascii?Q?3MxfWNEq5no/oAe6hSuDnm7H34q2VMBHAmRNapUBv+OKbMm/UjJHU4DyeSQA?= =?us-ascii?Q?ygb/GEcSB5XMYl+a9TmaQChdvwI+TuhSMxZi4n5aoiDfQksKx2ClA/PkuLxn?= =?us-ascii?Q?AfLCLiet+pVK6NYLY6fjGPqyNCKqpNhqtJRfZdlB+vicFW7KXW8CfuxCdJWx?= =?us-ascii?Q?gqhMH1WqYCxGVdlySbsips9jMXi1Pbw07PjBUaS7QncN67H5c8e5i5syLbAv?= =?us-ascii?Q?FENwgbxaLWEneTFob1J4Kbepw3r85TSC2MrPz11K5syBsfwvISBV/utojaDm?= =?us-ascii?Q?KD4NJM9AUopXuFhhZrgscbX7o7CZXyEf+Nw7+mUBWmEovBeAztkirOXVOd1+?= =?us-ascii?Q?49GVF106wq7pb3EJdRRH4W4hefkvfTh3hHPpZWrqpdd8F3cxxmoGGg7J6Xx6?= =?us-ascii?Q?PWHla/a2yBUKGdEKvCpjXIlTBYrYOvZPNzOmQT4D65Jv5bwK2tkPAZMlY1lH?= =?us-ascii?Q?MqiAaWoub531U0ri56DCuCrBkA01ckqRJLCgntENscTjHL/BXZVh3bRJRB7w?= =?us-ascii?Q?9XaMYwJb8F62jb2TG1ApcA3Ro6nMSUTrIEWsngg6HT2eaAX1U4WHdhUGaK3K?= =?us-ascii?Q?2+aFH3Aus3d1f5smDhTwnXvCYkqpG5gjzQMtkHgmPLNNXiAmzuVgtQI7gh6S?= =?us-ascii?Q?UZwMvEK/7yleARcU/fSB1NS3zQ3+as0EjMw7O0eWfGkSgV1DEscYNfMovdgd?= =?us-ascii?Q?zNUyOvWxf3e0gOFH6eLIBKrXxk0OhLSMlZP/nS1CvWLTBNDx+Hz3Lx45XcIA?= =?us-ascii?Q?7EfYHgVgA2VaTXh0bp/pcnkywTtQRDXpBheby+WWGfuBc7ZeUf6zaoPnftuk?= =?us-ascii?Q?lmVOG2F6s6lSMpraAh2kotTkIKg9WWlmQe29EhZtnJq1F71oQnXhzCqdCE9G?= =?us-ascii?Q?vEmd334=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR01MB7903.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(1800799015)(366007)(52116005)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Lg0+DXOT6eZb+ZZaYhkLirVZvAGnOqU0hEidEiGwbLN6RURejCbJO57rQHSE?= =?us-ascii?Q?paYa1g1mj+xh6JwpWBhPDxy2IVqAPpscEflcGu8vDXsWf5nbmMapKQG4cNT4?= =?us-ascii?Q?UB1sk6qLrOJPZPXLSZpyv9PmlQUSoBUPbV7z4x69GyIOyZSWeGYpQTftv/LR?= =?us-ascii?Q?nh8Iuc10ULseqr6MieQccchkXgdu/oCrIHuylKeddBR+stMajnM0w6znazEP?= =?us-ascii?Q?ynK+LkfAASdKftQH/K+cZ5nlYQ70fZfmfdtm9JHTKNJHYEuFTCqJNH8b3p/8?= =?us-ascii?Q?LL6sK6F8vjIsY2Uuh7ZRDpcW82FlouwNaPldjFsK1LDuVNimIFV5pd25ResP?= =?us-ascii?Q?+1DoSJ3ciyfVQbNWLvr40YyHG81nFuNPhWggDsK73I3j4+hFzRo6mZzbHex2?= =?us-ascii?Q?tX/HJdsaxhiiYr0lF80vyf1cLx2r+fWIUiIVhyUJz8o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kFH1GFge8XJX7GnaduflC/j5F4BtHt2GBZEvdPF7Jw9wU1i7zYWXkeSCMWHy?= =?us-ascii?Q?diU0PLYBsZCWpDufL0Kq6yj2FdFM/QS1rQTRXZO/oOOHFvmMrjYrEuBbkWcQ?= =?us-ascii?Q?aYuigVGjU6fcBAx19+MOm5n8NUCrx+FO2w+fgV4CfMYavjfSPEIaGI6oLmu9?= =?us-ascii?Q?FmwTY+rR5HlXlPQVPXHughKseQt8hXmNoYG7l3CqunXEbPLP7IUxCMEH+2TV?= =?us-ascii?Q?lmw7lWC4MtCPTxsNvbWln29IoQhNAdF8Rs6ucnAsAF63dXEqSe4dv3HuJEEH?= =?us-ascii?Q?hO/RRW3d2KDJf6zWTqq52Cw=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ff43bb5-8961-4345-07f8-08dc79da82f5 X-MS-Exchange-CrossTenant-AuthSource: SN7PR01MB7903.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2024 21:10:58.7904 (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: YF33iHZj/8X5TE4rKsI8AtO7vgsxJKaOv38aBd7MiVIXIEq9qeliMNqMF768eauM2WbPlTw5hvKOub4cJkky1zA83bGjumEYkBgHt6n0f36g6wA9WQZs3miLNrqclofC X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR01MB8627 Content-Type: text/plain; charset="utf-8" A single call to einj_get_available_error_type in init function is sufficient to save the return value in a global variable to be used later in various places in the code. This commit does not introduce any functional changes, but only removing unnecessary redundant function calls. Signed-off-by: Zaid Alali Acked-by: Tony Luck Reviewed-by: Jonathan Cameron --- drivers/acpi/apei/einj-core.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/acpi/apei/einj-core.c b/drivers/acpi/apei/einj-core.c index 9515bcfe5e97..b1bbbee9c664 100644 --- a/drivers/acpi/apei/einj-core.c +++ b/drivers/acpi/apei/einj-core.c @@ -83,6 +83,8 @@ static struct debugfs_blob_wrapper vendor_blob; static struct debugfs_blob_wrapper vendor_errors; static char vendor_dev[64]; =20 +static u32 available_error_type; + /* * Some BIOSes allow parameters to the SET_ERROR_TYPE entries in the * EINJ table through an unpublished extension. Use with caution as @@ -648,14 +650,9 @@ static struct { u32 mask; const char *str; } const ein= j_error_type_string[] =3D { =20 static int available_error_type_show(struct seq_file *m, void *v) { - int rc; - u32 error_type =3D 0; =20 - rc =3D einj_get_available_error_type(&error_type); - if (rc) - return rc; for (int pos =3D 0; pos < ARRAY_SIZE(einj_error_type_string); pos++) - if (error_type & einj_error_type_string[pos].mask) + if (available_error_type & einj_error_type_string[pos].mask) seq_printf(m, "0x%08x\t%s\n", einj_error_type_string[pos].mask, einj_error_type_string[pos].str); =20 @@ -678,8 +675,7 @@ bool einj_is_cxl_error_type(u64 type) =20 int einj_validate_error_type(u64 type) { - u32 tval, vendor, available_error_type =3D 0; - int rc; + u32 tval, vendor; =20 /* Only low 32 bits for error type are valid */ if (type & GENMASK_ULL(63, 32)) @@ -695,13 +691,9 @@ int einj_validate_error_type(u64 type) /* Only one error type can be specified */ if (tval & (tval - 1)) return -EINVAL; - if (!vendor) { - rc =3D einj_get_available_error_type(&available_error_type); - if (rc) - return rc; + if (!vendor) if (!(type & available_error_type)) return -EINVAL; - } =20 return 0; } @@ -777,6 +769,10 @@ static int __init einj_probe(struct platform_device *p= dev) goto err_put_table; } =20 + rc =3D einj_get_available_error_type(&available_error_type); + if (rc) + return rc; + rc =3D -ENOMEM; einj_debug_dir =3D debugfs_create_dir("einj", apei_get_debugfs_dir()); =20 --=20 2.34.1 From nobody Tue Nov 26 00:21:09 2024 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 F3B8E14B094; Tue, 21 May 2024 21:11:06 +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=1716325868; cv=fail; b=Hoa+mepW3koLrss4/Zv7Ay7uECiffZI/+iMin1GVXDWWeFCkvTMrMdcnNIe0rDhfiq5kHl3WyvWI9VMewvbPszi4GOSOazIoMU8TKhUzyMVTamhvD697MHNKSGGeVy5ZyAAUGcK2X3MKFKLbwn39u50/190v96YR0ebaxCtvWXA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716325868; c=relaxed/simple; bh=eH4bs5hw72vLV3DW4bCjbm8AOR17nolv6dF4AeNrD8s=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Basx9ALovmz9Ijg+udEVAEn8UsvI+KtCpXFUFdBGGwhKGcja24Kl3t899L7MF1oNGiRQCCBgOapPfNpnHv8KL8CqpSi4GUn+Ox1Z2yhHNLCsgHXlYwuCdGifhIGHSiJMILI/v6BnLW1o6y05hDH+F+kCagDwOP0vIDgMofRbRu8= 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=lsHaM4uP; 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="lsHaM4uP" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d4U21rnEnZXm+0HJdytW2BU3BW81ZHPC8NxKi9vaOCB7mWfQKR0myXkbtII8vmYlcyQ4LQuxBKsVvy1zUcxyN/CVeBrHGnxb5f4iEarO4puoEsgDDQW6mGg7LHGVAAzFNNYyCOzYXZhqHHyndeznvdsc/nzB5uLEQLcXT0Wg8NoYQauae08UqZt5SyzuZwN9Mkpu0ZJERCsSaHbWSUy+gdH/HuysW+8TMQk0fOzEbeJ2aUa14cD/UFiv13KWAM/L2U4E6bNnGqjDlVpJ2WJRGC68gvHClZbjN2BTz9lwjIhoQbOH85C0oNfGfyVXeGiFMFUXier4XBxsWz5SDrxNBg== 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=CWfHkAE1FxrGrsWlP6B8OPhEEiZWMDnw6UGyw8od9Hw=; b=fePhwJFOg90qtKyl2xLRW1rAvC8yj3xDqiGvnWSO0eyaMMMce+3t35n8Ss1ZoEc9bUNRdqRJAWJh80CvoxoxEEriJMLvgRGheTDO5yjntbnoa9zueu4E5r4kERiUXG5L/1upGPolRgNPIXdRewUIrLnXHHJpnlDrQ91qcMdtF9owmJYpXLj8uXmCAsGvnvsmNabzlXVJ3t9zB4ONkw6NFy+1RJvwQvO6Oe2hyAo1z7foEXmzstNO2Uf0qdaQcBBsHXSdBCQnwolXE0KFPEK0i4tkg0XLAXfOKHql0v4DdKh/8HgRzJgnFsQAt9XTwVJLWYpGg3WizGU8tQJi1DZAwg== 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=CWfHkAE1FxrGrsWlP6B8OPhEEiZWMDnw6UGyw8od9Hw=; b=lsHaM4uPxe0NA2VZsqrXWjrBOtLCbH4/7MjXino/s8qiVVtSlQydKq6q9/ZugQ0sZRUMddg0Qve2ygEMHHyjghbGDqVb9YP3wph0I8UR8ngqIEwC3+70TpVTtTsakkfnCDPSDdpAi/zHdlQPg6PVkZCy4hEaxtq71kqo8gaDkyw= 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:00 +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:00 +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 4/8] ACPI: APEI: EINJ: Enable the discovery of EINJv2 capabilities Date: Tue, 21 May 2024 14:10:32 -0700 Message-Id: <20240521211036.227674-5-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> Content-Transfer-Encoding: quoted-printable 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-kernel@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: 9e04e0dc-d303-40c1-7172-08dc79da83d9 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: =?us-ascii?Q?EZdhg9Unf5R17QsOiuYgCD4zd06Y7OAe0g+FOIemNRM6j+Fh0CS8e4kfGLuj?= =?us-ascii?Q?js/aDdNFN3U3M3si705Vk0RBu3WfI5V0mEJXxE9GziP5isB18yYeGutyMnYN?= =?us-ascii?Q?/xRuVxgARk6OKTtnUoX8WJPIFH/AlulVMPF/agDWIq1RbIhWt3jx77wgYVSP?= =?us-ascii?Q?If2KXxygyXFgQoQql765Ii8Wjgk7E9hB1L+9tJH08ETkH3tY8PaSqAXRJhvB?= =?us-ascii?Q?czbqfP2fRUjX9/swMqn5dcoJrKKPUr7EAEdOe0cPwpSxaI1li6Bv8vek7nlN?= =?us-ascii?Q?wmZCYeyYRx1hx399E5Gib1yREJX11EukGLlZYyF5gW8yeIceKTHkxL0hMU79?= =?us-ascii?Q?9ZL5ma4wiyE1Fgh86Fzk3ukr85nUsOD5Gn20vZvLOdO0hHRl/RCAbYNwaUUi?= =?us-ascii?Q?6tAY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UKXF?= =?us-ascii?Q?TR718LISta5tnHRHq65FpMVJeWDoIuW0ki36IBVpxUkSp7fXkgL6dA9bJWze?= =?us-ascii?Q?Hed1Vso=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR01MB7903.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(1800799015)(366007)(52116005)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?+z1uvhle1T6uEFuCV73ETYljzIC3KUmRFOfeFOpUH1ks0EufxgUMwnCmnkTB?= =?us-ascii?Q?v2zdPrTSqWMrzmcW8XTEvZQFmis6RbQ6kcwgR5aOBFUJsqut9wsyYZGT0p6e?= =?us-ascii?Q?8Q6ozNzaZ/4AItTY7pvnFkLJPCcoFx45ZFhoIIAjvJEgk8Ik1+zrWLagIA1C?= =?us-ascii?Q?+A47+NeYXG3GN3sEJOE3Y+jkR/AE2zCwtpm00Us7bteVajsjay9FVkWv+Hpi?= =?us-ascii?Q?bWbK4dKLwEBmeEFbeyUmZwiC8lU7jRYx8QnWL6Yk/BgbOq5tY9kEkUaibFVQ?= =?us-ascii?Q?6ndquBT3iI2RdTnEpW9XdQCLewfKi/ScwFdUGGR2mw/zXE3qHY2E5AeiO8iT?= =?us-ascii?Q?MoKW8zCcjC5PvXikFbPa7h8bij0Ry8Hdnn4t8Es+I5FDq76+dZPt9xzMCtRO?= =?us-ascii?Q?Onc5shiqFI2RQOjb5ZYpto2ne4HBTzOZJEtgND829EvcqVVvMZ5aH0gvK1ER?= =?us-ascii?Q?h7DFQIqf+jxKY8CzfBIPRZodwaYrcs/lCijP6Ms/wdM0EjfN7qdru0DS1lGu?= =?us-ascii?Q?ctdPTIXIKNkBK4/mPPMUBNPRu9U/GWStwqqEd4/LiEZGr68dhxv3/lssItsy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umQjbQK0WaIgBqZI0o9e?= =?us-ascii?Q?jVyMd8em42IAb8y5W40I4CY9UB7a67yJha345C9ahAlUpRdcpXAgmkpFAt8h?= =?us-ascii?Q?GOvQZuavL2oUs0z6yKyeL9yhbaWo0EQKppsNludOYIzkLnZkSVbU85l/jNhI?= =?us-ascii?Q?Cn726StDl+P++ynu950AhPU=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e04e0dc-d303-40c1-7172-08dc79da83d9 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:00.2615 (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: 0tnFjKtvhZiDavVCfsu95ScgQUSVWUrKJMj7ojMBKTf8WOM+CCcqM7jzV1eLZCJTKV9ok44HI6HvCMzLa9ptaJbusnNX7k0ATRNWVv7KKNfp2A3W5ABtibYPh7mAsi1G X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR01MB8627 Content-Type: text/plain; charset="utf-8" Enable the driver to show all supported error injections for EINJ and EINJv2 at the same time. EINJv2 capabilities can be discovered by checking the return value of get_error_type, where bit 30 set indicates EINJv2 support. Signed-off-by: Zaid Alali --- drivers/acpi/apei/apei-internal.h | 2 +- drivers/acpi/apei/einj-core.c | 35 ++++++++++++++++++++++++------- drivers/acpi/apei/einj-cxl.c | 2 +- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/drivers/acpi/apei/apei-internal.h b/drivers/acpi/apei/apei-int= ernal.h index cd2766c69d78..9a3dbaeed39a 100644 --- a/drivers/acpi/apei/apei-internal.h +++ b/drivers/acpi/apei/apei-internal.h @@ -131,7 +131,7 @@ static inline u32 cper_estatus_len(struct acpi_hest_gen= eric_status *estatus) =20 int apei_osc_setup(void); =20 -int einj_get_available_error_type(u32 *type); +int einj_get_available_error_type(u32 *type, int version); int einj_error_inject(u32 type, u32 flags, u64 param1, u64 param2, u64 par= am3, u64 param4); int einj_cxl_rch_error_inject(u32 type, u32 flags, u64 param1, u64 param2, diff --git a/drivers/acpi/apei/einj-core.c b/drivers/acpi/apei/einj-core.c index b1bbbee9c664..cc5ad1f45ea4 100644 --- a/drivers/acpi/apei/einj-core.c +++ b/drivers/acpi/apei/einj-core.c @@ -33,6 +33,7 @@ #define SLEEP_UNIT_MAX 5000 /* 5ms */ /* Firmware should respond within 1 seconds */ #define FIRMWARE_TIMEOUT (1 * USEC_PER_SEC) +#define ACPI65_EINJV2_SUPP BIT(30) #define ACPI5_VENDOR_BIT BIT(31) #define MEM_ERROR_MASK (ACPI_EINJ_MEMORY_CORRECTABLE | \ ACPI_EINJ_MEMORY_UNCORRECTABLE | \ @@ -84,6 +85,7 @@ static struct debugfs_blob_wrapper vendor_errors; static char vendor_dev[64]; =20 static u32 available_error_type; +static u32 available_error_type_v2; =20 /* * Some BIOSes allow parameters to the SET_ERROR_TYPE entries in the @@ -159,13 +161,13 @@ static void einj_exec_ctx_init(struct apei_exec_conte= xt *ctx) EINJ_TAB_ENTRY(einj_tab), einj_tab->entries); } =20 -static int __einj_get_available_error_type(u32 *type) +static int __einj_get_available_error_type(u32 *type, int version) { struct apei_exec_context ctx; int rc; =20 einj_exec_ctx_init(&ctx); - rc =3D apei_exec_run(&ctx, ACPI_EINJ_GET_ERROR_TYPE); + rc =3D apei_exec_run(&ctx, version); if (rc) return rc; *type =3D apei_exec_ctx_get_output(&ctx); @@ -174,12 +176,12 @@ static int __einj_get_available_error_type(u32 *type) } =20 /* Get error injection capabilities of the platform */ -int einj_get_available_error_type(u32 *type) +int einj_get_available_error_type(u32 *type, int version) { int rc; =20 mutex_lock(&einj_mutex); - rc =3D __einj_get_available_error_type(type); + rc =3D __einj_get_available_error_type(type, version); mutex_unlock(&einj_mutex); =20 return rc; @@ -647,15 +649,27 @@ static struct { u32 mask; const char *str; } const ei= nj_error_type_string[] =3D { { BIT(11), "Platform Uncorrectable fatal"}, { BIT(31), "Vendor Defined Error Types" }, }; +static struct { u32 mask; const char *str; } const einjv2_error_type_strin= g[] =3D { + { BIT(0), "EINJV2 Processor Error" }, + { BIT(1), "EINJV2 Memory Error" }, + { BIT(2), "EINJV2 PCI Express Error" }, +}; =20 static int available_error_type_show(struct seq_file *m, void *v) { =20 + seq_printf(m, "EINJ error types:\n"); for (int pos =3D 0; pos < ARRAY_SIZE(einj_error_type_string); pos++) if (available_error_type & einj_error_type_string[pos].mask) seq_printf(m, "0x%08x\t%s\n", einj_error_type_string[pos].mask, - einj_error_type_string[pos].str); - + einj_error_type_string[pos].str); + if (available_error_type & ACPI65_EINJV2_SUPP) { + seq_printf(m, "EINJv2 error types:\n"); + for (int pos =3D 0; pos < ARRAY_SIZE(einjv2_error_type_string); pos++) + if (available_error_type_v2 & einjv2_error_type_string[pos].mask) + seq_printf(m, "0x%08x\t%s\n", einjv2_error_type_string[pos].mask, + einjv2_error_type_string[pos].str); + } return 0; } =20 @@ -692,7 +706,7 @@ int einj_validate_error_type(u64 type) if (tval & (tval - 1)) return -EINVAL; if (!vendor) - if (!(type & available_error_type)) + if (!(type & (available_error_type | available_error_type_v2))) return -EINVAL; =20 return 0; @@ -769,9 +783,14 @@ static int __init einj_probe(struct platform_device *p= dev) goto err_put_table; } =20 - rc =3D einj_get_available_error_type(&available_error_type); + rc =3D einj_get_available_error_type(&available_error_type, ACPI_EINJ_GET= _ERROR_TYPE); if (rc) return rc; + if (available_error_type & ACPI65_EINJV2_SUPP) { + rc =3D einj_get_available_error_type(&available_error_type_v2, ACPI_EINJ= V2_GET_ERROR_TYPE); + if (rc) + return rc; + } =20 rc =3D -ENOMEM; einj_debug_dir =3D debugfs_create_dir("einj", apei_get_debugfs_dir()); diff --git a/drivers/acpi/apei/einj-cxl.c b/drivers/acpi/apei/einj-cxl.c index 8b8be0c90709..25adc9b03d18 100644 --- a/drivers/acpi/apei/einj-cxl.c +++ b/drivers/acpi/apei/einj-cxl.c @@ -30,7 +30,7 @@ int einj_cxl_available_error_type_show(struct seq_file *m= , void *v) int cxl_err, rc; u32 available_error_type =3D 0; =20 - rc =3D einj_get_available_error_type(&available_error_type); + rc =3D einj_get_available_error_type(&available_error_type, ACPI_EINJ_GET= _ERROR_TYPE); if (rc) return rc; =20 --=20 2.34.1 From nobody Tue Nov 26 00:21:09 2024 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> Content-Transfer-Encoding: quoted-printable 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-kernel@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: =?us-ascii?Q?Rk4IqrF+5N3sfSXqen/W11x0Ostg3zszO7hIumErOsRnE9tK6fRsi3rQIJwM?= =?us-ascii?Q?Jjrr+2FB2BL5u999SMncf8+05R/D1p2ZkBWYKeoW8SpskI7r6XaI9NQzmU+W?= =?us-ascii?Q?6Uq6tH22Hzie9SbS/qzWOme2Dijd7zlTWXB8PL1oYM2akB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Th1akzySy2M+xYVmI/27pl/kF0Iy6l1S43GZMR5ei6cPq?= =?us-ascii?Q?U2pdEFBQkkQJtRxXUffZzSUF613arh0AcbGCgUPcO3dUPhMrG25HMeyG/v+F?= =?us-ascii?Q?M0SoQhOgfT1JmhQJwnPzyyODMflUPXiadDmdNJzV7g3KKv18ERyuRv8+I3Gw?= =?us-ascii?Q?cNUNzZ7PCSrNZDCNMuzT/mLXDkYHRQc0z5noVC0UiIaLh5EUiZ5lfOurq6A4?= =?us-ascii?Q?Qj9VmakGMOiNrE4x/rF4Rku/I3EVo3SNV8OvtLGnvlrAYXw+IQPBCvrVD94d?= =?us-ascii?Q?QRQnhQPaW6SGXLf7FHnnGK3D6Lp4L+b+59J2d+rAtlsPOQ=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR01MB7903.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(1800799015)(366007)(52116005)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ao6Bc9doaY8M2HelZoDYNuZgkz0DtQzj7P+iXldLYbM1IRMf4JpRhLLITf29?= =?us-ascii?Q?E7fAhXxeLgdiI/YMplewrhAgoSFBhm0d+WBzRx4gYBRykjDbaayK75updFtO?= =?us-ascii?Q?nVVQqVflhfK8njmUWhxJoQU3/PL3dp6qTn/q7S9GphcIjOqOO0apFug8qCBO?= =?us-ascii?Q?WqznxDL5yfz31mXJCUpTlDGSA6KJF4FA5SuSghjCWqnjMC4vYcJVCmqf/85y?= =?us-ascii?Q?v/qB4ijVqCcNmB1SRffg5oDsXjYNBS4Xz+n/vhJM9kA7mHMSpM98Cs202FZE?= =?us-ascii?Q?6pSPmkVl7iAWpjbJKwjEHwc59FEC0qADeheN2FAZB6pfEkckrPkgVurB/7au?= =?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IjWPKGqDS0Pc/0+kd991swlfxP2Flvs+V1U1?= =?us-ascii?Q?CDw7p0OE85MQCY8ADKVEdyKmvcShfdKe+z5fIxYWplKGBN8bsC7cuDoTOoOK?= =?us-ascii?Q?hxnhnIT8PqX1iOL4Eq/Z4Yr662T1kqLo6R+x9vPa3FrP2YX7Gn7Yn9hBcvt1?= =?us-ascii?Q?pl/VGCOAD66Ca3t0wb90skMCs7oOzkBmsh3FcfLPC5qEsgwJwdjk+gnjZLys?= =?us-ascii?Q?ClfFB+A3V7L7UsVERj6cbYaSXXXthTTOo2mJgWxpjGwlp+G1g1iiPvVTtIR3?= =?us-ascii?Q?5rxdE9vaUHqxxL/xHkP56UmuzUrQvbTseWjUhXVU/nuiFr3kqeudcD65wBMM?= =?us-ascii?Q?AiHixg5v0wM283rrgV6+XjSa0L1ZZu+1GT93dJ/AiEZq/ubQdExo+zrQZ8mF?= =?us-ascii?Q?sHLrjhbOY5J8KPqa4LnhEe0=3D?= 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 Content-Type: text/plain; charset="utf-8" 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; =20 +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 =3D 1, --=20 2.34.1 From nobody Tue Nov 26 00:21:09 2024 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 06B8114C580; Tue, 21 May 2024 21:11:11 +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=1716325872; cv=fail; b=gY6kfy7wQQadOdoT2LM18TEpEOFutQpcWN4zQoUJfTltBb5jEJvp+s1PtFQkAQAGiQByfh+OSLR2sFV/6lfkQkGNbKL8xo/NZE43IWcA0N2VBDwG7JjIARk6+ruzYWL9vwgWv8RXtrrwYKMZUNH+qokUt10HBaCDY3TuoEhnG3g= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716325872; c=relaxed/simple; bh=pn/AwO2rweeEgIbHvSwXspfFwsfPelMopfV+CFHtqkc=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=F93kprxWHeOKp/Lj5TNOA2n6H7mnPzsRhjsc4SlvWrl7QkQFSO6YoELvfIPiBSr9fF1wZhjnf0ciYOAH2tcsjeTie1McXSuBeNu9WnLOhH9sAmsoRFJTgaB8Q2sH+iwyK7CyPOuutgjrzVe+bvvTLGQH/Pd/7x2/qc1v43ZHrHY= 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=pOiDHUwz; 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="pOiDHUwz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JhbrQwYrvzvVtxYTzMkD5IEEyKmDeJClRMKamRyklnMQriay7ajGjso5Oxp0QfosTCQFhzvlvpMpK6EfThI3sj23HmN0vfDCpQapXNUG+ZXg2/aQXNxow60PlnS3gkJRP6m0114tm+MQ7vhaQ4Enu0PjROK4B6mDtJuzYSbTFjn9YJyxpl+w8rk456rtaOj1LeHmaIhLXRQhaqVq3bWj3g1gtwamvl2AZuXoQDrMqoEzpmYVaITyiIp3HmkCa4Obix/VMr6WMjD3GV3v5gVOWTbWk53Rai3aTcf2Lq6wCcSoXK8B3pddUBTYxJUK5Ck3VuRAvuFoayq/et2b/wBsqw== 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=pDpk5WkSbUbdCTmSLfJRqaBqSuk1bwkxJM/n0gnz4wE=; b=LUZoR9UqEN69z6YRUvFOlil2G39tlJEuUnn+VWLES87rOGHWMCVxqF1xLE82WK6F+7nxU5LS9ZfZoLrOSW+gK+xV6/g4wpRWifRb4qhKfrToKkR4Ph66GZ09TKq2kxYKohIWnbAO+wOP/dmpgSyuydpMUy5i/1lQUzh2FEvklwk7RrnsdE5U7WfEzhkP692qJzsAKQl16x6MmsY0gsnjhFDoFfysiLe27dctJCb0MmejIOpnLvhH2ph3Q4VQTAxenOk1d2Ljr/VKuC+UUsBF5LttCHQZ/OixsemACAT0hv/K9nIoncc2+O4WYqI2MgtGSyhikJeZNE2bCpjtloJosw== 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=pDpk5WkSbUbdCTmSLfJRqaBqSuk1bwkxJM/n0gnz4wE=; b=pOiDHUwzKFjxcn2oJbFvA2YsI1eLLWtpHb0aqlJYml+kO+8UQ7mZ0eD5VMIf5OkFGQ82Y9gVEjMp2kzE2r0xZItqYwCEHTmSZ9wWgiunB0kMka80vjvIb5XW4YupCWqjWDvyuS10TaXp4gjdH09QIHNclnENDdHkPR5lM6SHHzg= 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:05 +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:05 +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 6/8] ACPI: APEI: EINJ: Add debugfs files for EINJv2 support Date: Tue, 21 May 2024 14:10:34 -0700 Message-Id: <20240521211036.227674-7-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> Content-Transfer-Encoding: quoted-printable 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-kernel@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: ec2c3762-cdc8-45e0-d6c8-08dc79da85a5 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: =?us-ascii?Q?dFwYLX3ae1ObLBNOZC3fRqNaALCfhMU8U9NfwLo+U1lz/xxATQ1S4S33i6Ho?= =?us-ascii?Q?QeUWYge2IRl7lONJwPrxCg8unwFkJQ7+YJmKKd6cZajAqiP1pLaxb8Ong3Yq?= =?us-ascii?Q?NYFjsWh0C8KlZY7dGeObQdYleM7p71+feVMQrUprJO35UjglfK8GLeWRSz4h?= =?us-ascii?Q?8UWZjnqs9WWu6QDg3ljoHF7L9iHXJHdMDmGPW3jMuX+DYsKsnIYROoJoszn7?= =?us-ascii?Q?RD1OkTohx9ly0H/nYapiRqtCf+iNr7gxr93AxUgsNVfuKX/MRfXd8ByIGaax?= =?us-ascii?Q?tg1mG1QGs4UThY867q2ag3juofv/17+vBmpwprCbodjNkjucslTp9+xKlHSu?= =?us-ascii?Q?y5Qr5Id0w8l56ntBC0timuXdjbiYLdKpupx5GmGzN3a7EQnjezGEnXGPLL7P?= =?us-ascii?Q?UcnhHJK1XQtsxJ6Coo/0tbmpckOMT0Ua4JF15d21aoDuGPVUbTtbctVTiQSE?= =?us-ascii?Q?9JCLuM/C5lChb6UYvzNkw5/a8ltMmmgWPWUue7hYTo9qqif9043ahxejNgSE?= =?us-ascii?Q?eT32u3OIYAdf76oTbGiuRoiN6A1wUWWmVSVXYOl3X1Sf1uAY0mwXpFC0THoc?= =?us-ascii?Q?LsdfWzQSnynnqUBHzJmzUnjiacnYVxhq9SkmYwuDt8yeioA5sQO4YzsD4JTS?= =?us-ascii?Q?GC4ueh9eKxHU7ZfgFerRHuDxD0X8m7gFenSsHq5L+OX3fCkHFdtQG95l+gg8?= =?us-ascii?Q?wDRIEHjdGVaFOaIMSDIKi4r8urGw9UC4jGuAUtuP2T3mA8+LT84N9odqgPAO?= =?us-ascii?Q?mAgR4RFzwv0EdODUqSpynL0ERQRcddM+RQxK7ETtk/av07T2cpnQ4aBALK3u?= =?us-ascii?Q?RHCBILirbbF2wSU6hUeV+QzFnhmfRvqhNvBdr/gram4dHdhk/M+LK9ZIe8KF?= =?us-ascii?Q?T3nhfMK30/heWY74qlAmYXONy9lLtzcgjl1lqJEhfV5/+dm6AQTNR/LM1QFJ?= =?us-ascii?Q?+4zCVq9jbm059e8WJ2oYkvVQFiGsxe5AxMfNSj9yJtBCD89S4FtSre0lV01P?= =?us-ascii?Q?/AJS1eV6uyeXKNKB9Wiu1S0BKphFAksqsvSA1nBAgVVWn3aBRXrjwi5KlqCr?= =?us-ascii?Q?c6+eltB3fJ13GF+wvgl/Hke5bJ83AN34w07zsMF5K705xSARcIO87NCcpTdO?= =?us-ascii?Q?b1dtm6sS+6fXrjGcRLAJ2oqXeNDPf8lbrgLp1tD/Re9D6AlJpHmUXLsMQb0Y?= =?us-ascii?Q?VHu+pWY9zK8S1plRZVSlXsrcYTSUoRmo+asTMU196XGsNOlAasADQqmbnK7f?= =?us-ascii?Q?n5ctU5tEMjZdOsHsFxBzWSkXVccoCeoGu+lJhhx+hQGKXyc5eB1qOarmmyyb?= =?us-ascii?Q?EHnXKAK4syFlbPJkRJ3yM1X4TAz4ZFm9NwFxUMjqRsYKbF2WM4Lzh3BJGB/c?= =?us-ascii?Q?M5x/uzs=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR01MB7903.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(1800799015)(366007)(52116005)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?9sIw4V3phj5KbWMVmxAP2Qq53m0wMg1IMh41MHOeGE5Dk8YB6kMICGCQi5Er?= =?us-ascii?Q?93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X9bmpCbwWl?= =?us-ascii?Q?/6yrA/tuWsP1XBuwn1rfiCfF5lD7s0QZFqhCZf2NwhWZYiDNXyfT/mNaFDUL?= =?us-ascii?Q?dYeuajy4llmpqcrOGfkP8mLBjo5GylsrRrr1NtjVIz21U+j0vDTY3RKls5tA?= =?us-ascii?Q?WXeTVyzomS1d0/gCwYpB+iETnfWFTi/8lf2QtswHEGPs+OoKfdDWfZqhl8+S?= =?us-ascii?Q?nehJIfWoMa3CBP7wwcPhGzX0A09DT+efJAe4YsPv/ny6dQtRTkWKMbrLFfdw?= =?us-ascii?Q?PPFrVK1WSEwkHRqdBng9M+b+BTZugUoVr8bL+UCTnFMWZufGZWQj47eMjYBv?= =?us-ascii?Q?vxbeNiKTdJYZJoRZow2+lm6c/UZyLp/1b1Dhj9qmaglDyRlSrSo9WnUYwlov?= =?us-ascii?Q?IHYy1+TiKhGSiy3hfFgmz16gNjzmZoGAtdegcG/f7rpv0UhVJCUVtMBu1fF3?= =?us-ascii?Q?JvbuPgTiqM8Ns4PsEk5k90JkQPaJeWPqS7p30ylU8YFtc4czXLqEJO6ZuU3o?= =?us-ascii?Q?FKHyYYz2ApaVbsQOEttH6HufwpnOHvQ4VJ0nCcIG+ZwlnlRxch8ZHKjafoSN?= =?us-ascii?Q?XaOFV6G7smpt4iOHjlIElD551INYoYimUaogPVifqIXTbEpUBPit1CHUFtOm?= =?us-ascii?Q?hNlhnoKVOgrUWSVjhwvIQoC5YfqkIZzKtY+o7mjUxhaNSdXCw1mEs1380fGY?= =?us-ascii?Q?p02TVla6MjVjFwuSTKwqmtk=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: ec2c3762-cdc8-45e0-d6c8-08dc79da85a5 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:03.3382 (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: l0AlrPHx7DHrJf6ne4DWeN2hk/6Ui1bnvvn+Vt/JbSeqE9c/zPJCz2xpR14dpiOJEdG0XlRI3ZeEUFqNxiPJg/3u8xt1MPN7ZKhiZXF8sC0m+ctD9J9hXaUI/vwzIVDB X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR01MB8627 Content-Type: text/plain; charset="utf-8" Create a debugfs blob file to be used for reading the user input for the component array. EINJv2 enables users to inject errors to multiple components/devices at the same time using component array. Signed-off-by: Zaid Alali --- drivers/acpi/apei/einj-core.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/acpi/apei/einj-core.c b/drivers/acpi/apei/einj-core.c index 2021bea02996..2e30ebed079b 100644 --- a/drivers/acpi/apei/einj-core.c +++ b/drivers/acpi/apei/einj-core.c @@ -33,6 +33,7 @@ #define SLEEP_UNIT_MAX 5000 /* 5ms */ /* Firmware should respond within 1 seconds */ #define FIRMWARE_TIMEOUT (1 * USEC_PER_SEC) +#define COMP_ARR_SIZE 1024 #define ACPI65_EINJV2_SUPP BIT(30) #define ACPI5_VENDOR_BIT BIT(31) #define MEM_ERROR_MASK (ACPI_EINJ_MEMORY_CORRECTABLE | \ @@ -107,6 +108,9 @@ static struct debugfs_blob_wrapper vendor_blob; static struct debugfs_blob_wrapper vendor_errors; static char vendor_dev[64]; =20 +static struct debugfs_blob_wrapper einjv2_component_arr; +static u64 component_count; +static void *user_input; static u32 available_error_type; static u32 available_error_type_v2; =20 @@ -859,6 +863,19 @@ static int __init einj_probe(struct platform_device *p= dev) &error_param4); debugfs_create_x32("notrigger", S_IRUSR | S_IWUSR, einj_debug_dir, ¬rigger); + if (available_error_type & ACPI65_EINJV2_SUPP) { + debugfs_create_x64("einjv2_component_count", S_IRUSR | S_IWUSR, + einj_debug_dir, &component_count); + user_input =3D kzalloc(COMP_ARR_SIZE, GFP_KERNEL); + if (!user_input) { + rc =3D -ENOMEM; + goto err_release; + } + einjv2_component_arr.data =3D user_input; + einjv2_component_arr.size =3D COMP_ARR_SIZE; + debugfs_create_blob("einjv2_component_array", S_IRUSR | S_IWUSR, + einj_debug_dir, &einjv2_component_arr); + } } =20 if (vendor_dev[0]) { @@ -908,6 +925,7 @@ static void __exit einj_remove(struct platform_device *= pdev) apei_resources_fini(&einj_resources); debugfs_remove_recursive(einj_debug_dir); acpi_put_table((struct acpi_table_header *)einj_tab); + kfree(user_input); } =20 static struct platform_device *einj_dev; --=20 2.34.1 From nobody Tue Nov 26 00:21:09 2024 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 F2C1C14D707; Tue, 21 May 2024 21:11:12 +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=1716325874; cv=fail; b=fstbFM27cj2tgHe++60ADoZJK2vpH3aSw+NrEqXg/SEchtreDwxpn5P+PvvkEQOykVHt5RbTCP+HIhYMEECiFJWartmwaLssjFQjxgUl3kMlr0LS6P3aQcLXXTMIPP8zjY9VLYVLqaIHzmHRe3aPrCb5nLCAB2Jh4+7RIwGsSWI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716325874; c=relaxed/simple; bh=X90Dls9d/qSnBn6kxi3Pa4EPRPQv7KQu8SBBUU1H8v8=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ScaqxfP96K041tgJaKs9c7pMSUYKaUkhi2J4kPAQlwUtI1GwwTTT+EJR81Im2uLXvSuDStj5/t1juS/VVDdCmBvRLcC1dPkbZ1qrCUanzMXeoVU6WaQWJqBOT36vEUFHlYW85re1EjoFSz0kXOIjCzaJ75mYsUc/e+b0A552xFw= 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=h9Zd1dG2; 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="h9Zd1dG2" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BP+BfhyyNGpshb5z33HMBUIaoEG4I7Tp2G7bJDmODkzGGo62/O3Wq4Wz1ImhXg4B7XgdP1V6hgv0Ysy8418dhvW7pU6S2W2jOinsqviqPmoEJBCHo/iEXAfYD1VParDqNe9SUaM8oUtBOdJji+08fMuWVdCxk/8EJk3BK37IXDkC0TgpFYoC/Z5xIkBYjDxqsG1UnlUHtM1inFQ+q9mZej8LTZxosweyFWU8bJcy/Un4SdK4fg3OcOVEIuez8ZayR76Xp8wAYAfSY9RB40sCn95bVz8TMk7D+5q49KlPtaWy4IOlVnzgf32cAfXXYBluo0wqK0o/kSmKYqy1rvvQdw== 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=8SPdbPUe9w64Es2ez5yiZmgOAj6YhjODK0L+oylcb6U=; b=CotOUbfceUJCCeELZnBqY6Ky8jdJL6PXR4Fyeq56JxxXs0VMT0g/J+TAEqpjNmGkm24VV5cL7Di09zmlnu+tbOjFCXjX64yi2c/lFzpArS7z6B/krzQSE2BAOP4B3IAJ3bYwNlZ4RWpK8b0PJvd4WdkhZtqwtn22yGN04OqFJ0ZwwyCl0SJPBktJKQ/0jAIULMEFgJ807u2g0D5HlNtXs0JpPNKtDgc1DFRBLq/BST277hIk8ObP2OrazLkraGj1EJGNIgRrF3ionYsQT5p3RPPVrovv9TBshqv1Tahunyax46k7Jef5QKe8yAcp83Xb3PMe4peSm5cYLK+2j+6Xvw== 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=8SPdbPUe9w64Es2ez5yiZmgOAj6YhjODK0L+oylcb6U=; b=h9Zd1dG2oGESzYvLIKFIswyRBR2eDKT1ami3c0J+FYqk/cbiwbqzb36y4E4AZRKyBM3+kTtxkjG7LwGyexzhTSAIRkkRC6EE35z2A65W48bccyoC8Ojgf6R4smWkJvNtvObyzmBkaCwlOq1ENCYATmYRPLqE1PVLAYTxc250NCQ= 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:05 +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:05 +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 7/8] ACPI: APEI: EINJ: Enable EINJv2 error injections Date: Tue, 21 May 2024 14:10:35 -0700 Message-Id: <20240521211036.227674-8-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> Content-Transfer-Encoding: quoted-printable 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-kernel@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: f66b2658-166f-48ce-7e86-08dc79da868c 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: =?us-ascii?Q?jT59qP/57p4KcK88dcs8MuWkRFcMcvkZiX8DBfB+rUkYOjFfc9INcp85Dd5/?= =?us-ascii?Q?isA3hKPyd74hjgYr5V/WYoWM4rx0yQF79sWjfaCImx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T9ctTWhHtkXZEMlYuUnCSanhVJqw+8fg3vFSr97koUqrMt5lsSZam3ctn?= =?us-ascii?Q?NB41KKDtzcQvsd1OYzYIevknuy1VL7yQTtdgA1jDNV8gsBmPS4MGtrj9Bzgm?= =?us-ascii?Q?xD7S0eLtI7hkDQs2TNB+GvBZLJCvNL/57lzxb73KvMLYo70Hvz86BmG56UhY?= =?us-ascii?Q?+jtciiMBMtti8N+ajpkB6ufwjfkKerdSsCw1OVy3JRdZ32icf4vQ7ISz6Edb?= =?us-ascii?Q?mCx2zeTQfbFYlgiYKsmF6FcPfcJgpJWO36wca+Xrg4Mm9xXXWQaBZ5/BxQul?= =?us-ascii?Q?NIhcQDD35ZvB0tJiSIUx5Pea3qHb8uXH8cMLk/oevPZSb44rn32N2YnROD5W?= =?us-ascii?Q?thtTsMag91L7a1CRMjiKL0MtJdoptgOUdC7ZVPawo8Py71O4xoebLbddb+h5?= =?us-ascii?Q?2b9jie0=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR01MB7903.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(1800799015)(366007)(52116005)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?fxqUZgS3VcDgUyYvswWqFMJfRJrDusR9+LS7bk7LF03RhjAgeNDGm4KUj/EE?= =?us-ascii?Q?RTWaXLgoMMsoEjJG35KfQPV8A5DNSoNMpunP/9WzDYIRs8aAsG5TbqACaPZG?= =?us-ascii?Q?8Mz7z0yvfrl4g/uiTJ5b4tupzWEKfQPfXNueofqbnmDv1Yx0WiCiuU3PE+zi?= =?us-ascii?Q?RUKndh4MJR4sTzbOYDeetxZeZbxBEVwK6bpBm8CeTzORrOLrwGchROzHaVjK?= =?us-ascii?Q?xv0/8NkImmegrc+Dzv6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kco?= =?us-ascii?Q?A/jZvVLyHxFTidBD7i0nNWWOBntaX01ol1uFyVAG6KuB+WV/QWeGi1x8ZqdK?= =?us-ascii?Q?EZZruV9rqRAjChHTyJHhibPLTQKZITQAvYu/89w4FlY72IckyZGQKWI9krGR?= =?us-ascii?Q?Zxu8kTTvDM1W1Oi9gRC1dj+apLbbzolHVmnEyENLjBIuT8QA0JnoOcCiyDvg?= =?us-ascii?Q?5e/wWau3mf+1OcAUbFXZh6VeHQl2qOe8Ka6oglh57YSHmwNU4qVGmBYyfDmM?= =?us-ascii?Q?SaTaBJf61hryahMQNl9XgujMsBXZ0qa9NcVW4hNb02MhYVl8VEfYYJOm8JyN?= =?us-ascii?Q?Sc3Cr7o4udlm+4mkSZ/AJwuhU+TNXYKMmF1R2YsxogaBGYyG9AhzCKR06gg6?= =?us-ascii?Q?PlwCXdJ4j6HmhDiUtuJ4iEwAQ5fBz8A1VBbLxbKQMOCsMaAMFGOVuXZ5S/u6?= =?us-ascii?Q?sV6UvWIEabYnmx7F50oIZxgKAuhHxP/GOCEQI7JyhN4bsG7FfwZ6RIGaX571?= =?us-ascii?Q?IrLJQjT28epzFeFj4AAisBI=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: f66b2658-166f-48ce-7e86-08dc79da868c 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:04.8198 (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: htvPcXSRZX+icyLlzfE5o1BE0z4B/f7s6kLrsyjxZZQiyHzi0056yCRGCkXFJlJxpnltpuq4NKps0N++p6FvEEW3Htqn6fDGnnVj6lVA0zThwsyLOYaH0mnGFHJAGgxj X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR01MB8627 Content-Type: text/plain; charset="utf-8" Enable the driver to inject EINJv2 type errors. The component array values are parsed from user_input and expected to contain hex values for component id and syndrome separated by space, and multiple components are separated by new line as follows: component_id1 component_syndrome1 component_id2 component_syndrome2 : component_id(n) component_syndrome(n) for example: $comp_arr=3D"0x1 0x2 >0x1 0x4 >0x2 0x4" $cd /sys/kernel/debug/apei/einj/ $echo "$comp_arr" > einjv2_component_array Signed-off-by: Zaid Alali --- drivers/acpi/apei/einj-core.c | 81 ++++++++++++++++++++++++++++++++--- 1 file changed, 75 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/apei/einj-core.c b/drivers/acpi/apei/einj-core.c index 2e30ebed079b..2e5c00b34a4b 100644 --- a/drivers/acpi/apei/einj-core.c +++ b/drivers/acpi/apei/einj-core.c @@ -87,6 +87,13 @@ enum { SETWA_FLAGS_APICID =3D 1, SETWA_FLAGS_MEM =3D 2, SETWA_FLAGS_PCIE_SBDF =3D 4, + SETWA_FLAGS_EINJV2 =3D 8, +}; + +enum { + EINJV2_PROCESSOR_ERROR =3D 0x1, + EINJV2_MEMORY_ERROR =3D 0x2, + EINJV2_PCIE_ERROR =3D 0x4, }; =20 /* @@ -111,6 +118,7 @@ static char vendor_dev[64]; static struct debugfs_blob_wrapper einjv2_component_arr; static u64 component_count; static void *user_input; +static int nr_components; static u32 available_error_type; static u32 available_error_type_v2; =20 @@ -287,8 +295,18 @@ static void *einj_get_parameter_address(void) =20 v5param =3D acpi_os_map_iomem(pa_v5, sizeof(*v5param)); if (v5param) { + int offset, len; + acpi5 =3D 1; check_vendor_extension(pa_v5, v5param); + if (available_error_type & ACPI65_EINJV2_SUPP) { + len =3D v5param->einjv2_struct.length; + offset =3D offsetof(struct einjv2_extension_struct, component_arr); + nr_components =3D (len - offset) / 32; + acpi_os_unmap_iomem(v5param, sizeof(*v5param)); + v5param =3D acpi_os_map_iomem(pa_v5, sizeof(*v5param) + ( + (nr_components) * sizeof(struct syndrome_array))); + } return v5param; } } @@ -494,10 +512,52 @@ static int __einj_error_inject(u32 type, u32 flags, u= 64 param1, u64 param2, v5param->flags =3D vendor_flags; } else if (flags) { v5param->flags =3D flags; - v5param->memory_address =3D param1; - v5param->memory_address_range =3D param2; - v5param->apicid =3D param3; - v5param->pcie_sbdf =3D param4; + if (flags & SETWA_FLAGS_MEM) { + v5param->memory_address =3D param1; + v5param->memory_address_range =3D param2; + } + if (flags & SETWA_FLAGS_EINJV2) { + int count =3D 0, bytes_read, pos =3D 0; + unsigned int comp, synd; + struct syndrome_array *component_arr; + + if (component_count > nr_components) + goto err_out; + + v5param->einjv2_struct.component_arr_count =3D component_count; + component_arr =3D v5param->einjv2_struct.component_arr; + + while (sscanf(user_input+pos, "%x %x\n%n", &comp, &synd, + &bytes_read) =3D=3D 2) { + count++; + pos +=3D bytes_read; + if (count > component_count) + goto err_out; + + switch (type) { + case EINJV2_PROCESSOR_ERROR: + component_arr[count-1].comp_id.acpi_id =3D comp; + component_arr[count-1].comp_synd.proc_synd =3D synd; + break; + case EINJV2_MEMORY_ERROR: + component_arr[count-1].comp_id.device_id =3D comp; + component_arr[count-1].comp_synd.mem_synd =3D synd; + break; + case EINJV2_PCIE_ERROR: + component_arr[count-1].comp_id.pcie_sbdf =3D comp; + component_arr[count-1].comp_synd.pcie_synd =3D synd; + break; + } + } + if (count !=3D component_count) + goto err_out; + + /* clear buffer after user input for next injection */ + memset(user_input, 0, COMP_ARR_SIZE); + } else { + v5param->apicid =3D param3; + v5param->pcie_sbdf =3D param4; + } } else { switch (type) { case ACPI_EINJ_PROCESSOR_CORRECTABLE: @@ -570,6 +630,9 @@ static int __einj_error_inject(u32 type, u32 flags, u64= param1, u64 param2, rc =3D apei_exec_run_optional(&ctx, ACPI_EINJ_END_OPERATION); =20 return rc; +err_out: + memset(user_input, 0, COMP_ARR_SIZE); + return -EINVAL; } =20 /* Inject the specified hardware error */ @@ -581,9 +644,14 @@ int einj_error_inject(u32 type, u32 flags, u64 param1,= u64 param2, u64 param3, =20 /* If user manually set "flags", make sure it is legal */ if (flags && (flags & - ~(SETWA_FLAGS_APICID|SETWA_FLAGS_MEM|SETWA_FLAGS_PCIE_SBDF))) + ~(SETWA_FLAGS_APICID|SETWA_FLAGS_MEM|SETWA_FLAGS_PCIE_SBDF|SETWA_FLAGS_E= INJV2))) return -EINVAL; =20 + /*check if type is a valid EINJv2 error type*/ + if (flags & SETWA_FLAGS_EINJV2) { + if (!(type & available_error_type_v2)) + return -EINVAL; + } /* * We need extra sanity checks for memory errors. * Other types leap directly to injection. @@ -915,7 +983,8 @@ static void __exit einj_remove(struct platform_device *= pdev) sizeof(struct set_error_type_with_address) : sizeof(struct einj_parameter); =20 - acpi_os_unmap_iomem(einj_param, size); + acpi_os_unmap_iomem(einj_param, + size + (nr_components * sizeof(struct syndrome_array))); if (vendor_errors.size) acpi_os_unmap_memory(vendor_errors.data, vendor_errors.size); } --=20 2.34.1 From nobody Tue Nov 26 00:21:09 2024 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 0A3CB14EC4F; Tue, 21 May 2024 21:11:15 +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=1716325876; cv=fail; b=s6TzLFK0sx0gO1XVuehVtfkih8x85DmgMq+wwBlz2Eu5WJS2qulFDbK6EmosYxbsIltbmz+yBHTqU4Mz8GMsFeuE5MirI78S8soFK8k+uP53pC49R0P+D+e8FMvjlQLyZ2kf1btYz5AC8JI7wYd2lkTH1GjaGlGuYFob45ElD3s= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716325876; c=relaxed/simple; bh=+Y0C+jXMR3zm/uBeSgrAXMu/Af8xuurmZK3k6rENf40=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=UZqy6QF/kqLjXKqUxtsOaL/w3cZazlA1jhtkbvjstQQGwPNO3Dk8NwppIewNIuBfzUnRaNIB/drY7BU2O/8uvA44GmEYvgUZ8xA6bjQLTOp0eqmNOv9HBKaIh1YUJKJPTgv2S0GdCUO96i5z0CydY9Veaa1PH7EI6v0SDcizqSM= 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=MWhx7ZI8; 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="MWhx7ZI8" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eS95xuh4+q27Zm3qEfRzfPRIeYZRNrEmFd1sZWPfB+Xj6U7JN+HVRQk1g7qwx7s+PWHUD+0t01sG7yazWdw9c7wfaxB933YhUWL4XUNgW5r9WL62og+JlkGqJNh8CD6HWPqBCNGtXUM6BXGFn3p72wfQA+0x8Z1WkZvguUkHOA1RhiGMsR1ukMrkH0f7oNbpS4PaU+3Eh+4lpEBDsPy27LvviQOd7XsgNDmVRxPt+ghcNpFfHvxlIy+zWckVIk5B7UTYSbGo5D3w6iFEasV+4XoLK4R8CPcKgIf/j48wmtcDjndrjLm9np1jmiJvtSocVP3kd4Vc74vxhMdSG+C/IQ== 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=Ba4/majp9gwCEXlY6qSxsX2dXjHxs+2H+BqN/OQDXgE=; b=b/gtwHUKaUI4Zak9eUMlxtJ06Az1rbJPM+GPEyl0o1Pm0cgtlt7aXyHWWiwCrAdPobFaVV2U54FBVg4oEqeUWIYknc3/wljUGMfJ0zS1k4FW99B7iK4xB5CZZHMsg9/xuSH1KDxZx0KeSzfBweYlADqIvI4HMYUbZql24TPrHjQWJXJFTBq0HXvCoDQAg5RdAZCNOSD+We1eWPWLADnchiJG1bcGSg2ZYjjlMm41IiADTgaVOu8oU4IU2YaURXd4vKhPIYPBBdSGjKMwa/HH35SPcMrng8163BMJqK6VqqClBqFk3sXKAcySFulHMwBuagajDi2Tn/7IwQCNu4m9TQ== 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=Ba4/majp9gwCEXlY6qSxsX2dXjHxs+2H+BqN/OQDXgE=; b=MWhx7ZI8k1gevJyV0LBr8jQBlWvTjlaeucS03Ywrpjh4Fr2/DwDt+F/kZU6s+fqRuZLwBFrfmhTLPtkXVUucOX4xRXUeCzmvV03y3ZNFLdpRLN+wdQB9qI4us4Zev2Cs87BbZx5JUWEJRAfaMJpDmFj738TbIx2xhnivPXfX2zM= 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:07 +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:07 +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 8/8] ACPI: APEI: EINJ: Update the documentation for EINJv2 support Date: Tue, 21 May 2024 14:10:36 -0700 Message-Id: <20240521211036.227674-9-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> Content-Transfer-Encoding: quoted-printable 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-kernel@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: 2f5d6aa9-0922-4d14-3e0f-08dc79da8771 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: =?us-ascii?Q?Az1aAadhbHh7Om7+mzRQN3eDbu2rQq9tSwsCR8Rqd401TzRdIhr3re4yEqaf?= =?us-ascii?Q?vGcsUbfCCkBRDn3XbtCe0TaEeUxTnm4ew9Sej1SKKwLjL3BmvwKtQWNEJBZt?= =?us-ascii?Q?kk+0ikP8TG6t47xQ5VYZDcdQp1eBDzz37P3CCYciQgMo18F9rYcFGAmcRYp+?= =?us-ascii?Q?Cwt70Azd9pEyCUQBxcveiySzcgvED872x0FFj3SoDfRDUwcZVpq7A6STyF18?= =?us-ascii?Q?+YgyVfrRS8vcbszWm3eo1NSaJ0693QfhdS6+S4UwNjNmcVpMbNORufD7Ex0J?= =?us-ascii?Q?gjYICVnfkt6YNO7sab0h+XHWqLiI4+IHSb6HD6swpw/MlaJzi6ARi2qM6uMu?= =?us-ascii?Q?kV9ZVxcVQsenxoRvDUmmRFFQQYOLX6uzz9TvpTjsoJs1CAcpUnqkP/gOZflx?= =?us-ascii?Q?VSRERJdUlmDSj2GZy8fZafXvu7fX8UTspyx29BbcHfS1CPUKbEcW/9OCmjBN?= =?us-ascii?Q?pMwy5m4Je4Rw71fFXLZYArG1OMliPEDkWIj/4QI8O3i/4b1jaHJfPX+06jlC?= =?us-ascii?Q?NEsacbcceEBIrwZbkU7zhfofzTW97uCxhOhFi3viCczVU8HxNbYBW3LhfZZ8?= =?us-ascii?Q?rDiMjPXczWKWs1Sg+QnO+i7fjemHkHaHEoQ00ztW6QmRFH4DUInrYHFrZeiW?= =?us-ascii?Q?2omzRPTWKgWRCCkEPAuhC0U8t3e4nzqi7NDtr3hMUHC2/8fskrVrbx47nKtJ?= =?us-ascii?Q?KmXM6rIsKRVGeLMY20lFE7tosfl9Z4TgzArN7QQnlINGKN1TIoewJIsh2joB?= =?us-ascii?Q?XFx2hBQbD1qs3LhFAidpHnsXaiffh7RcgKA/oFXXjoPpK44whDFTfYfmQbT9?= =?us-ascii?Q?MlOZybaCstRAmisd5rJyPDd5mBkMWsOFcrwxBfPRFQCZ6ODgaj/fAd/P3sjF?= =?us-ascii?Q?pg5XewWdHaCS42q7Qyl14YKe6n9e23sdDEDNtR+flIl4V+ixe8VqJtpTtLYu?= =?us-ascii?Q?15zGaX9hTyNHrrKw8uU+45YSYyGwwilnlSQtRAfpHEFjs/1Rz+nlErLLqMg0?= =?us-ascii?Q?8O+sN5wc2JUfCw3zrviNv94UAmKN4UG+pDa8nYdUmVI5ODk5xsjnwHdbNqQT?= =?us-ascii?Q?tJ3D770RuB+c9BeWcQjYxrA1JdylcFImm6QSehp+RzV+BLlJ5rwflcj+PHTs?= =?us-ascii?Q?8WMFI5CF6S3Ab2LkQUXPv1MCAZgyYAyJYvjKvyMDd+MzRBzrBlOCCiDY47pd?= =?us-ascii?Q?PbnjBZwo2ShPOv6U5h1efACjLnxZ7qKZllgZ9zlfAdzYtxl/xfMvb0wuVgq2?= =?us-ascii?Q?C/2klddUnTlWBqWTIm915c/0uFd+3mGdRyiIrekNZKx4C3HWSIIfvpqLmqgE?= =?us-ascii?Q?TrYyUuikXKLCAtME0FSdIUCZ?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR01MB7903.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(1800799015)(366007)(52116005)(376005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?huFoXxV++igu/XjaV6Svd9B4c43+gu9t/fWZdPgCCMt95RivO52G367iVMAQ?= =?us-ascii?Q?2/1O/IYWHxoPXaj5Mj56xn0gPT8d0ClXWcaFCFUImro+pO9ewv8HG5i6h9FZ?= =?us-ascii?Q?5sctE5HTTarDWCdHW1WjvVon8bNHQcFqImha7egKPT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Gk90fVszekR0bw8Xl27jDSdCLLxLSaVAgKMwrzj?= =?us-ascii?Q?uxP/0doeI7DlIiKhlqB66bK5DhHbYvMkYaAS1VeFMZPy3MmmY7kDMiYeXbyS?= =?us-ascii?Q?BSSaF6w83vBP4eOCse0/qBiCEvIWlkqt2nGXAOpeuA83BZwEq9QrHTux273W?= =?us-ascii?Q?BrkGDYPWxkgkceKjK5hxI8HLaWKMab2YA+zWqb/g1Jbh+tTvciTxpBsyGltX?= =?us-ascii?Q?i6ukvA8Tc8pzdQoEokX4nUBOu+aQLPJ7FrYtQZuYBCFzyoV9Mhenx86hmLwR?= =?us-ascii?Q?uOvAnRZyHIScFf7qTZTSIzG/DOEEbLyeBR6gJVZpJeXo7m4YE5C1IU7QEqYm?= =?us-ascii?Q?U45fwCrCPNUDyemsi0WkMJOee8OxhC8J8Brzj4j5eb6U4BrmeHB1NazhtuoH?= =?us-ascii?Q?PG/KYZR1bh5qJ+qDyIJhrdUhFqR7Cbvo/QMiPj3W0P8EaPgXjKYmIAgU7d2z?= =?us-ascii?Q?UTMX/eWViuw9CL/kWvQ+zjzxVW/aUoFCd0jOoI2BRWzkQPpJJlnPZuhTAuAC?= =?us-ascii?Q?+d0ln+ab0dmTPaYeF1glAQBy7AMO02y6BtnicJfIqnTzU7SaZmgb6tCgdDv0?= =?us-ascii?Q?blNxcyWEBjCKUJbS8S2bwzA=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2f5d6aa9-0922-4d14-3e0f-08dc79da8771 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:06.3133 (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: zMVQxIDGqO+/45Q50cQcGgreP93HY8Eo3fKSYQ2meTW/wAMWcGdq23wDRoFz4RB4uDw+57/wprl5f+l5HVS3hZTrEQ9Ya6Pzbz819vrbiGYsC3ioc6T/C8fb+JcO2Ay2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR01MB8627 Content-Type: text/plain; charset="utf-8" Add documentation for the updated ACPI specs for EINJv2(1)(2) (1)https://bugzilla.tianocore.org/show_bug.cgi?id=3D4615 (2)https://bugzilla.tianocore.org/attachment.cgi?id=3D1446 Signed-off-by: Zaid Alali --- .../firmware-guide/acpi/apei/einj.rst | 51 +++++++++++++++++-- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/Documentation/firmware-guide/acpi/apei/einj.rst b/Documentatio= n/firmware-guide/acpi/apei/einj.rst index c52b9da08fa9..f2751cee9698 100644 --- a/Documentation/firmware-guide/acpi/apei/einj.rst +++ b/Documentation/firmware-guide/acpi/apei/einj.rst @@ -61,8 +61,18 @@ The following files belong to it: 0x00000800 Platform Uncorrectable fatal =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D =20 + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D + Error Type Value Error Description + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D + 0x00000001 EINJV2 Processor Error + 0x00000002 EINJV2 Memory Error + 0x00000004 EINJV2 PCI Express Error + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D + The format of the file contents are as above, except present are only - the available error types. + the available error types. The available Error types are discovered by + calling GET_ERROR_TYPE command, and if bit 30 is set in the returned + value, then EINJv2 is supported by the system. =20 - error_type =20 @@ -85,9 +95,11 @@ The following files belong to it: Bit 0 Processor APIC field valid (see param3 below). Bit 1 - Memory address and mask valid (param1 and param2). + Memory address and range valid (param1 and param2). Bit 2 PCIe (seg,bus,dev,fn) valid (see param4 below). + Bit 3 + EINJv2 extension structure is valid =20 If set to zero, legacy behavior is mimicked where the type of injection specifies just one bit set, and param1 is multiplexed. @@ -110,6 +122,7 @@ The following files belong to it: Used when the 0x1 bit is set in "flags" to specify the APIC id =20 - param4 + Used when the 0x4 bit is set in "flags" to specify target PCIe device =20 - notrigger @@ -122,6 +135,18 @@ The following files belong to it: this actually works depends on what operations the BIOS actually includes in the trigger phase. =20 +- einjv2_component_count + + The value from this file is used to set the "Component Array Count" + field of EINJv2 Extension Structure. + +- einjv2_component_array + + The contents of this file are used to set the "Component Array" field + of the EINJv2 Extension Structure. The expected format is hex values + for component id and syndrome separated by space, and multiple + components are separated by new line. + CXL error types are supported from ACPI 6.5 onwards (given a CXL port is present). The EINJ user interface for CXL error types is at /cxl. The following files belong to it: @@ -139,7 +164,6 @@ is present). The EINJ user interface for CXL error type= s is at under /apei/einj, while CXL 1.1/1.0 port injections must use this file. =20 - BIOS versions based on the ACPI 4.0 specification have limited options in controlling where the errors are injected. Your BIOS may support an extension (enabled with the param_extension=3D1 module parameter, or boot @@ -194,6 +218,27 @@ An error injection example:: # echo 0x8 > error_type # Choose correctable memory error # echo 1 > error_inject # Inject now =20 +An EINJv2 error injection example:: + + # cd /sys/kernel/debug/apei/einj + # cat available_error_type # See which errors can be injected + 0x00000002 Processor Uncorrectable non-fatal + 0x00000008 Memory Correctable + 0x00000010 Memory Uncorrectable non-fatal + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + 0x00000001 EINJV2 Processor Error + 0x00000002 EINJV2 Memory Error + + # echo 0x12345000 > param1 # Set memory address for injection + # echo 0xfffffffffffff000 > param2 # Range - anywhere in this= page + # comp_arr=3D"0x1 0x2 # Fill in the component array + >0x1 0x4 + >0x2 0x4" + # echo "$comp_arr" > einjv2_component_array + # echo 0x2 > error_type # Choose EINJv2 memory err= or + # echo 0xa > flags # set flags to indicate EINJv2 + # echo 1 > error_inject # Inject now + You should see something like this in dmesg:: =20 [22715.830801] EDAC sbridge MC3: HANDLING MCE MEMORY ERROR --=20 2.34.1