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