From patchwork Fri Mar 4 05:40:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilkka Koskinen X-Patchwork-Id: 12768487 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 11A03C433F5 for ; Fri, 4 Mar 2022 05:40:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231287AbiCDFlY (ORCPT ); Fri, 4 Mar 2022 00:41:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238157AbiCDFlY (ORCPT ); Fri, 4 Mar 2022 00:41:24 -0500 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2091.outbound.protection.outlook.com [40.107.237.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58399151D32; Thu, 3 Mar 2022 21:40:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AQv+wBRIC4tjcZABNUmDa9/Iz2LS/eEh0qnxGi+jSba1tSBJvcN6bS3tbChiVGSUDKspIV+rnoZHnVG+icYD/bCFv2SjdamfMzN0+R0722LQTakMz7V2pcwaftNYmianwgtdjqeq1/KsS5zFDe3zGYZrM2Y0zlCZhPaYHDw7SXIRcdN0en/9E0SB9R/1LdHwmR/Srkwi/3/uegN2XMp+Qqbg9MlPqzM/i9foJNCwGigm4192zwFftGl1BAXDvCnLYDsEYMjHVLK2MELGWb262dYiBR48hAbMfVM977i/oaNXTs1x2jULAfWdpV5YlI+tA2WmXxRwd2B5WOthQr9Zfg== 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=TRcG1a8LNkbBVzx5ghVExIk84D2nzWyVkxDYCiCEHdiSKFjPHMP54le9FbCJEAii5ONhwjGhUCkHCnj25RuOT2qqLwTTpPkTZrSMo1hZHUTpo6mdisTJwsXEv9Tw/vV155e1BesQ5VId1VHAHsM485/eD6sx4asoZTj3zSi3vA0QE1hBouHwmUiNNI48iaz8IrdU5+2K6aJ+tQi+5Uyy/Tyy5KIVyEBMxu6GvU5LhfoVTyxLJJ1Ts2MWeTVA9MwcdsAYBBhGted1AbFxEucRiOEG+EIMQUUrWzSxL6dTAfHiiUSaOe8amVhojkp7MAX2kowagRlMxk06NCrXbM+XTg== 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=p7noXgrfUN+/VsSbbsaaN4BGUrEey5Ut0v0LvAruMcDOCEfl87TwR7c+zLpJpjSXCQBO3tbutQhbFz2jHhmpdjfn87FQ4ClqNUZHxF3/8Zey1GHrA8r+EEDA6SQViArLUd5+EfN8ZPsfbnoVP5aqsLpx5F3sqkNSkbpE0LapubU= 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 CY4PR0101MB3174.prod.exchangelabs.com (2603:10b6:910:41::33) 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:40:33 +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:40:32 +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:40:02 -0800 Message-Id: <20220304054003.152319-2-ilkka@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220304054003.152319-1-ilkka@os.amperecomputing.com> References: <20220304054003.152319-1-ilkka@os.amperecomputing.com> X-ClientProxiedBy: CH0P220CA0018.NAMP220.PROD.OUTLOOK.COM (2603:10b6:610:ef::30) To DM5PR0102MB3590.prod.exchangelabs.com (2603:10b6:4:a4::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 95bd5b8f-ca42-458c-dac5-08d9fda17fc7 X-MS-TrafficTypeDiagnostic: CY4PR0101MB3174: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: vDvbFN07hq6+uR97XvuNpvJk4NPP4ZsBuqnEk+aI430MVNuXfl/fVAHOmg9QkDF6621TgV+IbSV7GtOLLcW5QsOJpXplOmniJljXhcrYGq+tiV/sxKA1uwyvMlx7nFMejNMKJ5nNXH6VG8Yf2RHxlU9VKZW2qalJkpasIOZYI5Iu2IAIht8lNLtp2nqi0AzD+4VIsoVOsgE9IIWj+RpWM9rgP/ILQsGnhKzzCgsRMHBd+ZQhbJRR44f1gXJG9nAN60WloBvyHAZyTxj3vcPNIds85vZ0rWNUNmRTwvOuEzzLYq30oBjm4Gj7SnEdjDLE2ZdoYTyXv/dPx+ekt7MbcfimA7hr3zlXP34Pj2cvc0eV3EO5rWPfla5R6jvkktZ6odObktxmmBk4/7foFndeTjxTQ0dKyfVutw6S3zuOkQrM7cknWS7HqNIHn1kGDZLN8K9Y3k4nkGMcTIWlHFx1K2fboiGK71nqU092w1hSLsQJ602MHoPCCQlkip0OrcXMTKtiS4kq60uixMnsOj6e1yhOMkxZp8d20PoosgQ0GMF9O6WvQV33Lh7wGZ73L2/sSa2q7c7TJ+8sxIwfTm2oF2MwlYpuWvMZeaOxsEoQTCn3ycbHA3yTbDa8GcmdW265Ne/gHDcV3F4xBV+f8Cblc3ag9E4UO32TgyZu7d0HCphG1tyKBzGSatxNP3OjquyEJyDhFgTIDqHlYccgY0zB3A== 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)(107886003)(186003)(6512007)(508600001)(1076003)(83380400001)(6666004)(4744005)(4326008)(2906002)(8676002)(38350700002)(38100700002)(5660300002)(7416002)(6486002)(316002)(8936002)(52116002)(66946007)(66556008)(66476007)(2616005)(6506007)(86362001)(26005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6b58olf0/uFPfz4MdBrJiseU8fC9z4pcprDTmSZbzB/ECtcwtNNCT9j0Oo+6b5uVWFTbBJPgFhDItNvPlAXqTmsutGSYpFb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mLt/bA+t6lF+ZMuTWcHo5rklsZwgXV6KH90fuBmkllEB6i/iuAYDJHfYzcl3UvM85zA2WHD7GifV1HS0r89Mg0QK3LDdBCs/P0vajrjw50Fibn+hVQ3rYES4OPG84DkJz8nsqO4aK8HQur2ni3rprAE2mXRs0icqAgZxeWb78o/H+1Su6OkpjxGd/ABhaENwzcbu30MRqJeZEY+Xy6nyGS/exXxYa4kml9VHe/7j0Iy5RMjuSVt7oh85vqwhgGhPe0moTCTfrKwoB4w0lXa3UYRZX030hoxUuVI/Z3aFTBu2LwiW4gzrqrXJBCC68vTp+3tPDwDP1cGjjZ3xj3ZCc2ILB99F/1IeDVSaOaPSB5TTxOAKNbshuJQTiDU58OFdHt1TYE/Piv7CSZ6dIK8ms3txdfl5bgyr99d5qFqouJUSuka+KFtwatya4MolTISmacrnScx/3Rp+qg0zswn6f/V2ckePXYyLXJblxTbYDXlEcIQb3ZJWfmwRJwwUBq/+sYW/pJK/DlChl0YMx8E0VB7Cf8OYxCbCM3MFiZcCxi+WnyiE4cFeAn7lOupMfQSQ== X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 95bd5b8f-ca42-458c-dac5-08d9fda17fc7 X-MS-Exchange-CrossTenant-AuthSource: DM5PR0102MB3590.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2022 05:40:32.7814 (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: ejBtP4Aagul5LvZBXFFDEE3lddvEHX5XN2RxXBlGSB475TrhKq8uZKdjphKvS0dhfId8bycN0QGClfETqfMBCZLwjUHYQAl0PB6mdp/NYcdx7y4ndKMd1Yqr31goRJP5 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0101MB3174 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:40:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilkka Koskinen X-Patchwork-Id: 12768488 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 34A80C433F5 for ; Fri, 4 Mar 2022 05:40:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238213AbiCDFl3 (ORCPT ); Fri, 4 Mar 2022 00:41:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238216AbiCDFl1 (ORCPT ); Fri, 4 Mar 2022 00:41:27 -0500 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2130.outbound.protection.outlook.com [40.107.237.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4058A158DAF; Thu, 3 Mar 2022 21:40:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e3tMzAj8qGlsa5H1PEdOvFv0yrZyw4sSrrTfOBhjXjdOzFrXxb+c9RRdPvG4+LFPnqoYi58JA/PYjAJP+ltjw+j7A4AYthraMHfLR/dDLHWP7V+98FozsD7qSqflTyuSAFdvFoPXHtlT+NeZH9B95a30v0zKzgjotjyqEqnGol9h7WMuOrnHewBDPZHtJtR7BHH1pUgm9iiGOwSJJvNxlQdIJspmTiRkfTDeMZFdd2V52syM6WY/yPtBsXVMLfKXl9t+Gf2cM4f8YJmZ5AR1E29EiS2EZ6Yrs8WTfo9g2CFRLfPcoOg2dYOnkQVQQg7w3mKUnKKcaLh8jm/KHv+Hxg== 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=RbyYBbPow87TOqd4bTckMbPZb/VnTWKEkd+Yq83r01dKe6KdfIelGeJix4FKUtiOZqTli7R8RRNB3yQ9jnFB/+nVFE7AT7YSvXn1u7x/JBO9JWK3LcO5FWF8u1wluWOdWXVtxOwbmff0a4HwJExE+bEa+6ydlbtN8CoUOEUDry3YA9gZhjAy3tF3ooG20rbpmx59wcGMDkpE8lNbBHlnrtOEnollM6mDGcq/Y7kz/pNLlXdfbd7vFbcNKl8DgvlFwg3Hek65Y6+QW35BdkXlySrNPkL7x0c3hZYMrc1dgs+HMauRFo7YMj7nIZv5V9Pxmc3veoyYJ0FP1MsRj2vY/g== 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=jNYUithR13phh8v6VWhgVVWw78rD28VxKQyFiyJ48GDAZdUT/dJ7FiwVpaz93kiryUHnABuvlaJj6vVdVPrtm4p5mIxlRvIGbY9NCprV4m/kybWgoDgGJeV7F1j8JpTEf6Md7OGSzKE8XvEX4TefvX8bgW+Prezl73JsDIj+dN4= 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 CY4PR0101MB3174.prod.exchangelabs.com (2603:10b6:910:41::33) 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:40:36 +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:40:36 +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:40:03 -0800 Message-Id: <20220304054003.152319-3-ilkka@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220304054003.152319-1-ilkka@os.amperecomputing.com> References: <20220304054003.152319-1-ilkka@os.amperecomputing.com> X-ClientProxiedBy: CH0P220CA0018.NAMP220.PROD.OUTLOOK.COM (2603:10b6:610:ef::30) To DM5PR0102MB3590.prod.exchangelabs.com (2603:10b6:4:a4::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dad92764-b511-4898-2d34-08d9fda1820b X-MS-TrafficTypeDiagnostic: CY4PR0101MB3174: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: zysyLTDceoUpC61A9AGcFcYNLJr7FKq0n6x7UvzPAFBqSbvDOGX3+46ktGHMxPBah6w1bxKEoSJPEgSobwjugEVmY1O5FeYwVzuyLfM6pmvrXXTC5xlrxxrKx/dhSccm7qMumlmBmcNnzTC8Nd5aGFmWUCDGdaB9jm/Gjx5jDESifpoCKeR7AS/z3NMhIm/5uqnzDnqntvyw3KYv6WcBwxJNhTT2aJvrtv0pJTMxjapl2Iad7Ha9KHjjhH1Rl2B6NLXtb80ldm5mHzcp+WYlPUHKYsTOKEP90AGR3vM5a3JXkoGb7BpbXms4wzKjxR51W6EGGbG5gUdEd8YuDUBHPwUddHvjU35ZyApBlBt8cDDVUCw3H7TmpfAyYMP7ybnY7sgl9tRdj/1tc4PNU06xyDHH/FP42kxGc1y4WOfQtrBK0mXGtxEWXXRBzkNaRquSjTKR0sJbSDJhJqNzr9ROjpqLmcdJKGpVTRGLRtm5Jq2tEUNaqfyock5AlPlR4XxouOkP2P27Fo1ElAjpwywucZM7fVJDIeOuY1FIdXAtQH+IUeeJN5etRA1CzyjqpOoYRIHgH/+73yYO737vAVYEsjMR91T0VzgIPyDZne08wpOi8Q7RJ0I+grIa4WN5MLhA5GDOCdONu4bpUSo1TE4EAoODqj0EYhzqcOs/ipdQ+Urjk7x73BAsNIapuaU1Eob0maGWe1LjMrRj1GfdceDxnA9zh2o79wGYCv5zXZfpy7uam+1DqMW9kcfDcwiez7LG4H5P85lDzLqu7oqwTT2lZ5Q3GnghXhwqV7Z1kuLS1aaNLGjef2oDG9TOSvv02GMp 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)(107886003)(186003)(6512007)(508600001)(1076003)(83380400001)(6666004)(966005)(4326008)(2906002)(8676002)(38350700002)(38100700002)(5660300002)(7416002)(6486002)(316002)(8936002)(52116002)(66946007)(66556008)(66476007)(2616005)(6506007)(86362001)(26005)(41533002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YdPHF4y/gbufosYKNkCNRrWsdOplNfHT9dhdRRPZuFxa5fUe3iNxlYZ9dK0z2CmesMKSaf6hOLFnY/AeUeFu9rmGqzXNtjymnHYc9UVEqJ97iFvBoTNWy2XTeockfeHfB2SClZi+AptNXvD+KkHt8SECBhyUz1By+37YIEXlDE+Vv1ZhBFlx3TBKju8YJT2Ywc22wPUTuuH9uLCASDQKLdN1v5fOAY3WjOutAdi1KwZQC1PtR3rVymMXvwYgj/ibfZgxkip7jGOBlo+lWQ69/r2UECiMgITk/SsB2n/Un8uY/pFuVsxpaXuFhOYzkCWRtEfJNopDtRnXT203XZDb+nR/C46EztWyic7hrEa9jbt6fQjzMD6VAWOeLRQC35olbNGI4wjBP4P/B6///jhH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O5MORqgLScwfSTULpK3NXn6iXcsvwoduY3d0fgAo0Z+J9HMdLkgB2GpNhL1AERthbIY8kkbhtp0OYTpxw3GgakTk7z8t1seKCOZcwT6xaU++rvzGLLJkUmj2rq6r2wUe0NjB1YBMPXchqvsUXYCyfW0oWSJURp3X3HvWw/Spf/TxAxqSwCQi/e20vJT5yb7tvFl0b2bgSir3JTasybmd+/PdKgS6WklJhJNWJvB1T1pKBF+cdsI3p59XHVtdv94M/WOfv9i+4A== X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: dad92764-b511-4898-2d34-08d9fda1820b X-MS-Exchange-CrossTenant-AuthSource: DM5PR0102MB3590.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2022 05:40:36.5624 (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: Zqe+eTYUzBBRttkTZRXizpEyexz4puK50tyntDWuoz4yiPRST1s59bfve0uO6C7VSyAYTQlPA4zOljVt0sddLV08mElxf1huRWL3BZA7KY8OrZhZyRDTjcMBfe9urbOi X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0101MB3174 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 --- 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__ */