6da3f65ae2
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/acpica-tools#97b38e48de60dcda464ba13c4571a9669a887813
141 lines
5.5 KiB
Diff
141 lines
5.5 KiB
Diff
diff -Naur acpica-unix2-20200214.orig/source/components/namespace/nsutils.c acpica-unix2-20200214/source/components/namespace/nsutils.c
|
|
--- acpica-unix2-20200214.orig/source/components/namespace/nsutils.c 2020-02-14 10:33:55.000000000 -0700
|
|
+++ acpica-unix2-20200214/source/components/namespace/nsutils.c 2020-02-26 10:25:43.477022167 -0700
|
|
@@ -363,6 +363,15 @@
|
|
|
|
/* Move on the next segment */
|
|
|
|
+ {
|
|
+ /* Make sure the name segment reflects endian-ness first */
|
|
+
|
|
+ UINT32 Tmp32 = 0;
|
|
+
|
|
+ memcpy(&Tmp32, Result, ACPI_NAMESEG_SIZE);
|
|
+ ACPI_MOVE_32_TO_32(Result, &Tmp32);
|
|
+ }
|
|
+
|
|
ExternalName++;
|
|
Result += ACPI_NAMESEG_SIZE;
|
|
}
|
|
diff -Naur acpica-unix2-20200214.orig/source/common/dmtbdump2.c acpica-unix2-20200214/source/common/dmtbdump2.c
|
|
--- acpica-unix2-20200214.orig/source/common/dmtbdump2.c 2020-02-26 11:44:13.732967820 -0700
|
|
+++ acpica-unix2-20200214/source/common/dmtbdump2.c 2020-02-26 12:38:44.286849954 -0700
|
|
@@ -1685,6 +1685,8 @@
|
|
UINT32 Offset = sizeof (ACPI_TABLE_FPDT);
|
|
ACPI_DMTABLE_INFO *InfoTable;
|
|
UINT32 i;
|
|
+ UINT32 TableLen;
|
|
+ UINT32 NumPrivRes;
|
|
|
|
|
|
/* There is no main table (other than the standard ACPI header) */
|
|
@@ -1692,7 +1694,8 @@
|
|
/* Subtables */
|
|
|
|
Offset = sizeof (ACPI_TABLE_HEADER);
|
|
- while (Offset < Table->Length)
|
|
+ ACPI_MOVE_32_TO_32(&TableLen, &Table->Length);
|
|
+ while (Offset < TableLen)
|
|
{
|
|
AcpiOsPrintf ("\n");
|
|
|
|
@@ -1704,7 +1707,7 @@
|
|
AcpiOsPrintf ("Invalid subtable length\n");
|
|
return;
|
|
}
|
|
- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
|
|
+ Status = AcpiDmDumpTable (TableLen, Offset, Subtable,
|
|
Subtable->Length, AcpiDmTableInfoPpttHdr);
|
|
if (ACPI_FAILURE (Status))
|
|
{
|
|
@@ -1746,7 +1749,7 @@
|
|
AcpiOsPrintf ("Invalid subtable length\n");
|
|
return;
|
|
}
|
|
- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
|
|
+ Status = AcpiDmDumpTable (TableLen, Offset, Subtable,
|
|
Subtable->Length, InfoTable);
|
|
if (ACPI_FAILURE (Status))
|
|
{
|
|
@@ -1762,15 +1765,16 @@
|
|
|
|
/* Dump SMBIOS handles */
|
|
|
|
+ ACPI_MOVE_32_TO_32(&NumPrivRes, &PpttProcessor->NumberOfPrivResources);
|
|
if ((UINT8)(Subtable->Length - SubtableOffset) <
|
|
- (UINT8)(PpttProcessor->NumberOfPrivResources * 4))
|
|
+ (UINT8)(NumPrivRes * 4))
|
|
{
|
|
AcpiOsPrintf ("Invalid private resource number\n");
|
|
return;
|
|
}
|
|
- for (i = 0; i < PpttProcessor->NumberOfPrivResources; i++)
|
|
+ for (i = 0; i < NumPrivRes; i++)
|
|
{
|
|
- Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
|
|
+ Status = AcpiDmDumpTable (TableLen, Offset + SubtableOffset,
|
|
ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable, SubtableOffset),
|
|
4, AcpiDmTableInfoPptt0a);
|
|
if (ACPI_FAILURE (Status))
|
|
diff -Naur acpica-unix2-20200214.orig/source/compiler/dttable2.c acpica-unix2-20200214/source/compiler/dttable2.c
|
|
--- acpica-unix2-20200214.orig/source/compiler/dttable2.c 2020-02-26 11:44:13.726967769 -0700
|
|
+++ acpica-unix2-20200214/source/compiler/dttable2.c 2020-02-26 12:39:03.671014890 -0700
|
|
@@ -1087,9 +1087,11 @@
|
|
Subtable->Buffer, sizeof (ACPI_SUBTABLE_HEADER));
|
|
if (PpttProcessor)
|
|
{
|
|
+ UINT32 NumPrivRes;
|
|
+
|
|
/* Compile initiator proximity domain list */
|
|
|
|
- PpttProcessor->NumberOfPrivResources = 0;
|
|
+ NumPrivRes = 0;
|
|
while (*PFieldList)
|
|
{
|
|
Status = DtCompileTable (PFieldList,
|
|
@@ -1105,8 +1107,9 @@
|
|
|
|
DtInsertSubtable (ParentTable, Subtable);
|
|
PpttHeader->Length += (UINT8)(Subtable->Length);
|
|
- PpttProcessor->NumberOfPrivResources++;
|
|
+ NumPrivRes++;
|
|
}
|
|
+ ACPI_MOVE_32_TO_32(&PpttProcessor->NumberOfPrivResources, &NumPrivRes);
|
|
}
|
|
break;
|
|
|
|
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 |
|