linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/acpi: Work around broken XSDT on SEGA AALE board
@ 2022-02-23 16:07 Mark Cilissen
  2022-02-24  8:41 ` Hans de Goede
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Cilissen @ 2022-02-23 16:07 UTC (permalink / raw)
  To: linux-acpi, x86, linux-kernel
  Cc: Hans de Goede, Rafael J. Wysocki, Len Brown, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, H. Peter Anvin,
	Mark Cilissen

On this board the ACPI RSDP structure points to both a RSDT and an XSDT,
but the XSDT points to a truncated FADT. This causes all sorts of trouble
and usually a complete failure to boot after the following error occurs:

  ACPI Error: Unsupported address space: 0x20 (*/hwregs-*)
  ACPI Error: AE_SUPPORT, Unable to initialize fixed events (*/evevent-*)
  ACPI: Unable to start ACPI Interpreter

This leaves the ACPI implementation in such a broken state that subsequent
kernel subsystem initialisations go wrong, resulting in among others
mismapped PCI memory, SATA and USB enumeration failures, and freezes.

As this is an older embedded platform that will likely never see any BIOS
updates to address this issue and its default shipping OS only complies to
ACPI 1.0, work around this by forcing `acpi=rsdt`. This patch, applied on
top of Linux 5.10.102, was confirmed on real hardware to fix the issue.

Signed-off-by: Mark Cilissen <mark@yotsuba.nl>
Cc: stable@vger.kernel.org
---
 arch/x86/kernel/acpi/boot.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 5b6d1a95776f..7caf4da075cd 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -1328,6 +1328,17 @@ static int __init disable_acpi_pci(const struct dmi_system_id *d)
 	return 0;
 }
 
+static int __init disable_acpi_xsdt(const struct dmi_system_id *d)
+{
+	if (!acpi_force) {
+		pr_notice("%s detected: force use of acpi=rsdt\n", d->ident);
+		acpi_gbl_do_not_use_xsdt = TRUE;
+	} else {
+		pr_notice("Warning: DMI blacklist says broken, but acpi XSDT forced\n");
+	}
+	return 0;
+}
+
 static int __init dmi_disable_acpi(const struct dmi_system_id *d)
 {
 	if (!acpi_force) {
@@ -1451,6 +1462,20 @@ static const struct dmi_system_id acpi_dmi_table[] __initconst = {
 		     DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
 		     },
 	 },
+	/*
+	 * Boxes that need ACPI XSDT use disabled due to corrupted tables
+	 */
+	{
+	 .callback = disable_acpi_xsdt,
+	 .ident = "SEGA AALE",
+	 .matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "NEC"),
+		     DMI_MATCH(DMI_PRODUCT_NAME, "Bearlake CRB Board"),
+		     DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+		     DMI_MATCH(DMI_BIOS_VERSION, "V1.12"),
+		     DMI_MATCH(DMI_BIOS_DATE, "02/01/2011"),
+		     },
+	},
 	{}
 };
 

base-commit: cfb92440ee71adcc2105b0890bb01ac3cddb8507
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86/acpi: Work around broken XSDT on SEGA AALE board
  2022-02-23 16:07 [PATCH] x86/acpi: Work around broken XSDT on SEGA AALE board Mark Cilissen
@ 2022-02-24  8:41 ` Hans de Goede
  2022-03-01 19:34   ` Rafael J. Wysocki
  0 siblings, 1 reply; 4+ messages in thread
From: Hans de Goede @ 2022-02-24  8:41 UTC (permalink / raw)
  To: Mark Cilissen, linux-acpi, x86, linux-kernel
  Cc: Rafael J. Wysocki, Len Brown, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, H. Peter Anvin

Hi Mark,

On 2/23/22 17:07, Mark Cilissen wrote:
> On this board the ACPI RSDP structure points to both a RSDT and an XSDT,
> but the XSDT points to a truncated FADT. This causes all sorts of trouble
> and usually a complete failure to boot after the following error occurs:
> 
>   ACPI Error: Unsupported address space: 0x20 (*/hwregs-*)
>   ACPI Error: AE_SUPPORT, Unable to initialize fixed events (*/evevent-*)
>   ACPI: Unable to start ACPI Interpreter
> 
> This leaves the ACPI implementation in such a broken state that subsequent
> kernel subsystem initialisations go wrong, resulting in among others
> mismapped PCI memory, SATA and USB enumeration failures, and freezes.
> 
> As this is an older embedded platform that will likely never see any BIOS
> updates to address this issue and its default shipping OS only complies to
> ACPI 1.0, work around this by forcing `acpi=rsdt`. This patch, applied on
> top of Linux 5.10.102, was confirmed on real hardware to fix the issue.
> 
> Signed-off-by: Mark Cilissen <mark@yotsuba.nl>
> Cc: stable@vger.kernel.org

Wow, you got it working, cool!

The patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans





> ---
>  arch/x86/kernel/acpi/boot.c | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
> index 5b6d1a95776f..7caf4da075cd 100644
> --- a/arch/x86/kernel/acpi/boot.c
> +++ b/arch/x86/kernel/acpi/boot.c
> @@ -1328,6 +1328,17 @@ static int __init disable_acpi_pci(const struct dmi_system_id *d)
>  	return 0;
>  }
>  
> +static int __init disable_acpi_xsdt(const struct dmi_system_id *d)
> +{
> +	if (!acpi_force) {
> +		pr_notice("%s detected: force use of acpi=rsdt\n", d->ident);
> +		acpi_gbl_do_not_use_xsdt = TRUE;
> +	} else {
> +		pr_notice("Warning: DMI blacklist says broken, but acpi XSDT forced\n");
> +	}
> +	return 0;
> +}
> +
>  static int __init dmi_disable_acpi(const struct dmi_system_id *d)
>  {
>  	if (!acpi_force) {
> @@ -1451,6 +1462,20 @@ static const struct dmi_system_id acpi_dmi_table[] __initconst = {
>  		     DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
>  		     },
>  	 },
> +	/*
> +	 * Boxes that need ACPI XSDT use disabled due to corrupted tables
> +	 */
> +	{
> +	 .callback = disable_acpi_xsdt,
> +	 .ident = "SEGA AALE",
> +	 .matches = {
> +		     DMI_MATCH(DMI_SYS_VENDOR, "NEC"),
> +		     DMI_MATCH(DMI_PRODUCT_NAME, "Bearlake CRB Board"),
> +		     DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
> +		     DMI_MATCH(DMI_BIOS_VERSION, "V1.12"),
> +		     DMI_MATCH(DMI_BIOS_DATE, "02/01/2011"),
> +		     },
> +	},
>  	{}
>  };
>  
> 
> base-commit: cfb92440ee71adcc2105b0890bb01ac3cddb8507


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86/acpi: Work around broken XSDT on SEGA AALE board
  2022-02-24  8:41 ` Hans de Goede
