acpica-tools/0041-Support-MTMR-in-a-big-endian-world.patch
Al Stone 6c29d68058 Update some of the big-endian patches with corrections
Signed-off-by: Al Stone <ahs3@redhat.com>
2020-10-23 18:40:24 -06:00

47 lines
1.5 KiB
Diff

From 62c6c5b94772b7f8f5de6136a2ba61e31d0c7b3c Mon Sep 17 00:00:00 2001
From: Al Stone <ahs3@redhat.com>
Date: Fri, 16 Oct 2020 20:52:43 -0400
Subject: [PATCH 3/5] 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.26.2