|
|
214d7a |
From ff1449919ee7d395d301e3a56a4ba333604d0458 Mon Sep 17 00:00:00 2001
|
|
|
214d7a |
From: Al Stone <ahs3@redhat.com>
|
|
|
214d7a |
Date: Fri, 25 Sep 2020 18:13:20 -0600
|
|
|
214d7a |
Subject: [PATCH 32/45] Support WDAT in a big-endian world
|
|
|
214d7a |
|
|
|
214d7a |
Signed-off-by: Al Stone <ahs3@redhat.com>
|
|
|
214d7a |
---
|
|
|
214d7a |
source/common/dmtbdump3.c | 7 ++++---
|
|
|
214d7a |
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
214d7a |
|
|
|
214d7a |
Index: acpica-unix2-20210604/source/common/dmtbdump3.c
|
|
|
214d7a |
===================================================================
|
|
|
214d7a |
--- acpica-unix2-20210604.orig/source/common/dmtbdump3.c
|
|
|
214d7a |
+++ acpica-unix2-20210604/source/common/dmtbdump3.c
|
|
|
214d7a |
@@ -675,11 +675,12 @@ AcpiDmDumpWdat (
|
|
|
214d7a |
ACPI_STATUS Status;
|
|
|
214d7a |
UINT32 Offset = sizeof (ACPI_TABLE_WDAT);
|
|
|
214d7a |
ACPI_WDAT_ENTRY *Subtable;
|
|
|
214d7a |
+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length);
|
|
|
214d7a |
|
|
|
214d7a |
|
|
|
214d7a |
/* Main table */
|
|
|
214d7a |
|
|
|
214d7a |
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoWdat);
|
|
|
214d7a |
+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoWdat);
|
|
|
214d7a |
if (ACPI_FAILURE (Status))
|
|
|
214d7a |
{
|
|
|
214d7a |
return;
|
|
|
214d7a |
@@ -688,12 +689,12 @@ AcpiDmDumpWdat (
|
|
|
214d7a |
/* Subtables */
|
|
|
214d7a |
|
|
|
214d7a |
Subtable = ACPI_ADD_PTR (ACPI_WDAT_ENTRY, Table, Offset);
|
|
|
214d7a |
- while (Offset < Table->Length)
|
|
|
214d7a |
+ while (Offset < TableLength)
|
|
|
214d7a |
{
|
|
|
214d7a |
/* Common subtable header */
|
|
|
214d7a |
|
|
|
214d7a |
AcpiOsPrintf ("\n");
|
|
|
214d7a |
- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
|
|
|
214d7a |
+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
|
|
|
214d7a |
sizeof (ACPI_WDAT_ENTRY), AcpiDmTableInfoWdat0);
|
|
|
214d7a |
if (ACPI_FAILURE (Status))
|
|
|
214d7a |
{
|