@ 2022-03-01 19:34   ` Rafael J. Wysocki
  2022-03-02 19:42     ` Rafael J. Wysocki
  0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2022-03-01 19:34 UTC (permalink / raw)
  To: Hans de Goede, Mark Cilissen
  Cc: ACPI Devel Maling List, x86, Linux Kernel Mailing List,
	Rafael J. Wysocki, Len Brown, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, H. Peter Anvin

On Thu, Feb 24, 2022 at 9:41 AM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Hi Mark,
>
> On 2/23/22 17:07, Mark Cilissen wrote:
> > On this board the ACPI RSDP structure points to both a RSDT and an XSDT,
> > but the XSDT points to a truncated FADT. This causes all sorts of trouble
> > and usually a complete failure to boot after the following error occurs:
> >
> >   ACPI Error: Unsupported address space: 0x20 (*/hwregs-*)
> >   ACPI Error: AE_SUPPORT, Unable to initialize fixed events (*/evevent-*)
> >   ACPI: Unable to start ACPI Interpreter
> >
> > This leaves the ACPI implementation in such a broken state that subsequent
> > kernel subsystem initialisations go wrong, resulting in among others
> > mismapped PCI memory, SATA and USB enumeration failures, and freezes.
> >
> > As this is an older embedded platform that will likely never see any BIOS
> > updates to address this issue and its default shipping OS only complies to
> > ACPI 1.0, work around this by forcing `acpi=rsdt`. This patch, applied on
> > top of Linux 5.10.102, was confirmed on real hardware to fix the issue.
> >
> > Signed-off-by: Mark Cilissen <mark@yotsuba.nl>
> > Cc: stable@vger.kernel.org
>
> Wow, you got it working, cool!
>
> The patch looks good to me:
>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Applied as 5.18 material, thanks!

