Commit ae85372a authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Stefan Bader

acpi/arm64: ignore 5.1 FADTs that are reported as 5.0

BugLink: https://bugs.launchpad.net/bugs/1840081

[ Upstream commit 2af22f3e ]

Some Qualcomm Snapdragon based laptops built to run Microsoft Windows
are clearly ACPI 5.1 based, given that that is the first ACPI revision
that supports ARM, and introduced the FADT 'arm_boot_flags' field,
which has a non-zero field on those systems.

So in these cases, infer from the ARM boot flags that the FADT must be
5.1 or later, and treat it as 5.1.
Acked-by: default avatarSudeep Holla <sudeep.holla@arm.com>
Tested-by: default avatarLee Jones <lee.jones@linaro.org>
Reviewed-by: default avatarGraeme Gregory <graeme.gregory@linaro.org>
Acked-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: default avatarHanjun Guo <guohanjun@huawei.com>
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarConnor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 89571f6a
...@@ -142,11 +142,15 @@ static int __init acpi_fadt_sanity_check(void) ...@@ -142,11 +142,15 @@ static int __init acpi_fadt_sanity_check(void)
*/ */
if (table->revision < 5 || if (table->revision < 5 ||
(table->revision == 5 && fadt->minor_revision < 1)) { (table->revision == 5 && fadt->minor_revision < 1)) {
pr_err("Unsupported FADT revision %d.%d, should be 5.1+\n", pr_err(FW_BUG "Unsupported FADT revision %d.%d, should be 5.1+\n",
table->revision, fadt->minor_revision); table->revision, fadt->minor_revision);
if (!fadt->arm_boot_flags) {
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
pr_err("FADT has ARM boot flags set, assuming 5.1\n");
}
if (!(fadt->flags & ACPI_FADT_HW_REDUCED)) { if (!(fadt->flags & ACPI_FADT_HW_REDUCED)) {
pr_err("FADT not ACPI hardware reduced compliant\n"); pr_err("FADT not ACPI hardware reduced compliant\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment