Additional clean-up for big endian support

Signed-off-by: Al Stone <ahs3@redhat.com>
This commit is contained in:
Al Stone 2020-02-27 13:27:54 -07:00
parent a4c3787ec9
commit 2652e3e2c4
2 changed files with 56 additions and 2 deletions

View File

@ -104,3 +104,57 @@ diff -Naur acpica-unix2-20200214.orig/source/compiler/dttable2.c acpica-unix2-20
}
break;
diff -Naur acpica-unix2-20200214.orig/source/compiler/aslxref.c acpica-unix2-20200214/source/compiler/aslxref.c
--- acpica-unix2-20200214.orig/source/compiler/aslxref.c 2020-02-14 10:33:53.000000000 -0700
+++ acpica-unix2-20200214/source/compiler/aslxref.c 2020-02-26 13:21:43.973602232 -0700
@@ -547,8 +547,14 @@
*/
AslGbl_NsLookupCount++;
- Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType,
- ACPI_IMODE_EXECUTE, Flags, WalkState, &Node);
+ {
+ UINT32 Tmp32;
+
+ ACPI_MOVE_32_TO_32(&Tmp32, Path);
+
+ Status = AcpiNsLookup (WalkState->ScopeInfo, (char *)&Tmp32, ObjectType,
+ ACPI_IMODE_EXECUTE, Flags, WalkState, &Node);
+ }
if (ACPI_FAILURE (Status))
{
if (Status == AE_NOT_FOUND)
diff -Naur acpica-unix2-20200214.orig/source/compiler/aslload.c acpica-unix2-20200214/source/compiler/aslload.c
--- acpica-unix2-20200214.orig/source/compiler/aslload.c 2020-02-14 10:33:53.000000000 -0700
+++ acpica-unix2-20200214/source/compiler/aslload.c 2020-02-27 13:25:19.308413494 -0700
@@ -175,13 +175,17 @@
ACPI_NAMESPACE_NODE *Node;
ACPI_STATUS Status;
char *ExternalPath;
+ char TmpPath[ACPI_NAMESEG_SIZE];
SourceRegion = UtGetArg (Op, 0);
if (SourceRegion)
{
- Status = AcpiNsLookup (WalkState->ScopeInfo,
- SourceRegion->Asl.Value.String, AmlType, ACPI_IMODE_EXECUTE,
+ char TmpName[ACPI_NAMESEG_SIZE];
+
+ ACPI_MOVE_32_TO_32(TmpName, SourceRegion->Asl.Value.String);
+ Status = AcpiNsLookup (WalkState->ScopeInfo, TmpName,
+ AmlType, ACPI_IMODE_EXECUTE,
ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, NULL, &Node);
if (Status == AE_NOT_FOUND)
{
@@ -232,8 +236,9 @@
default:
+ ACPI_MOVE_32_TO_32(TmpPath, Child->Asl.Value.String);
Status = AcpiNsLookup (WalkState->ScopeInfo,
- Child->Asl.Value.String,
+ TmpPath,
ACPI_TYPE_LOCAL_REGION_FIELD,
ACPI_IMODE_LOAD_PASS1,
ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE |

View File

@ -18,7 +18,7 @@ diff -Naur acpica-unix2-20191213.orig/source/compiler/aslcompiler.l acpica-unix2
#include <stdlib.h>
#include <string.h>
-YYSTYPE AslCompilerlval;
+extern YYSTYPE AslCompilerlval;
+#define YYSTYPE AslCompilerlval;
/*
* Generation: Use the following command line:
@ -30,7 +30,7 @@ diff -Naur acpica-unix2-20191213.orig/source/compiler/prparser.l acpica-unix2-20
* Local support functions
*/
-YY_BUFFER_STATE LexBuffer;
+extern YY_BUFFER_STATE LexBuffer;
+static YY_BUFFER_STATE LexBuffer;
/******************************************************************************