|
|
214d7a |
From 0fb79a24fb70ab1e1e4879220af82a9fa00af586 Mon Sep 17 00:00:00 2001
|
|
|
214d7a |
From: Al Stone <ahs3@redhat.com>
|
|
|
214d7a |
Date: Mon, 28 Sep 2020 13:01:18 -0600
|
|
|
214d7a |
Subject: [PATCH 36/45] Support MCFG in a big-endian world
|
|
|
214d7a |
|
|
|
214d7a |
Signed-off-by: Al Stone <ahs3@redhat.com>
|
|
|
214d7a |
---
|
|
|
214d7a |
source/common/dmtbdump2.c | 11 ++++++-----
|
|
|
214d7a |
1 file changed, 6 insertions(+), 5 deletions(-)
|
|
|
214d7a |
|
|
|
214d7a |
Index: acpica-unix2-20210604/source/common/dmtbdump2.c
|
|
|
214d7a |
===================================================================
|
|
|
214d7a |
--- acpica-unix2-20210604.orig/source/common/dmtbdump2.c
|
|
|
214d7a |
+++ acpica-unix2-20210604/source/common/dmtbdump2.c
|
|
|
214d7a |
@@ -930,11 +930,12 @@ AcpiDmDumpMcfg (
|
|
|
214d7a |
ACPI_STATUS Status;
|
|
|
214d7a |
UINT32 Offset = sizeof (ACPI_TABLE_MCFG);
|
|
|
214d7a |
ACPI_MCFG_ALLOCATION *Subtable;
|
|
|
214d7a |
+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length);
|
|
|
214d7a |
|
|
|
214d7a |
|
|
|
214d7a |
/* Main table */
|
|
|
214d7a |
|
|
|
214d7a |
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMcfg);
|
|
|
214d7a |
+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoMcfg);
|
|
|
214d7a |
if (ACPI_FAILURE (Status))
|
|
|
214d7a |
{
|
|
|
214d7a |
return;
|
|
|
214d7a |
@@ -943,17 +944,17 @@ AcpiDmDumpMcfg (
|
|
|
214d7a |
/* Subtables */
|
|
|
214d7a |
|
|
|
214d7a |
Subtable = ACPI_ADD_PTR (ACPI_MCFG_ALLOCATION, Table, Offset);
|
|
|
214d7a |
- while (Offset < Table->Length)
|
|
|
214d7a |
+ while (Offset < TableLength)
|
|
|
214d7a |
{
|
|
|
214d7a |
- if (Offset + sizeof (ACPI_MCFG_ALLOCATION) > Table->Length)
|
|
|
214d7a |
+ if (Offset + sizeof (ACPI_MCFG_ALLOCATION) > TableLength)
|
|
|
214d7a |
{
|
|
|
214d7a |
AcpiOsPrintf ("Warning: there are %u invalid trailing bytes\n",
|
|
|
214d7a |
- (UINT32) sizeof (ACPI_MCFG_ALLOCATION) - (Offset - Table->Length));
|
|
|
214d7a |
+ (UINT32) sizeof (ACPI_MCFG_ALLOCATION) - (Offset - TableLength));
|
|
|
214d7a |
return;
|
|
|
214d7a |
}
|
|
|
214d7a |
|
|
|
214d7a |
AcpiOsPrintf ("\n");
|
|
|
214d7a |
- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
|
|
|
214d7a |
+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
|
|
|
214d7a |
sizeof (ACPI_MCFG_ALLOCATION), AcpiDmTableInfoMcfg0);
|
|
|
214d7a |
if (ACPI_FAILURE (Status))
|
|
|
214d7a |
{
|