https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3499b966821e50384bb38bfda4dfa0dfc0c6f18b

commit 3499b966821e50384bb38bfda4dfa0dfc0c6f18b
Author:     Thomas Faber <[email protected]>
AuthorDate: Fri Oct 9 09:19:55 2020 +0200
Commit:     Thomas Faber <[email protected]>
CommitDate: Fri Oct 16 01:21:52 2020 +0200

    [ACPICA] Update to version 20200925. CORE-17170
---
 drivers/bus/acpi/acpica/events/evrgnini.c          | 11 ++--
 drivers/bus/acpi/acpica/executer/exregion.c        | 70 ++++++++++++++++------
 drivers/bus/acpi/acpica/include/acconfig.h         |  2 +-
 drivers/bus/acpi/acpica/include/acdebug.h          |  6 ++
 drivers/bus/acpi/acpica/include/acexcep.h          |  4 +-
 drivers/bus/acpi/acpica/include/acpixf.h           |  2 +-
 drivers/bus/acpi/acpica/include/acpredef.h         | 23 ++++++-
 drivers/bus/acpi/acpica/include/actbl1.h           | 16 ++---
 drivers/bus/acpi/acpica/include/actypes.h          | 16 +++--
 drivers/bus/acpi/acpica/include/acuuid.h           |  8 ++-
 drivers/bus/acpi/acpica/include/platform/aclinux.h |  3 +-
 drivers/bus/acpi/acpica/namespace/nsalloc.c        |  2 +-
 drivers/bus/acpi/acpica/namespace/nsarguments.c    |  4 +-
 drivers/bus/acpi/acpica/namespace/nsxfobj.c        |  3 +-
 drivers/bus/acpi/acpica/parser/psparse.c           |  4 +-
 drivers/bus/acpi/acpica/utilities/utpredef.c       |  4 +-
 drivers/bus/acpi/acpica/utilities/utstrsuppt.c     | 30 ++++++++--
 media/doc/3rd Party Files.txt                      |  2 +-
 18 files changed, 154 insertions(+), 56 deletions(-)

