4496ab
Changes in the handling of comments caused some length fields to be used
4496ab
in new ways.  The new way broke the existing adaptation for big endian
4496ab
support; this patch repairs that adaptation.
4496ab
4496ab
Signed-off-by: Al Stone <ahs3@redhat.com>
4496ab
4496ab
diff -Naur acpica-unix2-20180531.orig/source/compiler/aslcodegen.c acpica-unix2-20180531/source/compiler/aslcodegen.c
4496ab
--- acpica-unix2-20180531.orig/source/compiler/aslcodegen.c	2018-07-06 20:28:35.255546578 -0400
4496ab
+++ acpica-unix2-20180531/source/compiler/aslcodegen.c	2018-07-06 20:32:10.373797644 -0400
4496ab
@@ -494,8 +494,7 @@
4496ab
 
4496ab
     /* Table length. Checksum zero for now, will rewrite later */
4496ab
 
4496ab
-    DWord = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength;
4496ab
-    ACPI_MOVE_32_TO_32(&TableHeader.Length, &DWord);
4496ab
+    TableHeader.Length = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength;
4496ab
 
4496ab
     /* Calculate the comment lengths for this definition block parseOp */
4496ab
 
4496ab
@@ -539,6 +538,8 @@
4496ab
         CvDbgPrint ("    Length: %u\n", CommentLength);
4496ab
         }
4496ab
     }
4496ab
+    DWord = TableHeader.Length;
4496ab
+    ACPI_MOVE_32_TO_32(&TableHeader.Length, &DWord);
4496ab
 
4496ab
     TableHeader.Checksum = 0;
4496ab