[PATCH 1/2] ACPICA: Update to version 20201113

Colin King colin.king at canonical.com
Fri Nov 13 19:47:45 UTC 2020


From: Colin Ian King <colin.king at canonical.com>

Changes in this release of ACPICA are detailed at the following
link on the ACPICA developer mailing list:

https://lists.acpica.org/hyperkitty/list/devel@acpica.org/thread/QO3SRKDKAT5K2W2D2ENYAVQRXHRUP3YX/`

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/acpica/source/common/ahuuids.c            |  5 ++
 src/acpica/source/compiler/aslbtypes.c        |  2 +-
 src/acpica/source/compiler/aslcodegen.c       |  2 +-
 src/acpica/source/compiler/aslmap.c           |  2 +-
 src/acpica/source/compiler/aslmessages.c      | 85 ++++++++++++++++++-
 src/acpica/source/compiler/aslmessages.h      |  7 +-
 src/acpica/source/compiler/aslnamesp.c        | 35 ++++++--
 src/acpica/source/compiler/aslopcodes.c       |  6 ++
 src/acpica/source/compiler/aslprimaries.y     | 10 +--
 src/acpica/source/compiler/aslrules.y         |  4 +
 src/acpica/source/compiler/asltypes.y         |  1 +
 .../source/components/events/evregion.c       | 59 ++++++-------
 .../source/components/namespace/nspredef.c    |  9 +-
 .../source/components/namespace/nsprepkg.c    | 38 +++++----
 .../source/components/namespace/nsrepair2.c   | 39 ++++-----
 src/acpica/source/include/accommon.h          |  2 +-
 src/acpica/source/include/acpixf.h            |  2 +-
 src/acpica/source/include/acuuid.h            |  5 ++
 18 files changed, 216 insertions(+), 97 deletions(-)

diff --git a/src/acpica/source/common/ahuuids.c b/src/acpica/source/common/ahuuids.c
index 3c14b10e..326ea3b3 100644
--- a/src/acpica/source/common/ahuuids.c
+++ b/src/acpica/source/common/ahuuids.c
@@ -181,6 +181,7 @@ const AH_UUID  Gbl_AcpiUuids[] =
     {"Physical Presence Interface", UUID_PHYSICAL_PRESENCE},
 
     {"[Non-volatile DIMM and NFIT table]",       NULL},
+    {"NVDIMM Device",               UUID_NFIT_DIMM},
     {"Volatile Memory Region",      UUID_VOLATILE_MEMORY},
     {"Persistent Memory Region",    UUID_PERSISTENT_MEMORY},
     {"NVDIMM Control Region",       UUID_CONTROL_REGION},
@@ -189,6 +190,10 @@ const AH_UUID  Gbl_AcpiUuids[] =
     {"Volatile Virtual CD",         UUID_VOLATILE_VIRTUAL_CD},
     {"Persistent Virtual Disk",     UUID_PERSISTENT_VIRTUAL_DISK},
     {"Persistent Virtual CD",       UUID_PERSISTENT_VIRTUAL_CD},
+    {"Microsoft NVDIMM Command set",UUID_NFIT_DIMM_N_MSFT},
+    {"HP NDIMM HPE1",               UUID_NFIT_DIMM_N_HPE1},
+    {"HP NDIMM HPE2",               UUID_NFIT_DIMM_N_HPE2},
+    {"Virtual NVDIMM",              UUID_NFIT_DIMM_N_HYPERV},
 
     {"[Processor Properties]",      NULL},
     {"Cache Properties",            UUID_CACHE_PROPERTIES},
diff --git a/src/acpica/source/compiler/aslbtypes.c b/src/acpica/source/compiler/aslbtypes.c
index 796b61ac..4e579c7e 100644
--- a/src/acpica/source/compiler/aslbtypes.c
+++ b/src/acpica/source/compiler/aslbtypes.c
@@ -672,7 +672,7 @@ AnMapObjTypeToBtype (
  *
  * PARAMETERS:  Btype               - Bitfield of ACPI types
  *
- * RETURN:      The Etype corresponding the the Btype
+ * RETURN:      The Etype corresponding the Btype
  *
  * DESCRIPTION: Convert a bitfield type to an encoded type
  *
diff --git a/src/acpica/source/compiler/aslcodegen.c b/src/acpica/source/compiler/aslcodegen.c
index 61e06735..ba0384e8 100644
--- a/src/acpica/source/compiler/aslcodegen.c
+++ b/src/acpica/source/compiler/aslcodegen.c
@@ -700,7 +700,7 @@ CgUpdateHeader (
 
     Checksum = (UINT8) (0 - Sum);
 
-    /* Re-write the the checksum byte */
+    /* Re-write the checksum byte */
 
     FlSeekFile (ASL_FILE_AML_OUTPUT, Op->Asl.FinalAmlOffset +
         ACPI_OFFSET (ACPI_TABLE_HEADER, Checksum));
diff --git a/src/acpica/source/compiler/aslmap.c b/src/acpica/source/compiler/aslmap.c
index 2c03cd08..9a3ea588 100644
--- a/src/acpica/source/compiler/aslmap.c
+++ b/src/acpica/source/compiler/aslmap.c
@@ -538,7 +538,7 @@ const ASL_MAPPING_ENTRY     AslKeywordMapping [] =
 /* TYPE_TRANSLATION */          OP_TABLE_ENTRY (AML_BYTE_OP,                1,                              0,                  0),
 /* UART_SERIALBUS */            OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP,         0,                              0,                  0),
 /* UART_SERIALBUSV2 */          OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP,         0,                              0,                  0),