diff --git a/drivers/bus/acpi/acpica/events/evrgnini.c 
b/drivers/bus/acpi/acpica/events/evrgnini.c
index 144240e3c73..04b5fbe13ec 100644
--- a/drivers/bus/acpi/acpica/events/evrgnini.c
+++ b/drivers/bus/acpi/acpica/events/evrgnini.c
@@ -75,6 +75,7 @@ AcpiEvSystemMemoryRegionSetup (
 {
     ACPI_OPERAND_OBJECT     *RegionDesc = (ACPI_OPERAND_OBJECT *) Handle;
     ACPI_MEM_SPACE_CONTEXT  *LocalRegionContext;
+    ACPI_MEM_MAPPING        *Mm;
 
 
     ACPI_FUNCTION_TRACE (EvSystemMemoryRegionSetup);
@@ -86,12 +87,14 @@ AcpiEvSystemMemoryRegionSetup (
         {
             LocalRegionContext = (ACPI_MEM_SPACE_CONTEXT *) *RegionContext;
 
-            /* Delete a cached mapping if present */
+            /* Delete memory mappings if present */
 
-            if (LocalRegionContext->MappedLength)
+            while (LocalRegionContext->FirstMm)
             {
-                AcpiOsUnmapMemory (LocalRegionContext->MappedLogicalAddress,
-                    LocalRegionContext->MappedLength);
+                Mm = LocalRegionContext->FirstMm;
+                LocalRegionContext->FirstMm = Mm->NextMm;
+                AcpiOsUnmapMemory(Mm->LogicalAddress, Mm->Length);
+                ACPI_FREE(Mm);
             }
             ACPI_FREE (LocalRegionContext);
             *RegionContext = NULL;
diff --git a/drivers/bus/acpi/acpica/executer/exregion.c 
b/drivers/bus/acpi/acpica/executer/exregion.c
index 5f3745d23cc..3a13c04a77e 100644
--- a/drivers/bus/acpi/acpica/executer/exregion.c
+++ b/drivers/bus/acpi/acpica/executer/exregion.c
@@ -80,6 +80,7 @@ AcpiExSystemMemorySpaceHandler (
     ACPI_STATUS             Status = AE_OK;
     void                    *LogicalAddrPtr = NULL;
     ACPI_MEM_SPACE_CONTEXT  *MemInfo = RegionContext;
+    ACPI_MEM_MAPPING        *Mm = MemInfo->CurMm;
     UINT32                  Length;
     ACPI_SIZE               MapLength;
     ACPI_SIZE               PageBoundaryMapLength;
@@ -139,21 +140,46 @@ AcpiExSystemMemorySpaceHandler (
      * Is 1) Address below the current mapping? OR
      *    2) Address beyond the current mapping?
      */
-    if ((Address < MemInfo->MappedPhysicalAddress) ||
-        (((UINT64) Address + Length) >
-            ((UINT64)
-            MemInfo->MappedPhysicalAddress + MemInfo->MappedLength)))
+    if (!Mm || (Address < Mm->PhysicalAddress) ||
+        ((UINT64) Address + Length > (UINT64) Mm->PhysicalAddress + 
Mm->Length))
     {
         /*
-         * The request cannot be resolved by the current memory mapping;
-         * Delete the existing mapping and create a new one.
+         * The request cannot be resolved by the current memory mapping.
+         *
+         * Look for an existing saved mapping covering the address range
+         * at hand. If found, save it as the current one and carry out
+         * the access.
          */
-        if (MemInfo->MappedLength)
+        for (Mm = MemInfo->FirstMm; Mm; Mm = Mm->NextMm)
         {
-            /* Valid mapping, delete it */
+            if (Mm == MemInfo->CurMm)
+            {
+                continue;
+            }
+
+            if (Address < Mm->PhysicalAddress)
+            {
+                continue;
+            }
+
+            if ((UINT64) Address + Length > (UINT64) Mm->PhysicalAddress + 
Mm->Length)
+            {
+                continue;
+            }
+
+            MemInfo->CurMm = Mm;
+            goto access;
+        }
 
-            AcpiOsUnmapMemory (MemInfo->MappedLogicalAddress,
-                MemInfo->MappedLength);
+        /* Create a new mappings list entry */
+
+        Mm = ACPI_ALLOCATE_ZEROED(sizeof(*Mm));
+        if (!Mm)
+        {
+            ACPI_ERROR((AE_INFO,
+                "Unable to save memory mapping at 0x%8.8X%8.8X, size %u",
+                ACPI_FORMAT_UINT64(Address), Length));
+            return_ACPI_STATUS(AE_NO_MEMORY);
         }
 
         /*
@@ -189,28 +215,38 @@ AcpiExSystemMemorySpaceHandler (
 
         /* Create a new mapping starting at the address given */
 
-        MemInfo->MappedLogicalAddress = AcpiOsMapMemory (Address, MapLength);
-        if (!MemInfo->MappedLogicalAddress)
+        LogicalAddrPtr = AcpiOsMapMemory(Address, MapLength);
+        if (!LogicalAddrPtr)
         {
             ACPI_ERROR ((AE_INFO,
                 "Could not map memory at 0x%8.8X%8.8X, size %u",
                 ACPI_FORMAT_UINT64 (Address), (UINT32) MapLength));
-            MemInfo->MappedLength = 0;
+            ACPI_FREE(Mm);
             return_ACPI_STATUS (AE_NO_MEMORY);
         }
 
         /* Save the physical address and mapping size */
 
-        MemInfo->MappedPhysicalAddress = Address;
-        MemInfo->MappedLength = MapLength;
+        Mm->LogicalAddress = LogicalAddrPtr;
+        Mm->PhysicalAddress = Address;
+        Mm->Length = MapLength;
+
+        /*
+         * Add the new entry to the mappigs list and save it as the
+         * current mapping.
+         */
+        Mm->NextMm = MemInfo->FirstMm;
+        MemInfo->FirstMm = Mm;
+        MemInfo->CurMm = Mm;
     }
 
+access:
     /*
      * Generate a logical pointer corresponding to the address we want to
      * access
      */
-    LogicalAddrPtr = MemInfo->MappedLogicalAddress +
-        ((UINT64) Address - (UINT64) MemInfo->MappedPhysicalAddress);
+    LogicalAddrPtr = Mm->LogicalAddress +
+        ((UINT64) Address - (UINT64) Mm->PhysicalAddress);
 
     ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
         "System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n",
diff --git a/drivers/bus/acpi/acpica/include/acconfig.h 
b/drivers/bus/acpi/acpica/include/acconfig.h
index aa38a84eca5..c764770a479 100644
--- a/drivers/bus/acpi/acpica/include/acconfig.h
+++ b/drivers/bus/acpi/acpica/include/acconfig.h
@@ -158,7 +158,7 @@
  *
  *****************************************************************************/
 
-/* Method info (in WALK_STATE), containing local variables and argumetns */
+/* Method info (in WALK_STATE), containing local variables and arguments */
 
 #define ACPI_METHOD_NUM_LOCALS          8
 #define ACPI_METHOD_MAX_LOCAL           7
diff --git a/drivers/bus/acpi/acpica/include/acdebug.h 
b/drivers/bus/acpi/acpica/include/acdebug.h
index c32a94c89cf..1fa90043471 100644
--- a/drivers/bus/acpi/acpica/include/acdebug.h
+++ b/drivers/bus/acpi/acpica/include/acdebug.h
@@ -79,6 +79,7 @@ typedef struct acpi_db_execute_walk
 {
     UINT32                  Count;
     UINT32                  MaxCount;
+    char                    NameSeg[ACPI_NAMESEG_SIZE + 1];
 
 } ACPI_DB_EXECUTE_WALK;
 
@@ -87,6 +88,7 @@ typedef struct acpi_db_execute_walk
 
 #define EX_NO_SINGLE_STEP               1
 #define EX_SINGLE_STEP                  2
+#define EX_ALL                          4
 
 
 /*
@@ -237,6 +239,10 @@ void
 AcpiDbEvaluatePredefinedNames (
     void);
 
+void
+AcpiDbEvaluateAll (
+    char                    *NameSeg);
+
 
 /*
  * dbnames - namespace commands
diff --git a/drivers/bus/acpi/acpica/include/acexcep.h 
b/drivers/bus/acpi/acpica/include/acexcep.h
index 06b554b8a7f..194f3a82732 100644
--- a/drivers/bus/acpi/acpica/include/acexcep.h
+++ b/drivers/bus/acpi/acpica/include/acexcep.h
@@ -76,12 +76,12 @@ typedef struct acpi_exception_info
 {
     char                *Name;
 
-#ifdef ACPI_HELP_APP
+#if defined (ACPI_HELP_APP) || defined (ACPI_ASL_COMPILER)
     char                *Description;
 #endif
 } ACPI_EXCEPTION_INFO;
 
-#ifdef ACPI_HELP_APP
+#if defined (ACPI_HELP_APP) || defined (ACPI_ASL_COMPILER)
 #define EXCEP_TXT(Name,Description)     {Name, Description}
 #else
 #define EXCEP_TXT(Name,Description)     {Name}
diff --git a/drivers/bus/acpi/acpica/include/acpixf.h 
b/drivers/bus/acpi/acpica/include/acpixf.h
index c14c302d617..4003b45da0a 100644
--- a/drivers/bus/acpi/acpica/include/acpixf.h
+++ b/drivers/bus/acpi/acpica/include/acpixf.h
@@ -46,7 +46,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20200717
+#define ACPI_CA_VERSION                 0x20200925
 
 #include "acconfig.h"
 #include "actypes.h"
diff --git a/drivers/bus/acpi/acpica/include/acpredef.h 
b/drivers/bus/acpi/acpica/include/acpredef.h
index 2b6173d6c9f..188070bcde0 100644
--- a/drivers/bus/acpi/acpica/include/acpredef.h
+++ b/drivers/bus/acpi/acpica/include/acpredef.h
@@ -138,7 +138,7 @@ enum AcpiReturnPackageTypes
 
 /* Support macros for users of the predefined info table */
 
-#define METHOD_PREDEF_ARGS_MAX          4
+#define METHOD_PREDEF_ARGS_MAX          5
 #define METHOD_ARG_BIT_WIDTH            3
 #define METHOD_ARG_MASK                 0x0007
 #define ARG_COUNT_IS_MINIMUM            0x8000
@@ -154,6 +154,7 @@ enum AcpiReturnPackageTypes
 #define METHOD_2ARGS(a1,a2)             (2 | (a1 << 3) | (a2 << 6))
 #define METHOD_3ARGS(a1,a2,a3)          (3 | (a1 << 3) | (a2 << 6) | (a3 << 9))
 #define METHOD_4ARGS(a1,a2,a3,a4)       (4 | (a1 << 3) | (a2 << 6) | (a3 << 9) 
| (a4 << 12))
+#define METHOD_5ARGS(a1,a2,a3,a4,a5)    (5 | (a1 << 3) | (a2 << 6) | (a3 << 9) 
| (a4 << 12) | (a5 << 15))
 
 #define METHOD_RETURNS(type)            (type)
 #define METHOD_NO_RETURN_VALUE          0
@@ -915,9 +916,29 @@ const ACPI_PREDEFINED_INFO          
AcpiGbl_PredefinedMethods[] =
     {{"_S4W",   METHOD_0ARGS,
                 METHOD_RETURNS (ACPI_RTYPE_INTEGER)}},
 
+    {{"_SBA",   METHOD_0ARGS,
+                METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (4 Int) 
*/
+                    PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 
4,0,0,0),
+
+    {{"_SBI",   METHOD_0ARGS,
+                METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (1 Int, 
1 Buf) */
+                    PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 1, 
ACPI_RTYPE_BUFFER,1,0),
+
+    {{"_SBR",   METHOD_3ARGS (ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, 
ACPI_TYPE_INTEGER),
+                METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (2 Int) 
*/
+                    PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2, 
ACPI_RTYPE_BUFFER | ACPI_RTYPE_INTEGER, 1,0),
+
     {{"_SBS",   METHOD_0ARGS,
                 METHOD_RETURNS (ACPI_RTYPE_INTEGER)}},
 
+    {{"_SBT",   METHOD_4ARGS (ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, 
ACPI_TYPE_INTEGER, ACPI_TYPE_ANY),
+                METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (2 Int, 
1 Buf | Int) */
+                    PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2, 
ACPI_RTYPE_BUFFER | ACPI_RTYPE_INTEGER, 1,0),
+
+    {{"_SBW",   METHOD_5ARGS (ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, 
ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_ANY),
+                METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}},
+                    PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_BUFFER | 
ACPI_RTYPE_INTEGER, 1, 0,0,0),
+
     {{"_SCP",   METHOD_1ARGS (ACPI_TYPE_INTEGER) | ARG_COUNT_IS_MINIMUM,
                 METHOD_NO_RETURN_VALUE}},   /* Acpi 1.0 allowed 1 integer arg. 
Acpi 3.0 expanded to 3 args. Allow both. */
 
diff --git a/drivers/bus/acpi/acpica/include/actbl1.h 
b/drivers/bus/acpi/acpica/include/actbl1.h
index 4c17bdbfd7f..b25b690a4c0 100644
--- a/drivers/bus/acpi/acpica/include/actbl1.h
+++ b/drivers/bus/acpi/acpica/include/actbl1.h
@@ -1659,8 +1659,7 @@ typedef struct acpi_hest_ia_deferred_check
 
 
/*******************************************************************************
  *
- * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.2)
- *        Version 1
+ * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.3)
  *
  
******************************************************************************/
 
@@ -1702,7 +1701,7 @@ typedef struct acpi_hmat_proximity_domain
     ACPI_HMAT_STRUCTURE     Header;
     UINT16                  Flags;
     UINT16                  Reserved1;
-    UINT32                  ProcessorPD;            /* Processor proximity 
domain */
+    UINT32                  InitiatorPD;            /* Attached Initiator 
proximity domain */
     UINT32                  MemoryPD;               /* Memory proximity domain 
*/
     UINT32                  Reserved2;
     UINT64                  Reserved3;
@@ -1712,9 +1711,7 @@ typedef struct acpi_hmat_proximity_domain
 
 /* Masks for Flags field above */
 
-#define ACPI_HMAT_PROCESSOR_PD_VALID    (1)     /* 1: ProcessorPD field is 
valid */
-#define ACPI_HMAT_MEMORY_PD_VALID       (1<<1)  /* 1: MemoryPD field is valid 
*/
-#define ACPI_HMAT_RESERVATION_HINT      (1<<2)  /* 1: Reservation hint */
+#define ACPI_HMAT_INITIATOR_PD_VALID    (1)     /* 1: InitiatorPD field is 
valid */
 
 
 /* 1: System locality latency and bandwidth information */
@@ -1739,10 +1736,9 @@ typedef struct acpi_hmat_locality
 /* Values for Memory Hierarchy flag */
 
 #define ACPI_HMAT_MEMORY            0
-#define ACPI_HMAT_LAST_LEVEL_CACHE  1
-#define ACPI_HMAT_1ST_LEVEL_CACHE   2
-#define ACPI_HMAT_2ND_LEVEL_CACHE   3
-#define ACPI_HMAT_3RD_LEVEL_CACHE   4
+#define ACPI_HMAT_1ST_LEVEL_CACHE   1
+#define ACPI_HMAT_2ND_LEVEL_CACHE   2
+#define ACPI_HMAT_3RD_LEVEL_CACHE   3
 
 /* Values for DataType field above */
 
diff --git a/drivers/bus/acpi/acpica/include/actypes.h 
b/drivers/bus/acpi/acpica/include/actypes.h
index 86064afe79d..46d934635db 100644
--- a/drivers/bus/acpi/acpica/include/actypes.h
+++ b/drivers/bus/acpi/acpica/include/actypes.h
@@ -869,7 +869,7 @@ typedef UINT8                           ACPI_ADR_SPACE_TYPE;
  *
  * Note: A Data Table region is a special type of operation region
  * that has its own AML opcode. However, internally, the AML
- * interpreter simply creates an operation region with an an address
+ * interpreter simply creates an operation region with an address
  * space type of ACPI_ADR_SPACE_DATA_TABLE.
  */
 #define ACPI_ADR_SPACE_DATA_TABLE       (ACPI_ADR_SPACE_TYPE) 0x7E /* Internal 
to ACPICA only */
@@ -1332,13 +1332,21 @@ typedef struct acpi_pci_id
 
 } ACPI_PCI_ID;
 
+typedef struct acpi_mem_mapping
+{
+    ACPI_PHYSICAL_ADDRESS           PhysicalAddress;
+    UINT8                           *LogicalAddress;
+    ACPI_SIZE                       Length;
+    struct acpi_mem_mapping         *NextMm;
+
+} ACPI_MEM_MAPPING;
+
 typedef struct acpi_mem_space_context
 {
     UINT32                          Length;
     ACPI_PHYSICAL_ADDRESS           Address;
-    ACPI_PHYSICAL_ADDRESS           MappedPhysicalAddress;
-    UINT8                           *MappedLogicalAddress;
-    ACPI_SIZE                       MappedLength;
+    ACPI_MEM_MAPPING                *CurMm;
+    ACPI_MEM_MAPPING                *FirstMm;
 
 } ACPI_MEM_SPACE_CONTEXT;
 
diff --git a/drivers/bus/acpi/acpica/include/acuuid.h 
b/drivers/bus/acpi/acpica/include/acuuid.h
index 39e3d2d9231..f0929081877 100644
--- a/drivers/bus/acpi/acpica/include/acuuid.h
+++ b/drivers/bus/acpi/acpica/include/acuuid.h
@@ -61,6 +61,10 @@
 #define UUID_PCI_HOST_BRIDGE            "33db4d5b-1ff7-401c-9657-7441c03dd766"
 #define UUID_I2C_DEVICE                 "3cdff6f7-4267-4555-ad05-b30a3d8938de"
 #define UUID_POWER_BUTTON               "dfbcf3c5-e7a5-44e6-9c1f-29c76f6e059c"
+#define UUID_MEMORY_DEVICE              "03b19910-f473-11dd-87af-0800200c9a66"
+#define UUID_GENERIC_BUTTONS_DEVICE     "fa6bd625-9ce8-470d-a2c7-b3ca36c4282e"
+#define UUID_NVDIMM_ROOT_DEVICE         "2f10e7a4-9e91-11e4-89d3-123b93f75cba"
+#define UUID_CONTROL_METHOD_BATTERY     "f18fc78b-0f15-4978-b793-53f833a1d35b"
 
 /* Interfaces */
 
@@ -90,6 +94,8 @@
 #define UUID_BATTERY_THERMAL_LIMIT      "4c2067e3-887d-475c-9720-4af1d3ed602e"
 #define UUID_THERMAL_EXTENSIONS         "14d399cd-7a27-4b18-8fb4-7cb7b9f4e500"
 #define UUID_DEVICE_PROPERTIES          "daffd814-6eba-4d8c-8a91-bc9bbf4aa301"
-
+#define UUID_DEVICE_GRAPHS              "ab02a46b-74c7-45a2-bd68-f7d344ef2153"
+#define UUID_HIERARCHICAL_DATA_EXTENSION "dbb8e3e6-5886-4ba6-8795-1319f52a966b"
+#define UUID_CORESIGHT_GRAPH            "3ecbc8b6-1d0e-4fb3-8107-e627f805c6cd"
 
 #endif /* __ACUUID_H__ */
diff --git a/drivers/bus/acpi/acpica/include/platform/aclinux.h 
b/drivers/bus/acpi/acpica/include/platform/aclinux.h
index 2d7bd59594a..011347c80e5 100644
--- a/drivers/bus/acpi/acpica/include/platform/aclinux.h
+++ b/drivers/bus/acpi/acpica/include/platform/aclinux.h
@@ -216,7 +216,8 @@
 
 #if defined(__ia64__)    || (defined(__x86_64__) && !defined(__ILP32__)) ||\
     defined(__aarch64__) || defined(__PPC64__) ||\
-    defined(__s390x__)
+    defined(__s390x__) ||\
+    (defined(__riscv) && (defined(__LP64__) || defined(_LP64)))
 #define ACPI_MACHINE_WIDTH          64
 #define COMPILER_DEPENDENT_INT64    long
 #define COMPILER_DEPENDENT_UINT64   unsigned long
diff --git a/drivers/bus/acpi/acpica/namespace/nsalloc.c 
b/drivers/bus/acpi/acpica/namespace/nsalloc.c
index f9103e651f0..8d94a7f0694 100644
--- a/drivers/bus/acpi/acpica/namespace/nsalloc.c
+++ b/drivers/bus/acpi/acpica/namespace/nsalloc.c
@@ -373,7 +373,7 @@ AcpiNsDeleteChildren (
         NodeToDelete = NextNode;
         NextNode = NextNode->Peer;
         AcpiNsDeleteNode (NodeToDelete);
-    };
+    }
 
     /* Clear the parent's child pointer */
 
diff --git a/drivers/bus/acpi/acpica/namespace/nsarguments.c 
b/drivers/bus/acpi/acpica/namespace/nsarguments.c
index f9f2dbcf831..892e5f31d30 100644
--- a/drivers/bus/acpi/acpica/namespace/nsarguments.c
+++ b/drivers/bus/acpi/acpica/namespace/nsarguments.c
@@ -97,7 +97,9 @@ AcpiNsCheckArgumentTypes (
         ArgType = METHOD_GET_NEXT_TYPE (ArgTypeList);
         UserArgType = Info->Parameters[i]->Common.Type;
 
-        if (UserArgType != ArgType)
+        /* No typechecking for ACPI_TYPE_ANY */
+
+        if ((UserArgType != ArgType) && (ArgType != ACPI_TYPE_ANY))
         {
             ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, 
ACPI_WARN_ALWAYS,
                 "Argument #%u type mismatch - "
diff --git a/drivers/bus/acpi/acpica/namespace/nsxfobj.c 
b/drivers/bus/acpi/acpica/namespace/nsxfobj.c
index a1d9596abb3..5fe4f9bd2b6 100644
--- a/drivers/bus/acpi/acpica/namespace/nsxfobj.c
+++ b/drivers/bus/acpi/acpica/namespace/nsxfobj.c
@@ -61,7 +61,8 @@
  *
  * RETURN:      Status
  *
- * DESCRIPTION: This routine returns the type associatd with a particular 
handle
+ * DESCRIPTION: This routine returns the type associated with a particular
+ *              handle
  *
  
******************************************************************************/
 
diff --git a/drivers/bus/acpi/acpica/parser/psparse.c 
b/drivers/bus/acpi/acpica/parser/psparse.c
index 0baad4d556c..97c7be4d49f 100644
--- a/drivers/bus/acpi/acpica/parser/psparse.c
+++ b/drivers/bus/acpi/acpica/parser/psparse.c
@@ -554,8 +554,8 @@ AcpiPsParseAml (
             }
 
             /*
-             * If the transfer to the new method method call worked
-             *, a new walk state was created -- get it
+             * If the transfer to the new method method call worked,
+             * a new walk state was created -- get it
              */
             WalkState = AcpiDsGetCurrentWalkState (Thread);
             continue;
diff --git a/drivers/bus/acpi/acpica/utilities/utpredef.c 
b/drivers/bus/acpi/acpica/utilities/utpredef.c
index 016cb0516b3..a5e57f01bc5 100644
--- a/drivers/bus/acpi/acpica/utilities/utpredef.c
+++ b/drivers/bus/acpi/acpica/utilities/utpredef.c
@@ -209,7 +209,7 @@ AcpiUtGetArgumentTypes (
 
 static const char   *UtExternalTypeNames[] = /* Indexed by ACPI_TYPE_* */
 {
-    ", UNSUPPORTED-TYPE",
+    ", Type_ANY",
     ", Integer",
     ", String",
     ", Buffer",
@@ -391,7 +391,7 @@ AcpiUtGetArgumentTypes (
     {
         ThisArgumentType = METHOD_GET_NEXT_TYPE (ArgumentTypes);
 
-        if (!ThisArgumentType || (ThisArgumentType > METHOD_MAX_ARG_TYPE))
+        if (ThisArgumentType > METHOD_MAX_ARG_TYPE)
         {
             printf ("**** Invalid argument type (%u) "
                 "in predefined info structure\n", ThisArgumentType);
diff --git a/drivers/bus/acpi/acpica/utilities/utstrsuppt.c 
b/drivers/bus/acpi/acpica/utilities/utstrsuppt.c
index 878e6e91640..1a660c743b8 100644
--- a/drivers/bus/acpi/acpica/utilities/utstrsuppt.c
+++ b/drivers/bus/acpi/acpica/utilities/utstrsuppt.c
@@ -99,10 +99,16 @@ AcpiUtConvertOctalString (
 
     while (*String)
     {
-        /* Character must be ASCII 0-7, otherwise terminate with no error */
-
+        /*
+         * Character must be ASCII 0-7, otherwise:
+         * 1) Runtime: terminate with no error, per the ACPI spec
+         * 2) Compiler: return an error
+         */
         if (!(ACPI_IS_OCTAL_DIGIT (*String)))
         {
+#ifdef ACPI_ASL_COMPILER
+            Status = AE_BAD_OCTAL_CONSTANT;
+#endif
             break;
         }
 
@@ -155,10 +161,16 @@ AcpiUtConvertDecimalString (
 
     while (*String)
     {
-        /* Character must be ASCII 0-9, otherwise terminate with no error */
-
+        /*
+         * Character must be ASCII 0-9, otherwise:
+         * 1) Runtime: terminate with no error, per the ACPI spec
+         * 2) Compiler: return an error
+         */
         if (!isdigit (*String))
         {
+#ifdef ACPI_ASL_COMPILER
+            Status = AE_BAD_DECIMAL_CONSTANT;
+#endif
            break;
         }
 
@@ -211,10 +223,16 @@ AcpiUtConvertHexString (
 
     while (*String)
     {
-        /* Must be ASCII A-F, a-f, or 0-9, otherwise terminate with no error */
-
+        /*
+         * Character must be ASCII A-F, a-f, or 0-9, otherwise:
+         * 1) Runtime: terminate with no error, per the ACPI spec
+         * 2) Compiler: return an error
+         */
         if (!isxdigit (*String))
         {
+#ifdef ACPI_ASL_COMPILER
+            Status = AE_BAD_HEX_CONSTANT;
+#endif
             break;
         }
 
diff --git a/media/doc/3rd Party Files.txt b/media/doc/3rd Party Files.txt
index 7280aed5f64..5b2ff47e5b0 100644
--- a/media/doc/3rd Party Files.txt     
+++ b/media/doc/3rd Party Files.txt     
@@ -92,7 +92,7 @@ Used Version: 1.6.37
 Website: http://libpng.sourceforge.net/
 
 Title: ACPICA
-Used Version: 20200717
+Used Version: 20200925
 Website: https://acpica.org/
 
 Title: Schily Tools, mkisofs

Reply via email to