edb6c78416
This update also means a major update for all of the big-endian patching that has been done. The older mechanism was getting to unwieldy to keep maintained, and too sensitive to upstream changes. Hence, redid all of the old patches, and took the opportunity to make them more amenable to change over time. Ultimately, the goal is to have upstream accept these in some form. Signed-off-by: Al Stone <ahs3@redhat.com>
62 lines
2.3 KiB
Diff
62 lines
2.3 KiB
Diff
From 4e76aa1a5556f250f51a3802734fd6cb77718299 Mon Sep 17 00:00:00 2001
|
|
From: Al Stone <ahs3@redhat.com>
|
|
Date: Wed, 23 Sep 2020 12:49:52 -0600
|
|
Subject: [PATCH 20/40] Support SLIT in a big-endian world
|
|
|
|
Signed-off-by: Al Stone <ahs3@redhat.com>
|
|
---
|
|
source/common/dmtbdump3.c | 8 +++++---
|
|
source/compiler/dttable2.c | 2 +-
|
|
2 files changed, 6 insertions(+), 4 deletions(-)
|
|
|
|
Index: acpica-unix2-20200925/source/common/dmtbdump3.c
|
|
===================================================================
|
|
--- acpica-unix2-20200925.orig/source/common/dmtbdump3.c
|
|
+++ acpica-unix2-20200925/source/common/dmtbdump3.c
|
|
@@ -96,11 +96,12 @@ AcpiDmDumpSlit (
|
|
UINT32 Localities;
|
|
UINT32 i;
|
|
UINT32 j;
|
|
+ UINT32 TableLength = AcpiUtReadUint32(&Table->Length);
|
|
|
|
|
|
/* Main table */
|
|
|
|
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoSlit);
|
|
+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoSlit);
|
|
if (ACPI_FAILURE (Status))
|
|
{
|
|
return;
|
|
@@ -108,7 +109,8 @@ AcpiDmDumpSlit (
|
|
|
|
/* Display the Locality NxN Matrix */
|
|
|
|
- Localities = (UINT32) ACPI_CAST_PTR (ACPI_TABLE_SLIT, Table)->LocalityCount;
|
|
+ Localities = (UINT32)
|
|
+ AcpiUtReadUint64(&ACPI_CAST_PTR (ACPI_TABLE_SLIT, Table)->LocalityCount);
|
|
Offset = ACPI_OFFSET (ACPI_TABLE_SLIT, Entry[0]);
|
|
Row = (UINT8 *) ACPI_CAST_PTR (ACPI_TABLE_SLIT, Table)->Entry;
|
|
|
|
@@ -121,7 +123,7 @@ AcpiDmDumpSlit (
|
|
{
|
|
/* Check for beyond EOT */
|
|
|
|
- if (Offset >= Table->Length)
|
|
+ if (Offset >= TableLength)
|
|
{
|
|
AcpiOsPrintf (
|
|
"\n**** Not enough room in table for all localities\n");
|
|
Index: acpica-unix2-20200925/source/compiler/dttable2.c
|
|
===================================================================
|
|
--- acpica-unix2-20200925.orig/source/compiler/dttable2.c
|
|
+++ acpica-unix2-20200925/source/compiler/dttable2.c
|
|
@@ -1529,7 +1529,7 @@ DtCompileSlit (
|
|
ParentTable = DtPeekSubtable ();
|
|
DtInsertSubtable (ParentTable, Subtable);
|
|
|
|
- Localities = *ACPI_CAST_PTR (UINT32, Subtable->Buffer);
|
|
+ Localities = (UINT32) AcpiUtReadUint64(Subtable->Buffer);
|
|
LocalityBuffer = UtLocalCalloc (Localities);
|
|
LocalityListLength = 0;
|
|
|