-/* UNICODE */                   OP_TABLE_ENTRY (AML_BUFFER_OP,              0,                              OP_AML_PACKAGE,     0),
+/* UNICODE */                   OP_TABLE_ENTRY (AML_BUFFER_OP,              0,                              OP_AML_PACKAGE,     ACPI_BTYPE_BUFFER),
 /* UNLOAD */                    OP_TABLE_ENTRY (AML_UNLOAD_OP,              0,                              0,                  0),
 /* UPDATERULE_ONES */           OP_TABLE_ENTRY (AML_BYTE_OP,                AML_FIELD_UPDATE_WRITE_AS_ONES, 0,                  0),
 /* UPDATERULE_PRESERVE */       OP_TABLE_ENTRY (AML_BYTE_OP,                AML_FIELD_UPDATE_PRESERVE,      0,                  0),
diff --git a/src/acpica/source/compiler/aslmessages.c b/src/acpica/source/compiler/aslmessages.c
index 320ad2ae..d883bc58 100644
--- a/src/acpica/source/compiler/aslmessages.c
+++ b/src/acpica/source/compiler/aslmessages.c
@@ -384,6 +384,7 @@ const char                      *AslCompilerMsgs [] =
 /*    ASL_MSG_EXTERNAL_FOUND_HERE */        "External declaration below ",
 /*    ASL_MSG_LOWER_CASE_NAMESEG */         "At least one lower case letter found in NameSeg, ASL is case insensitive - converting to upper case",
 /*    ASL_MSG_LOWER_CASE_NAMEPATH */        "At least one lower case letter found in NamePath, ASL is case insensitive - converting to upper case",
+/*    ASL_MSG_UUID_NOT_FOUND */             "Unknown UUID string"
 };
 
 /* Table compiler */
@@ -457,7 +458,7 @@ AeDecodeMessageId (
 
         if (Index >= ACPI_ARRAY_LENGTH (AslCompilerMsgs))
         {
-            return ("[Unknown ASL Compiler exception ID]");
+            return ("[Unknown iASL Compiler exception ID]");
         }
     }
 
@@ -470,7 +471,7 @@ AeDecodeMessageId (
 
         if (Index >= ACPI_ARRAY_LENGTH (AslTableCompilerMsgs))
         {
-            return ("[Unknown Table Compiler exception ID]");
+            return ("[Unknown iASL Table Compiler exception ID]");
         }
     }
 
@@ -483,7 +484,7 @@ AeDecodeMessageId (
 
         if (Index >= ACPI_ARRAY_LENGTH (AslPreprocessorMsgs))
         {
-            return ("[Unknown Preprocessor exception ID]");
+            return ("[Unknown iASL Preprocessor exception ID]");
         }
     }
 
