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