Subject: Re: Dom0: ACPI panic
To: Quentin Garnier <cube@cubidou.net>
From: Christoph Egger <Christoph_Egger@gmx.de>
List: port-xen
Date: 09/06/2007 13:06:58
--Boundary-00=_S993GQfyg8JPY2U
Content-Type: text/plain;
charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On Thursday 06 September 2007 12:06:19 Quentin Garnier wrote:
> On Thu, Sep 06, 2007 at 11:51:03AM +0200, Christoph Egger wrote:
> > AcpiTbGetTableHeader() reads the ACPI Header from the BIOS
> > which contains the wrong Header->Length value.
> > => buggy BIOS
> >
> > The attached patch adds a sanity check. I don't know, if AE_LIMIT is the
> > correct error code, but NetBSD/Xen now boots on this machine.
>
> I don't see how the test can succeed in the normal case.
oh, damn! I should have tested this on a different machine first, where
the BIOS value is correct. New version of the patch attached.
Christoph
--Boundary-00=_S993GQfyg8JPY2U
Content-Type: text/x-diff;
charset="iso-8859-15";
name="acpica_tbget.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="acpica_tbget.diff"
Index: tbget.c
===================================================================
RCS file: /cvsroot/src/sys/dist/acpica/tbget.c,v
retrieving revision 1.1
diff -u -p -r1.1 tbget.c
--- tbget.c 23 Mar 2006 13:36:31 -0000 1.1
+++ tbget.c 6 Sep 2007 11:04:32 -0000
@@ -251,6 +251,12 @@ AcpiTbGetTableHeader (
ACPI_MEMCPY (ReturnHeader, Header, sizeof (ACPI_TABLE_HEADER));
AcpiOsUnmapMemory (Header, sizeof (ACPI_TABLE_HEADER));
+
+ if ((Address->Pointer.Physical + ReturnHeader->Length) <=
+ Address->Pointer.Physical)
+ {
+ return_ACPI_STATUS (AE_LIMIT);
+ }
break;
--Boundary-00=_S993GQfyg8JPY2U--