acpica-tools/0033-Support-MCFG-in-a-big-endian-world.patch
DistroBaker 80dc240519 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/acpica-tools.git#defe2b64332fc44bf9915c8f57d2614c529cdb43
2020-10-31 12:18:15 +01:00

51 lines
1.9 KiB
Diff

From 0fecc447cd64bf9da3345b2912e41e6005eb1011 Mon Sep 17 00:00:00 2001
From: Al Stone <ahs3@redhat.com>
Date: Mon, 28 Sep 2020 13:01:18 -0600
Subject: [PATCH 33/40] Support MCFG in a big-endian world
Signed-off-by: Al Stone <ahs3@redhat.com>
---
source/common/dmtbdump2.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
Index: acpica-unix2-20200925/source/common/dmtbdump2.c
===================================================================
--- acpica-unix2-20200925.orig/source/common/dmtbdump2.c
+++ acpica-unix2-20200925/source/common/dmtbdump2.c
@@ -769,11 +769,12 @@ AcpiDmDumpMcfg (
ACPI_STATUS Status;
UINT32 Offset = sizeof (ACPI_TABLE_MCFG);
ACPI_MCFG_ALLOCATION *Subtable;
+ UINT32 TableLength = AcpiUtReadUint32(&Table->Length);
/* Main table */
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMcfg);
+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoMcfg);
if (ACPI_FAILURE (Status))
{
return;
@@ -782,17 +783,17 @@ AcpiDmDumpMcfg (
/* 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))
{