acpica-tools/aslcodegen.patch
Al Stone c4eca0e1b7 Update to 20190405 version of the upstream source
Signed-off-by: Al Stone <ahs3@redhat.com>
2019-05-11 16:52:39 -06:00

30 lines
1.2 KiB
Diff

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