> > ---
> >  arch/x86/kernel/acpi/boot.c | 25 +++++++++++++++++++++++++
> >  1 file changed, 25 insertions(+)
> >
> > diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
> > index 5b6d1a95776f..7caf4da075cd 100644
> > --- a/arch/x86/kernel/acpi/boot.c
> > +++ b/arch/x86/kernel/acpi/boot.c
> > @@ -1328,6 +1328,17 @@ static int __init disable_acpi_pci(const struct dmi_system_id *d)
> >       return 0;
> >  }
> >
> > +static int __init disable_acpi_xsdt(const struct dmi_system_id *d)
> > +{
> > +     if (!acpi_force) {
> > +             pr_notice("%s detected: force use of acpi=rsdt\n", d->ident);
> > +             acpi_gbl_do_not_use_xsdt = TRUE;
> > +     } else {
> > +             pr_notice("Warning: DMI blacklist says broken, but acpi XSDT forced\n");
> > +     }
> > +     return 0;
> > +}
> > +
> >  static int __init dmi_disable_acpi(const struct dmi_system_id *d)
> >  {
> >       if (!acpi_force) {
> > @@ -1451,6 +1462,20 @@ static const struct dmi_system_id acpi_dmi_table[] __initconst = {
> >                    DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
> >                    },
> >        },
> > +     /*
> > +      * Boxes that need ACPI XSDT use disabled due to corrupted tables
> > +      */
> > +     {
> > +      .callback = disable_acpi_xsdt,
> > +      .ident = "SEGA AALE",
> > +      .matches = {
> > +                  DMI_MATCH(DMI_SYS_VENDOR, "NEC"),
> > +                  DMI_MATCH(DMI_PRODUCT_NAME, "Bearlake CRB Board"),
> > +                  DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
> > +                  DMI_MATCH(DMI_BIOS_VERSION, "V1.12"),
> > +                  DMI_MATCH(DMI_BIOS_DATE, "02/01/2011"),
> > +                  },
> > +     },
> >       {}
> >  };
> >
> >
> > base-commit: cfb92440ee71adcc2105b0890bb01ac3cddb8507
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86/acpi: Work around broken XSDT on SEGA AALE board
  2022-03-01 19:34   ` Rafael J. Wysocki
@ 2022-03-02 19:42     ` Rafael J. Wysocki
  0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2022-03-02 19:42 UTC (permalink / raw)
  To: Mark Cilissen, Hans de Goede
  Cc: ACPI Devel Maling List, Linux Kernel Mailing List,
	Rafael J. Wysocki, Len Brown, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, H. Peter Anvin,
	the arch/x86 maintainers

On Tue, Mar 1, 2022 at 8:34 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Thu, Feb 24, 2022 at 9:41 AM Hans de Goede <hdegoede@redhat.com> wrote:
> >
> > Hi Mark,
> >
> > On 2/23/22 17:07, Mark Cilissen wrote:
> > > On this board the ACPI RSDP structure points to both a RSDT and an XSDT,
> > > but the XSDT points to a truncated FADT. This causes all sorts of trouble
> > > and usually a complete failure to boot after the following error occurs:
> > >
> > >   ACPI Error: Unsupported address space: 0x20 (*/hwregs-*)
> > >   ACPI Error: AE_SUPPORT, Unable to initialize fixed events (*/evevent-*)
> > >   ACPI: Unable to start ACPI Interpreter
> > >
> > > This leaves the ACPI implementation in such a broken state that subsequent
> > > kernel subsystem initialisations go wrong, resulting in among others
> > > mismapped PCI memory, SATA and USB enumeration failures, and freezes.
> > >
> > > As this is an older embedded platform that will likely never see any BIOS
> > > updates to address this issue and its default shipping OS only complies to
> > > ACPI 1.0, work around this by forcing `acpi=rsdt`. This patch, applied on
> > > top of Linux 5.10.102, was confirmed on real hardware to fix the issue.
> > >
> > > Signed-off-by: Mark Cilissen <mark@yotsuba.nl>
> > > Cc: stable@vger.kernel.org
> >
> > Wow, you got it working, cool!
> >
> > The patch looks good to me:
> >
> > Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>
> Applied as 5.18 material, thanks!

And dropped due to a problem introduced by it.

Also please note that the x86 mailing list address originally used in
the CC list was incorrect.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-02 19:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23 16:07 [PATCH] x86/acpi: Work around broken XSDT on SEGA AALE board Mark Cilissen
2022-02-24  8:41 ` Hans de Goede
2022-03-01 19:34   ` Rafael J. Wysocki
2022-03-02 19:42     ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).