50c9ebc
Changes in the handling of comments caused some length fields to be used
50c9ebc
in new ways.  The new way broke the existing adaptation for big endian
50c9ebc
support; this patch repairs that adaptation.
50c9ebc
50c9ebc
Signed-off-by: Al Stone <ahs3@redhat.com>
50c9ebc
d7f8eec
Index: acpica-unix-20191018/source/compiler/aslcodegen.c
ae6f250
===================================================================
d7f8eec
--- acpica-unix-20191018.orig/source/compiler/aslcodegen.c
d7f8eec
+++ acpica-unix-20191018/source/compiler/aslcodegen.c
c4eca0e
@@ -497,8 +497,7 @@ CgWriteTableHeader (
50c9ebc
 
50c9ebc
     /* Table length. Checksum zero for now, will rewrite later */
50c9ebc
 
50c9ebc
-    DWord = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength;
ae6f250
-    ACPI_MOVE_32_TO_32(&AslGbl_TableHeader.Length, &DWord);
ae6f250
+    AslGbl_TableHeader.Length = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength;
50c9ebc
 
50c9ebc
     /* Calculate the comment lengths for this definition block parseOp */
50c9ebc
 
c4eca0e
@@ -544,6 +543,8 @@ CgWriteTableHeader (
ae6f250
             CvDbgPrint ("    Length: %u\n", CommentLength);
50c9ebc
         }
50c9ebc
     }
ae6f250
+    DWord = AslGbl_TableHeader.Length;
ae6f250
+    ACPI_MOVE_32_TO_32(&AslGbl_TableHeader.Length, &DWord);
50c9ebc
 
ae6f250
     AslGbl_TableHeader.Checksum = 0;
ae6f250
     Op->Asl.FinalAmlOffset = ftell (AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle);