From patchwork Thu Jun 28 10:06:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Morse X-Patchwork-Id: 10493501 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BA31D60325 for ; Thu, 28 Jun 2018 10:18:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A54E429B00 for ; Thu, 28 Jun 2018 10:18:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9954129B28; Thu, 28 Jun 2018 10:18:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 382BA29B00 for ; Thu, 28 Jun 2018 10:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=6Cdgpsku8YoJTtlOTiYIkqibX8dbeWp6n2BPhtZPyzM=; b=rVC8mV7ThpYXvi6j/CGoUvgD47 4lbMwZP7RP+Jkq2/J8uwWsxrjsQMg3OnRjuJ8DTuGahgpZVa4R+IL7NSRRWB0S+Qz76xqTXMFdjYe lAlPZ28e0hUQr2KO8SP86NedYXx4jxyQYRYoX+O53LveLbSpMdEkaK/dPNEkOfRMDCDnVtEvYll5H 2zBkKA0vizAOmeWT0YbJoHRwqIjrzaRA3ruxRjxEIM0MDz/xvI2PZs09yjIwPGp/El8qeFIIh+gXx e55F46k6afcL0oRXMwrihUpvY1dr3fB9GwqH0ZxT4uLptxHnTcv8ALExB4Rp0+kNopgZQkLLTDUHI hSUeO4oQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fYU0F-0001Us-2O; Thu, 28 Jun 2018 10:18:15 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fYTrJ-0004t9-Es for linux-arm-kernel@bombadil.infradead.org; Thu, 28 Jun 2018 10:09:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=iMynr/F9MUCDpBtecrABLsOXkbufdLUotbY+FhNWlE8=; b=Laos4pWJD5LSBGgNoMIBATkBX +Qyb2S2n6XnCJyhMOfa3tF2m2YdjAwYdT98v5M4FvEL7YTHItDqfP/dgKwDz0mG/g3JBZ5PQ6waHJ DiqCZBsAvPXBV0Z9q6oKy1zLZi8Pf35qyhI2tOxyc/nnJX5RYmSuzI3JNE6aWgN8P8KahdX/uo/H2 YUVuQ9wk33+rlFbgfuxv+hQ8uKZKESO2JTG2fhiUE6F2hUBNeeq5QjNxkFLYFdNvAFA8oQfLNTqXS bgBUz7zbB8BVcJPHX3O6IZczFs1WlVNbp6WMYZiR9qvnC9Zlqk9RYYqli7l6cW7UrMFWJR65qi2Q0 VlMlpIRaA==; Received: from foss.arm.com ([217.140.101.70]) by merlin.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fYTpo-0004Qa-As for linux-arm-kernel@lists.infradead.org; Thu, 28 Jun 2018 10:07:30 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4016415AD; Thu, 28 Jun 2018 03:07:14 -0700 (PDT) Received: from melchizedek.cambridge.arm.com (melchizedek.cambridge.arm.com [10.1.206.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 768EB3F266; Thu, 28 Jun 2018 03:07:12 -0700 (PDT) From: James Morse To: linux-acpi@vger.kernel.org Subject: [RFC/RFT PATCH 2/2] ACPI / APEI: Add DMI matching quirks for platforms that require hest_disable Date: Thu, 28 Jun 2018 11:06:56 +0100 Message-Id: <20180628100656.10692-3-james.morse@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180628100656.10692-1-james.morse@arm.com> References: <20180628100656.10692-1-james.morse@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180628_060728_477334_2AB05AE0 X-CRM114-Status: GOOD ( 17.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lorenzo Pieralisi , Ard Biesheuvel , Geoff Levand , Riku Voipio , Mark Salter , James Morse , Hanjun Guo , Sudeep Holla , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Some RAS errors are related to an invalid hardware access that was made by software. Sometimes this happens before the kernel runs. For example, HPE's ProLiant m400 Server (aka moonshot) trips the platforms RAS mechanism during UEFI's ExitBootServices. Once the kernel probes the RAS error descriptor regions, it finds a stale 'fatal error', and hits the deck. Add a table of DMI matches to allow platforms like this to be quirked. For moonshot we also want to know the UEFI firmware version, as this appears to be where the faulting access happens. This quirk causes the following to be printed during boot: | [ 2.491990] HEST: disabled due to firmware quirk | [ 2.496659] HEST: Table parsing disabled. [...] | [ 6.341314] GHES: HEST is not enabled! Link: https://bugzilla.redhat.com/show_bug.cgi?id=1574718 Link: https://www.spinics.net/lists/arm-kernel/msg660956.html Signed-off-by: James Morse CC: Mark Salter CC: Geoff Levand --- drivers/acpi/apei/hest.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c index b1e9f81ebeea..d0e49f0cd353 100644 --- a/drivers/acpi/apei/hest.c +++ b/drivers/acpi/apei/hest.c @@ -23,6 +23,8 @@ * GNU General Public License for more details. */ +#include +#include #include #include #include @@ -212,6 +214,40 @@ err: goto out; } +static int __init quirk_hpe_moonshot_m400(const struct dmi_system_id *d) +{ + /* Only 'EFI v2.60 by HPE' is known to be affected */ + unsigned int affected_version = (2<<16) | 60; + + if (!IS_ENABLED(CONFIG_EFI)) + return 0; + + if (efi_get_runtime_version() == affected_version) { + pr_info(HEST_PFX "disabled due to firmware quirk\n"); + hest_disable = HEST_DISABLED; + } + + return 0; +} + +static const struct dmi_system_id hest_quirk_dmi_table[] __initconst = { + { + .callback = quirk_hpe_moonshot_m400, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "HPE"), + DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant m400 Server"), + DMI_MATCH(DMI_BOARD_NAME, "ProLiant m400 Server"), + DMI_MATCH(DMI_BIOS_VERSION, "U02"), + }, + }, + {}, +}; + +static void __init acpi_hest_quirks(void) +{ + dmi_check_system(hest_quirk_dmi_table); +} + static int __init setup_hest_disable(char *str) { hest_disable = HEST_DISABLED; @@ -226,6 +262,8 @@ void __init acpi_hest_init(void) int rc = -ENODEV; unsigned int ghes_count = 0; + acpi_hest_quirks(); + if (hest_disable) { pr_info(HEST_PFX "Table parsing disabled.\n"); return;