2020-10-24 00:40:24 +00:00
|
|
|
From 62c6c5b94772b7f8f5de6136a2ba61e31d0c7b3c Mon Sep 17 00:00:00 2001
|
2020-10-23 19:04:26 +00:00
|
|
|
From: Al Stone <ahs3@redhat.com>
|
|
|
|
Date: Fri, 16 Oct 2020 20:52:43 -0400
|
2020-10-24 00:40:24 +00:00
|
|
|
Subject: [PATCH 3/5] Support MTMR in a big-endian world
|
2020-10-23 19:04:26 +00:00
|
|
|
|
|
|
|
Signed-off-by: Al Stone <ahs3@redhat.com>
|
|
|
|
---
|
|
|
|
source/common/dmtbdump2.c | 7 ++++---
|
|
|
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
|
2020-10-25 17:36:21 +00:00
|
|
|
Index: acpica-unix2-20200925/source/common/dmtbdump2.c
|
|
|
|
===================================================================
|
|
|
|
--- acpica-unix2-20200925.orig/source/common/dmtbdump2.c
|
|
|
|
+++ acpica-unix2-20200925/source/common/dmtbdump2.c
|
|
|
|
@@ -1048,11 +1048,12 @@ AcpiDmDumpMtmr (
|
2020-10-23 19:04:26 +00:00
|
|
|
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;
|
2020-10-25 17:36:21 +00:00
|
|
|
@@ -1061,12 +1062,12 @@ AcpiDmDumpMtmr (
|
2020-10-23 19:04:26 +00:00
|
|
|
/* 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))
|
|
|
|
{
|