acpica-tools/aslcodegen.patch
Al Stone d7f8eec1b2 Update to 20191018 upstream source with refreshed patches
Signed-off-by: Al Stone <ahs3@redhat.com>
2019-11-23 16:16:51 -07: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-20191018/source/compiler/aslcodegen.c
===================================================================
--- acpica-unix-20191018.orig/source/compiler/aslcodegen.c
+++ acpica-unix-20191018/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);