@@ -491,7 +492,7 @@ AeDecodeMessageId (
 
     else
     {
-        return ("[Unknown exception/component ID]");
+        return ("[Unknown iASL exception ID]");
     }
 
     return (MessageTable[Index]);
@@ -559,3 +560,79 @@ AeBuildFullExceptionCode (
      */
     return (((Level + 1) * 1000) + MessageId);
 }
+
+
+#ifdef ACPI_HELP_APP
+/*******************************************************************************
+ *
+ * FUNCTION:    AhDecodeAslException
+ *
+ * PARAMETERS:  HexString           - iASL status string from command line, in
+ *                                    hex. If null, display all exceptions.
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Decode and display an iASL exception code. Note1: a
+ * NULL string for HexString displays all known iASL exceptions. Note2:
+ * implements the -x option for AcpiHelp.
+ *
+ ******************************************************************************/
+
+#define AH_DISPLAY_ASL_EXCEPTION_TEXT(Status, Exception) \
+    printf ("%.4X: %s\n", Status, Exception)
+
+#define AH_DISPLAY_EXCEPTION(Status, Name) \
+    printf ("%.4X: %s\n", Status, Name)
+
+
+void
+AhDecodeAslException (
+    char                    *HexString)
+{
+    UINT32                  i;
+    UINT32                  MessageId;
+    const char              *OneException;
+    UINT32                  Index = 1;
+
+
+    /*
+     * A null input string means to decode and display all known
+     * exception codes.
+     */
+    if (!HexString)
+    {
+        printf ("All defined iASL exception codes:\n\n");
+        printf ("Main iASL exceptions:\n\n");
+        AH_DISPLAY_EXCEPTION (0,
+            "AE_OK                        (No error occurred)");
+
+        /* Display codes in each block of exception types */
+
+        for (i = 1; Index < ACPI_ARRAY_LENGTH (AslCompilerMsgs); i++, Index++)
+        {
+            AH_DISPLAY_ASL_EXCEPTION_TEXT (Index, AslCompilerMsgs[i]);
+        }
+
+        printf ("\niASL Table Compiler exceptions:\n\n");
+        Index = ASL_MSG_TABLE_COMPILER;
+        for (i = 0; i < ACPI_ARRAY_LENGTH (AslTableCompilerMsgs); i++, Index++)
+        {
+            AH_DISPLAY_ASL_EXCEPTION_TEXT (Index, AslTableCompilerMsgs[i]);
+        }
+
+        printf ("\niASL Preprocessor exceptions:\n\n");
+        Index = ASL_MSG_PREPROCESSOR;
+        for (i = 0; i < ACPI_ARRAY_LENGTH (AslPreprocessorMsgs); i++, Index++)
+        {
+            AH_DISPLAY_ASL_EXCEPTION_TEXT (Index, AslPreprocessorMsgs[i]);
+        }
+        return;
+    }
+
+    /* HexString is valid - convert it to a MessageId and decode it */
+
+    MessageId = strtol (HexString, NULL, 16);
+    OneException = AeDecodeMessageId ((UINT16) MessageId);
+    AH_DISPLAY_ASL_EXCEPTION_TEXT (MessageId, OneException);
+}
+#endif
diff --git a/src/acpica/source/compiler/aslmessages.h b/src/acpica/source/compiler/aslmessages.h
index 8a2b5c6c..2313d212 100644
--- a/src/acpica/source/compiler/aslmessages.h
+++ b/src/acpica/source/compiler/aslmessages.h
@@ -152,7 +152,6 @@
 #ifndef __ASLMESSAGES_H
 #define __ASLMESSAGES_H
 
-
 /* These values must match error type string tables in aslmessages.c */
 
 typedef enum
@@ -167,9 +166,12 @@ typedef enum
 
 } ASL_MESSAGE_TYPES;
 
-
 #define ASL_ERROR_LEVEL_LENGTH          8 /* Length of strings for types above */
 
+void
+AhDecodeAslException (
+    char                    *HexString);
+
 /*
  * Exception code blocks, 0 - 999
  * Available for new exception blocks: 600 - 999
@@ -386,6 +388,7 @@ typedef enum
     ASL_MSG_EXTERNAL_FOUND_HERE,
     ASL_MSG_LOWER_CASE_NAMESEG,
     ASL_MSG_LOWER_CASE_NAMEPATH,
+    ASL_MSG_UUID_NOT_FOUND,
 
 
     /* These messages are used by the Data Table compiler only */
diff --git a/src/acpica/source/compiler/aslnamesp.c b/src/acpica/source/compiler/aslnamesp.c
index f74b5ffb..0a099a0b 100644
--- a/src/acpica/source/compiler/aslnamesp.c
+++ b/src/acpica/source/compiler/aslnamesp.c
@@ -226,8 +226,8 @@ NsDisplayNamespace (
 
     /* File header */
 
-    FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "Contents of ACPI Namespace\n\n");
-    FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "Count  Depth    Name - Type\n\n");
+    FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "Contents of ACPI Namespace\n\n"
+        "Count  Depth    Name - Type\n\n");
 
     /* Walk entire namespace from the root */
 
@@ -239,14 +239,21 @@ NsDisplayNamespace (
         return (Status);
     }
 
-    /* Print the full pathname for each namespace node */
+    /* Print the full pathname for each namespace node in the common namespace */
 
-    FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "\nNamespace pathnames\n\n");
+    FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT,
+        "\nNamespace pathnames and where declared:\n"
+        "<NamePath, Object type, Containing file, Line number within file>\n\n");
 
     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
         ACPI_UINT32_MAX, FALSE, NsDoOnePathname, NULL,
         NULL, NULL);
 
+    /*
+     * We just dumped the entire common namespace, we don't want to do it
+     * again for other input files.
+     */
+    AslGbl_NsOutputFlag = FALSE;
     return (Status);
 }
 
@@ -512,7 +519,7 @@ NsDoOneNamespaceObject (
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Print the full pathname for a namespace node.
+ * DESCRIPTION: Print the full pathname and addtional info for a namespace node.
  *
  ******************************************************************************/
 
@@ -528,6 +535,13 @@ NsDoOnePathname (
     ACPI_BUFFER             TargetPath;
 
 
+    /* Ignore predefined namespace nodes and External declarations */
+
+    if (!Node->Op || (Node->Flags & ANOBJ_IS_EXTERNAL))
+    {
+        return (AE_OK);
+    }
+
     TargetPath.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
     Status = AcpiNsHandleToPathname (Node, &TargetPath, FALSE);
     if (ACPI_FAILURE (Status))
@@ -535,8 +549,15 @@ NsDoOnePathname (
         return (Status);
     }
 
-    FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "%s\n",
-        ACPI_CAST_PTR (char, TargetPath.Pointer));
+    /*
+     * Print the full pathname (and other information)
+     * for each namespace node in the common namespace
+     */
+    FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "%-41s %-12s  %s, %u\n",
+        ACPI_CAST_PTR (char, TargetPath.Pointer),
+        AcpiUtGetTypeName (Node->Type),
+        Node->Op->Asl.Filename, Node->Op->Asl.LogicalLineNumber);
+
     ACPI_FREE (TargetPath.Pointer);
     return (AE_OK);
 }
