acpica-tools/aslcodegen.patch
Al Stone ae6f250891 Update to 20181003 upstream source
Signed-off-by: Al Stone <ahs3@redhat.com>
2018-10-24 14:19:27 -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-unix2-20181003/source/compiler/aslcodegen.c
===================================================================
--- acpica-unix2-20181003.orig/source/compiler/aslcodegen.c
+++ acpica-unix2-20181003/source/compiler/aslcodegen.c
@@ -494,8 +494,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 */
@@ -541,6 +540,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);