[packages/acpica/dev-20221020] - initial update to 20221020

qboosh qboosh at pld-linux.org
Sun Jul 2 10:00:00 CEST 2023


commit e0da2c9bcfe4619bb8bc80c91e43722983175c94
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jul 2 08:44:22 2023 +0200

    - initial update to 20221020

 ...y-utility-functions-to-be-endian-agnostic.patch | 146 +++++++++----------
 0043-Support-DSDT-SSDT-in-a-big-endian-world.patch |  31 +++-
 0046-Support-PHAT-in-a-big-endian-world.patch      | 157 +++++++++++++--------
 acpica.spec                                        |   8 +-
 int-format.patch                                   |   9 --
 5 files changed, 205 insertions(+), 146 deletions(-)
---
diff --git a/acpica.spec b/acpica.spec
index 579e7a4..693cc10 100644
--- a/acpica.spec
+++ b/acpica.spec
@@ -5,15 +5,15 @@
 Summary:	ACPI Component Architecture - an assembler and disassembler for DSDT tables
 Summary(pl.UTF-8):	ACPI CA - asembler i disasembler dla tablic DSDT
 Name:		acpica
-Version:	20220331
+Version:	20221020
 Release:	1
 License:	GPL v2
 Group:		Development/Tools
 #Source0Download: https://acpica.org/downloads
-Source0:	https://acpica.org/sites/acpica/files/%{name}-unix2-%{version}.tar.gz
-# Source0-md5:	5721db851442be86054d45acd1dcacef
+Source0:	https://acpica.org/sites/acpica/files/%{name}-unix2-%{version}.tar_0.gz
+# Source0-md5:	fbaf79f37be8ed524d40496a17db38d6
 Source1:	https://acpica.org/sites/acpica/files/acpitests-unix-%{version}.tar.gz
-# Source1-md5:	9902b30fd402852a90a4ec59e471c5ff
+# Source1-md5:	33221120579244a5ab18aa07d122ff45
 Source2:	iasl.1
 Source3:	acpibin.1
 Source4:	acpidump.1
diff --git a/0002-Modify-utility-functions-to-be-endian-agnostic.patch b/0002-Modify-utility-functions-to-be-endian-agnostic.patch
index a328096..48b1d96 100644
--- a/0002-Modify-utility-functions-to-be-endian-agnostic.patch
+++ b/0002-Modify-utility-functions-to-be-endian-agnostic.patch
@@ -24,54 +24,23 @@ Signed-off-by: Al Stone <ahs3 at redhat.com>
  source/components/tables/tbprint.c | 13 +++++++++----
  5 files changed, 26 insertions(+), 17 deletions(-)
 
