2021-07-12 03:22:10 +00:00
|
|
|
From 055fee09d8f9244b6c437ad18b98edb81a87e8bc Mon Sep 17 00:00:00 2001
|
2020-10-27 23:54:15 +00:00
|
|
|
From: Al Stone <ahs3@redhat.com>
|
|
|
|
Date: Tue, 27 Oct 2020 17:50:52 -0600
|
2021-07-12 03:22:10 +00:00
|
|
|
Subject: [PATCH 05/45] Correct an endian-ness problem when converting ASL to
|
|
|
|
ASL+
|
2020-10-27 23:54:15 +00:00
|
|
|
|
|
|
|
Signed-off-by: Al Stone <ahs3@redhat.com>
|
|
|
|
---
|
|
|
|
source/compiler/cvparser.c | 5 +++--
|
|
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
|
2022-04-03 21:18:02 +00:00
|
|
|
Index: acpica-unix2-20220331/source/compiler/cvparser.c
|
2021-07-12 03:22:10 +00:00
|
|
|
===================================================================
|
2022-04-03 21:18:02 +00:00
|
|
|
--- acpica-unix2-20220331.orig/source/compiler/cvparser.c
|
|
|
|
+++ acpica-unix2-20220331/source/compiler/cvparser.c
|
2020-10-27 23:54:15 +00:00
|
|
|
@@ -144,6 +144,7 @@ CvInitFileTree (
|
|
|
|
char *ChildFilename = NULL;
|
|
|
|
UINT8 *AmlStart;
|
|
|
|
UINT32 AmlLength;
|
2021-07-12 03:22:10 +00:00
|
|
|
+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length);
|
2020-10-27 23:54:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
if (!AcpiGbl_CaptureComments)
|
|
|
|
@@ -152,7 +153,7 @@ CvInitFileTree (
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER);
|
|
|
|
+ AmlLength = TableLength - sizeof (ACPI_TABLE_HEADER);
|
|
|
|
AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER));
|
|
|
|
|
|
|
|
CvDbgPrint ("AmlLength: %x\n", AmlLength);
|
|
|
|
@@ -162,7 +163,7 @@ CvInitFileTree (
|
|
|
|
AcpiGbl_FileTreeRoot = AcpiOsAcquireObject (AcpiGbl_FileCache);
|
|
|
|
|
|
|
|
AcpiGbl_FileTreeRoot->FileStart = (char *)(AmlStart);
|
|
|
|
- AcpiGbl_FileTreeRoot->FileEnd = (char *)(AmlStart + Table->Length);
|
|
|
|
+ AcpiGbl_FileTreeRoot->FileEnd = (char *)(AmlStart + TableLength);
|
|
|
|
AcpiGbl_FileTreeRoot->Next = NULL;
|
|
|
|
AcpiGbl_FileTreeRoot->Parent = NULL;
|
|
|
|
AcpiGbl_FileTreeRoot->Filename = (char *)(AmlStart+2);
|