diff --git a/big-endian-v3.patch b/big-endian-v3.patch index 11fab3f..f4d404e 100644 --- a/big-endian-v3.patch +++ b/big-endian-v3.patch @@ -17,3 +17,90 @@ diff -Naur acpica-unix2-20200214.orig/source/components/namespace/nsutils.c acpi 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 +@@ -1670,6 +1670,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) */ +@@ -1677,7 +1679,8 @@ + /* Subtables */ + + Offset = sizeof (ACPI_TABLE_HEADER); +- while (Offset < Table->Length) ++ ACPI_MOVE_32_TO_32(&TableLen, &Table->Length); ++ while (Offset < TableLen) + { + AcpiOsPrintf ("\n"); + +@@ -1689,7 +1692,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)) + { +@@ -1731,7 +1734,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)) + { +@@ -1747,15 +1750,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; +