-Index: acpica-unix2-20220331/source/common/acfileio.c
-===================================================================
---- acpica-unix2-20220331.orig/source/common/acfileio.c
-+++ acpica-unix2-20220331/source/common/acfileio.c
-@@ -280,6 +280,7 @@ AcGetOneTableFromFile (
-     ACPI_TABLE_HEADER       *Table;
-     INT32                   Count;
-     long                    TableOffset;
-+    UINT32                  Length;
- 
- 
-     *ReturnTable = NULL;
-@@ -319,7 +320,8 @@ AcGetOneTableFromFile (
- 
-     /* Allocate a buffer for the entire table */
- 
--    Table = AcpiOsAllocate ((ACPI_SIZE) TableHeader.Length);
-+    Length = AcpiUtReadUint32 (&TableHeader.Length);
-+    Table = AcpiOsAllocate ((ACPI_SIZE) Length);
-     if (!Table)
-     {
-         return (AE_NO_MEMORY);
-@@ -329,13 +331,13 @@ AcGetOneTableFromFile (
- 
-     fseek (File, TableOffset, SEEK_SET);
- 
--    Count = fread (Table, 1, TableHeader.Length, File);
-+    Count = fread (Table, 1, Length, File);
- 
-     /*
-      * Checks for data table headers happen later in the execution. Only verify
-      * for Aml tables at this point in the code.
+--- acpica-unix2-20221020/source/common/acfileio.c.orig	2022-10-20 23:17:29.000000000 +0200
++++ acpica-unix2-20221020/source/common/acfileio.c	2023-07-01 21:29:48.697091987 +0200
+@@ -337,11 +337,11 @@ AcGetOneTableFromFile (
       */
--    if (GetOnlyAmlTables && Count != (INT32) TableHeader.Length)
-+    if (GetOnlyAmlTables && Count != (INT32) Length)
+     if (AcpiGbl_CDAT)
      {
-         Status = AE_ERROR;
-         goto ErrorExit;
-@@ -343,7 +345,7 @@ AcGetOneTableFromFile (
- 
-     /* Validate the checksum (just issue a warning) */
- 
--    Status = AcpiTbVerifyChecksum (Table, TableHeader.Length);
-+    Status = AcpiTbVerifyChecksum (Table, Length);
-     if (ACPI_FAILURE (Status))
+-        TableLength = ACPI_CAST_PTR (ACPI_TABLE_CDAT, &TableHeader)->Length;
++        TableLength = AcpiUtReadUint32(&(ACPI_CAST_PTR (ACPI_TABLE_CDAT, &TableHeader)->Length));
+     }
+     else
      {
-         Status = AcCheckTextModeCorruption (Table);
-@@ -436,6 +438,7 @@ AcValidateTableHeader (
+-        TableLength = TableHeader.Length;
++        TableLength = AcpiUtReadUint32(&TableHeader.Length);
+     }
+ 
+     /* Allocate a buffer for the entire table */
+@@ -474,6 +474,7 @@ AcValidateTableHeader (
      long                    OriginalOffset;
      UINT32                  FileSize;
      UINT32                  i;
@@ -79,26 +48,44 @@ Index: acpica-unix2-20220331/source/common/acfileio.c
  
  
      ACPI_FUNCTION_TRACE (AcValidateTableHeader);
-@@ -472,11 +475,12 @@ AcValidateTableHeader (
-     /* Validate table length against bytes remaining in the file */
+@@ -537,25 +538,30 @@ AcValidateTableHeader (
+     {
+         /* Standard ACPI table header */
  
-     FileSize = CmGetFileSize (File);
--    if (TableHeader.Length > (UINT32) (FileSize - TableOffset))
-+    Length = AcpiUtReadUint32 (&TableHeader.Length);
+-        if (TableHeader.Length > (UINT32) (FileSize - TableOffset))
++        Length = AcpiUtReadUint32 (&TableHeader.Length);
++        if (Length > (UINT32) (FileSize - TableOffset))
+         {
+             fprintf (stderr, "Table [%4.4s] is too long for file - "
+                 "needs: 0x%.2X, remaining in file: 0x%.2X\n",
+-                TableHeader.Signature, TableHeader.Length,
++                TableHeader.Signature, Length,
+                 (UINT32) (FileSize - TableOffset));
+             return (AE_BAD_HEADER);
+         }
+     }
+-    else if (CdatTableHeader->Length > (UINT32) (FileSize - TableOffset))
++    else
++    {
++    Length = AcpiUtReadUint32 (&CdatTableHeader->Length);
 +    if (Length > (UINT32) (FileSize - TableOffset))
      {
-         fprintf (stderr, "Table [%4.4s] is too long for file - "
+         /* Special header for CDAT table */
+ 
+         fprintf (stderr, "Table [CDAT] is too long for file - "
              "needs: 0x%.2X, remaining in file: 0x%.2X\n",
--            TableHeader.Signature, TableHeader.Length,
-+            TableHeader.Signature, Length,
+-            CdatTableHeader->Length,
++            Length,
              (UINT32) (FileSize - TableOffset));
          return (AE_BAD_HEADER);
      }
-Index: acpica-unix2-20220331/source/common/dmtable.c
-===================================================================
---- acpica-unix2-20220331.orig/source/common/dmtable.c
-+++ acpica-unix2-20220331/source/common/dmtable.c
-@@ -713,7 +713,7 @@ AcpiDmDumpDataTable (
++    }
+ 
+     /* For CDAT table, there are no ASCII fields in the header, we are done */
+ 
+--- acpica-unix2-20221020/source/common/dmtable.c.orig	2022-10-20 23:17:29.000000000 +0200
++++ acpica-unix2-20221020/source/common/dmtable.c	2023-07-01 21:33:40.842501014 +0200
+@@ -695,7 +695,7 @@ AcpiDmDumpDataTable (
          {
              /* Dump the raw table data */
  
@@ -107,7 +94,7 @@ Index: acpica-unix2-20220331/source/common/dmtable.c
  
              AcpiOsPrintf ("\n/*\n%s: Length %d (0x%X)\n\n",
                  ACPI_RAW_TABLE_DATA_HEADER, Length, Length);
-@@ -730,7 +730,7 @@ AcpiDmDumpDataTable (
+@@ -712,7 +712,7 @@ AcpiDmDumpDataTable (
       */
      if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS))
      {
@@ -116,7 +103,7 @@ Index: acpica-unix2-20220331/source/common/dmtable.c
          Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoFacs);
          if (ACPI_FAILURE (Status))
          {
-@@ -751,7 +751,7 @@ AcpiDmDumpDataTable (
+@@ -755,7 +755,7 @@ AcpiDmDumpDataTable (
          /*
           * All other tables must use the common ACPI table header, dump it now
           */
@@ -125,10 +112,19 @@ Index: acpica-unix2-20220331/source/common/dmtable.c
          Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoHeader);
          if (ACPI_FAILURE (Status))
          {
-@@ -1415,7 +1415,7 @@ AcpiDmDumpTable (
+@@ -1146,7 +1146,7 @@ AcpiDmDumpTable (
+              *          Start of the vendor data (Target)
+              */
+             ByteLength = ((ACPI_CAST_PTR (char, Table) +
+-                            (ACPI_CAST_PTR (ACPI_PMTT_HEADER, Table)->Length)) -
++                            AcpiUtReadUint32 (&(ACPI_CAST_PTR (ACPI_PMTT_HEADER, Table)->Length))) -
+                             ACPI_CAST_PTR (char, Target));
+             break;
+ 
+@@ -1421,7 +1421,7 @@ AcpiDmDumpTable (
  
              AcpiOsPrintf ("%2.2X", *Target);
-             Temp8 = AcpiDmGenerateChecksum (Table,
+             Temp8 = AcpiUtGenerateChecksum (Table,
 -                ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
 +                AcpiUtReadUint32 (&(ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length)),
                  ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum);
@@ -160,20 +156,17 @@ Index: acpica-unix2-20220331/source/compiler/dtsubtable.c
 +    AcpiUtWriteUint (Subtable->LengthField, Subtable->SizeOfLengthField,
 +                     &Subtable->TotalLength, sizeof (Subtable->TotalLength));
  }
-Index: acpica-unix2-20220331/source/components/tables/tbprint.c
-===================================================================
---- acpica-unix2-20220331.orig/source/components/tables/tbprint.c
-+++ acpica-unix2-20220331/source/components/tables/tbprint.c
-@@ -44,6 +44,8 @@
- #include "acpi.h"
- #include "accommon.h"
+--- acpica-unix2-20221020/source/components/tables/tbprint.c.orig	2022-10-20 23:17:32.000000000 +0200
++++ acpica-unix2-20221020/source/components/tables/tbprint.c	2023-07-01 21:41:53.759830651 +0200
+@@ -46,6 +46,7 @@
  #include "actables.h"
+ #include "acdisasm.h"
+ #include "acutils.h"
 +#include "platform/acenv.h"
-+#include "acutils.h"
  
  #define _COMPONENT          ACPI_TABLES
          ACPI_MODULE_NAME    ("tbprint")
-@@ -151,7 +153,7 @@ AcpiTbPrintTableHeader (
+@@ -153,7 +154,7 @@ AcpiTbPrintTableHeader (
  
          ACPI_INFO (("%-4.4s 0x%8.8X%8.8X %06X",
              Header->Signature, ACPI_FORMAT_UINT64 (Address),
@@ -182,7 +175,16 @@ Index: acpica-unix2-20220331/source/components/tables/tbprint.c
      }
      else if (ACPI_VALIDATE_RSDP_SIG (ACPI_CAST_PTR (ACPI_TABLE_RSDP,
          Header)->Signature))
-@@ -179,9 +181,12 @@ AcpiTbPrintTableHeader (
+@@ -167,7 +168,7 @@ AcpiTbPrintTableHeader (
+         ACPI_INFO (("RSDP 0x%8.8X%8.8X %06X (v%.2d %-6.6s)",
+             ACPI_FORMAT_UINT64 (Address),
+             (ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Revision > 0) ?
+-                ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Length : 20,
++                AcpiUtReadUint32 (&(ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Length)) : 20,
+             ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Revision,
+             LocalHeader.OemId));
+     }
+@@ -181,9 +182,12 @@ AcpiTbPrintTableHeader (
              "%-4.4s 0x%8.8X%8.8X"
              " %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)",
              LocalHeader.Signature, ACPI_FORMAT_UINT64 (Address),
diff --git a/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch b/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch
index 777f74a..dadb505 100644
--- a/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch
+++ b/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch
@@ -69,10 +69,8 @@ Index: acpica-unix2-20220331/source/common/dmrestag.c
          AcpiDmAddResourceToNamespace, (void **) BufferNode);
  }
  
-Index: acpica-unix2-20220331/source/common/dmtables.c
-===================================================================
---- acpica-unix2-20220331.orig/source/common/dmtables.c
-+++ acpica-unix2-20220331/source/common/dmtables.c
+--- acpica-unix2-20221020/source/common/dmtables.c.orig	2022-10-20 23:17:29.000000000 +0200
++++ acpica-unix2-20221020/source/common/dmtables.c	2023-07-01 21:54:16.342474403 +0200
 @@ -142,6 +142,10 @@ AdCreateTableHeader (
      ACPI_TABLE_HEADER       *Table)
  {
@@ -97,8 +95,8 @@ Index: acpica-unix2-20220331/source/common/dmtables.c
  
      AcpiOsPrintf ("\n *     Checksum         0x%2.2X",        Table->Checksum);
  
--    Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), Table->Length);
-+    Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), TableLength);
+-    Checksum = AcpiUtChecksum (ACPI_CAST_PTR (UINT8, Table), Table->Length);
++    Checksum = AcpiUtChecksum (ACPI_CAST_PTR (UINT8, Table), TableLength);
      if (Checksum)
      {
          AcpiOsPrintf (" **** Incorrect checksum, should be 0x%2.2X",
@@ -123,6 +121,27 @@ Index: acpica-unix2-20220331/source/common/dmtables.c
  }
  
  
+@@ -243,7 +247,7 @@ AdDisplayTables (
+     char                    *Filename,
+     ACPI_TABLE_HEADER       *Table)
+ {
+-
++    UINT32 TableLength = AcpiUtReadUint32 (&Table->Length);
+ 
+     if (!AcpiGbl_ParseOpRoot)
+     {
+@@ -264,9 +268,9 @@ AdDisplayTables (
+         AcpiUtDebugDumpBuffer ((UINT8 *) Table, sizeof (ACPI_TABLE_HEADER),
+             DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
+ 
+-        AcpiOsPrintf ("Table Body (Length 0x%X)\n", Table->Length);
++        AcpiOsPrintf ("Table Body (Length 0x%X)\n", TableLength);
+         AcpiUtDebugDumpBuffer (((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER)),
+-            Table->Length, DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
++            TableLength, DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
+     }
+ 
+     return (AE_OK);
 @@ -396,7 +400,8 @@ AdParseTable (
  
      fprintf (stderr, "Pass 1 parse of [%4.4s]\n", (char *) Table->Signature);
diff --git a/0046-Support-PHAT-in-a-big-endian-world.patch b/0046-Support-PHAT-in-a-big-endian-world.patch
index 9a22b3b..ab709d7 100644
--- a/0046-Support-PHAT-in-a-big-endian-world.patch
+++ b/0046-Support-PHAT-in-a-big-endian-world.patch
@@ -9,22 +9,25 @@ Signed-off-by: Al Stone <ahs3 at redhat.com>
  source/compiler/dttable2.c | 12 +++++++++---
  2 files changed, 29 insertions(+), 19 deletions(-)
 
-Index: acpica-unix2-20220331/source/common/dmtbdump2.c
-===================================================================
---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c
-+++ acpica-unix2-20220331/source/common/dmtbdump2.c
-@@ -2029,39 +2029,41 @@ AcpiDmDumpPhat (
+--- acpica-unix2-20221020/source/common/dmtbdump2.c.orig	2023-07-01 21:55:10.515514255 +0200
++++ acpica-unix2-20221020/source/common/dmtbdump2.c	2023-07-02 08:00:29.075426396 +0200
+@@ -2029,25 +2029,30 @@ AcpiDmDumpPhat (
+     ACPI_DMTABLE_INFO       *InfoTable;
      ACPI_PHAT_HEADER        *Subtable;
      ACPI_PHAT_VERSION_DATA  *VersionData;
++    UINT32                  VersionDataHeaderLength;
      UINT32                  RecordCount;
 -    UINT32                  Length = Table->Length;
 +    UINT32                  TableLength = AcpiUtReadUint32 (&Table->Length);
      UINT32                  Offset = sizeof (ACPI_TABLE_PHAT);
+     UINT32                  OriginalOffset;
 -    UINT32                  SubtableLength;
 +    UINT16                  SubtableLength;
      UINT32                  PathLength;
      UINT32                  VendorLength;
+     UINT16                  RecordType;
 +    UINT16                  SubtableType;
+     const wchar_t           *WideString;
  
  
      Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Table, sizeof (ACPI_TABLE_PHAT));
@@ -38,13 +41,14 @@ Index: acpica-unix2-20220331/source/common/dmtbdump2.c
 +        SubtableLength = AcpiUtReadUint16 (&Subtable->Length);
 +
          AcpiOsPrintf ("\n");
--        Status = AcpiDmDumpTable (Length, 0, Subtable,
-+        Status = AcpiDmDumpTable (TableLength, 0, Subtable,
+-        Status = AcpiDmDumpTable (Length, Offset, Subtable,
++        Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
              sizeof (ACPI_PHAT_HEADER), AcpiDmTableInfoPhatHdr);
          if (ACPI_FAILURE (Status))
          {
-             return;
-         }
+@@ -2057,29 +2062,29 @@ AcpiDmDumpPhat (
+         DbgPrint (ASL_DEBUG_OUTPUT, "\n/* %u, Subtable->Type %X */\n",
+             __LINE__, Subtable->Type);
  
 -        switch (Subtable->Type)
 +        switch (SubtableType)
@@ -52,28 +56,35 @@ Index: acpica-unix2-20220331/source/common/dmtbdump2.c
          case ACPI_PHAT_TYPE_FW_VERSION_DATA:
  
              InfoTable = AcpiDmTableInfoPhat0;
--            SubtableLength = sizeof (ACPI_PHAT_VERSION_DATA);
+-            SubtableLength = Offset += sizeof (ACPI_PHAT_VERSION_DATA);
++            Offset += sizeof (ACPI_PHAT_VERSION_DATA);
              break;
  
          case ACPI_PHAT_TYPE_FW_HEALTH_DATA:
  
              InfoTable = AcpiDmTableInfoPhat1;
--            SubtableLength = sizeof (ACPI_PHAT_HEALTH_DATA);
+-            SubtableLength = Offset += sizeof (ACPI_PHAT_TYPE_FW_HEALTH_DATA);
++            Offset += sizeof (ACPI_PHAT_TYPE_FW_HEALTH_DATA);
              break;
  
          default:
-@@ -2072,22 +2074,22 @@ AcpiDmDumpPhat (
+ 
+             DbgPrint (ASL_DEBUG_OUTPUT, "\n**** Unknown PHAT subtable type 0x%X\n\n",
+-                Subtable->Type);
++                SubtableType);
+ 
              return;
          }
  
--        Status = AcpiDmDumpTable (Length, 0, Subtable,
-+        Status = AcpiDmDumpTable (TableLength, 0, Subtable,
+-        Status = AcpiDmDumpTable (Length, SubtableLength, Subtable,
++        Status = AcpiDmDumpTable (TableLength, SubtableLength, Subtable,
              SubtableLength, InfoTable);
          if (ACPI_FAILURE (Status))
          {
-             return;
+@@ -2087,25 +2092,26 @@ AcpiDmDumpPhat (
          }
  
+         OriginalOffset = Offset;
 -        switch (Subtable->Type)
 +        switch (SubtableType)
          {
@@ -82,34 +93,73 @@ Index: acpica-unix2-20220331/source/common/dmtbdump2.c
              VersionData = ACPI_CAST_PTR (ACPI_PHAT_VERSION_DATA, Subtable);
 -            RecordCount = VersionData->ElementCount;
 +            RecordCount = AcpiUtReadUint32 (&VersionData->ElementCount);
-             while (RecordCount)
+             RecordType = *ACPI_CAST_PTR (UINT8, Subtable);
++            VersionDataHeaderLength = AcpiUtReadUint32 (&(VersionData->Header.Length));
+ 
+             /*
+              * Skip past a zero-valued block (not part of the ACPI PHAT specification).
+              * First, check for a zero length record and a zero element count
+              */
+-            if (!VersionData->Header.Length && !VersionData->ElementCount)
++            if (!VersionDataHeaderLength && !RecordCount)
              {
--                Status = AcpiDmDumpTable (Length, Offset,
-+                Status = AcpiDmDumpTable (TableLength, Offset,
-                     ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_VERSION_DATA)),
+                 while (RecordType == 0)
+                 {
+                     Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Table, Offset);
+                     RecordType = *ACPI_CAST_PTR (UINT8, Subtable);
+-                    RecordCount = VersionData->ElementCount;
++                    RecordCount = AcpiUtReadUint32 (&VersionData->ElementCount);
+                     Offset += 1;
+                 }
+ 
+@@ -2120,13 +2126,13 @@ AcpiDmDumpPhat (
+ 
+             /* Emit each of the version elements */
+ 
+-            while (RecordCount && VersionData->Header.Length)
++            while (RecordCount && VersionDataHeaderLength)
+             {
+                 AcpiOsPrintf ("\n/* Version Element #%Xh Offset %Xh */\n\n",
+                     VersionData->ElementCount - RecordCount + 1, Offset);
+ 
+                 Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Table, Offset);
+-                Status = AcpiDmDumpTable (Length, Offset, Subtable,
++                Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
                      sizeof (ACPI_PHAT_VERSION_ELEMENT), AcpiDmTableInfoPhat0a);
                  if (ACPI_FAILURE (Status))
-@@ -2105,7 +2107,7 @@ AcpiDmDumpPhat (
-             /* account for the null terminator */
+                 {
+@@ -2150,9 +2156,9 @@ AcpiDmDumpPhat (
+ 
+             PathLength = (wcslen (WideString) * 2) + 2;
+             DbgPrint (ASL_DEBUG_OUTPUT, "/* %u, PathLength %X, Offset %X, Table->Length %X */\n",
+-                __LINE__, PathLength, Offset, Length);
++                __LINE__, PathLength, Offset, TableLength);
  
-             PathLength = strlen (ACPI_ADD_PTR (char, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA))) + 1;
 -            Status = AcpiDmDumpTable (Length, Offset,
 +            Status = AcpiDmDumpTable (TableLength, Offset,
                  ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA)),
                  PathLength, AcpiDmTableInfoPhat1a);
-             if (ACPI_FAILURE (Status))
-@@ -2116,8 +2118,8 @@ AcpiDmDumpPhat (
-             /* Get vendor data - data length is the remaining subtable length */
+             Offset += PathLength;
+@@ -2164,15 +2170,15 @@ AcpiDmDumpPhat (
+             /* Get Device-Specific Data - length of which is the remaining subtable length. */
  
              VendorLength =
 -                Subtable->Length - sizeof (ACPI_PHAT_HEALTH_DATA) - PathLength;
--            Status = AcpiDmDumpTable (Length, 0,
 +                SubtableLength - sizeof (ACPI_PHAT_HEALTH_DATA) - PathLength;
-+            Status = AcpiDmDumpTable (TableLength, 0,
-                 ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA) + PathLength),
-                 VendorLength, AcpiDmTableInfoPhat1b);
-             if (ACPI_FAILURE (Status))
-@@ -2129,15 +2131,15 @@ AcpiDmDumpPhat (
+             DbgPrint (ASL_DEBUG_OUTPUT, "%u, Subtable->Length %X, VendorLength %X, Offset %X PathLength: %X\n",
+-                __LINE__, Subtable->Length, VendorLength, Offset, PathLength);
++                __LINE__, SubtableLength, VendorLength, Offset, PathLength);
+ 
+             if (VendorLength)
+             {
+                 /* Point past the Device Path, Compile the Device-Specific Data */
+ 
+-                Status = AcpiDmDumpTable (Length, Offset,
++                Status = AcpiDmDumpTable (TableLength, Offset,
+                     ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA) + PathLength),
+                     VendorLength, AcpiDmTableInfoPhat1b);
+                 if (ACPI_FAILURE (Status))
+@@ -2192,7 +2198,7 @@ AcpiDmDumpPhat (
          default:
  
              AcpiOsPrintf ("\n**** Unknown PHAT subtable type 0x%X\n\n",
@@ -118,30 +168,27 @@ Index: acpica-unix2-20220331/source/common/dmtbdump2.c
              return;
          }
  
-         /* Next subtable */
- 
--        Offset += Subtable->Length;
-+        Offset += SubtableLength;
-         Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable,
--            Subtable->Length);
-+            SubtableLength);
-     }
- }
- 
-Index: acpica-unix2-20220331/source/compiler/dttable2.c
-===================================================================
---- acpica-unix2-20220331.orig/source/compiler/dttable2.c
-+++ acpica-unix2-20220331/source/compiler/dttable2.c
-@@ -1267,6 +1267,8 @@ DtCompilePhat (
-     ACPI_DMTABLE_INFO       *Info;
-     ACPI_PHAT_VERSION_DATA  *VersionData;
-     UINT32                  RecordCount;
+@@ -2200,7 +2206,7 @@ AcpiDmDumpPhat (
+ 
+         DbgPrint (ASL_DEBUG_OUTPUT, "/* %u, Bottom of main loop: Offset %X, "
+             "Subtable->Length %X, Table->Length %X */\n",
+-            __LINE__, Offset, Subtable->Length, Table->Length);
++            __LINE__, Offset, SubtableLength, TableLength);
+ 
+         Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Table,
+             Offset);
+--- acpica-unix2-20221020/source/compiler/dttable2.c.orig	2023-07-02 08:01:19.868484559 +0200
++++ acpica-unix2-20221020/source/compiler/dttable2.c	2023-07-02 08:06:56.953325081 +0200
+@@ -1278,6 +1278,8 @@ DtCompilePhat (
+     UINT32                  TableOffset = 0;
+     UINT32                  DataOffsetValue;
+     UINT32                  i;
 +    UINT16                  SubtableType;
 +    UINT16                  Tmp16;
  
  
-     /* The table consist of subtables */
-@@ -1284,8 +1286,9 @@ DtCompilePhat (
+     /* The table consists of subtables */
+@@ -1300,8 +1302,9 @@ DtCompilePhat (
          DtPushSubtable (Subtable);
  
          PhatHeader = ACPI_CAST_PTR (ACPI_PHAT_HEADER, Subtable->Buffer);
@@ -152,7 +199,7 @@ Index: acpica-unix2-20220331/source/compiler/dttable2.c
          {
          case ACPI_PHAT_TYPE_FW_VERSION_DATA:
  
-@@ -1316,13 +1319,13 @@ DtCompilePhat (
+@@ -1389,13 +1392,13 @@ DtCompilePhat (
          ParentTable = DtPeekSubtable ();
          DtInsertSubtable (ParentTable, Subtable);
  
@@ -166,9 +213,9 @@ Index: acpica-unix2-20220331/source/compiler/dttable2.c
 -            RecordCount = VersionData->ElementCount;
 +            RecordCount = AcpiUtReadUint32 (&VersionData->ElementCount);
  
-             while (RecordCount)
-             {
-@@ -1373,6 +1376,9 @@ DtCompilePhat (
+             /* Compile all of the Version Elements */
+ 
+@@ -1498,6 +1501,9 @@ DtCompilePhat (
              DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, *PFieldList, "PHAT");
              return (AE_ERROR);
          }
diff --git a/int-format.patch b/int-format.patch
index ce98627..63f2092 100644
--- a/int-format.patch
+++ b/int-format.patch
@@ -250,15 +250,6 @@ Index: acpica-unix2-20220331/source/components/tables/tbxfroot.c
  
          return_ACPI_STATUS (AE_NO_MEMORY);
      }
-@@ -204,7 +204,7 @@ AcpiFindRootPointer (
-         {
-             ACPI_ERROR ((AE_INFO,
-                 "Could not map memory at 0x%8.8X for length %u",
--                PhysicalAddress, ACPI_EBDA_WINDOW_SIZE));
-+                PhysicalAddress, (UINT32) ACPI_EBDA_WINDOW_SIZE));
- 
-             return_ACPI_STATUS (AE_NO_MEMORY);
-         }
 @@ -236,7 +236,7 @@ AcpiFindRootPointer (
      {
          ACPI_ERROR ((AE_INFO,
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/acpica.git/commitdiff/e0da2c9bcfe4619bb8bc80c91e43722983175c94



More information about the pld-cvs-commit mailing list