acpica-tools/aslcodegen.patch
Al Stone b07847bae5 Update to 20190329 version of upstream source
Signed-off-by: Al Stone <ahs3@redhat.com>
2019-05-10 18:40:20 -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-20190329/source/compiler/aslcodegen.c
===================================================================
--- acpica-unix-20190329.orig/source/compiler/aslcodegen.c
+++ acpica-unix-20190329/source/compiler/aslcodegen.c
@@ -500,8 +500,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 */
@@ -547,6 +546,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);