From nobody Tue Nov 26 01:00:11 2024 Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazon11021088.outbound.protection.outlook.com [52.101.62.88]) (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 17ABB1CDA31; Tue, 22 Oct 2024 21:34:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.62.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729632886; cv=fail; b=hEc9cbrM9VU84qu6Cniux9KjyTAumVotYgJ0u0/VwAHtSRkr0XZl9lFt41S9uu9EdNipSIHL6bTdG9IaOkVWvVRAd90pi74PI1uOIXLxWQaO1++pwANVkyGWTI3M3iokgT+thQT03nxefO0+BVAtp98x86lxzfeM/6bQQ4nQ5bI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729632886; c=relaxed/simple; bh=P9k6UcwKmIuZQ/7IYvLoIObmIB9VggFGJOCYU2oGyfc=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ACT3Egzyc4kkTzG1XhUH+3zsDx/1WctyhxdiUIbvmwqZxY3VxsQcKugI7XUVQIdtMJ0Te3/x6ex/pZ8UX8erS7FvXnd3L8JUT88T9jkuExFmhrk1HQHgSMcPjemDNoaNz//EPu/5khDkzpgBeYp5JcLR2d7ebQcGfSok1tZnFb0= 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=s1rLe8kh; arc=fail smtp.client-ip=52.101.62.88 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="s1rLe8kh" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UZzRfrkHmwzejqYuzqTBdxpQOExN3HjLBv9zx9OO0xEy5SwV4k7o/7ayOHgi4CgAkzWQl5AOcQ7TenC9+ugrTnR5smI20mDw99VMo0X5+U/m6lfbpWXffl0vZqrkoAJG7xnsknauVVjdgTt/A8zWztpoDUe5oP3wgIECTATgWOwk/PwycsPIULG1Dy5DFUYtTTmYpSuGqZ9TRsYYpR7fM1sLfa5a3bibw0nZgqF/U4QbaaOkL8zmjkpNCHaTCs7uS8Nl/symlZwyPT5B/J1JDI9WAIp9foZsHUpfGM0bV/lwhJp9wdQdRlVkPaD/v3v93avhFDJuxCWx5p8YtvYFqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=jS/rd6dnR1LqFsJ4MqHnLYRlcAqn5m7bXnQtwRvU4/8=; b=BEtyPgbAsijtqEkzQt1mLoTqUcj3lnwGIfbGQAtEaFs4h6dedYYgNaY9L03wLKt/w/xy0znLGX3BW4FUq/PyjfjyDp5ZUpejocyAzqK3WfFD3eXWz9PwsReUV9F0CWrP6TGbhINRrA6iqAP09Ic4jczLCh/RgyErfSVPl3uC93SDBDa6b0CALNmXkACItbNtMzhUBkojagkO3Um5aa5HV89KM8aHKDrLl56GK8PS+p3Gzv6ekayObWH2wSuH7mEEkBOPBY0Dpz8MoZCG5A/K7yP0ffsHxkfRHRE3lIS1gIBXEgXgF0slMBoHc4At3phFz7Q4ksIyTVK5MX+tba5RTQ== 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=jS/rd6dnR1LqFsJ4MqHnLYRlcAqn5m7bXnQtwRvU4/8=; b=s1rLe8khrZuKNBkVunJLPfoZmIUA62pfqqoprn+CflzM6dYcOL2ASlFB4DAQfIDtxzLuWe2cZ4gHHFIIqEJR1HQJ5Ui2RWqZ7cgT2siPKSvuW9LaR4bWBNIzbAW7Hh9AIux4sI5VOtDnYngn9GF89JiXa3/DCOMjYs/17yo36UY= 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 DS1PR01MB8991.prod.exchangelabs.com (2603:10b6:8:21b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Tue, 22 Oct 2024 21:34:41 +0000 Received: from SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f]) by SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f%5]) with mapi id 15.20.8093.014; Tue, 22 Oct 2024 21:34:41 +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, dan.j.williams@intel.com, zaidal@os.amperecomputing.com, Jonathan.Cameron@huawei.com, Benjamin.Cheatham@amd.com, Avadhut.Naik@amd.com, viro@zeniv.linux.org.uk, arnd@arndb.de, ira.weiny@intel.com, dave.jiang@intel.com, sthanneeru.opensrc@micron.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linux.dev Subject: [PATCH 1/8] ACPICA: Update values to hex to follow ACPI specs Date: Tue, 22 Oct 2024 14:34:22 -0700 Message-Id: <20241022213429.1561784-2-zaidal@os.amperecomputing.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241022213429.1561784-1-zaidal@os.amperecomputing.com> References: <20241022213429.1561784-1-zaidal@os.amperecomputing.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: MW4P221CA0027.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::32) 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_|DS1PR01MB8991:EE_ X-MS-Office365-Filtering-Correlation-Id: 68b53671-6fe8-4a54-1cf1-08dcf2e156a7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?rkv24dLh4DuNRziL2SJaLIrvZp0vuENhrBWv7zMgrFULqUXlKRBOgYeDjVgK?= =?us-ascii?Q?e/Jn6TSJsaykX17cAz+PafWn/UTO5k3s14PlX3krPbE1nGimRlS2JxneWzT6?= =?us-ascii?Q?a9YUAFkX/We9OqW2ovh9dUFMlbwRQt3hyOQGk/kk+cXwjrkNSg+k3anle0Pg?= =?us-ascii?Q?KraiA7gfvQbJj4aiuchXxV8nef28S/67gQYSxOGUUL/D37yUvXsMnWRfcQD3?= =?us-ascii?Q?UKUZXUBQUjIwmbbVNCb5pp0lBpYopdO9P6NkVHwVTKWjRZZMm8KkX0CfVswS?= =?us-ascii?Q?dcBgnu5f4OWoBKuwy7XcuhnJOkimw/HmM157hzr0aPeR7grpg5zAD6xMj02L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Eh1XqUBW9ZE1ZyUM/WISISpF75z0mADg?= =?us-ascii?Q?M79m/Yex7g0vSwMkldYuKEV6PxwaMLbXP87V/9RI7BQ/D7yTj2uuRAKSpAB/?= =?us-ascii?Q?8NtyNfZuHU/+RRaFBWYdJJrKaKJoDIALk2zIaiWms7kkmD3JKRGbLcYYK9Mk?= =?us-ascii?Q?ULKoNw3SIYNEWj2xfEc30z/YJ8szSBrvuyv6bYIRQSN8vzRzIA=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:(13230040)(52116014)(366016)(7416014)(376014)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?YPQqiBmOGViR6vZIoDJJQOER0DWjhl+1B06JYVoqdJqLM6unBWOVYlfddYrD?= =?us-ascii?Q?QnJI5RQBQ/+UIpZARDS5kokuBt7UybUZM4aisxdRNoz37MjNYueTOls0jOwd?= =?us-ascii?Q?Y+l9vfZIfAAItyTRl/71up0DV7tO2iw7Azbth88yRGVl9wk+MZxYWnmJsYmX?= =?us-ascii?Q?x9/7pZUwrc65o88UXuVnnGlT9ejDNVKyVqP36XdY+XvyFznz12lKvZwR/F+L?= =?us-ascii?Q?w+tzN6ppYWlYk2keFArWH59kNR4cLBwAQd1hYn628dL+Y12EvkqcfFJpm+zs?= =?us-ascii?Q?J0bRzAic5CvJ0JRVGdtqJNf8Eq5ky9cFBLGL9y/XN5rE8Q1Q2W4LGb6tTH11?= =?us-ascii?Q?WJc9xJWxBNv06kxcTD+Z6FhKfeXDSZuIerXwojh1yJsaZPAVNOXqMmM/DOVA?= =?us-ascii?Q?+mZOF0JZRxzfX8jkVOudQjvig0IBYeDepRGgvIk7o4Ll9pya3r8jcJtIUreJ?= =?us-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LkzGmAgScuyERgPGn4y1iSnLn?= =?us-ascii?Q?x6h3ELZVEiwyJo8WX61a/RMTgSmpeB901s6Ly+F8cpmJC/YvBsLb47pBp6vG?= =?us-ascii?Q?5b4GF8y5e46Bx4XZkcgr4ISsRFtSWZ/bbeL/7OKsZIeQf2ZBmKfcbECu36tk?= =?us-ascii?Q?TpxDn4vrltnce/JS50TRYaAdqASx8aG8Tz+VAtIWA2t1Mj9LOMjM366pnr3I?= =?us-ascii?Q?6N4ZeaW3t1mdE9oOsTOVRQcufkI2hepAcJ4dzRCsXwtSOSqUmiQaXJwca2bR?= =?us-ascii?Q?GbteRz2v3R8SczOgrZLekKQ=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68b53671-6fe8-4a54-1cf1-08dcf2e156a7 X-MS-Exchange-CrossTenant-AuthSource: SN7PR01MB7903.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 21:34:41.6451 (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: Imjsqe3bph0eGWocqrF+ODKqvJMTnsiodcQHdfJm27QBrmIxCmwLYzapQNYmcid0ncg7RdzORax+CP/QiuT43JykNv/eKS7EmW8xM08c6dZOMv7JajoDmNQ2DepJKUWY X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS1PR01MB8991 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 see pull request(2). (1) https://uefi.org/specs/ACPI/6.5/18_Platform_Error_Interfaces.html (2) https://github.com/acpica/acpica/pull/977 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 199afc2cd122..ba177b79a2b8 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -1022,18 +1022,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 01:00:11 2024 Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazon11021088.outbound.protection.outlook.com [52.101.62.88]) (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 E21F71CDFC6; Tue, 22 Oct 2024 21:34:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.62.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729632888; cv=fail; b=D335iLPVHLETVRLtlXmHBKel/l1zq/hSyd7I19s8FIOXpMx1UXHU2DTrN89W1uPTCE73gxD1FoGF0F3eUYNEgJOPEE9wTJ206KNKr6xEAN9wDQiEb+oRZ5d0xtO0DNxjVNfcnFbWO0ra8YbKV3NS7yjfkA2GHI7WJ10dOxOxNI4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729632888; c=relaxed/simple; bh=nscLSxZrHlX6/Ql5pEchg3Uhvc4a3LRGrb8W0x3KwTI=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=p3aTgqCQSJMyYlKa4ADh/cOhCUkEc9OSvhztXJWWz8ijw1O0ZpvI3XgpdVnKIgtHvCrfDXqNEQMLFn3YR9bIbVz6lEEYQN49MruNErqo56sTFX4z7wjjC4vtYNYz4pCnoXQmITyDGL9gGaq+uFidUQ/DxiAdQ4dNMk/sDqMXN1A= 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=HV+DKD2h; arc=fail smtp.client-ip=52.101.62.88 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="HV+DKD2h" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nE1f4tISi8W6dZ8FyCt5Pe00ljtv3cu7uTkfwx86c9yTnHvbRQDXFdWctYvSSPBy9YT2Dxddl4Z7JRLw2SviZqjJHPpC4Et+Wrqi4HSpnCaHixiHAyPcqPrfo0097+V5/nUnW2bqEckLIJTVNGTz3DF+VXmZZbjcPk87L6rFL0e9XEDr9iKRUNMIFMD3DUPi0Fo4kZl/hY1831JB9IS8QcDV1IaGuFjEI0Ixj4Mc7JzT0VNG/Fhlxp70xPoKgjiaOWb4ugh1sGv5S1AioHvESZtcAWmaC1nZ5qW4Ci/dwr8pOsKUnu9NFcDhEzh+N97R5a5ancGuD61ULbb8BNrAcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=ZUKHikz4xNHj1OCwUUwCaPbdlF9FmPccUjEAqlP2Hsg=; b=GH4oqjQhDR/eF63DSP63+0nInuYq5NAk8wlaLMkhtvTOuGIspiUYxN0woFkMbgHQgpU8i4ByPHFoLvjOoDOIdv5CbVcilOfVSldW14hEQ2StiQr3lWqgeQp1eKaze7KWVp3o/eZPbAfkb48ee4wj2MBieabbtEbi6B0yQDJ1SMssTzR8qduAhxtpkNgPCA1vwBTnx6hnF0sggM5IyBStWNu5uAIbIc2dLNAoKoc5otBxDbNX03xvkNGWuT/JW5vf9t6XvVZFSa/dj7snnYXm2AfJDoZLEXcaQPqd6lWMDLlBhT1OSCSmcuReB7kT5QCzY58Ck1IbM1q1Ci4NkAzXlQ== 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=ZUKHikz4xNHj1OCwUUwCaPbdlF9FmPccUjEAqlP2Hsg=; b=HV+DKD2hjFZITtirpE7SO7PVdHBBMn7C725h4q3RKzls1hm6DnwIGEwBYYXvkuWrHnArwk58i8DHkEsYfyH1zgiUpuC+foYLU2pE0TteJDEXGLpKYah3oowmOpgYDCLdJKHBghv0dMkqWbiqE3gSNYUqENk7LFIxqFv9PoCdY48= 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 DS1PR01MB8991.prod.exchangelabs.com (2603:10b6:8:21b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Tue, 22 Oct 2024 21:34:43 +0000 Received: from SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f]) by SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f%5]) with mapi id 15.20.8093.014; Tue, 22 Oct 2024 21:34:43 +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, dan.j.williams@intel.com, zaidal@os.amperecomputing.com, Jonathan.Cameron@huawei.com, Benjamin.Cheatham@amd.com, Avadhut.Naik@amd.com, viro@zeniv.linux.org.uk, arnd@arndb.de, ira.weiny@intel.com, dave.jiang@intel.com, sthanneeru.opensrc@micron.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linux.dev Subject: [PATCH 2/8] ACPICA: Add EINJv2 get error type action Date: Tue, 22 Oct 2024 14:34:23 -0700 Message-Id: <20241022213429.1561784-3-zaidal@os.amperecomputing.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241022213429.1561784-1-zaidal@os.amperecomputing.com> References: <20241022213429.1561784-1-zaidal@os.amperecomputing.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: MW4P221CA0027.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::32) 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_|DS1PR01MB8991:EE_ X-MS-Office365-Filtering-Correlation-Id: 25a7b9fb-c52a-4d8d-66fe-08dcf2e1578f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?kgmyYlrzo0F7eEcxYgqsjpMo6iaTwWAGR44U4r1z5fUaRo9DTUJ+f3ovWc/l?= =?us-ascii?Q?q9WJ7fHUd2VWyGMaq8lQKVXyc020SUze8Pya03bsGx4SVI4af+Hi2gAMggxa?= =?us-ascii?Q?4VTIGsGe+bVt8gag2B19tveAerhq4sBRXboMZhQfuJCdjg+g4WJcFcYIdrE9?= =?us-ascii?Q?QsQFMWyoEdP62uTIYDqz2AoiCs+1zL1yfkFvRLt6ZrIpdWD1nX1uNAYqAW2s?= =?us-ascii?Q?HmRvp7J3+hoqdDNf199rt/WFp42s8puiWdYDziUsGnTUtsghD6xen/nrgYQf?= =?us-ascii?Q?gVAlNJ2gkgJOs6rAIe9xBdgoJkpwSdD7XS+SrDftnRzmkW1+NiP9PzaQCbuG?= =?us-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5QFKP6Ih99VyI88uxGz0DDpz?= =?us-ascii?Q?ZgifFFSNakFYHTGaJT1OYjftKv3ewnvpaFXzf3hX+fJbo9xVZHWNcEkoQCO6?= =?us-ascii?Q?Ywk3MFcmjVf/HvKkun13/AN3op1wEpXPHIn+voUQNLN+cA=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:(13230040)(52116014)(366016)(7416014)(376014)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?AaZGVuY2yPHOhqVEi/q60b7WMmDT06uzrg9sefjHidwGScwA77n9dREU8nJU?= =?us-ascii?Q?k6lSlVhacGk0NBHELfWkzXHDTBNZ1MhdyP8sa879l7HWCdju1r4Bb5Ct0DBp?= =?us-ascii?Q?r8Ntmp53PBTot0F2mBZH3OBZRveQzMYU1+TmUN1oCaNF39ftlLpyXrcfKOzX?= =?us-ascii?Q?L6nfsMBdEZNMSF3NNCu/JEIqMbTap79pfzNC17n/kQo7LYTb8o33uP5flcFz?= =?us-ascii?Q?NHxET2ub+pp1zowyCWLYsC36DPrSFUHLOOYi8DDufyVRh5C+jL3gv6BwqLPJ?= =?us-ascii?Q?U0KKjqPTSbEa1j7FqvQT4kDLdjnD4yXRZ/dqzriuugeOhrayXcDuHSp/RcE3?= =?us-ascii?Q?0anWvZuNLseMqSaxqHwv3HiwMl/hnDAzrC2DENdMIZTcmuSK/AGDJbnDNsOD?= =?us-ascii?Q?yaKguw3wxrzWcV1ogNNbLbP2oig8BbnJJsAJx3UB5H7TI6stWwSdEWqtxmr4?= =?us-ascii?Q?13YAD7TO5WNqSsVedT+shvMXemkykMhrmtHlMubQFXz3y5eWwwz5zkhaDYoT?= =?us-ascii?Q?CjfthU8nlBLr+z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-ascii?Q?7UeMRPkIZx3OlTuPYu2H4tR13ndHWvOop5cTNsXW+rGM4uq7YHHuwEfglRte?= =?us-ascii?Q?p3hhypx2WmXRyn7iwMVADGL2Ov/LrXtrVv4KI0MbWO9VuiBdq3TXzmu1TknL?= =?us-ascii?Q?Lq9oeHvBuW3RN9lknLy4AvdyozTUcJ6Tp5vrNsVJQUzXDmEoH6JabjreDcOl?= =?us-ascii?Q?6vhOlEA2RSnhhdtblbOu7RY=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 25a7b9fb-c52a-4d8d-66fe-08dcf2e1578f X-MS-Exchange-CrossTenant-AuthSource: SN7PR01MB7903.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 21:34:43.1760 (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: CxzockKxtoC1lymli5IgstzBYSiBpLYIpKcfKYcxgfvvxOSnXz4WVWd61RXs815CUjTCTjVMEvidb1MkvuH3dogdA7hsQmODoV/bnBuhD2Mb4YlFh1nUGEwGzVho8Ncj X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS1PR01MB8991 Content-Type: text/plain; charset="utf-8" Add EINJV2_GET_ERROR_TYPE as defined in the approved new ACPI 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=3D1521 This commit is not a direct merge, it will come from ACPICA project, see pull request(3). (3) https://github.com/acpica/acpica/pull/977 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 ba177b79a2b8..66a71b6619ff 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -1032,7 +1032,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 01:00:11 2024 Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazon11021088.outbound.protection.outlook.com [52.101.62.88]) (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 B694D1CF282; Tue, 22 Oct 2024 21:34:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.62.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729632890; cv=fail; b=DqhxjN+QJHleZij3dkhTfJUShhy0R7Ssvh3kDFvwgFBJUJZ0oia4pRPdZLgjOQCoCdWl2+4uceH88Rc1iW77+bPeIHPdo0YHnbQ9rGMbTiJJxdcaGsT+vZf9ZeODU5V4r0JlEBCPNiEPPZr3904DJdYsJrIxSP6xEutydHspaMk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729632890; c=relaxed/simple; bh=7Pui8Uh/AaA5ZbR3YtLSxow+P/kaJZT1Ife3NB17z5k=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Ol6lf9aGRSnGo7iVZqvpaaQnks73cBv18PGfctGQcvdlR2FBXIqHOQwNzZnEhaJxKn1XsqKNjqQ1gfoo6KPbl8KIoTAla18BiXyAJSdd/Zt0bGeLjgUw/QPQtx8wEDdvFr9jLNVsSA8xbZ4DWT86u1r6S9Hv8PAg5wgfKY91dXA= 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=eJ1y3b/s; arc=fail smtp.client-ip=52.101.62.88 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="eJ1y3b/s" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rRuVbuYk8G2xJUwTjGhyb7d3+21ItAoV62HvRWHwWlYIw50UErlnE+Dj8gHCJ+M/pFFpIz1adiNhF5HhMmB2xS/0Nqo5HPEr67omB5VWIKnXIMcEuqvKW/tQkBFqnc3kldiugTRAVpAqoT16bFgjiPKTT1ZFhDsTNC8JvNa0Z2iX+OmdBLBBxID6Ah6y5qBmB5mmQ0MImzxEtxRTCrrVdj2+l3sZOYOYRfHFQchYGUDhTaa4VlizMjAnxjesAAsSH6AQNqIwd5v6vJe+DeLHAvRsOL+BO8M9iebUUuAWB1PDQkN1aEHcXTlVqPvfObficlXIjIHwMKa/9JVWBEcVuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=I9aQVUejRa9bLVYZogPYcwPdi4eK8mzZi3jIiHStYGM=; b=OzGBmo+r5UYkfZK7VE56Btq5BnKuGkdVNBqvlecm2GupVmdC4javC9pN+lBViFA+XH+6bIcEZ5N09dtk+DEjJNiVnihA62t3GKmi5i491dEIO3IBDvx9cQioAqrSLGfmu47Vq5CJDZbUK/FmEiK/Uo1rvpP9o69ggfa7YYsVUHpSbB7zlp0C3JGnJAQQpOphIUqfuiUbnQVzDtxygSKGEMym5wIw9QHgrygfXOfthcorfS3j8dbb2WAjXaNt1H7y85gUREMo6ybn3RqjcP96IYQo0LvHiL0lYpdGjpQ6crQX7f7l/dgYNziRv3g5ccUO6vAK5Ni/HuNjd5LrB6yFhA== 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=I9aQVUejRa9bLVYZogPYcwPdi4eK8mzZi3jIiHStYGM=; b=eJ1y3b/sWZQTSQ342DFMA1Mldk87gXm1r/dmB+WE2zOJiWfogxwcbalIbfeSz3+YBW453z3szOAyHLuBgED1ER6FqyOWSrCLn0KOaAp8PTe57JsK1Tg4guoH+jC4ajvd4IB88E20o5u+Kmbq+hXoBhRmXksDZI5SrngbabKV8H4= 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 DS1PR01MB8991.prod.exchangelabs.com (2603:10b6:8:21b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Tue, 22 Oct 2024 21:34:44 +0000 Received: from SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f]) by SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f%5]) with mapi id 15.20.8093.014; Tue, 22 Oct 2024 21:34:44 +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, dan.j.williams@intel.com, zaidal@os.amperecomputing.com, Jonathan.Cameron@huawei.com, Benjamin.Cheatham@amd.com, Avadhut.Naik@amd.com, viro@zeniv.linux.org.uk, arnd@arndb.de, ira.weiny@intel.com, dave.jiang@intel.com, sthanneeru.opensrc@micron.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linux.dev Subject: [PATCH 3/8] ACPI: APEI: EINJ: Remove redundant calls to einj_get_available_error_type Date: Tue, 22 Oct 2024 14:34:24 -0700 Message-Id: <20241022213429.1561784-4-zaidal@os.amperecomputing.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241022213429.1561784-1-zaidal@os.amperecomputing.com> References: <20241022213429.1561784-1-zaidal@os.amperecomputing.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: MW4P221CA0027.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::32) 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_|DS1PR01MB8991:EE_ X-MS-Office365-Filtering-Correlation-Id: e88190ee-61df-4bce-9ed1-08dcf2e15875 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?5eBAQFSXuJtUpWDSUty6iq9ysrd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Q?iwm2w7S4tRn6+0dQtWZEN/qOlHNNqRMp5wifXeOqKNXBTx51oMrOXOIZSSub?= =?us-ascii?Q?pjIiYi00fBUYNwIjM6sWIBB3I50YzxOAgKhpSnuCfmba8SO/vlRzYwxdB0A/?= =?us-ascii?Q?fwxqr9mkUc2q25jKEQ7mPrLiPa3EMGgsHa7KQilE1NFuz4qzzr3iDt0ibi4Z?= =?us-ascii?Q?y4zJRPOM2s8tMAqqheKp2B/EdlsTwdHQS1s6+YM8wTfOXfeFEjsUZHeV/hx6?= =?us-ascii?Q?kf4eKE4OskzYDyLgl0PJysut2bkaThA9h2RX224OCRJ/+BrQhrV7193hW4fc?= =?us-ascii?Q?UzOfnmHIHjmagXV3B+VC+LiM3AHNsQsgjv9igZ2g1X7rmKqDqySttUUA0NtP?= =?us-ascii?Q?F4zwJy82Fpd9QJehqHfzxiwwQIVYtMukdJ0qPE1L6G22gZcKv5TJAGF+1xwK?= =?us-ascii?Q?ZQILeM7rkN89KR0DiAN8LrTP1ED3/tnY3q5IOU+cxOYG/QZC5Y+Q8S5NapwC?= =?us-ascii?Q?WPfGlRvhcSfKJFtaybA2Shhl/HqJ?= 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:(13230040)(52116014)(366016)(7416014)(376014)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?0sRnUS1W83z3JCekZzB+Tmmhu9FinO/0gk2MhAABPeDOpKS+hpV83nJ1NsvR?= =?us-ascii?Q?9EbWfEvFYbEpfvY945WDmXxoD0YPgSiXA8ErcQ9HGNQdfiBG7f6IjTXqoS3j?= =?us-ascii?Q?2HPlrNcWy8JU8ZO/6fO9a49r77GbvRBIjQlIaQqusvJxaTVwYpMVzCwc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g2jO2tAzbXOIUdJdtoIrD?= =?us-ascii?Q?LAM+YBphvReBKT08yZo/k1y5vwwgf5ewW0+bbK1lijywlk9pytmVAiQRI/WP?= =?us-ascii?Q?BH1QlUKdGXI5BkpBNiqv+qSy0u29CJluCn3xQLj1Ce2yEAMtfEd+AXlc+Fdg?= =?us-ascii?Q?vX6hUargZ3xij40CE8+BmOOZ5kENsL0NPRHJxoiiRPLhTwPhocO1RPWhEQ6I?= =?us-ascii?Q?Xpb6KxRyxGBNxGuPcdV4cdvK/jxKbf4pS3WSDk2EI6QGFi3Drwo0+Pei3vVn?= =?us-ascii?Q?qi8XhVO6Tu+WN8zOUpGUK1RkR4mbvnP5BfTOHULqjGO3tV0c3XUiCi8VHbG6?= =?us-ascii?Q?2s5Q+BKK2VtFteGJh1kAzeluoixQfkPwA6OJoMA+4cigbQp31QCz6j8eQeXP?= =?us-ascii?Q?qHJ1pa+0RL+wM+aNxIWnTm7ljkvNdV9eQgpfrcXAGbI/irEIHZWTOMiZxRq2?= =?us-ascii?Q?WTcLY14rug64wypJ0agcCX1ldTY00P8Bn3Rcz6EOekKbScqKs3RfIsoyT74J?= =?us-ascii?Q?CAWAfDpALwAfroeVKskvscs3BzhJs5qGeHiOt5h26BCPhmWw+LMqniVxH/PJ?= =?us-ascii?Q?ILT+5cQtZxsYr0eYlroXdt8=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: e88190ee-61df-4bce-9ed1-08dcf2e15875 X-MS-Exchange-CrossTenant-AuthSource: SN7PR01MB7903.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 21:34:44.6775 (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: LO40VHSarVUF57RWnZLUYnAGTgVxqz3YC242A/dLNXHVwmOqK/xuW9wARV3hWrDWPk+tLh/y16VDcTnxNdYkhCVdrkG9+O/sR0BGMgaLFMmKdy9xMGeTAwYwXqKziiU5 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS1PR01MB8991 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 --- 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 5c22720f43cc..78c5a20115eb 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 01:00:11 2024 Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazon11021088.outbound.protection.outlook.com [52.101.62.88]) (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 68DB61CF5E6; Tue, 22 Oct 2024 21:34:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.62.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729632892; cv=fail; b=n3Wm6/kf/68MobeBHpSSmnmW7woRma9/IludKgd/cC6qjfFVgRztkoEi3EhhwF7/iUskmfAwS6XtsjRmnvOeGUCRugQlHmTisfVck794yYHbfrAmTTbao1zewM9gR1VElr9xhY0SfBbqq2L3njb+jcwKCkBkqGHUNYdy6pSW1Ow= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729632892; c=relaxed/simple; bh=6K9Vu4L6/O1/OTZfk2//JqeRBYIJN79++zQgmwajSa0=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=J07MW4T0yz2pdnSCFm//oZyJ4hLDQ88wzoZjsdviPRciSCnckgOaMiPONYPUyUzonBOEhF0wE6nJuWROckgt7Wvx/9NCs8J9VeAYZNcjpi35e8ckXUleTOubiyMNnzKfIL6ipv4fBkBSHYjrgmoRj6OdZGyblXhwWhIjYQSRGGM= 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=kAQ4UYWM; arc=fail smtp.client-ip=52.101.62.88 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="kAQ4UYWM" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yVT89+MGguB1O94gSoydQvopfjq5kkOWt0dhSC7cJSkaAu5LLAH3/J1hkwHYTfmfDqLmT11Ay5I9sq8WOaDeGgAgm1VMdlkxrrsyoL8UmsDmisdAjSgl4xPBDqU3fkcxBw29WadOMcaEcIatR+xI4EiJ0tAatfpPHEUdl/3BX1UDedbwEs8EOA4qbjFzlxHtZdT6ozGkWfboZeChm7p4GC4FvoT+2FBmZ33Q/IPlSqD1rC6Dlq9u6r/hzduaX1xj94bpTPH+SZJibCASymQZ0SaHLk0CRj+Y1G5+oVpUNleWpp3Ci4O4VZ4nCGME/AigR7O4MZzHb2svD+TEXPfw/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=h4uw7zLZyAVtMaitfutAbQhVjfCOnOi6ttCLIFIsHGU=; b=jpOHZnKG5uNanVWwLgA24YC9WOZMywKoF0RiyrF1PW9N+4bqn3oKcFVHr0yR3x+yr8lV86CDerOMhmLc8Eb606TzS7hFfShroXjcPjgD6YF7YBJWk/kCj134rDIFm4zUvQPFSfFDSKW7BTAyY42O3lYdxu1WWqCP5yHfn3QDa98IvOvcMn8EKLjHUZYx9+eAoL2BVY758EaO4yQyZHJ9fyds4qYPK42bf7S2y93dNEfbPIio1BU0E5F/RqswmRJhLoF7zAl7GWgkPK8vB7O0si3sVGR7fmVMNpeQpg7VtkoDrSb+3ku4A91RU1S5JIK9liuDZfL81SnCCtRGbRrfYQ== 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=h4uw7zLZyAVtMaitfutAbQhVjfCOnOi6ttCLIFIsHGU=; b=kAQ4UYWMjEmLpRLXPm+mbLRItk4mJUeHw8zeVpOxU9jNqEwbWJ7EE31ZQ8f6XlulXokswBxTVrx2Qt895oSaxWFOqHXBMfCmCguJLwyeU/rPZgSbIgllywwAr8JKnObNbuF6x+2UR488wfBCimWRxz/Sftoc2ghh1EUjBAwa8k4= 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 DS1PR01MB8991.prod.exchangelabs.com (2603:10b6:8:21b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Tue, 22 Oct 2024 21:34:46 +0000 Received: from SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f]) by SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f%5]) with mapi id 15.20.8093.014; Tue, 22 Oct 2024 21:34:46 +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, dan.j.williams@intel.com, zaidal@os.amperecomputing.com, Jonathan.Cameron@huawei.com, Benjamin.Cheatham@amd.com, Avadhut.Naik@amd.com, viro@zeniv.linux.org.uk, arnd@arndb.de, ira.weiny@intel.com, dave.jiang@intel.com, sthanneeru.opensrc@micron.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linux.dev Subject: [PATCH 4/8] ACPI: APEI: EINJ: Enable the discovery of EINJv2 capabilities Date: Tue, 22 Oct 2024 14:34:25 -0700 Message-Id: <20241022213429.1561784-5-zaidal@os.amperecomputing.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241022213429.1561784-1-zaidal@os.amperecomputing.com> References: <20241022213429.1561784-1-zaidal@os.amperecomputing.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: MW4P221CA0027.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::32) 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_|DS1PR01MB8991:EE_ X-MS-Office365-Filtering-Correlation-Id: 40388e7c-3b81-4b77-4cf0-08dcf2e15958 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?k0iso+viZqxJenZCqq5kumsYfTMHM6mZqDqb7t4dvjrdPs0ZJ3C/pci3vSg/?= =?us-ascii?Q?tuwb3hlqtkXEbycs9Mj2+QHC3AfSXuxXKoaOlmGmlu00x2eG9BGF+UbZEOG6?= =?us-ascii?Q?CWOfud6GyBU5SNR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gMcruRtIES?= =?us-ascii?Q?oBOvMQaIbXRg0LURjfS33OyBxQidoYKO7iPcjRnBVzTUhIbiP35WU4rQesvN?= =?us-ascii?Q?hpYKAsk3GnHiVejnu5NLuuxtao6c6of8PVIV0EeIe6fYqW0y6+w3TkD5RGbl?= =?us-ascii?Q?72oKKtGmbh0S4QENqFAAhpeSM/rD9BO3JPbLjONmOpGkWEi2iaIde2EDDtvx?= =?us-ascii?Q?ELjdkYIvWXlu6c0uPUsi7JK/q1759MemyChjfLdMXfdrGaoL4VH3h/gj1ZPx?= =?us-ascii?Q?+vW3Q/+KVGOxrzuQfR+K0On67zh/ivoRTvIb243bqOfEzsdM+kgFWeAnTTZT?= =?us-ascii?Q?yNpT2X9kbg88B5xIZcUMJR+hLn+YWKV4WpW7q9cXDdVNLX4BIkWxr3TuQKow?= =?us-ascii?Q?HQbVMkliEwSGZmQC0vqX6YoI84Sm?= 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:(13230040)(52116014)(366016)(7416014)(376014)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?P7taSpamMOrNKrn3zi8zJ5LvvzELo5XSFHJlDunQEoMxlItBMIi29hlNB+4c?= =?us-ascii?Q?7Pd5l7dkcWn9G+0SEt1Fz8iFbGYAdFWmhPMB/tLQJRTKNwDfSxcPhgYHeA+w?= =?us-ascii?Q?hefwKhh7R9YtvoLtl6pThffuROzqxXh3dfhoKLyEfHtHYE1IEh6uW+XuNnNf?= =?us-ascii?Q?JCwDI6OFXzfXdhC6vtTtKZKGeQGwCIn0MKU+mdDsEvGD3CdV9iZNeWZvKNzK?= =?us-ascii?Q?reEhwg0xcskMtHG3NWZTWQ5RHsKJfRVECk1M2wcoQQa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Bs/ISpPk84tIeWZWZfxzAn/RZDO8+lr9N213UC+?= =?us-ascii?Q?G/CQZn99gNefEyNTCUQWcMn+ebmYyc7rGVzolWlv93Jl0jgoa0rzETkX2pic?= =?us-ascii?Q?ZeoR2hjdDMA3TCbevs3HRjYnM8fVII7Ly9stlx3HBUP9onKsCWyohdiU0sok?= =?us-ascii?Q?9bsqGhNlMqFeF+N4vCXGfl7ggwkFDr5kVJjLzZBEblkvPByoRrX2hG5wbbso?= =?us-ascii?Q?ta6/G7C7SF2UXG3SI9Y/LECzkxUiBlOPCjii4MMFXcnoD/c8+eD2Fr1GsnEA?= =?us-ascii?Q?W2cmTxeMj2xxymFyVJQx3qWrcIQYa2CzAU33duuap2BM6BFnd8+IAP4q44Sf?= =?us-ascii?Q?p2oRTcKITh1uTcabpkaYtRbqaQguV87whYi0U9x293xM67w6ShnaOH28Ipi3?= =?us-ascii?Q?/v9zdswhBu9KdevLNBTEU0FseUUtvxswR3eRO43xKxktjrVOM8QeiC/EYw3L?= =?us-ascii?Q?VA7u3IyRxEOc9VaWhde+AjI=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40388e7c-3b81-4b77-4cf0-08dcf2e15958 X-MS-Exchange-CrossTenant-AuthSource: SN7PR01MB7903.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 21:34:46.1462 (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: Ranh8ELR11OK6WQLTIe8OrFC84yQGLcnh2lztlYG6aJJICjxAOoJKMeFe6ZJfXgBlbLOJ19m7GnnIWRK2u727FgrhB7IRPladt3S7nbh1J1qilwozpx76x5z+V5lzXEp X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS1PR01MB8991 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 | 33 +++++++++++++++++++++++-------- drivers/acpi/apei/einj-cxl.c | 2 +- 3 files changed, 27 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 78c5a20115eb..3621f071a735 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,6 +649,11 @@ static struct { u32 mask; const char *str; } const ein= j_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) { @@ -654,8 +661,13 @@ static int available_error_type_show(struct seq_file *= m, void *v) 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) { + 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 +704,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))) return -EINVAL; =20 return 0; @@ -769,9 +781,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 a4e709937236..5ffc4a162c70 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 01:00:11 2024 Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazon11021088.outbound.protection.outlook.com [52.101.62.88]) (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 C181A1F9EBF; Tue, 22 Oct 2024 21:34:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.62.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729632894; cv=fail; b=VoDRmBCb7io/dMcihIA9LwaJ6dZ2PzeYcrQuEqJozmTIA2DLMk6IqSNpVgwiPC/Opyq+stBoV+ha/u5pBgdJftSKxgEsvInaykKH6R3zw70Dd2WmLAHve4Fl+HJa7uNcqgvDQFD43nLoOvdziPsbHsdTshd/GgWzt9nPL0DqqJE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729632894; c=relaxed/simple; bh=inU4LKjxZ3bA+W+3VsFgqsEeAOCacrEw0PSnRO9AEbA=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=L7T7JWNHPUZjJNVIYmdG6AbGxEREs5y1q2++U5CYz8Qu4xcHkCqinniqiN2rIOQLzwOglflE23XF70gAvTnIuI2LsQEByQPpeCFIKveCzzbnJ+o/ZN71EOuZs6cbLSXp1RrbAk9Lz9wKImPM+7IZU33Xgi+PKvR6cu7t4xBknjE= 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=uni8z0HC; arc=fail smtp.client-ip=52.101.62.88 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="uni8z0HC" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ee8fzLoidaX8/S6znVjYMI9dt7L3gixkXhcfO9YBaZq0em9JHGPoPN6HPtsbLJNhuwD+wI+inuW2/ToBmw1qda4rEB9p9DaZwZNx/huVGF5IPc3ijE7QDpDS1moFi9lOqC9f9QWi+gU9IKPnZV8fEujy5oFFukNLd1t1UQ6Ui8QAhbC/HQRhIxCbWOKhvuUvt090g7Y7TdgMe63Lm53HXFASH+Cnvs0NLWP3ltipTSgtV0yQyKE0zEEexWb2TuSh+2mJZBOoD6C4u/EA02yuyrNu9sTE40O3AdI1WRw+cBvnWZNMIc4eCl4fsKA/WsGLiVAmq+nz2cr5rt3wO5qzuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=hUrSB5OXVGInHjspH9AWJRqFUGr5GDfBfBHtLNol6nA=; b=KUz4rVsjJJsHj90LhCtJpqCMAi9kgbNsI+vmyS81wAr9Pw0IDf9O7yMQZcTttMdpdxR1mlYM29GFGLlAgLaSTa43uXakN/E7/kVQFjXo8bbUt3cp35TuIZakCCRMZK+SJWS9neKpCp/Qib8V3x4mWm3+zXuqbAOGYuxQ5h2QieQT+w3yhLwbEVHcfzhkbo5xzX7DWVrGrF/A6ebRg0o89lvoU1QXwCUjDstfumvnIM00sJblnSWGznNEcS9P4kHT+rMhTco0CEyDMhOQIs4QDeyUeMWJuYYnydoZzIBRqbL7tSc/kQBUCkPo3fudU2AOZE/Qtevcag1GqtI/J5M+aw== 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=hUrSB5OXVGInHjspH9AWJRqFUGr5GDfBfBHtLNol6nA=; b=uni8z0HC4fhjvzlMChFSIyr6Nq5iMLMTzDzCJEnAjhNNoOAYBeOEjGS8myD3OCsbFIyXNNj9uEFqYnv+QS5WC9PMqzouJXzKIcgurto6PJ9qCJmiu2x7r6yMsGJhMVZdSo5xU7uERAWNM3vbOko43zulBLz2HNW2CHIW3UA2pZs= 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 DS1PR01MB8991.prod.exchangelabs.com (2603:10b6:8:21b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Tue, 22 Oct 2024 21:34:47 +0000 Received: from SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f]) by SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f%5]) with mapi id 15.20.8093.014; Tue, 22 Oct 2024 21:34:47 +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, dan.j.williams@intel.com, zaidal@os.amperecomputing.com, Jonathan.Cameron@huawei.com, Benjamin.Cheatham@amd.com, Avadhut.Naik@amd.com, viro@zeniv.linux.org.uk, arnd@arndb.de, ira.weiny@intel.com, dave.jiang@intel.com, sthanneeru.opensrc@micron.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linux.dev Subject: [PATCH 5/8] ACPI: APEI: EINJ: Add einjv2 extension struct Date: Tue, 22 Oct 2024 14:34:26 -0700 Message-Id: <20241022213429.1561784-6-zaidal@os.amperecomputing.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241022213429.1561784-1-zaidal@os.amperecomputing.com> References: <20241022213429.1561784-1-zaidal@os.amperecomputing.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: MW4P221CA0027.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::32) 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_|DS1PR01MB8991:EE_ X-MS-Office365-Filtering-Correlation-Id: d75ed08b-3682-4ea0-ccec-08dcf2e15a38 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?t3i6FxFFhrufUdSNPZcn8UlHOg52kymK213HVIskbolAaDY++/3kXDXwFmER?= =?us-ascii?Q?OMKtJhcHCOuhgHO7ybUl9n14KjNzu3tCbJU0tvsLTxpqvE7GbTI+po6R1B7g?= =?us-ascii?Q?z/w41Am8PAFlyyElVPlrsMvPS9Snoz0o7u0aLpPG1d92OcxGGKAaB9m6qndk?= =?us-ascii?Q?UtrztLELSLlUh7neLltgtycG9Q5vLW+/h696UIiMeTSqP5goF1WXCRc8XKdE?= =?us-ascii?Q?W6B9h2DKl4aK2N91JRPdMG6XKLILwfUzgCvibxmqAfYWbGe70tntk8XT88f/?= =?us-ascii?Q?xgTFkR6svj6wNWefxOmyg+SRfn4z9evJet9R6P/k4ozk6tODV8hhqGAGfqmO?= =?us-ascii?Q?ks/2h14K0VbQuC4PAkZwlL+1cLJFt7Uo1yktjz1lR/DQijQFVanEHLSlfu86?= =?us-ascii?Q?iTM7PSEvzM//iptxVHTUJEtzWDTG3WVCJ38zPuXW3NT8uoTIZzxSIidtLab/?= =?us-ascii?Q?NDRfWElDB/BSIYNGpxiF1y4/s9aHVr8HDrgNwgr+OrPCm0jfryk8DT889Hwn?= =?us-ascii?Q?ZlpOxjSGKyUmPmnf6hpYgt7rKlB7n/bQl2NFRLLib0vxnQWaseCsMBgY4hLr?= =?us-ascii?Q?CbgLz0xUYTgV7AnjEnTyO1vZ8ErQZnWpMbofCb60RHm1Z/Jar8QxmbviRvtW?= =?us-ascii?Q?Cuj2xapT5zQ+BBv8kGTxUgq1YVu9y1vlXj9gN2ToyLbCKBzBlDBEbyiFTrMK?= =?us-ascii?Q?F8q8THrtyq8+2R7Pq6ie9zfyMEZUS60sWLbF3WFG4wCAN8GUZuEd482ewhmJ?= =?us-ascii?Q?L+urMvlY1glX6C/UWlGdkdelNVjCz6egWfJvaBdVdMbqJsz2Bg9dnLn8kj2z?= =?us-ascii?Q?cp9ow5HFvFJULZkq4AIamWuk6SAKieBrsGqhybs1X2nfa+CWxu6PjfJdwgSY?= =?us-ascii?Q?t0k4Msz5R/YBuuyckou3dLUdekuxIFfBt87r7I2YwYB5D0XHKzv3H5lAiHat?= =?us-ascii?Q?mYoH9sU08AIQXsXSVpjOctuDX723BdsHiBWc0OX7VlLUyBI36555NlK7M9j0?= =?us-ascii?Q?BdfAJPRV6WmQqWgkA1QPcPLn6AS+P1My1ybMOIkbAoenew+LIK5+1wqJDHxb?= =?us-ascii?Q?o+DmM6CYj6/r9sAK5a/cSfplMmmGiKhN4OwT7iNonK7N+mJ3TIb+NZL57Xvm?= =?us-ascii?Q?0lX7owcn1Cj/v+WboqjWRMLgXh5EL9o/zAr7no2xUZMqHDHfpryKIyyepdEP?= =?us-ascii?Q?+fRaP1MNTxZE6VLZsEYJmO3oTY4QG8lPETJjXsaLrDNjjWpJq61/U7Sca66E?= =?us-ascii?Q?A0sNLtQoI4KL2yZbdJ9AO+dJtCMIJkoNekv2YbltnfwkUpaI60opR+A9FZSS?= =?us-ascii?Q?3Q60yxAdDfNbpIl6DpWl+bo1gXhe2rMDTt2x7MBfAA5S6Y1xwH8D3FpssEgb?= =?us-ascii?Q?pJ2NZykNQPvuqvOeXccGXkfEhT4M?= 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:(13230040)(52116014)(366016)(7416014)(376014)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?vgO2IN1bcxRb2D0PafVbYrv6zP6YAfsYB471njdN4huuljvOLxShINdACTT7?= =?us-ascii?Q?DpeoK2YN7KkRyRwfDbxLXoY4nvS+1N6fUZcbi2EeLBMsmfEGhqyaTjvjGTFz?= =?us-ascii?Q?RVrduUHkdapthmB234IrO0jb61W/fbxJcPoOngDOt3GLFY5c5Tw/jR5Wm1CH?= =?us-ascii?Q?8TGguwdNw+43L5BS4KVorCaz0uZ0apnUQseERxVQ4XNUT0Drp2l8F7aVUZ/Z?= =?us-ascii?Q?q4uO1tS+AEdI7kGdgjAXByGnIv+exawlFSQxA+IlgvQab2cEKQdRi0AX5z1a?= =?us-ascii?Q?Z3x/Y0aetqx/2W2qQYRPAZzdnYeZdv6qzdZMr2Z1vbbZEWgjsAVglhUQX0w3?= =?us-ascii?Q?9/alzJv+GIiNofvkM14jN2ybfg2tKRAtHSPt06F7WAT+P28lfuWGimwhMflo?= =?us-ascii?Q?gYetqXfxErt3B/TcbaJQhNsSQSRWt6pfsksR0ocmJtgQNW1kCAQcQ1vom99x?= =?us-ascii?Q?ieJiYILwaOf4ubglcu7ptn0QDUAM5xG/LKvoKgk/P77ezO1xU9KpTdNv9oYM?= =?us-ascii?Q?jGcZ6fvMOp5A4HmtevDUrtS20vm9R713ZTygMq+wt/KuX1BWa58WyVuYhif3?= =?us-ascii?Q?pAl0ONmxAaflZAyx7JDm6wQxKIe7MjrfbKolPWh3JAlb67bceRijxQRVytwR?= =?us-ascii?Q?KIXIf/LvF29k7ZtQSpRKCaLdccwR02Hpfnc9KX+Rcpdkv9/MLz5CGQp2FPLL?= =?us-ascii?Q?PChdTyjkFaGX8DyJ9C9aIp/AdeyIunPnVOCjP6NAS8g+iDbpJljmgAdhy8Ab?= =?us-ascii?Q?FWo0Z8G59kurc3Uqznl6tBn2ZKAx8FWGRqfLvZmORrfLP7OqSrlLb7UYhW4d?= =?us-ascii?Q?W5gHsSeluaGboyNPdGhImPSwkpJwfRnteXVESHyUn1zW2eFn46RKY+Qj/cd7?= =?us-ascii?Q?Z+Fpu3M9WLx6Fg9c04bqXJ3kgIEyv9u82rM2cX7rb/7CzCF29eaSoul9N4PN?= =?us-ascii?Q?HNoOO9scUHcmTIV4j9y+hGL+q6j1ZRw9g9wpzGinZHmd9NYkw4iUDvz70a7C?= =?us-ascii?Q?gkW/Gydon8rLwg81Hh3+kEgRoCrwSC5hNKqRRlkmQ8+XdNSDWCMV5KoEPtbC?= =?us-ascii?Q?6bYKDcrlvKj3reNYY/4Prpw5fUmnizUfpYVXoGGCLx+6h7cU2qFGj/I42qMn?= =?us-ascii?Q?5tzRVvQ2R18IcWc8b/1ZH2We3r4rTpMY4cV62sxZUFzPTUoqvCDOby3L8lfU?= =?us-ascii?Q?t9XfIG3be9JZfalYgYit5+5Njl7EaKNmgxpKTFzrqE4AdtV2kxIhCcngvQyG?= =?us-ascii?Q?nBEH4Ks1ZmHxXun1KM/U9iiCf1jczM+srJ06veA4Ov+MFQ58umfY+8GSDEZK?= =?us-ascii?Q?fmSI8M/34c26f0yJM3yAjj9xWOZe+QHy+hmb1ZLjh3bIp21vCoUjaLPM9n+5?= =?us-ascii?Q?Hd8t/Yf2pd80cAQQIoVqm6p+zTDsnS8bEbCcXWs5MsUCit7mi1ccYXVOevNk?= =?us-ascii?Q?6pz6T3gu4MA9H460BMYf99WbIZcoKDDJVZY0y5aVDuPtEazTsaqOWAYUW2XP?= =?us-ascii?Q?xWEfP97Lr/3xEvJy3bTmmi0Jv5GMctiyZJsSKKb5TC/4bYgUEErV27ySL4IJ?= =?us-ascii?Q?m9Bt4Q13P/Ffl8ElqV2mQsevx5J+gfQnmdWmObbTLH4iwPs8/e9GrVGM0CfW?= =?us-ascii?Q?Jur4wwTDYhU0CsBCUE9TCbE=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: d75ed08b-3682-4ea0-ccec-08dcf2e15a38 X-MS-Exchange-CrossTenant-AuthSource: SN7PR01MB7903.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 21:34:47.6776 (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: nFuCPyy9Q4g14bOjJuUCJhigPbcrsMgo3R4XTZmAvg1vAVANS6yPNB4yq7YAVlRwzk9KhkDpUVE4xtmLq6S/uD0t8aRjR9uvbWzMU322gMbJJhE7cIXx4J/UcqLKnIx2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS1PR01MB8991 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 3621f071a735..31a13ad6c4e5 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 vendor_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 01:00:11 2024 Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazon11021088.outbound.protection.outlook.com [52.101.62.88]) (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 8A1091FB3F8; Tue, 22 Oct 2024 21:34:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.62.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729632896; cv=fail; b=Pw7OiyIF1vntuS0aQdCxDUZu2EqptWyw0xv+hHpmxnpN5bk/FT8ceySf/pdoYFJzAdS58Om0Cn3w+r//KG2eDB+gSFRJHdmggAJrbhskMhWMmkLbEXZGZMnZ/NEe1sNAFSolPxmVeyUmItQfp9niOeUgP+EZOwOwMGME5rRYZ7k= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729632896; c=relaxed/simple; bh=xLb/rAoVAFvQeZJ2UUh3DkSCfUUw1oR4Vh4V6xDf0jY=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=fUGyI2C5d/pK7rIla/zuVsShtHT7rNMC6dPojA4I77ANqjt7Rh/GiUiO/U77Evwxm4809zrHjkkrNhvMNZwh68qkDFqVnxlssIVOk5fsyLRsPJIXQddalpdVXHZZZYEoxzXQY5PVZHRlEI0xnmqDCiBA9gCo/eqNaaFfi0ZFYIo= 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=Q2FahM8w; arc=fail smtp.client-ip=52.101.62.88 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="Q2FahM8w" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Iwxz3oIL2O/w/+hS3jACSF9BmiiOPu//2yq2J/xgEI7vYmihYpKXK8MBXOfFO9gl6U3+WXpgrqfABJMgS3/Msi6E/DBdYcYhQ+s3DZTwUuqjRxPqreG8TpWAKiKyqTZS++oIZcCz6uOY4AuekJTCT7APaJSc7aiAdlbMCOVN2tIGfEevuFkpJ3m48ATf7EX5f813YiyEBxaLTBKzYoZSZM306ltbiOeAuOGNXnHI660Al6gPnjBvzAzfMTFKqrRIrXaLblSpW29dkbHZufWJHneael50zsN6eYsH84guOuV9/VJO5v19oyVWOpJvRzDTGOCDn9Fo/yqeTxKfflweGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=1h1gd5ujYkh21FhkeF6/fcIKV0vmkyIgGaZWBOxJPFQ=; b=OXSP/vSHWGat2zEEMXTAfFJ4JRawHd3Ztk/3joMANTcBd6KA2fVY9C0hLzsTS4PAJc+92t2QkpwejMfjRMwvWOvm0xpPmSZCKQJTfwtr0gJS+ke9RmZYf9XXA1ejZbsX2+7ON158AeXeTW247aWS1UcjT3thoZCVOthal5qtSUMxilpQR7N7jN4rONJDpI+P/4C8yoZk0MTbeF12T51pnjfoWnWFoAc3vL4ud2bL9H9lTi3R2b3qjHN5oTcRpOUwd7B3WfMgXs2VSDOH1+C0KXix5uJzY1wp2K5Qc58BvBinmm+Sma3chgkfKFpZc0h2mIBby7b6p0K1viFhKtjAtg== 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=1h1gd5ujYkh21FhkeF6/fcIKV0vmkyIgGaZWBOxJPFQ=; b=Q2FahM8wnPbKnEtHJ55d7eh9dEdbenhvHiXoh9eLA+tHZzApxSz5nShY9ZKVVE8wsFeFOypUpt3iNHFExXVk/OA+HIoMsxSsR9xO4J3RE/bTTCy4/Mj8Nxm12tOJvzc2kwqLfbZmZXAFB7jB8n4P18Y2QqvUNHi5ywY0AqzHuAs= 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 DS1PR01MB8991.prod.exchangelabs.com (2603:10b6:8:21b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Tue, 22 Oct 2024 21:34:49 +0000 Received: from SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f]) by SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f%5]) with mapi id 15.20.8093.014; Tue, 22 Oct 2024 21:34:49 +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, dan.j.williams@intel.com, zaidal@os.amperecomputing.com, Jonathan.Cameron@huawei.com, Benjamin.Cheatham@amd.com, Avadhut.Naik@amd.com, viro@zeniv.linux.org.uk, arnd@arndb.de, ira.weiny@intel.com, dave.jiang@intel.com, sthanneeru.opensrc@micron.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linux.dev Subject: [PATCH 6/8] ACPI: APEI: EINJ: Add debugfs files for EINJv2 support Date: Tue, 22 Oct 2024 14:34:27 -0700 Message-Id: <20241022213429.1561784-7-zaidal@os.amperecomputing.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241022213429.1561784-1-zaidal@os.amperecomputing.com> References: <20241022213429.1561784-1-zaidal@os.amperecomputing.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: MW4P221CA0027.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::32) 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_|DS1PR01MB8991:EE_ X-MS-Office365-Filtering-Correlation-Id: e19714ee-d77a-45d6-8be8-08dcf2e15b22 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?que8s7NswWdER17tAUj2tqvEzv7BQl93uVN/zvWdlL5FsBiGiwZ7j7R2WC7L?= =?us-ascii?Q?me19BnXnMUhYnJ7rs1CIcYbf1ic4rvekOY9VE+RH/qxEiN9Jku1duUC70n+z?= =?us-ascii?Q?wN6kBS9UZR6RdDzKtwXAxMpfW72lMpF9juG1ZKYXXXdWM6Npt/7NTMPbUDeD?= =?us-ascii?Q?2DGOMvzxoMAhroi/hE3j03An3WmPWzOuv2tsUWOUuYrza209xQng7bqDKFm6?= =?us-ascii?Q?FxBJkZHfh0lV4REuiJEzcQkR4XmGGecrObjVyFkgurtNnQvMbxIZ2WYOjZfb?= =?us-ascii?Q?W0ZAGWL4UwWYpgCUpxQCjMedbh1shFO/YTtP6zEI9qIxWXzRwZl6HaSmkmj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urzuHtPuBmHNsEih/x3an6COsqWFhrfu?= =?us-ascii?Q?92jl0tvoOFR+9HT4N8epAJcj6dUHugtt/LV0QmwrJSUqSg4IT83n1VQBzfJe?= =?us-ascii?Q?ZwudScb0OWxQbBLzFXun/dBgz7GBh2zM0soVYz0nNHHSdfptVJXGgrFw/j6a?= =?us-ascii?Q?gp2uT3Yw1NrXKXf62FcvKm+Z9UgY?= 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:(13230040)(52116014)(366016)(7416014)(376014)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?a936a7gGu2RJnBy/SkGlQ8ZqbZHDa7WBqHjm9iNcCKXeVBzmNeHWjmzl3WQC?= =?us-ascii?Q?niRryrmLmDobXOLvNbp8x0ggMHr+SFmih6bChlPktjIYZnyy0G66Q+j46m98?= =?us-ascii?Q?4e5P/xktMm7sI6ZCEqIcVItGXiHGTmK0kaEb4ETEjajvLsSynMIaAYR1bFDR?= =?us-ascii?Q?rmko8fCJW3tETSW/RSIXuuyKy7X5Ur92dJdhAx00gt57wSduS8D2ky5cz3qB?= =?us-ascii?Q?U03iXOgvtgQKbDHw6zYlXN58LyyCbmg2w+3ExQ5QtNuiWGoJURwP+zSFr/9Z?= =?us-ascii?Q?C0sWjmKU5qIOMdVj6fSj7Ec5/e87rUB/VO0ICppvpkRy0ZhGQOoNS7PFb1uD?= =?us-ascii?Q?LisAZF6pTSFh+oO2eH/AFQHyhztW5SsuPDjPLB0Y7Ii7QaFnHB+vJtiQJx7f?= =?us-ascii?Q?qnrqMiVN8ZUDn4qCLvRcjOcEFe9xZYb5a8jR51vAy8tOxK8+pWTJMB6Pb1Lh?= =?us-ascii?Q?ePgETHh8U0pPiz5b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= =?us-ascii?Q?lNZWFoAp8+ZAFSToIv5kGZiQht85JwSbpC9TCWW5+IGLq31+bj0My3w5H4N0?= =?us-ascii?Q?tY+titmR7l5LeYVMjxe9TvvDHgkM1usHX9ACYbInzdvgOexXR3lcPFT7Vz3H?= =?us-ascii?Q?1WqKTDMK/lVEVIGleuokKvbv2tB+4ECnO6kc/Dvzq1QnO59L6Z/H4WrHjCMt?= =?us-ascii?Q?dC/lByNbop2Msed7OiLCOpcGgpAfXzRbQtxxkf8Enx0hpa1gVwT3COVAhTAk?= =?us-ascii?Q?y9zgznsAi9Enqxh7ymaEoVk=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: e19714ee-d77a-45d6-8be8-08dcf2e15b22 X-MS-Exchange-CrossTenant-AuthSource: SN7PR01MB7903.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 21:34:49.1652 (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: RdPoOvxBP363pie88LQX7rqjVFusOfzELCTmduN3msrR4jBdtpOlFykvCqWrkvO/yYugsa8olrhbxvt2s2dPS2/VnhXYvnoPfv3lR+j6dmVCSvK6Dvo2a8TBQSwsdWBL X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS1PR01MB8991 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 31a13ad6c4e5..bd46a611eef7 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 @@ -857,6 +861,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]) { @@ -906,6 +923,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 01:00:11 2024 Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazon11021088.outbound.protection.outlook.com [52.101.62.88]) (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 440DD1FDFBD; Tue, 22 Oct 2024 21:34:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.62.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729632898; cv=fail; b=VVM4qGMDnqUa64dVu6lPOTXw8X8n4wcsLXRm/rb6SuiRRc/UgcAteQu3sTRUgmiBUsC3tq5vYSFNcV+ZxgDyowtb6n43g1YTXNMSvMbXxmT7TS+ArOTSYiyzG3/0tEfBarDjABJGJzTWER5ziWHLj2Rx8d12esr5Y10ksl/Qvgo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729632898; c=relaxed/simple; bh=RgTuf7Tl5pCEkoTFVkO5PS7PfcpZervL8uKzE2ztS5s=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Y3pJJwaIYXJPwOLn0O/ILBi17ZQFzWlBDFFti+Okvrn8ljhMQOWAnujK28fLVA26/uyEeMLo/wskyUxuNK4X/tbY812NwyUH2VM8NwZcrt4w/7WzirkScQZ3/0Mcs0JI6Vbzf0wvEgYmgZrllhqkjn9jS+z8kbu5WpZR0bCwNVs= 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=hmciz4bj; arc=fail smtp.client-ip=52.101.62.88 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="hmciz4bj" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WkxUkCoH7FjYZEuCSfLdlaiw9zAa8/juZlUHoVwyc5dTua11ba+LpK2v9G/glPF5egMQHf0R8/IxoMYFhbHDj2K4q1i1g2HZEs/zUfDNgUMYmcPKXcGJhYlTgbgdBRzGGBa8R7Xj8dQQLVhba+KxAzeUA3t+mOR5nUeHHhDDRUWFrYM3waJrd+xgSNG0N/neQ172ub29nJ1suCitBwpjPWsLucxvQpAOMxoMPBcVanqnZ8SX0KUVK9mgxmnUpgkKhJpWcnW9YbK+3YBZObeKjrYpQHqankkusQKbjwswIPmgmqGTGbO4Eet1jrqKat9oshj0pADuC7AZujztUE7s1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=i8SU1tGZDZpK2DWW3QVJUYW6fVUfhNKfppdBc0Q/KrY=; b=l1KITH5RiZSUTtjsTX8h04TmwmUMHxtf75IydSOwQxxOb2/iNiGaQ33brNkt7asKLWScJ6RUTIjLG6+/VroKaj/2Yc4oBkIGmV3DjPYBmIero9hlZWefVNZ8WHo8LYig1ucZG80HFsLvs5Qu/TF/LggzJh628PbBVBDjrCGS//35yiEJEO70Cqng+fA23BtxWs10ozfk3MP7nzEPDTzbTYNXUmK/pYcR6/dyU9Flyl/w07JVM8mJaf0B75zjpWI6eHCWnQkJzev+nC1U2q/q8NARgrrxaMfe0HSHtISz7tsUGYZc2ln8IWiXamYOwgc0/gIueW+mGws4LWLePkhrvw== 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=i8SU1tGZDZpK2DWW3QVJUYW6fVUfhNKfppdBc0Q/KrY=; b=hmciz4bjQSRlD8SnaWNk4O0DQzOWAD8Yg3Qlrinhn0gnlMTpqGjWqa9sv9QLKg/QuxN2CZmDcVdSWnMO5ECjAPFPa/YX+sYA/YOplox99NWqlyhDkGVhezevmV5exVXRFfMuCHYiEnm++iHvc+CEbPMZubAJ0FHhny9BSrgLRLw= 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 DS1PR01MB8991.prod.exchangelabs.com (2603:10b6:8:21b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Tue, 22 Oct 2024 21:34:50 +0000 Received: from SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f]) by SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f%5]) with mapi id 15.20.8093.014; Tue, 22 Oct 2024 21:34:50 +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, dan.j.williams@intel.com, zaidal@os.amperecomputing.com, Jonathan.Cameron@huawei.com, Benjamin.Cheatham@amd.com, Avadhut.Naik@amd.com, viro@zeniv.linux.org.uk, arnd@arndb.de, ira.weiny@intel.com, dave.jiang@intel.com, sthanneeru.opensrc@micron.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linux.dev Subject: [PATCH 7/8] ACPI: APEI: EINJ: Enable EINJv2 error injections Date: Tue, 22 Oct 2024 14:34:28 -0700 Message-Id: <20241022213429.1561784-8-zaidal@os.amperecomputing.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241022213429.1561784-1-zaidal@os.amperecomputing.com> References: <20241022213429.1561784-1-zaidal@os.amperecomputing.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: MW4P221CA0027.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::32) 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_|DS1PR01MB8991:EE_ X-MS-Office365-Filtering-Correlation-Id: b3e51744-ad9a-45f0-17db-08dcf2e15c11 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?TxBaRggXdPNX78ihY1rEMgahAL8Hhv83gR36/kRZ/TeGo+3bRrt46ET4C/wk?= =?us-ascii?Q?Bvn41e9XnWJQpS4hBK8EBzlhAQ6BXwExZCelp9k7IVpJ4hQyZubPSDDP7oke?= =?us-ascii?Q?pb22XI1GTNsccHBho9m00xzVE2A7eNAAgq8zc/s7DhuNoWj3RDFfK+Ombkpe?= =?us-ascii?Q?ghpanwE40AalFN3MlnL4z/2zHtn/YdZspF6kEVAa3kmvNlp/IH1DdDyxgjyz?= =?us-ascii?Q?SoDMn+nYtWYJ91YeiJLOOmd/RoGtwen+3iTAosrw3ptAdmaCxqRLiKbusIrd?= =?us-ascii?Q?xAWF5gpjFf2OTXeLzvT3A+dHzwNAXEh/UqBXXVBykTUnQhq+EZ5Bp8ocGu1Z?= =?us-ascii?Q?lPY9adHlvFHCCUxJ+KVNPzrwiY/3bP6C/C/JnHbPkqI6pznw5S9SBXuNIu7g?= =?us-ascii?Q?AvX27STVQ9QIVf+ygaGi/ZdycpdQEoTqRWWhtl3EbLW2PB0KfZBmR4q3OL7+?= =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Z3+YMGa4ntOrY+a+psVDEhp?= =?us-ascii?Q?qvBk8jz7M0IUSnKqF3U5VtHos7kz?= 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:(13230040)(52116014)(366016)(7416014)(376014)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?4Dn4CXDcs4dRc0k/29u62R3vx3GrgXBiEZP9vX4yxObYXoFCHEex24SYRhMe?= =?us-ascii?Q?WCiXKO/FMAR772kgVR+BViH7qsmG9VmLVYcwd9lSTmZ/CpatAtyHxoUEG2Dt?= =?us-ascii?Q?VGpZRcN4rlyOVibptKTct4iOGQSnd69bRtY7IXhocGWzu+gSIJBkkj6SLpp0?= =?us-ascii?Q?F8TQCvHBkWVWeFYXm6vAR1Xuv+9eOvytoDurTnyzmGiQiS48y79Sb44tydVW?= =?us-ascii?Q?kkuV8ccB33xcYek76KWBSV/Z7v9KsE8npNNJ/H3H1NTCpmKgydO1mN9mLDSn?= =?us-ascii?Q?MIG9pk+TObYfjx5hxAZJ5gpyrWV3myypMUkPdkZyCG+dmqaR9r2GDJlriAUR?= =?us-ascii?Q?omKDDLrRPt4SXRf+72VfB8rdJ504OJFOQB28CELBlYjJrFoSLDPPUHaXXN2u?= =?us-ascii?Q?FmT3M2d15FyBQtA19qXefmQp/3bxqv/1NigHTItFaQxatBsXIEaCFz2n6SAT?= =?us-ascii?Q?wt7DL7ZVOPfLhAxY0TssJw55DOotJXrY3Ug29kOo8MGQxyLZ33asEtX29sEk?= =?us-ascii?Q?nFsiQ7cSTC0pQn2QCnzWSVeYjKmGvWQ9Dgns3KO+dB/xbltv9ndBpPHdCkqb?= =?us-ascii?Q?TdROMgzcca+84zZE4PllLmv38zTzQzEjgVeQPVG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r5P+yr4noNFUkE/BtNs47lbLGyETCXDyyb+BYxolHkiLPtrJTDPmQNq3?= =?us-ascii?Q?GZzQyAzU+LtAxyfwodA8tqW571Qs8JLOe19hnfwbmyUiX/TopiIxv7ivfz3v?= =?us-ascii?Q?oagdJUj9Wry6Wg65x/2WbDo=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: b3e51744-ad9a-45f0-17db-08dcf2e15c11 X-MS-Exchange-CrossTenant-AuthSource: SN7PR01MB7903.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 21:34:50.7503 (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: hJBm0NqCA7t6jHQvsOeg90/K7CEwe5M+SojY9tfShvLpjJ83991lVaRXKNrXtqo/KGseQ0YTgVJilTmeVufNqwt59Q8LPmiHnG69+z0vyrZio7VQZBOfwDQ3o9iiOW1m X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS1PR01MB8991 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 | 76 +++++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/apei/einj-core.c b/drivers/acpi/apei/einj-core.c index bd46a611eef7..bc833f42dfc7 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; } } @@ -496,8 +514,49 @@ static int __einj_error_inject(u32 type, u32 flags, u6= 4 param1, u64 param2, 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_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) { + pos +=3D bytes_read; + if (count > component_count) + goto err_out; + + switch (type) { + case EINJV2_PROCESSOR_ERROR: + component_arr[count].comp_id.acpi_id =3D comp; + component_arr[count].comp_synd.proc_synd =3D synd; + break; + case EINJV2_MEMORY_ERROR: + component_arr[count].comp_id.device_id =3D comp; + component_arr[count].comp_synd.mem_synd =3D synd; + break; + case EINJV2_PCIE_ERROR: + component_arr[count].comp_id.pcie_sbdf =3D comp; + component_arr[count].comp_synd.pcie_synd =3D synd; + break; + } + count++; + } + if (count !=3D component_count - 1) + 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 +629,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 +643,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. @@ -913,7 +980,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 01:00:11 2024 Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazon11021088.outbound.protection.outlook.com [52.101.62.88]) (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 344BF1CF5E6; Tue, 22 Oct 2024 21:34:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.62.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729632899; cv=fail; b=mqviea2Jfmf/OpkZV6Co90vOrBbYejiYeSnX116WVRE5TrJikpXlOeyIJQ+9I/6ZQw+9nzlSuiwlIFeySrN3maicWIp532VkEu8Ruu9fUxvsb+T0dGazDJrHKuA0VQJegF66tSca7MdDd3T04Sbz2ZFxWZ5r/+xeDeDAYrYcuME= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729632899; c=relaxed/simple; bh=iHnv+npEb3r+z1QzrBsfyz29acI9VLmO7cSjsXE/b6I=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=sgqGwG2EUEN/m7pTWIiTBy8yjQAzSl0ZnHVHx/tTQGPyaD153SPtRuuQqs6PAfbgxsaZCzPbQH0Vur1aSjJzdNeEgSbk20KX40SYkUyiyMAVZrgLolM3DPPcp8fg/dEuIR+tMCJrZkUL/irquzalNhHo1HW7cBdtFKVpWVLPWF8= 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=JWZTQiKq; arc=fail smtp.client-ip=52.101.62.88 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="JWZTQiKq" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MkzROVvCUuioLi+KKF1Eu6d4oRnXjXN2jbAJy4E8QbBTfwUBDEEd82QAloekLiXv/LcqwYwVmxVdL9D4CWetx1PBIAPUleLQHN5JC5/UIJoJnc+8Sqb1BSkfi8+vGIpcFms/OYXAHACuipmbf8I8kRbBJnKGPhvixtLMVWmMpIkm3WzticuXW9pksQbgjUaZX3eZE7uhkPXChf6YFgDY9eL5DH0OLb1o2lVEQg1APfPGiuHVFnJs5g/ggkDcbRzAusMpOMAnZIIMqNxzqrvTeygHp/ASr/WZSMav1kFctyHuJGYGePdEKGoVoxUzqVYzStNDPraZDpIcyTxvA/Wxwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=6deruYvRe8MdBxifjr6eImpHSrNQnDP9yNtvWcgGjfQ=; b=d7UjphpFxSvRSwwzcDSnTcIPKXgDqpMMnwohTGggRjww65N3KHysHlM+8ZWTODcOOaf8gIustCyU6B4nn88vU6UscZP7QfHywYZHkSQvYD86FXqhHuOG7zCwFqjN/uw/3YLN34IhfRukpkBAzROtYU+muwHeizPBHy62F7W10vD/AVfxNUi9hvI2jDkJqJC9B+zNIB4Lsb3jwQNauJUBT8baBUsh4L1mlLnfPpafbDvZGIVjzlwvIDMfTuzHLBAABpvsMd57SIDSMc9fWCtt1a+KeoBedxl7NYUQTwuwmuohUuZ0OiqitZUz6Zems//cGLb5EUDEb0SpPuiOaYNggA== 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=6deruYvRe8MdBxifjr6eImpHSrNQnDP9yNtvWcgGjfQ=; b=JWZTQiKqJrGwmcu0+p7/zxL6v2vnUvgxBhCdSxmpIia4mQWDLi2jEWWNtkL4rcJEm3izgo83IJT+/gl3zAH2nFi+lyHVgZzbEg3QXoXZoRp4+SAzcxFiaYHSEVgoJfM3jlx/6xL0GPRSL7H+svP0gBZv3pFn1BEexXXMgPlRdX4= 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 DS1PR01MB8991.prod.exchangelabs.com (2603:10b6:8:21b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Tue, 22 Oct 2024 21:34:52 +0000 Received: from SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f]) by SN7PR01MB7903.prod.exchangelabs.com ([fe80::cf45:9855:a64e:382f%5]) with mapi id 15.20.8093.014; Tue, 22 Oct 2024 21:34:52 +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, dan.j.williams@intel.com, zaidal@os.amperecomputing.com, Jonathan.Cameron@huawei.com, Benjamin.Cheatham@amd.com, Avadhut.Naik@amd.com, viro@zeniv.linux.org.uk, arnd@arndb.de, ira.weiny@intel.com, dave.jiang@intel.com, sthanneeru.opensrc@micron.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linux.dev Subject: [PATCH 8/8] ACPI: APEI: EINJ: Update the documentation for EINJv2 support Date: Tue, 22 Oct 2024 14:34:29 -0700 Message-Id: <20241022213429.1561784-9-zaidal@os.amperecomputing.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241022213429.1561784-1-zaidal@os.amperecomputing.com> References: <20241022213429.1561784-1-zaidal@os.amperecomputing.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: MW4P221CA0027.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::32) 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_|DS1PR01MB8991:EE_ X-MS-Office365-Filtering-Correlation-Id: 58d0e2b0-d617-4689-1fdb-08dcf2e15d01 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?lK4R6qGanLMimTkA6dC1N01HoVjcaftACYQHGallws/4uW8oDeelAO5Amv3l?= =?us-ascii?Q?k3tnjf8IOwGaOUQRyrcKR5woeeZ3Wadas3dq3BKIs3zyeMDz66b9wcWzkHj+?= =?us-ascii?Q?0srKkc/OuVB7gBs1GNuANVkipLpeMl2Oa0rOdm4Es5nnB2UXVWSARsbSzXZz?= =?us-ascii?Q?kDyJSHXRnp7CegM/1GzCL4d4oEbqn74GAyWbYbwx8/rz8uzI8Gh52lpEYO+D?= =?us-ascii?Q?Mk/MoO9l8IZ5Q/nt5UThEQI607UZ1xDsAHSDF+2Btvci02/aZzEpcAS2H63J?= =?us-ascii?Q?qSSRQY23XBTFxgh9h7mHD69vDqELF5/APeWLh3z74mQmYCSLH5dRZ0PukheH?= =?us-ascii?Q?Ax1H3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IMTBEp5MF?= =?us-ascii?Q?1rUfgrgc0jOYpzugMP9EO6qOxcVeJSDCeMAz9YVy4jt9t2O55ZU9mdAJPpZK?= =?us-ascii?Q?31GMPH8qoHU2PzWUZG7fCURitWkZxNlS8oVbCfUusQxfrg=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:(13230040)(52116014)(366016)(7416014)(376014)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?o7KMzdsZItmbjz60o8GT2pnsilOsD7OZ5k4vxH8xVPfSnM92gQmINqybYeSl?= =?us-ascii?Q?ROaoD9/RzoMUETOwDOrR66+ujv3Ztbz4Ht9UJ506NiQ5Fn/idOdjQv1eOWZr?= =?us-ascii?Q?w2PXzopo/s5QycpnFZDPR2SLMXJwHpKBasswQef9WC5QS8vZyRY5Ao6Sa2ym?= =?us-ascii?Q?3eXqY7uk13kdk+oZGjhqqHR3Wch+zbfGaDIYO/XUHaye+uMTDMTW6EJz79mC?= =?us-ascii?Q?cwFDhunUhjlYQ1UTYycaDUxeSpbncu+XQVjfwRJcqYkD0Vj83I3ni6pn056X?= =?us-ascii?Q?NL2Mr6BLY/T7SaRIHn38QJVHcxqmWUXOsSTH8k2TUERcmiPFxx2BDc3/8JaV?= =?us-ascii?Q?8Nfvn7mMdsXG4RqHjB1O80CdtSgQfAuG74wUGLaRiimnJ7qyfiTdT2zMxBZd?= =?us-ascii?Q?3YeHSFyl713pZnN+FaPEUGRn+z67BBOn+NjXKeMus0N+LkqkAYeAmztbmQfG?= =?us-ascii?Q?JPyVZmV1GThLJjIJDdy4y2Jw+dgz/jkejLPNEX4eqe1PtNRhmjPOasvrFL9H?= =?us-ascii?Q?OJ2M39I5Q51n8k03ND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q?0s5nMX+zwjAsBBp3XxIkpxzAMLoqEjhautZNBWOd4mdmjZmI/hvVe8RuSbvK?= =?us-ascii?Q?t4C9fGOQjT6ag5pzzK1qoKPJNFIIQyxblydAFLWGPzgNSblmWfwSxnQANgPu?= =?us-ascii?Q?JjhLYmPGG/PlxpwzWhkc7NhKPbVTCHjeWdVHdwaqFvmpqwYUY15SVGogSvP4?= =?us-ascii?Q?MMU9Q+xBbQ3S2KCzdGNkhzk=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58d0e2b0-d617-4689-1fdb-08dcf2e15d01 X-MS-Exchange-CrossTenant-AuthSource: SN7PR01MB7903.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 21:34:52.3130 (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: qyTECuYg5rsLvhPyLRBCZrq9UrVKvkFvoZ/uI4KUCXIRWO1TOk5aJIm56FgRzL/W0/t9nOpMKmBLq97+8NXiv2P738021pJ7CHlKIgQgnSIb98va4op27yMLqOQkILSX X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS1PR01MB8991 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 | 46 ++++++++++++++++++- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/Documentation/firmware-guide/acpi/apei/einj.rst b/Documentatio= n/firmware-guide/acpi/apei/einj.rst index c52b9da08fa9..3ad092111035 100644 --- a/Documentation/firmware-guide/acpi/apei/einj.rst +++ b/Documentation/firmware-guide/acpi/apei/einj.rst @@ -61,6 +61,14 @@ 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. =20 @@ -85,9 +93,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 +120,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 +133,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 +162,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 +216,26 @@ 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 + 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 error + # 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