Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37530935
en ru br
ALT Linux repos
S:20230628-alt1

Group :: System/Kernel and hardware
RPM: acpica

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: 0034-Support-LPIT-in-a-big-endian-world.patch
Download


From b521edcfceab513a900a000aa462d7f86b65a040 Mon Sep 17 00:00:00 2001
From: Al Stone <ahs3@redhat.com>
Date: Mon, 28 Sep 2020 16:49:30 -0600
Subject: [PATCH 34/40] Support LPIT in a big-endian world
Signed-off-by: Al Stone <ahs3@redhat.com>
---
 source/common/dmtbdump2.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Index: acpica-unix2-20200925/source/common/dmtbdump2.c
===================================================================
--- acpica-unix2-20200925.orig/source/common/dmtbdump2.c
+++ acpica-unix2-20200925/source/common/dmtbdump2.c
@@ -534,7 +534,7 @@ AcpiDmDumpLpit (
 {
     ACPI_STATUS             Status;
     ACPI_LPIT_HEADER        *Subtable;
-    UINT32                  Length = Table->Length;
+    UINT32                  TableLength = AcpiUtReadUint32(&Table->Length);
     UINT32                  Offset = sizeof (ACPI_TABLE_LPIT);
     ACPI_DMTABLE_INFO       *InfoTable;
     UINT32                  SubtableLength;
@@ -543,11 +543,11 @@ AcpiDmDumpLpit (
     /* Subtables */
 
     Subtable = ACPI_ADD_PTR (ACPI_LPIT_HEADER, Table, Offset);
-    while (Offset < Table->Length)
+    while (Offset < TableLength)
     {
         /* Common subtable header */
 
-        Status = AcpiDmDumpTable (Length, Offset, Subtable,
+        Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
             sizeof (ACPI_LPIT_HEADER), AcpiDmTableInfoLpitHdr);
         if (ACPI_FAILURE (Status))
         {
@@ -571,7 +571,7 @@ AcpiDmDumpLpit (
             return;
         }
 
-        Status = AcpiDmDumpTable (Length, Offset, Subtable,
+        Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
             SubtableLength, InfoTable);
         if (ACPI_FAILURE (Status))
         {
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin