2021-07-23 13:25:41 +00:00
|
|
|
From b11d50752feb9f1b52db076d1fb4753b30a53642 Mon Sep 17 00:00:00 2001
|
2020-10-31 11:18:15 +00:00
|
|
|
From: Al Stone <ahs3@redhat.com>
|
|
|
|
Date: Wed, 23 Sep 2020 12:49:52 -0600
|
2021-07-23 13:25:41 +00:00
|
|
|
Subject: [PATCH 23/45] Support SLIT in a big-endian world
|
2020-10-31 11:18:15 +00:00
|
|
|
|
|
|
|
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(-)
|
|
|
|
|
2021-07-23 13:25:41 +00:00
|
|
|
Index: acpica-unix2-20210604/source/common/dmtbdump3.c
|
2020-10-31 11:18:15 +00:00
|
|
|
===================================================================
|
2021-07-23 13:25:41 +00:00
|
|
|
--- acpica-unix2-20210604.orig/source/common/dmtbdump3.c
|
|
|
|
+++ acpica-unix2-20210604/source/common/dmtbdump3.c
|
2020-10-31 11:18:15 +00:00
|
|
|
@@ -96,11 +96,12 @@ AcpiDmDumpSlit (
|
|
|
|
UINT32 Localities;
|
|
|
|
UINT32 i;
|
|
|
|
UINT32 j;
|
2021-07-23 13:25:41 +00:00
|
|
|
+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length);
|
2020-10-31 11:18:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* 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;
|
2021-07-23 13:25:41 +00:00
|
|
|
+ Localities = (UINT32)
|
|
|
|
+ AcpiUtReadUint64 (&ACPI_CAST_PTR (ACPI_TABLE_SLIT, Table)->LocalityCount);
|
2020-10-31 11:18:15 +00:00
|
|
|
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");
|
2021-07-23 13:25:41 +00:00
|
|
|
Index: acpica-unix2-20210604/source/compiler/dttable2.c
|
2020-10-31 11:18:15 +00:00
|
|
|
===================================================================
|
2021-07-23 13:25:41 +00:00
|
|
|
--- acpica-unix2-20210604.orig/source/compiler/dttable2.c
|
|
|
|
+++ acpica-unix2-20210604/source/compiler/dttable2.c
|
|
|
|
@@ -1837,7 +1837,7 @@ DtCompileSlit (
|
2020-10-31 11:18:15 +00:00
|
|
|
ParentTable = DtPeekSubtable ();
|
|
|
|
DtInsertSubtable (ParentTable, Subtable);
|
|
|
|
|
|
|
|
- Localities = *ACPI_CAST_PTR (UINT32, Subtable->Buffer);
|
2021-07-23 13:25:41 +00:00
|
|
|
+ Localities = (UINT32) AcpiUtReadUint64 (Subtable->Buffer);
|
2020-10-31 11:18:15 +00:00
|
|
|
LocalityBuffer = UtLocalCalloc (Localities);
|
|
|
|
LocalityListLength = 0;
|
|
|
|
|