linuxtorvalds / rpms / kernel

Forked from rpms/kernel 2 years ago
Clone
Justin Vreeland 794d92
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
Justin Vreeland 794d92
From: Al Stone <ahs3@redhat.com>
Justin Vreeland 794d92
Date: Tue, 27 Feb 2018 00:21:23 -0500
Justin Vreeland 794d92
Subject: [PATCH] ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support
Justin Vreeland 794d92
Justin Vreeland 794d92
Message-id: <20180227002123.21608-1-ahs3@redhat.com>
Justin Vreeland 794d92
Patchwork-id: 206052
Justin Vreeland 794d92
O-Subject: [RHEL8 BZ1518076 PATCH] ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support
Justin Vreeland 794d92
Bugzilla: 1518076
Justin Vreeland 794d92
RH-Acked-by: Mark Salter <msalter@redhat.com>
Justin Vreeland 794d92
RH-Acked-by: Jeremy McNicoll <jmcnicol@redhat.com>
Justin Vreeland 794d92
Justin Vreeland 794d92
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1518076
Justin Vreeland 794d92
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=15417197
Justin Vreeland 794d92
Tested: compile-only; several other patches are required for full booting
Justin Vreeland 794d92
        QE has tested limited boot (see comment#12 of BZ)
Justin Vreeland 794d92
Justin Vreeland 794d92
This is a re-post of a RHEL-ALT-7.5 patch specific to aarch64 moonshots
Justin Vreeland 794d92
that we use in beaker.  It is required for these machines to boot.
Justin Vreeland 794d92
Justin Vreeland 794d92
    commit 8a663a264863efedf8bb4a9d76ac603920fdd739
Justin Vreeland 794d92
    Author: Robert Richter <rrichter@redhat.com>
Justin Vreeland 794d92
    Date:   Wed Aug 16 19:49:30 2017 -0400
Justin Vreeland 794d92
Justin Vreeland 794d92
    [acpi] APEI: arm64: Ignore broken HPE moonshot APEI support
Justin Vreeland 794d92
Justin Vreeland 794d92
    From: Mark Salter <msalter@redhat.com>
Justin Vreeland 794d92
    Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1344237
Justin Vreeland 794d92
    Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=13768971
Justin Vreeland 794d92
    Tested: Booted on moonshot with patched 4.11.0-20 kernel
Justin Vreeland 794d92
    Upstream: RHEL-only
Justin Vreeland 794d92
Justin Vreeland 794d92
    The aarch64 HP moonshot platforms we have in beaker and elsewhere have
Justin Vreeland 794d92
    a firmware bug which causes a spurious fatal memory error via APEI at
Justin Vreeland 794d92
    boot time. This platform is no longer supported and no further firmware
Justin Vreeland 794d92
    updates are expected. This is a downstream-only hack to avoid the problem
Justin Vreeland 794d92
    by bailing out of HEST table probing if we detect a moonshot HEST table.
Justin Vreeland 794d92
Justin Vreeland 794d92
    Signed-off-by: Mark Salter <msalter@redhat.com>
Justin Vreeland 794d92
    Signed-off-by: Robert Richter <rrichter@redhat.com>
Justin Vreeland 794d92
    Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
Justin Vreeland 794d92
Justin Vreeland 794d92
Upstream Status: RHEL only
Justin Vreeland 794d92
Signed-off-by: Al Stone <ahs3@redhat.com>
Justin Vreeland 794d92
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
Justin Vreeland 794d92
---
Justin Vreeland 794d92
 drivers/acpi/apei/hest.c | 8 ++++++++
Justin Vreeland 794d92
 1 file changed, 8 insertions(+)
Justin Vreeland 794d92
Justin Vreeland 794d92
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
Justin Vreeland 794d92
index 6e980fe16772..37bc003e7a83 100644
Justin Vreeland 794d92
--- a/drivers/acpi/apei/hest.c
Justin Vreeland 794d92
+++ b/drivers/acpi/apei/hest.c
Justin Vreeland 794d92
@@ -88,6 +88,14 @@ int apei_hest_parse(apei_hest_func_t func, void *data)
Justin Vreeland 794d92
 	if (hest_disable || !hest_tab)
Justin Vreeland 794d92
 		return -EINVAL;
Justin Vreeland 794d92
Justin Vreeland 794d92
+#ifdef CONFIG_ARM64
Justin Vreeland 794d92
+	/* Ignore broken firmware */
Justin Vreeland 794d92
+	if (!strncmp(hest_tab->header.oem_id, "HPE   ", 6) &&
Justin Vreeland 794d92
+	    !strncmp(hest_tab->header.oem_table_id, "ProLiant", 8) &&
Justin Vreeland 794d92
+	    MIDR_IMPLEMENTOR(read_cpuid_id()) == ARM_CPU_IMP_APM)
Justin Vreeland 794d92
+		return -EINVAL;
Justin Vreeland 794d92
+#endif
Justin Vreeland 794d92
+
Justin Vreeland 794d92
 	hest_hdr = (struct acpi_hest_header *)(hest_tab + 1);
Justin Vreeland 794d92
 	for (i = 0; i < hest_tab->error_source_count; i++) {
Justin Vreeland 794d92
 		len = hest_esrc_len(hest_hdr);
Justin Vreeland 794d92
-- 
Justin Vreeland 794d92
2.28.0
Justin Vreeland 794d92