From: Geoff Levand <geoff@infradead.org> To: linux-acpi@vger.kernel.org Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Riku Voipio <riku.voipio@linaro.org>, Sudeep Holla <sudeep.holla@arm.com>, Hanjun Guo <hanjun.guo@linaro.org>, Mark Salter <msalter@redhat.com>, linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64/acpi: Add fixup for HPE m400 quirks Date: Wed, 13 Jun 2018 11:22:30 -0700 [thread overview] Message-ID: <51d3d738-cdf5-2992-bba5-c3e1f34096c2@infradead.org> (raw) Adds a new ACPI init routine acpi_fixup_m400_quirks that adds a work-around for HPE ProLiant m400 APEI firmware problems. The work-around disables APEI when CONFIG_ACPI_APEI is set and m400 firmware is detected. Without this fixup m400 systems experience errors like these on startup: [Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 2 [Hardware Error]: event severity: fatal [Hardware Error]: Error 0, type: fatal [Hardware Error]: section_type: memory error [Hardware Error]: error_status: 0x0000000000001300 [Hardware Error]: error_type: 10, invalid address Kernel panic - not syncing: Fatal hardware error! Signed-off-by: Geoff Levand <geoff@infradead.org> --- Hi, It seems unlikely there will be any m400 firmware updates to fix this problem. APEI support is desired for new ARM64 servers coming to market. Distros are now forced to have their own fixes, not enable APEI, or let m400 users fend for themselves. Please consider. -Geoff arch/arm64/kernel/acpi.c | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index 7b09487ff8fb..3c315c2c7476 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -31,6 +31,8 @@ #include <asm/cpu_ops.h> #include <asm/smp_plat.h> +#include <acpi/apei.h> + #ifdef CONFIG_ACPI_APEI # include <linux/efi.h> # include <asm/pgtable.h> @@ -177,6 +179,33 @@ static int __init acpi_fadt_sanity_check(void) return ret; } +/* + * acpi_fixup_m400_quirks - Work-around for HPE ProLiant m400 APEI firmware + * problems. + */ +static void __init acpi_fixup_m400_quirks(void) +{ + acpi_status status; + struct acpi_table_header *header; +#if !defined(CONFIG_ACPI_APEI) + int hest_disable = HEST_DISABLED; +#endif + + if (!IS_ENABLED(CONFIG_ACPI_APEI) || hest_disable != HEST_ENABLED) + return; + + status = acpi_get_table(ACPI_SIG_HEST, 0, &header); + + if (ACPI_SUCCESS(status) && !strncmp(header->oem_id, "HPE ", 6) && + !strncmp(header->oem_table_id, "ProLiant", 8) && + MIDR_IMPLEMENTOR(read_cpuid_id()) == ARM_CPU_IMP_APM) { + hest_disable = HEST_DISABLED; + pr_info("Disabled APEI for m400.\n"); + } + + acpi_put_table(header); +} + /* * acpi_boot_table_init() called from setup_arch(), always. * 1. find RSDP and get its address, and then find XSDT @@ -232,11 +261,14 @@ void __init acpi_boot_table_init(void) if (acpi_disabled) { if (earlycon_acpi_spcr_enable) early_init_dt_scan_chosen_stdout(); - } else { - acpi_parse_spcr(earlycon_acpi_spcr_enable, true); - if (IS_ENABLED(CONFIG_ACPI_BGRT)) - acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt); + return; } + + acpi_parse_spcr(earlycon_acpi_spcr_enable, true); + if (IS_ENABLED(CONFIG_ACPI_BGRT)) + acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt); + + acpi_fixup_m400_quirks(); } #ifdef CONFIG_ACPI_APEI -- 2.14.1
WARNING: multiple messages have this Message-ID (diff)
From: geoff@infradead.org (Geoff Levand) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64/acpi: Add fixup for HPE m400 quirks Date: Wed, 13 Jun 2018 11:22:30 -0700 [thread overview] Message-ID: <51d3d738-cdf5-2992-bba5-c3e1f34096c2@infradead.org> (raw) Adds a new ACPI init routine acpi_fixup_m400_quirks that adds a work-around for HPE ProLiant m400 APEI firmware problems. The work-around disables APEI when CONFIG_ACPI_APEI is set and m400 firmware is detected. Without this fixup m400 systems experience errors like these on startup: [Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 2 [Hardware Error]: event severity: fatal [Hardware Error]: Error 0, type: fatal [Hardware Error]: section_type: memory error [Hardware Error]: error_status: 0x0000000000001300 [Hardware Error]: error_type: 10, invalid address Kernel panic - not syncing: Fatal hardware error! Signed-off-by: Geoff Levand <geoff@infradead.org> --- Hi, It seems unlikely there will be any m400 firmware updates to fix this problem. APEI support is desired for new ARM64 servers coming to market. Distros are now forced to have their own fixes, not enable APEI, or let m400 users fend for themselves. Please consider. -Geoff arch/arm64/kernel/acpi.c | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index 7b09487ff8fb..3c315c2c7476 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -31,6 +31,8 @@ #include <asm/cpu_ops.h> #include <asm/smp_plat.h> +#include <acpi/apei.h> + #ifdef CONFIG_ACPI_APEI # include <linux/efi.h> # include <asm/pgtable.h> @@ -177,6 +179,33 @@ static int __init acpi_fadt_sanity_check(void) return ret; } +/* + * acpi_fixup_m400_quirks - Work-around for HPE ProLiant m400 APEI firmware + * problems. + */ +static void __init acpi_fixup_m400_quirks(void) +{ + acpi_status status; + struct acpi_table_header *header; +#if !defined(CONFIG_ACPI_APEI) + int hest_disable = HEST_DISABLED; +#endif + + if (!IS_ENABLED(CONFIG_ACPI_APEI) || hest_disable != HEST_ENABLED) + return; + + status = acpi_get_table(ACPI_SIG_HEST, 0, &header); + + if (ACPI_SUCCESS(status) && !strncmp(header->oem_id, "HPE ", 6) && + !strncmp(header->oem_table_id, "ProLiant", 8) && + MIDR_IMPLEMENTOR(read_cpuid_id()) == ARM_CPU_IMP_APM) { + hest_disable = HEST_DISABLED; + pr_info("Disabled APEI for m400.\n"); + } + + acpi_put_table(header); +} + /* * acpi_boot_table_init() called from setup_arch(), always. * 1. find RSDP and get its address, and then find XSDT @@ -232,11 +261,14 @@ void __init acpi_boot_table_init(void) if (acpi_disabled) { if (earlycon_acpi_spcr_enable) early_init_dt_scan_chosen_stdout(); - } else { - acpi_parse_spcr(earlycon_acpi_spcr_enable, true); - if (IS_ENABLED(CONFIG_ACPI_BGRT)) - acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt); + return; } + + acpi_parse_spcr(earlycon_acpi_spcr_enable, true); + if (IS_ENABLED(CONFIG_ACPI_BGRT)) + acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt); + + acpi_fixup_m400_quirks(); } #ifdef CONFIG_ACPI_APEI -- 2.14.1
next reply other threads:[~2018-06-13 18:22 UTC|newest] Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-06-13 18:22 Geoff Levand [this message] 2018-06-13 18:22 ` [PATCH] arm64/acpi: Add fixup for HPE m400 quirks Geoff Levand 2018-06-15 8:47 ` Riku Voipio 2018-06-15 8:47 ` Riku Voipio 2018-06-15 9:51 ` Graeme Gregory 2018-06-15 9:51 ` Graeme Gregory 2018-06-15 11:14 ` James Morse 2018-06-15 11:14 ` James Morse 2018-06-15 17:17 ` Geoff Levand 2018-06-15 17:17 ` Geoff Levand 2018-06-15 17:33 ` Mark Salter 2018-06-15 17:33 ` Mark Salter 2018-06-15 18:15 ` Geoff Levand 2018-06-15 18:15 ` Geoff Levand 2018-06-15 19:14 ` Mark Salter 2018-06-15 19:14 ` Mark Salter 2018-06-18 16:18 ` James Morse 2018-06-18 16:18 ` James Morse 2018-06-18 18:04 ` Geoff Levand 2018-06-18 18:04 ` Geoff Levand 2018-06-18 22:18 ` Mark Salter 2018-06-18 22:18 ` Mark Salter 2018-06-19 10:21 ` James Morse 2018-06-19 10:21 ` James Morse 2018-06-22 15:19 ` Mark Salter 2018-06-22 15:19 ` Mark Salter 2018-06-25 15:34 ` Mark Salter 2018-06-25 15:34 ` Mark Salter 2018-06-26 14:51 ` James Morse 2018-06-26 14:51 ` James Morse 2018-06-26 20:20 ` Mark Salter 2018-06-26 20:20 ` Mark Salter 2018-06-27 8:48 ` Ard Biesheuvel 2018-06-27 8:48 ` Ard Biesheuvel 2018-06-27 12:25 ` Mark Salter 2018-06-27 12:25 ` Mark Salter 2018-07-03 9:30 ` Ian Campbell 2018-07-03 9:30 ` Ian Campbell 2018-07-03 15:20 ` Mark Salter 2018-07-03 15:20 ` Mark Salter 2018-06-28 10:06 ` James Morse 2018-06-28 10:06 ` James Morse 2018-06-29 13:05 ` Mark Salter 2018-06-29 13:05 ` Mark Salter
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=51d3d738-cdf5-2992-bba5-c3e1f34096c2@infradead.org \ --to=geoff@infradead.org \ --cc=hanjun.guo@linaro.org \ --cc=linux-acpi@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=lorenzo.pieralisi@arm.com \ --cc=msalter@redhat.com \ --cc=riku.voipio@linaro.org \ --cc=sudeep.holla@arm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.