From patchwork Fri Mar 4 05:22:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilkka Koskinen X-Patchwork-Id: 12768479 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAF76C433F5 for ; Fri, 4 Mar 2022 05:23:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232353AbiCDFYI (ORCPT ); Fri, 4 Mar 2022 00:24:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236824AbiCDFYE (ORCPT ); Fri, 4 Mar 2022 00:24:04 -0500 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2131.outbound.protection.outlook.com [40.107.244.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80D6A186426; Thu, 3 Mar 2022 21:23:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EGuESXKZL+aVq32LOp3PlUQ4h/RRDnitujj9YMFF4eYP15uXw/rqMmvoswzsY+rSdMyn3E/iHHCaciEgcwt2lnSn34aJrdzbTrT10F5lGZiWLfKlJ9l/x9nOJiFPwG9jz/ujrkoDHxV+IGg/tmjFR6iy5fL1HsY8gd6vLS4RfMGq4kdwsNBHq/FM1nfSXJeiszhjARiwjY/+514VTGzt778hrbA5CUn+V1kg7buR4UZePgYZEDGg/Wp3Pu9DTp1gdVrnAsVTTWkAyNdDErKUOZx4T1mKsSnvzo3n9OgkAaNjmfgUpOhnQGHnuuvn7g4bztYSRQiqNOngVVvhVKo6OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=O/pNR25m76J3ou5e/I866l8x3mpHuJyr6k15clz2jZE=; b=ZDCrUPYKLbZbuKpHIDidLMbvhT5JNhHcHblj7tiNI9PHpIJ8X9LWnOQBTDbsvyKxYpDRw6m4Z2rEuSP286bp4yMwuIL+uZJ5fxooePNgROtbpA/Eb8vNR3D9bxW8uSjjP4o0AYyvbnqXijPhtuJoGVIcd4s2SllCQn9nwMSnYqfLnlZo0PmQCZUahuRBWq4dog5tzypgyeUnhtefO4MWeNI8xGHiOnYEfSYvqZZ/y+15QNtU9AapQ4HRr4g9ao0UVx3nhQepA1a7n4CrUGB8F/boaQYvV8rJ/Ol2JWfGNFCrBzRCiyWhfVknOghIT45CJsMz51/z5hYob5xboAFedA== 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=O/pNR25m76J3ou5e/I866l8x3mpHuJyr6k15clz2jZE=; b=RauxtSHoKAg3VweYtSzdWZYTGPZbgdscyj+lcBD27VLyp8dU9oPeiF+DOQ8DGqbhl10iBXV5XvttOP5bDF388HUiXhikgVjgSYt4bjP2K8r/KEy2VcTG4DBt0pUjAO8a0QkYOj2oEHVUDMkLK1dBnCVd5PrklWv4f8Huv+C3qbg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from DM5PR0102MB3590.prod.exchangelabs.com (2603:10b6:4:a4::25) by CH2PR01MB5896.prod.exchangelabs.com (2603:10b6:610:39::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22; Fri, 4 Mar 2022 05:23:10 +0000 Received: from DM5PR0102MB3590.prod.exchangelabs.com ([fe80::181b:1522:26bc:c243]) by DM5PR0102MB3590.prod.exchangelabs.com ([fe80::181b:1522:26bc:c243%4]) with mapi id 15.20.5017.026; Fri, 4 Mar 2022 05:23:10 +0000 From: Ilkka Koskinen To: lorenzo.pieralisi@arm.com, guohanjun@huawei.com, sudeep.holla@arm.com, rafael@kernel.org, linux@armlinux.org.uk Cc: lenb@kernel.org, robert.moore@intel.com, james.morse@arm.com, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, patches@amperecomputing.com, scott@os.amperecomputing.com, darren@os.amperecomputing.com Subject: [PATCH v5 RESEND 1/2] ACPI: tables: Add AGDI to the list of known table signatures Date: Thu, 3 Mar 2022 21:22:40 -0800 Message-Id: <20220304052241.151946-2-ilkka@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220304052241.151946-1-ilkka@os.amperecomputing.com> References: <20220304052241.151946-1-ilkka@os.amperecomputing.com> X-ClientProxiedBy: CH2PR12CA0006.namprd12.prod.outlook.com (2603:10b6:610:57::16) To DM5PR0102MB3590.prod.exchangelabs.com (2603:10b6:4:a4::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 70cf158b-9e99-44b0-3b52-08d9fd9f1230 X-MS-TrafficTypeDiagnostic: CH2PR01MB5896:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cV4QvqCJ0gVe9CcNQv1hfepK2P/BsAtQ1Zr7nBAivu684eM2zDeRuUFTqidzB5rzpNd6nIZlC4JUVUUITJ7HIkpfBdcQeMl6CP+zuRKh+O7syVh6IM4dh+b652bZ/wUX7i4/qe5YY09G64IO673AH6SY9NsPUjObRCQaPKYox8ujGdH47aLfN+I+68l//+mCQtphpWNK2WrJCNCZi8V/N5lARHiplZRiOMm2azDMWr5HnRycgH6LEF/u6SzXYmcxk5dvtda5wD83PNk856XHayxDddolM8hpdeLpq5YvfQgtOkR0KPo8xpE/XaFIsy2yhNnccB9H5pKHBqIN22qYfY5zbY60v8/AKh8JUs+q4UBzDwc2Te312NadyPrZ0BSxgxK7eUmYMeKf4aMHqYbx47duTs764guGP7SEJQ75Gqh74B+ovUSGeQ/bIGipSdqNwDHPzbSNcxf/mvgbPJSqqXcO8WJI1JhOfWKhmi/+AOD+5Eq3hzj6QoX+5LCYZT1V7Nz8Z6xd78OhlixgGgysgA0uHtuaeB+g+Fj8viyAqhLIaJ7zKPdQe1IbJ3a3HXXjTwsMZiykTr67t9QeDCnyvJ3pLsFdyevyC8fN2n/6SsJzyPEjjPYKFTvIdLswinJtSp7B9c0Xyip2febTgRbsyC5fTfbpQDydJP4s2LFTxeOWS1fC334RJHqHqY6TV3u0cfALH+4GjEnbH4glWv/35w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR0102MB3590.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(1076003)(5660300002)(6512007)(7416002)(26005)(8936002)(107886003)(2906002)(4744005)(186003)(2616005)(6486002)(83380400001)(38350700002)(38100700002)(508600001)(6506007)(316002)(52116002)(66556008)(6666004)(4326008)(8676002)(66476007)(66946007)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: t34lJF1wKFeEZBVUdOI44APpbV7vh3lgNHf7v0SCfzT1DWAtODQ4kd0iUOY0eGKO+9ONbU6qwhC6zJr197QN4wY1JoSUhXC9mVeRxHnfPcbrLYr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rAsoqSzI1Un09gzdZFrvhAioSTkocxTpT/tVbduEaGLAoQXVQPx57y7/Le1rsZvPH9J84BV92qIb70QpLXOhXz8SHuyvrdDsNtgzk1i20eUAffh5TYT6n71I0Jf6sogUs2K89m6AJyjFWFvDHQUM7DqZs5drsO0DofhBQ1CCsROOg1kOh5yFvA3oyVJ6ZH+qz5PoR7Xdud9EeLBRIzEALAEEqCu0n+yd7IA9ssWykC+Q/pIcw2Lj5Rb7zxNgkT7X6jDgBHx4NBzzzwA1JnpHvP6f/Cp5P4EohnQKw1V2fT8NP3/YH4JwAaDiVY/RiZksZJxhhicTElGIrYTyJV9L32mVIIvICJV0O/L2BwJzNEWiA1jHH4RyFcdKEa/9QcRTzYtrk4THJNmLgNQdvK8FPkMw7OpmQYlpYhh8Hja/qITkTTJl/RwLadHSqxgdmewGrqiDWOXJNLKEFMS3v+5O3CUe5nJCUgkQ0f5b1x/qj17xBeZ+DnxQxDS7NKhqlvAb6qWDy6kdKIdhBhT54HsphNajOWiP20vg== X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 70cf158b-9e99-44b0-3b52-08d9fd9f1230 X-MS-Exchange-CrossTenant-AuthSource: DM5PR0102MB3590.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2022 05:23:10.1101 (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: V5OMJSjg+fxnTil7d28S7am0TiMTPfuM9gfsBmQokO2BwPky1x/8op+VyJ5X9K3SM0vnpfAd4IMH3FwlkGeO/YmXVB4F+dRo8qoqd0yAF524bIEzHffi7Qdi9EmDqK27 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR01MB5896 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Add AGDI to the list of known ACPI table signatures to allow the kernel to recognize it when upgrading tables via initrd. Signed-off-by: Ilkka Koskinen Reviewed-by: Russell King (Oracle) --- drivers/acpi/tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index 369eb998c3d1..ceee808f7f2a 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -545,7 +545,7 @@ static const char table_sigs[][ACPI_NAMESEG_SIZE] __initconst = { ACPI_SIG_WDDT, ACPI_SIG_WDRT, ACPI_SIG_DSDT, ACPI_SIG_FADT, ACPI_SIG_PSDT, ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT, ACPI_SIG_IORT, ACPI_SIG_NFIT, ACPI_SIG_HMAT, ACPI_SIG_PPTT, - ACPI_SIG_NHLT, ACPI_SIG_AEST, ACPI_SIG_CEDT }; + ACPI_SIG_NHLT, ACPI_SIG_AEST, ACPI_SIG_CEDT, ACPI_SIG_AGDI }; #define ACPI_HEADER_SIZE sizeof(struct acpi_table_header) From patchwork Fri Mar 4 05:22:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilkka Koskinen X-Patchwork-Id: 12768480 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CEE2AC433EF for ; Fri, 4 Mar 2022 05:23:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238172AbiCDFYJ (ORCPT ); Fri, 4 Mar 2022 00:24:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238177AbiCDFYI (ORCPT ); Fri, 4 Mar 2022 00:24:08 -0500 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam08on2100.outbound.protection.outlook.com [40.107.100.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C418B1ADA0; Thu, 3 Mar 2022 21:23:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WT502SxKkPJxN5o61VOS5ROVg4Pv+o/jpzwarx1/Wcu0+kWX5Sx02wgmus2AqphxVsz1YMJZvm8PmklCMEqr2ORZKgT7woCXg9K63t6t74HTf7W/gaqK9/wgtNUyd6r5QEfeB5KKVRAtgNAjIEwqDBOqDyM56AABXdxdjSkuK+wSkoLX99ig/CRDyiUerja7PNxSrhd69HmhdX1FlHTct0h9NCOCL132noRyuTyPFyjusbJ+sNtpb1Zx/SPZg/cGbdpJu/4Es5pnCSw6z6ISoJTLHufER26udD/NZQ6+mDH8OSuZ99W9g3RBMnpMmQmdUqcj1esU7fmrj6T/tDSK1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6mfWXihvszlFOIpsJH3Q772oo+mschXSOeDO1eSG5H4=; b=QYgNErm+dzVpCPRULrE61db38uZTWlAzY0YJRX1/uhzr62uri0DvDTNrqGd3k/dDSE2WoQc5uknSbmeeTEps2FVS6QSTTnutl3jikwQS07rmHScZNhfWhkovUi2P8xXbh+8P303huVc6Q0BAvjlCgvvJy7aothWzHZCNKRtW5IQEuSqWFgRsVFmT+d2VKndpF5tvYXAW1rjcPf2l0RBt3deqeYamORFa8BtIhnQLAqJAR7UtDjk4u6Q8TGP0pOXAKgDaCDYVq5ymkPjguwWVQJDqYPlUIY6uUhRHezxUeW4Uv8oPAfnmUza7ielGw2DpZN1aSUdjNOQzy5yqE4tUaw== 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=6mfWXihvszlFOIpsJH3Q772oo+mschXSOeDO1eSG5H4=; b=gXPt/73GJg7I/QxhPdxUjsaqOe1ddFHcYjym0UJkekNU8ItYjVPv77hLTNEW5taSJPc34B2ixiP0oHUTOyHTxGrj9xI7lfcNvPWR34sbr5EDymixv7nI9wLOQ7X/0iG6HsBO+faYlJJ/sZU5R8qbJlqzwPP2t8QKA6cdshXoagM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from DM5PR0102MB3590.prod.exchangelabs.com (2603:10b6:4:a4::25) by BL3PR01MB6898.prod.exchangelabs.com (2603:10b6:208:355::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.13; Fri, 4 Mar 2022 05:23:17 +0000 Received: from DM5PR0102MB3590.prod.exchangelabs.com ([fe80::181b:1522:26bc:c243]) by DM5PR0102MB3590.prod.exchangelabs.com ([fe80::181b:1522:26bc:c243%4]) with mapi id 15.20.5017.026; Fri, 4 Mar 2022 05:23:17 +0000 From: Ilkka Koskinen To: lorenzo.pieralisi@arm.com, guohanjun@huawei.com, sudeep.holla@arm.com, rafael@kernel.org, linux@armlinux.org.uk Cc: lenb@kernel.org, robert.moore@intel.com, james.morse@arm.com, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, patches@amperecomputing.com, scott@os.amperecomputing.com, darren@os.amperecomputing.com Subject: [PATCH v5 RESEND 2/2] ACPI: AGDI: Add support for Arm Generic Diagnostic Dump and Reset device Date: Thu, 3 Mar 2022 21:22:41 -0800 Message-Id: <20220304052241.151946-3-ilkka@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220304052241.151946-1-ilkka@os.amperecomputing.com> References: <20220304052241.151946-1-ilkka@os.amperecomputing.com> X-ClientProxiedBy: CH2PR12CA0006.namprd12.prod.outlook.com (2603:10b6:610:57::16) To DM5PR0102MB3590.prod.exchangelabs.com (2603:10b6:4:a4::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1411cbf3-20a6-4983-839b-08d9fd9f1657 X-MS-TrafficTypeDiagnostic: BL3PR01MB6898:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cdVSu1thxOOAdRgNd3IcrV34oFzUuZF4QEJc/SzpEGTHGoGxpEhGwQElJlt56B37sxbFdUDj7JXkUsgV2zbwtoYmkCphxQr1cQzTQBZoObAn31MQJJ3VgG0iLl0pnvxbwTvqDNws5Fgela6wELVErePoZiGkhp8RxtVrw7DKP5SL+4ujMjjUEI+kvZvJgqYZESSUrf+xMIsLW8PSZAOe1BZl1enLMbhIWNVo09KZiGIig8wR+g2BjO8ZM8Ov9ZcNqHjYwfedZmLI/bHPGiqnuIpDVYpWammM1FeX9ow0G49oSDjmcHcTfbHbeX1oddlq8i8jTw2+i7GpkWfaTT2IRrtXGQJMBLauxx1W4lwOn4cC80ni7IiKeKzVauULpguWblNzndtZFZ9Ws5G82zsiE/WtdQVv65xwR7fC5HMSUa/ss0qra1r9qWLbtQZWuOd/z9DoIXbC1uuCSBjDLKa222d9ZsWJ6Da7eTZvNWZQCkNd4VyFkLzyUDxpbIwrfHgTNhBYcw2Hy9tovWrASeWjnZaDH8bMK8+/HVp6OppCuwnyNBDxSnxQJW3YC9tGbMn5F8Z3/c2IwLHqGn9KwqLQuHlyTsl07r2C9CUSR4t1uq0PAx/iz9iq7EB6AsNYmgit88JwdEn2ZNf0N96Pf1mthRgPyAG41Ng67gJq+aNKRloorGsC6WpTnUp5NWQnBtW2dbAs/5Jdpa8t/DfttqsVUWu1rEzXuzStw5A4jXjPQhRKVGDhKGkK8251m9Hs3s4kkzXQ9ZNZMqEuK1vIptVFcr4monH2p/3J2xCKJY/lbaWqxes++cR6IEigf2IR/0RV X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR0102MB3590.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(8936002)(316002)(966005)(6486002)(66476007)(66556008)(8676002)(4326008)(2906002)(26005)(1076003)(7416002)(86362001)(508600001)(6666004)(66946007)(107886003)(6512007)(52116002)(6506007)(38100700002)(38350700002)(2616005)(186003)(5660300002)(83380400001)(41533002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 13Gp9uWQZMnkiB5EzmfB3R7+mHwbzlAZx3iAAS0uBrOPWZTWyvkj7fHcsBWPWfei4kAd00QjW1TLYvE+DpnOhya3p2JLOW/2vAPsnaYDX//H1enE9ab0R8/2u9kz97eajx5UgFB0xPfP/4MzNPqltUOlRCJycD+wWCTOvi4wN7tSNGtVB+AG4Fb994qc0wqfxwwyjrX+LwarzQ7B5jcnavg7KCLL73alq9by8I9rSBsY3B+pWSzhXLLRPtsnMKq2rsmN9sk7dRMqmUptK0LUuC/NmbIGaYCrD+GvIhwaKr7RtQcq9y9RGwAsB3hChySDOUuoZrMOTQ6wbUb1VdoHeECgveqeJkq6tBaYMmmQjudD7kObOgda9v6oitmhd359k8+uCd25QH5VwpDqxmri7hrgX2EDFxpeUtWamNm4ktQ7XaL/181avQFESE5gHxrXiFDnt5oYWA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PHy/Bb+HegZ1glT4FYhcA3DD6ALYDdGX0zbnsgF7vTq65Z5+afEaBSp1llLQ/M+68pcSJIHP8g7/oFKGcGIrCmiA/8H61e0Qum2eoa50B/EliNs3l2MolAoycXB68h8KTuNbR+Tl2nHwNrGm4deXw1zDVZqv9kJsqJHSkXA592hD9LU4jUFIpjoS6BCRDx0STL25XLYl+SkK+8AYHS/FM66Q== X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1411cbf3-20a6-4983-839b-08d9fd9f1657 X-MS-Exchange-CrossTenant-AuthSource: DM5PR0102MB3590.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2022 05:23:16.9378 (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: iQs4xIjGKeO4OFrF5fAGvN+nSrtiDFLZTY6raeI/utWB0OnlfPiQJIFRiesqj3ur3AHK6AaKtRGi9Z74nUcoI0aitmTaYzRzeDb/lGQ5wzGnW5oRLu8Cmh2o2a4hFNOn X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR01MB6898 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org ACPI for Arm Components 1.1 Platform Design Document v1.1 [0] specifices Arm Generic Diagnostic Device Interface (AGDI). It allows an admin to issue diagnostic dump and reset via an SDEI event or an interrupt. This patch implements SDEI path. [0] https://developer.arm.com/documentation/den0093/latest/ Signed-off-by: Ilkka Koskinen Reported-by: kernel test robot --- drivers/acpi/arm64/Kconfig | 10 +++++++ drivers/acpi/arm64/Makefile | 1 + drivers/acpi/arm64/agdi.c | 52 +++++++++++++++++++++++++++++++++++++ drivers/acpi/bus.c | 2 ++ include/linux/acpi_agdi.h | 13 ++++++++++ 5 files changed, 78 insertions(+) create mode 100644 drivers/acpi/arm64/agdi.c create mode 100644 include/linux/acpi_agdi.h diff --git a/drivers/acpi/arm64/Kconfig b/drivers/acpi/arm64/Kconfig index 6dba187f4f2e..d4a72835f328 100644 --- a/drivers/acpi/arm64/Kconfig +++ b/drivers/acpi/arm64/Kconfig @@ -8,3 +8,13 @@ config ACPI_IORT config ACPI_GTDT bool + +config ACPI_AGDI + bool "Arm Generic Diagnostic Dump and Reset Device Interface" + depends on ARM_SDE_INTERFACE + help + Arm Generic Diagnostic Dump and Reset Device Interface (AGDI) is + a standard that enables issuing a non-maskable diagnostic dump and + reset command. + + If set, the kernel parses AGDI table and listens for the command. diff --git a/drivers/acpi/arm64/Makefile b/drivers/acpi/arm64/Makefile index 66acbe77f46e..7b9e4045659d 100644 --- a/drivers/acpi/arm64/Makefile +++ b/drivers/acpi/arm64/Makefile @@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only +obj-$(CONFIG_ACPI_AGDI) += agdi.o obj-$(CONFIG_ACPI_IORT) += iort.o obj-$(CONFIG_ACPI_GTDT) += gtdt.o obj-y += dma.o diff --git a/drivers/acpi/arm64/agdi.c b/drivers/acpi/arm64/agdi.c new file mode 100644 index 000000000000..28916650d834 --- /dev/null +++ b/drivers/acpi/arm64/agdi.c @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * This file implements handling of + * Arm Generic Diagnostic Dump and Reset Interface table (AGDI) + * + * Copyright (c) 2022, Ampere Computing LLC + */ + +#define pr_fmt(fmt) "ACPI: AGDI: " fmt + +#include +#include +#include +#include + +static int agdi_sdei_handler(u32 sdei_event, struct pt_regs *regs, void *arg) +{ + nmi_panic(regs, "Arm Generic Diagnostic Dump and Reset SDEI event issued"); + return 0; +} + +void __init acpi_agdi_init(void) +{ + struct acpi_table_agdi *agdi_table; + acpi_status status; + int sdei_event; + + status = acpi_get_table(ACPI_SIG_AGDI, 0, + (struct acpi_table_header **) &agdi_table); + if (ACPI_FAILURE(status)) + return; + + if (agdi_table->flags & ACPI_AGDI_SIGNALING_MODE) { + pr_warn("Interrupt signaling is not supported"); + acpi_put_table((struct acpi_table_header *)agdi_table); + return; + } + + sdei_event = agdi_table->sdei_event; + acpi_put_table((struct acpi_table_header *)agdi_table); + + if (sdei_event_register(sdei_event, agdi_sdei_handler, NULL)) { + pr_err("Failed to register for SDEI event %d", sdei_event); + return; + } + + if (sdei_event_enable(sdei_event)) { + pr_err("Failed to enable SDEI event %d\n", sdei_event); + sdei_event_unregister(sdei_event); + return; + } +} diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index eaa511fc9c66..87b93f4df0cf 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -26,6 +26,7 @@ #include #include #endif +#include #include #include #include @@ -1386,6 +1387,7 @@ static int __init acpi_init(void) acpi_debugger_init(); acpi_setup_sb_notify_handler(); acpi_viot_init(); + acpi_agdi_init(); return 0; } diff --git a/include/linux/acpi_agdi.h b/include/linux/acpi_agdi.h new file mode 100644 index 000000000000..f477f0b452fa --- /dev/null +++ b/include/linux/acpi_agdi.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef __ACPI_AGDI_H__ +#define __ACPI_AGDI_H__ + +#include + +#ifdef CONFIG_ACPI_AGDI +void __init acpi_agdi_init(void); +#else +static inline void acpi_agdi_init(void) {} +#endif +#endif /* __ACPI_AGDI_H__ */