diff --git a/src/acpica/source/compiler/aslopcodes.c b/src/acpica/source/compiler/aslopcodes.c
index 14eb63dd..b2a02365 100644
--- a/src/acpica/source/compiler/aslopcodes.c
+++ b/src/acpica/source/compiler/aslopcodes.c
@@ -798,7 +798,13 @@ OpcDoUuId (
     }
     else
     {
+        /* Convert UUID string to a buffer, check for a known UUID */
+
         AcpiUtConvertStringToUuid (InString, Buffer);
+        if (!AcpiAhMatchUuid (Buffer))
+        {
+            AslError (ASL_REMARK, ASL_MSG_UUID_NOT_FOUND, Op, NULL);
+        }
     }
 
     /* Change Op to a Buffer */
diff --git a/src/acpica/source/compiler/aslprimaries.y b/src/acpica/source/compiler/aslprimaries.y
index 1fb9e501..68fdbe84 100644
--- a/src/acpica/source/compiler/aslprimaries.y
+++ b/src/acpica/source/compiler/aslprimaries.y
@@ -500,7 +500,7 @@ DivideTerm
 EISAIDTerm
     : PARSEOP_EISAID
         PARSEOP_OPEN_PAREN
-        StringData
+        StringLiteral
         PARSEOP_CLOSE_PAREN         {$$ = TrSetOpIntegerValue (PARSEOP_EISAID, $3);}
     | PARSEOP_EISAID
         PARSEOP_OPEN_PAREN
@@ -635,7 +635,7 @@ FprintfTerm
     : PARSEOP_FPRINTF
         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_FPRINTF);}
         TermArg ','
-        StringData
+        StringLiteral
         PrintfArgList
         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$7);}
     | PARSEOP_FPRINTF
@@ -1091,7 +1091,7 @@ PowerResTerm
 PrintfTerm
     : PARSEOP_PRINTF
         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_PRINTF);}
-        StringData
+        StringLiteral
         PrintfArgList
         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
     | PARSEOP_PRINTF
@@ -1412,7 +1412,7 @@ ToStringTerm
 ToUUIDTerm
     : PARSEOP_TOUUID
         PARSEOP_OPEN_PAREN
-        StringData
+        StringLiteral
         PARSEOP_CLOSE_PAREN         {$$ = TrSetOpIntegerValue (PARSEOP_TOUUID, $3);}
     | PARSEOP_TOUUID
         PARSEOP_OPEN_PAREN
@@ -1422,7 +1422,7 @@ ToUUIDTerm
 UnicodeTerm
     : PARSEOP_UNICODE
         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_UNICODE);}
-        StringData
+        StringLiteral
         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,0,$4);}
     | PARSEOP_UNICODE
         PARSEOP_OPEN_PAREN
diff --git a/src/acpica/source/compiler/aslrules.y b/src/acpica/source/compiler/aslrules.y
index f998527b..e7e678d2 100644
--- a/src/acpica/source/compiler/aslrules.y
+++ b/src/acpica/source/compiler/aslrules.y
@@ -523,6 +523,10 @@ StringData
     | String                        {}
     ;
 
+StringLiteral
+    : String                        {}
+    ;
+
 ByteConst
     : Integer                       {$$ = TrSetOpIntegerValue (PARSEOP_BYTECONST, $1);}
     ;
