|
|
9897bb |
From 724fcc83d359e4c8abbd2a48755e96049afa06d6 Mon Sep 17 00:00:00 2001
|
|
|
9897bb |
From: Al Stone <ahs3@redhat.com>
|
|
|
9897bb |
Date: Wed, 23 Sep 2020 12:25:38 -0600
|
|
|
9897bb |
Subject: [PATCH 22/45] Support SRAT in a big-endian world
|
|
|
9897bb |
|
|
|
9897bb |
Signed-off-by: Al Stone <ahs3@redhat.com>
|
|
|
9897bb |
---
|
|
|
9897bb |
source/common/dmtbdump3.c | 9 +++++----
|
|
|
9897bb |
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
|
9897bb |
|
|
|
9897bb |
Index: acpica-unix2-20210604/source/common/dmtbdump3.c
|
|
|
9897bb |
===================================================================
|
|
|
9897bb |
--- acpica-unix2-20210604.orig/source/common/dmtbdump3.c
|
|
|
9897bb |
+++ acpica-unix2-20210604/source/common/dmtbdump3.c
|
|
|
9897bb |
@@ -173,11 +173,12 @@ AcpiDmDumpSrat (
|
|
|
9897bb |
UINT32 Offset = sizeof (ACPI_TABLE_SRAT);
|
|
|
9897bb |
ACPI_SUBTABLE_HEADER *Subtable;
|
|
|
9897bb |
ACPI_DMTABLE_INFO *InfoTable;
|
|
|
9897bb |
+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length);
|
|
|
9897bb |
|
|
|
9897bb |
|
|
|
9897bb |
/* Main table */
|
|
|
9897bb |
|
|
|
9897bb |
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoSrat);
|
|
|
9897bb |
+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoSrat);
|
|
|
9897bb |
if (ACPI_FAILURE (Status))
|
|
|
9897bb |
{
|
|
|
9897bb |
return;
|
|
|
9897bb |
@@ -186,12 +187,12 @@ AcpiDmDumpSrat (
|
|
|
9897bb |
/* Subtables */
|
|
|
9897bb |
|
|
|
9897bb |
Subtable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Table, Offset);
|
|
|
9897bb |
- while (Offset < Table->Length)
|
|
|
9897bb |
+ while (Offset < TableLength)
|
|
|
9897bb |
{
|
|
|
9897bb |
/* Common subtable header */
|
|
|
9897bb |
|
|
|
9897bb |
AcpiOsPrintf ("\n");
|
|
|
9897bb |
- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
|
|
|
9897bb |
+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
|
|
|
9897bb |
Subtable->Length, AcpiDmTableInfoSratHdr);
|
|
|
9897bb |
if (ACPI_FAILURE (Status))
|
|
|
9897bb |
{
|
|
|
9897bb |
@@ -245,7 +246,7 @@ AcpiDmDumpSrat (
|
|
|
9897bb |
}
|
|
|
9897bb |
|
|
|
9897bb |
AcpiOsPrintf ("\n");
|
|
|
9897bb |
- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
|
|
|
9897bb |
+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
|
|
|
9897bb |
Subtable->Length, InfoTable);
|
|
|
9897bb |
if (ACPI_FAILURE (Status))
|
|
|
9897bb |
{
|