acpica-tools/0041-Support-MTMR-in-a-big-endian-world.patch
Al Stone 249abc074a Add big-endian support for three additional tables: MTMR, VRTC and S3PT
Signed-off-by: Al Stone <ahs3@redhat.com>
2020-10-23 13:04:26 -06:00

47 lines
1.5 KiB
Diff

From 902266037614bc0b3ff31c1dfeb350c80e517d90 Mon Sep 17 00:00:00 2001
From: Al Stone <ahs3@redhat.com>
Date: Fri, 16 Oct 2020 20:52:43 -0400
Subject: [PATCH 1/4] Support MTMR in a big-endian world
Signed-off-by: Al Stone <ahs3@redhat.com>
---
source/common/dmtbdump2.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/source/common/dmtbdump2.c b/source/common/dmtbdump2.c
index 285fd30d7..7450ca3f7 100644
--- a/source/common/dmtbdump2.c
+++ b/source/common/dmtbdump2.c
@@ -1156,11 +1156,12 @@ AcpiDmDumpMtmr (
ACPI_STATUS Status;
UINT32 Offset = sizeof (ACPI_TABLE_MTMR);
ACPI_MTMR_ENTRY *Subtable;
+ UINT32 TableLength = AcpiUtReadUint32(&Table->Length);
/* Main table */
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMtmr);
+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoMtmr);
if (ACPI_FAILURE (Status))
{
return;
@@ -1169,12 +1170,12 @@ AcpiDmDumpMtmr (
/* Subtables */
Subtable = ACPI_ADD_PTR (ACPI_MTMR_ENTRY, Table, Offset);
- while (Offset < Table->Length)
+ while (Offset < TableLength)
{
/* Common subtable header */
AcpiOsPrintf ("\n");
- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
sizeof (ACPI_MTMR_ENTRY), AcpiDmTableInfoMtmr0);
if (ACPI_FAILURE (Status))
{
--
2.28.0