diff --git a/src/acpica/source/compiler/asltypes.y b/src/acpica/source/compiler/asltypes.y
index 85d3af9a..5c07c5df 100644
--- a/src/acpica/source/compiler/asltypes.y
+++ b/src/acpica/source/compiler/asltypes.y
@@ -178,6 +178,7 @@ NoEcho('
 %type <n> RequiredTarget
 %type <n> SimpleName
 %type <n> StringData
+%type <n> StringLiteral
 %type <n> Target
 %type <n> Term
 %type <n> TermArg
diff --git a/src/acpica/source/components/events/evregion.c b/src/acpica/source/components/events/evregion.c
index 233e77d4..a62d1c26 100644
--- a/src/acpica/source/components/events/evregion.c
+++ b/src/acpica/source/components/events/evregion.c
@@ -164,8 +164,10 @@ extern UINT8        AcpiGbl_DefaultAddressSpaces[];
 /* Local prototypes */
 
 static void
-AcpiEvOrphanEcRegMethod (
-    ACPI_NAMESPACE_NODE     *EcDeviceNode);
+AcpiEvExecuteOrphanRegMethod (
+    ACPI_NAMESPACE_NODE     *DeviceNode,
+    ACPI_ADR_SPACE_TYPE     SpaceId);
+
 
 static ACPI_STATUS
 AcpiEvRegRun (
@@ -869,11 +871,13 @@ AcpiEvExecuteRegMethods (
     (void) AcpiNsWalkNamespace (ACPI_TYPE_ANY, Node, ACPI_UINT32_MAX,
         ACPI_NS_WALK_UNLOCK, AcpiEvRegRun, NULL, &Info, NULL);
 
-    /* Special case for EC: handle "orphan" _REG methods with no region */
-
-    if (SpaceId == ACPI_ADR_SPACE_EC)
+    /*
+     * Special case for EC and GPIO: handle "orphan" _REG methods with
+     * no region.
+     */
+    if (SpaceId == ACPI_ADR_SPACE_EC || SpaceId == ACPI_ADR_SPACE_GPIO)
     {
-        AcpiEvOrphanEcRegMethod (Node);
+        AcpiEvExecuteOrphanRegMethod (Node, SpaceId);
     }
 
     ACPI_DEBUG_PRINT_RAW ((ACPI_DB_NAMES,
@@ -954,32 +958,29 @@ AcpiEvRegRun (
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiEvOrphanEcRegMethod
+ * FUNCTION:    AcpiEvExecuteOrphanRegMethod
  *
- * PARAMETERS:  EcDeviceNode        - Namespace node for an EC device
+ * PARAMETERS:  DeviceNode          - Namespace node for an ACPI device
+ *              SpaceId             - The address space ID
  *
  * RETURN:      None
  *
- * DESCRIPTION: Execute an "orphan" _REG method that appears under the EC
+ * DESCRIPTION: Execute an "orphan" _REG method that appears under an ACPI
  *              device. This is a _REG method that has no corresponding region
- *              within the EC device scope. The orphan _REG method appears to
- *              have been enabled by the description of the ECDT in the ACPI
- *              specification: "The availability of the region space can be
- *              detected by providing a _REG method object underneath the
- *              Embedded Controller device."
- *
- *              To quickly access the EC device, we use the EcDeviceNode used
- *              during EC handler installation. Otherwise, we would need to
- *              perform a time consuming namespace walk, executing _HID
- *              methods to find the EC device.
+ *              within the device's scope. ACPI tables depending on these
+ *              "orphan" _REG methods have been seen for both EC and GPIO
+ *              Operation Regions. Presumably the Windows ACPI implementation
+ *              always calls the _REG method independent of the presence of
+ *              an actual Operation Region with the correct address space ID.
  *
  *  MUTEX:      Assumes the namespace is locked
  *
  ******************************************************************************/
 
 static void
-AcpiEvOrphanEcRegMethod (
-    ACPI_NAMESPACE_NODE     *EcDeviceNode)
+AcpiEvExecuteOrphanRegMethod (
+    ACPI_NAMESPACE_NODE     *DeviceNode,
+    ACPI_ADR_SPACE_TYPE     SpaceId)
 {
     ACPI_HANDLE             RegMethod;
     ACPI_NAMESPACE_NODE     *NextNode;
@@ -988,10 +989,10 @@ AcpiEvOrphanEcRegMethod (
     ACPI_OBJECT             Objects[2];
 
 
-    ACPI_FUNCTION_TRACE (EvOrphanEcRegMethod);
+    ACPI_FUNCTION_TRACE (EvExecuteOrphanRegMethod);
 
 
-    if (!EcDeviceNode)
+    if (!DeviceNode)
     {
         return_VOID;
     }
@@ -1002,7 +1003,7 @@ AcpiEvOrphanEcRegMethod (
 
     /* Get a handle to a _REG method immediately under the EC device */
 
-    Status = AcpiGetHandle (EcDeviceNode, METHOD_NAME__REG, &RegMethod);
+    Status = AcpiGetHandle (DeviceNode, METHOD_NAME__REG, &RegMethod);
     if (ACPI_FAILURE (Status))
     {
         goto Exit; /* There is no _REG method present */
@@ -1015,25 +1016,25 @@ AcpiEvOrphanEcRegMethod (
      * with other space IDs to be present; but the code below will then
      * execute the _REG method with the EmbeddedControl SpaceID argument.
      */
-    NextNode = AcpiNsGetNextNode (EcDeviceNode, NULL);
+    NextNode = AcpiNsGetNextNode (DeviceNode, NULL);
     while (NextNode)
     {
         if ((NextNode->Type == ACPI_TYPE_REGION) &&
             (NextNode->Object) &&
-            (NextNode->Object->Region.SpaceId == ACPI_ADR_SPACE_EC))
+            (NextNode->Object->Region.SpaceId == SpaceId))
         {
             goto Exit; /* Do not execute the _REG */
         }
 
-        NextNode = AcpiNsGetNextNode (EcDeviceNode, NextNode);
+        NextNode = AcpiNsGetNextNode (DeviceNode, NextNode);
     }
 
-    /* Evaluate the _REG(EmbeddedControl,Connect) method */
+    /* Evaluate the _REG(SpaceId,Connect) method */
 
     Args.Count = 2;
     Args.Pointer = Objects;
     Objects[0].Type = ACPI_TYPE_INTEGER;
-    Objects[0].Integer.Value = ACPI_ADR_SPACE_EC;
+    Objects[0].Integer.Value = SpaceId;
     Objects[1].Type = ACPI_TYPE_INTEGER;
     Objects[1].Integer.Value = ACPI_REG_CONNECT;
 
diff --git a/src/acpica/source/components/namespace/nspredef.c b/src/acpica/source/components/namespace/nspredef.c
index 70aac113..7f7965f2 100644
--- a/src/acpica/source/components/namespace/nspredef.c
+++ b/src/acpica/source/components/namespace/nspredef.c
@@ -223,13 +223,14 @@ AcpiNsCheckReturnValue (
     ACPI_STATUS                 Status;
     const ACPI_PREDEFINED_INFO  *Predefined;
 
+    ACPI_FUNCTION_TRACE (NsCheckReturnValue);
 
     /* If not a predefined name, we cannot validate the return object */
 
     Predefined = Info->Predefined;
     if (!Predefined)
     {
-        return (AE_OK);
+        return_ACPI_STATUS (AE_OK);
     }
 
     /*
@@ -239,7 +240,7 @@ AcpiNsCheckReturnValue (
     if ((ReturnStatus != AE_OK) &&
         (ReturnStatus != AE_CTRL_RETURN_VALUE))
     {
-        return (AE_OK);
+        return_ACPI_STATUS (AE_OK);
     }
 
     /*
@@ -259,7 +260,7 @@ AcpiNsCheckReturnValue (
         (!Predefined->Info.ExpectedBtypes) ||
         (Predefined->Info.ExpectedBtypes == ACPI_RTYPE_ALL))
     {
-        return (AE_OK);
+        return_ACPI_STATUS (AE_OK);
     }
 
     /*
@@ -325,7 +326,7 @@ Exit:
         Node->Flags |= ANOBJ_EVALUATED;
     }
 
-    return (Status);
+    return_ACPI_STATUS (Status);
 }
 
 
diff --git a/src/acpica/source/components/namespace/nsprepkg.c b/src/acpica/source/components/namespace/nsprepkg.c
index d33b76d6..689d2c16 100644
--- a/src/acpica/source/components/namespace/nsprepkg.c
+++ b/src/acpica/source/components/namespace/nsprepkg.c
@@ -214,7 +214,7 @@ AcpiNsCheckPackage (
     UINT32                      i;
 
 
-    ACPI_FUNCTION_NAME (NsCheckPackage);
+    ACPI_FUNCTION_TRACE (NsCheckPackage);
 
 
     /* The package info for this name is in the next table entry */
@@ -245,13 +245,13 @@ AcpiNsCheckPackage (
     {
         if (Package->RetInfo.Type == ACPI_PTYPE1_VAR)
         {
-            return (AE_OK);
+            return_ACPI_STATUS (AE_OK);
         }
 
         ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
             "Return Package has no elements (empty)"));
 
-        return (AE_AML_OPERAND_VALUE);
+        return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
     }
 
     /*
@@ -305,7 +305,7 @@ AcpiNsCheckPackage (
                 Package->RetInfo.ObjectType1, i);
             if (ACPI_FAILURE (Status))
             {
-                return (Status);
+                return_ACPI_STATUS (Status);
             }
 
             Elements++;
@@ -338,7 +338,7 @@ AcpiNsCheckPackage (
                     Package->RetInfo3.ObjectType[i], i);
                 if (ACPI_FAILURE (Status))
                 {
-                    return (Status);
+                    return_ACPI_STATUS (Status);
                 }
             }
             else
@@ -349,7 +349,7 @@ AcpiNsCheckPackage (
                     Package->RetInfo3.TailObjectType, i);
                 if (ACPI_FAILURE (Status))
                 {
-                    return (Status);
+                    return_ACPI_STATUS (Status);
                 }
             }
 
@@ -365,7 +365,7 @@ AcpiNsCheckPackage (
             Info, Elements, ACPI_RTYPE_INTEGER, 0);
         if (ACPI_FAILURE (Status))
         {
-            return (Status);
+            return_ACPI_STATUS (Status);
         }
 
         Elements++;
@@ -384,7 +384,7 @@ AcpiNsCheckPackage (
             Info, Elements, ACPI_RTYPE_INTEGER, 0);
         if (ACPI_FAILURE (Status))
         {
-            return (Status);
+            return_ACPI_STATUS (Status);
         }
 
         /*
@@ -428,7 +428,7 @@ AcpiNsCheckPackage (
                 Info, ReturnObject, ReturnObjectPtr);
             if (ACPI_FAILURE (Status))
             {
-                return (Status);
+                return_ACPI_STATUS (Status);
             }
 
             /* Update locals to point to the new package (of 1 element) */
@@ -466,7 +466,7 @@ AcpiNsCheckPackage (
                 Package->RetInfo.ObjectType1, 0);
             if (ACPI_FAILURE(Status))
             {
-                return (Status);
+                return_ACPI_STATUS (Status);
             }
 
             /* Validate length of the UUID buffer */
@@ -475,14 +475,14 @@ AcpiNsCheckPackage (
             {
                 ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname,
                     Info->NodeFlags, "Invalid length for UUID Buffer"));
-                return (AE_AML_OPERAND_VALUE);
+                return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
             }
 
             Status = AcpiNsCheckObjectType(Info, Elements + 1,
                 Package->RetInfo.ObjectType2, 0);
             if (ACPI_FAILURE(Status))
             {
-                return (Status);
+                return_ACPI_STATUS (Status);
             }
 
             Elements += 2;
@@ -498,10 +498,10 @@ AcpiNsCheckPackage (
             "Invalid internal return type in table entry: %X",
             Package->RetInfo.Type));
 
-        return (AE_AML_INTERNAL);
+        return_ACPI_STATUS (AE_AML_INTERNAL);
     }
 
-    return (Status);
+    return_ACPI_STATUS (Status);
 
 
 PackageTooSmall:
@@ -512,7 +512,7 @@ PackageTooSmall:
         "Return Package is too small - found %u elements, expected %u",
         Count, ExpectedCount));
 
-    return (AE_AML_OPERAND_VALUE);
+    return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
 }
 
 
@@ -865,6 +865,8 @@ AcpiNsCheckPackageElements (
     UINT32                      i;
 
 
+    ACPI_FUNCTION_TRACE (NsCheckPackageElements);
+
     /*
      * Up to two groups of package elements are supported by the data
      * structure. All elements in each group must be of the same type.
@@ -876,7 +878,7 @@ AcpiNsCheckPackageElements (
             Type1, i + StartIndex);
         if (ACPI_FAILURE (Status))
         {
-            return (Status);
+            return_ACPI_STATUS (Status);
         }
 
         ThisElement++;
@@ -888,11 +890,11 @@ AcpiNsCheckPackageElements (
             Type2, (i + Count1 + StartIndex));
         if (ACPI_FAILURE (Status))
         {
-            return (Status);
+            return_ACPI_STATUS (Status);
         }
 
         ThisElement++;
     }
 
-    return (AE_OK);
+    return_ACPI_STATUS (AE_OK);
 }
diff --git a/src/acpica/source/components/namespace/nsrepair2.c b/src/acpica/source/components/namespace/nsrepair2.c
index f62aca29..57c229a8 100644
--- a/src/acpica/source/components/namespace/nsrepair2.c
+++ b/src/acpica/source/components/namespace/nsrepair2.c
@@ -321,16 +321,18 @@ AcpiNsComplexRepairs (
     ACPI_STATUS             Status;
 
 
+    ACPI_FUNCTION_TRACE (NsComplexRepairs);
+
     /* Check if this name is in the list of repairable names */
 
     Predefined = AcpiNsMatchComplexRepair (Node);
     if (!Predefined)
     {
-        return (ValidateStatus);
+        return_ACPI_STATUS (ValidateStatus);
     }
 
     Status = Predefined->RepairFunction (Info, ReturnObjectPtr);
-    return (Status);
+    return_ACPI_STATUS (Status);
 }
 
 
@@ -526,20 +528,21 @@ AcpiNsRepair_CID (
     UINT16                  OriginalRefCount;
     UINT32                  i;
 
+    ACPI_FUNCTION_TRACE (NsRepair_CID);
 
     /* Check for _CID as a simple string */
 
     if (ReturnObject->Common.Type == ACPI_TYPE_STRING)
     {
         Status = AcpiNsRepair_HID (Info, ReturnObjectPtr);
-        return (Status);
+        return_ACPI_STATUS (Status);
     }
 
     /* Exit if not a Package */
 
     if (ReturnObject->Common.Type != ACPI_TYPE_PACKAGE)
     {
-        return (AE_OK);
+        return_ACPI_STATUS (AE_OK);
     }
 
     /* Examine each element of the _CID package */
@@ -553,7 +556,7 @@ AcpiNsRepair_CID (
         Status = AcpiNsRepair_HID (Info, ElementPtr);
         if (ACPI_FAILURE (Status))
         {
-            return (Status);
+            return_ACPI_STATUS (Status);
         }
 
         if (OriginalElement != *ElementPtr)
@@ -567,7 +570,7 @@ AcpiNsRepair_CID (
         ElementPtr++;
     }
 
-    return (AE_OK);
+    return_ACPI_STATUS (AE_OK);
 }
 
 
@@ -687,9 +690,8 @@ AcpiNsRepair_HID (
     ACPI_OPERAND_OBJECT     **ReturnObjectPtr)
 {
     ACPI_OPERAND_OBJECT     *ReturnObject = *ReturnObjectPtr;
-    ACPI_OPERAND_OBJECT     *NewString;
-    char                    *Source;
     char                    *Dest;
+    char                    *Source;
 
 
     ACPI_FUNCTION_NAME (NsRepair_HID);
@@ -699,7 +701,7 @@ AcpiNsRepair_HID (
 
     if (ReturnObject->Common.Type != ACPI_TYPE_STRING)
     {
-        return (AE_OK);
+        return_ACPI_STATUS (AE_OK);
     }
 
     if (ReturnObject->String.Length == 0)
@@ -711,15 +713,7 @@ AcpiNsRepair_HID (
         /* Return AE_OK anyway, let driver handle it */
 
         Info->ReturnFlags |= ACPI_OBJECT_REPAIRED;
-        return (AE_OK);
-    }
-
-    /* It is simplest to always create a new string object */
-
-    NewString = AcpiUtCreateStringObject (ReturnObject->String.Length);
-    if (!NewString)
-    {
-        return (AE_NO_MEMORY);
+        return_ACPI_STATUS (AE_OK);
     }
 
     /*
@@ -732,7 +726,7 @@ AcpiNsRepair_HID (
     if (*Source == '*')
     {
         Source++;
-        NewString->String.Length--;
+        ReturnObject->String.Length--;
 
         ACPI_DEBUG_PRINT ((ACPI_DB_REPAIR,
             "%s: Removed invalid leading asterisk\n", Info->FullPathname));
@@ -746,14 +740,13 @@ AcpiNsRepair_HID (
      * "NNNN####" where N is an uppercase letter or decimal digit, and
      * # is a hex digit.
      */
-    for (Dest = NewString->String.Pointer; *Source; Dest++, Source++)
+    for (Dest = ReturnObject->String.Pointer; *Source; Dest++, Source++)
     {
         *Dest = (char) toupper ((int) *Source);
     }
+    ReturnObject->String.Pointer[ReturnObject->String.Length] = 0;
 
-    AcpiUtRemoveReference (ReturnObject);
-    *ReturnObjectPtr = NewString;
-    return (AE_OK);
+    return_ACPI_STATUS (AE_OK);
 }
 
 
diff --git a/src/acpica/source/include/accommon.h b/src/acpica/source/include/accommon.h
index 809c5054..8aa37717 100644
--- a/src/acpica/source/include/accommon.h
+++ b/src/acpica/source/include/accommon.h
@@ -155,7 +155,7 @@
 /*
  * Common set of includes for all ACPICA source files.
  * We put them here because we don't want to duplicate them
- * in the the source code again and again.
+ * in the source code again and again.
  *
  * Note: The order of these include files is important.
  */
diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h
index a16b6830..df45d2dc 100644
--- a/src/acpica/source/include/acpixf.h
+++ b/src/acpica/source/include/acpixf.h
@@ -154,7 +154,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20200925
+#define ACPI_CA_VERSION                 0x20201113
 
 #include "acconfig.h"
 #include "actypes.h"
diff --git a/src/acpica/source/include/acuuid.h b/src/acpica/source/include/acuuid.h
index 468244a6..f11b3536 100644
--- a/src/acpica/source/include/acuuid.h
+++ b/src/acpica/source/include/acuuid.h
@@ -181,6 +181,7 @@
 
 /* NVDIMM - NFIT table */
 
+#define UUID_NFIT_DIMM                  "4309ac30-0d11-11e4-9191-0800200c9a66"
 #define UUID_VOLATILE_MEMORY            "7305944f-fdda-44e3-b16c-3f22d252e5d0"
 #define UUID_PERSISTENT_MEMORY          "66f0d379-b4f3-4074-ac43-0d3318b78cdb"
 #define UUID_CONTROL_REGION             "92f701f6-13b4-405d-910b-299367e8234c"
@@ -189,6 +190,10 @@
 #define UUID_VOLATILE_VIRTUAL_CD        "3d5abd30-4175-87ce-6d64-d2ade523c4bb"
 #define UUID_PERSISTENT_VIRTUAL_DISK    "5cea02c9-4d07-69d3-269f-4496fbe096f9"
 #define UUID_PERSISTENT_VIRTUAL_CD      "08018188-42cd-bb48-100f-5387d53ded3d"
+#define UUID_NFIT_DIMM_N_MSFT           "1ee68b36-d4bd-4a1a-9a16-4f8e53d46e05"
+#define UUID_NFIT_DIMM_N_HPE1           "9002c334-acf3-4c0e-9642-a235f0d53bc6"
+#define UUID_NFIT_DIMM_N_HPE2           "5008664b-b758-41a0-a03c-27c2f2d04f7e"
+#define UUID_NFIT_DIMM_N_HYPERV         "5746c5f2-a9a2-4264-ad0e-e4ddc9e09e80"
 
 /* Processor Properties (ACPI 6.2) */
 
-- 
2.28.0




More information about the fwts-devel mailing list