Blame SOURCES/DSDT-too-long.patch

44a778
ASL Test Suite encounters the following type of error...
44a778
44a778
  Table [DSDT] is too long for file - needs: 0xCE4C0000, remaining in file: 0x4CCE
44a778
44a778
when tests/aslts.sh was run on a big-endian system.
44a778
44a778
diff --git a/source/common/acfileio.c b/source/common/acfileio.c
44a778
index 589eaea..83e59e2 100644
44a778
--- a/source/common/acfileio.c
44a778
+++ b/source/common/acfileio.c
44a778
@@ -391,6 +391,7 @@ AcValidateTableHeader (
44a778
     size_t                  Actual;
44a778
     long                    OriginalOffset;
44a778
     UINT32                  FileSize;
44a778
+    UINT32                  Length;
44a778
     UINT32                  i;
44a778
 
44a778
 
44a778
@@ -422,11 +423,12 @@ AcValidateTableHeader (
44a778
     /* Validate table length against bytes remaining in the file */
44a778
 
44a778
     FileSize = CmGetFileSize (File);
44a778
-    if (TableHeader.Length > (UINT32) (FileSize - TableOffset))
44a778
+    ACPI_MOVE_32_TO_32(&Length, &TableHeader.Length);
44a778
+    if (Length > (UINT32) (FileSize - TableOffset))
44a778
     {
44a778
         fprintf (stderr, "Table [%4.4s] is too long for file - "
44a778
             "needs: 0x%.2X, remaining in file: 0x%.2X\n",
44a778
-            TableHeader.Signature, TableHeader.Length,
44a778
+            TableHeader.Signature, Length,
44a778
             (UINT32) (FileSize - TableOffset));
44a778
         return (AE_BAD_HEADER);
44a778
     }