svn commit: r334643 - in head/sys/contrib/dev/acpica: . common compiler components/debugger components/dispatcher components/executer components/namespace components/parser components/utilities inc...

Jung-uk Kim jkim at FreeBSD.org
Mon Jun 4 22:26:53 UTC 2018


Author: jkim
Date: Mon Jun  4 22:26:47 2018
New Revision: 334643
URL: https://svnweb.freebsd.org/changeset/base/334643

Log:
  MFV:	r334448
  
  Import ACPICA 20180531.

Modified:
  head/sys/contrib/dev/acpica/changes.txt
  head/sys/contrib/dev/acpica/common/acfileio.c
  head/sys/contrib/dev/acpica/common/dmtbdump2.c
  head/sys/contrib/dev/acpica/common/dmtbinfo2.c
  head/sys/contrib/dev/acpica/compiler/aslload.c
  head/sys/contrib/dev/acpica/compiler/dttable1.c
  head/sys/contrib/dev/acpica/compiler/dttemplate.h
  head/sys/contrib/dev/acpica/components/debugger/dbnames.c
  head/sys/contrib/dev/acpica/components/debugger/dbobject.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsdebug.c
  head/sys/contrib/dev/acpica/components/executer/exconfig.c
  head/sys/contrib/dev/acpica/components/namespace/nsdump.c
  head/sys/contrib/dev/acpica/components/parser/psloop.c
  head/sys/contrib/dev/acpica/components/parser/psobject.c
  head/sys/contrib/dev/acpica/components/parser/pswalk.c
  head/sys/contrib/dev/acpica/components/utilities/uterror.c
  head/sys/contrib/dev/acpica/include/acdisasm.h
  head/sys/contrib/dev/acpica/include/aclocal.h
  head/sys/contrib/dev/acpica/include/acoutput.h
  head/sys/contrib/dev/acpica/include/acpixf.h
  head/sys/contrib/dev/acpica/include/actbinfo.h
  head/sys/contrib/dev/acpica/include/actbl2.h
Directory Properties:
  head/sys/contrib/dev/acpica/   (props changed)

Modified: head/sys/contrib/dev/acpica/changes.txt
==============================================================================
--- head/sys/contrib/dev/acpica/changes.txt	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/changes.txt	Mon Jun  4 22:26:47 2018	(r334643)
@@ -1,4 +1,86 @@
 ----------------------------------------
+31 May 2018. Summary of changes for version 20180531:
+
+
+1) ACPICA kernel-resident Subsystem:
+
+Implemented additional support to help ensure that a DSDT or SSDT is 
+fully loaded even if errors are incurred during the load. The majority of 
+the problems that are seen is the failure of individual AML operators 
+that occur during execution of any module-level code (MLC) existing in 
+the table. This support adds a mechanism to abort the current ASL 
+statement (AML opcode), emit an error message, and to simply move on to 
+the next opcode -- instead of aborting the entire table load. This is 
+different than the execution of a control method where the entire method 
+is aborted upon any error. The goal is to perform a very "best effort" to 
+load the ACPI tables. The most common MLC errors that have been seen in 
+the field are direct references to unresolved ASL/AML symbols (referenced 
+directly without the use of the CondRefOf operator to validate the 
+symbol). This new ACPICA behavior is now compatible with other ACPI 
+implementations.
+
+Interpreter: The Unload AML operator is no longer supported for the 
+reasons below. An AE_NOT_IMPLEMENTED exception is returned.
+1) A correct implementation on at least some hosts may not be possible.
+2) Other ACPI implementations do not correctly/fully support it.
+3) It requires host device driver support which is not known to exist.
+    (To properly support namespace unload out from underneath.)
+4) This AML operator has never been seen in the field.
+
+Parser: Added a debug option to dump AML parse sub-trees as they are 
+being executed. Used with ACPI_DEBUG_PRINT, the enabling debug level is 
+ACPI_DB_PARSE_TREES.
+
+Debugger: Reduced the verbosity for errors incurred during table load and 
+module-level code execution.
+
+Completed an investigation into adding a namespace node "owner list" 
+instead of the current "owner ID" associated with namespace nodes. This 
+list would link together all nodes that are owned by an individual 
+control method. The purpose would be to enhance control method execution 
+by speeding up cleanup during method exit (all namespace nodes created by 
+a method are deleted upon method termination.) Currently, the entire 
+namespace must be searched for matching owner IDs if (and only if) the 
+method creates named objects outside of the local scope. However, by far 
+the most common case is that methods create objects locally, not outside 
+the method scope. There is already an ACPICA optimization in place that 
+only searches the entire namespace in the rare case of a method creating 
+objects elsewhere in the namespace. Therefore, it is felt that the 
+overhead of adding an additional pointer to each namespace node to 
+implement the owner list makes this feature unnecessary.
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL, Disassembler, and Template generator: Implemented support for 
+Revision D of the IORT table. Adds a new subtable that is used to specify 
+SMMUv3 PMCGs. rmurphy-arm.
+
+Disassembler: Restored correct table header validation for the "special" 
+ACPI tables -- RSDP and FACS. These tables do not contain a standard ACPI 
+table header and must be special-cased. This was a regression that has 
+been present for apparently a long time.
+
+AcpiExec: Reduced verbosity of the local exception handler implemented 
+within acpiexec. This handler is invoked by ACPICA upon any exceptions 
+generated during control method execution. A new option was added: -vh 
+restores the original verbosity level if desired.
+
+AcpiExec: Changed the default base from decimal to hex for the -x option 
+(set debug level). This simplifies the use of this option and matches the 
+behavior of the corresponding iASL -x option.
+
+AcpiExec: Restored a force-exit on multiple control-c (sigint) 
+interrupts. This allows program termination even if other issues cause 
+the control-c to fail.
+
+ASL test suite (ASLTS): Added tests for the recently implemented package 
+element resolution mechanism that allows forward references to named 
+objects from individual package elements (this mechanism provides 
+compatibility with other ACPI implementations.)
+
+
+----------------------------------------
 8 May 2018. Summary of changes for version 20180508:
 
 

Modified: head/sys/contrib/dev/acpica/common/acfileio.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/acfileio.c	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/common/acfileio.c	Mon Jun  4 22:26:47 2018	(r334643)
@@ -401,16 +401,16 @@ AcGetOneTableFromFile (
         return (AE_CTRL_TERMINATE);
     }
 
-    /* Validate the table signature/header (limited ASCII chars) */
-
-    Status = AcValidateTableHeader (File, TableOffset);
-    if (ACPI_FAILURE (Status))
-    {
-        return (Status);
-    }
-
     if (GetOnlyAmlTables)
     {
+        /* Validate the table signature/header (limited ASCII chars) */
+
+        Status = AcValidateTableHeader (File, TableOffset);
+        if (ACPI_FAILURE (Status))
+        {
+            return (Status);
+        }
+
         /*
          * Table must be an AML table (DSDT/SSDT).
          * Used for iASL -e option only.
@@ -438,7 +438,12 @@ AcGetOneTableFromFile (
     fseek (File, TableOffset, SEEK_SET);
 
     Count = fread (Table, 1, TableHeader.Length, File);
-    if (Count != (INT32) TableHeader.Length)
+
+    /*
+     * Checks for data table headers happen later in the execution. Only verify
+     * for Aml tables at this point in the code.
+     */
+    if (GetOnlyAmlTables && Count != (INT32) TableHeader.Length)
     {
         Status = AE_ERROR;
         goto ErrorExit;

Modified: head/sys/contrib/dev/acpica/common/dmtbdump2.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/dmtbdump2.c	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/common/dmtbdump2.c	Mon Jun  4 22:26:47 2018	(r334643)
@@ -265,6 +265,12 @@ AcpiDmDumpIort (
             Length = IortNode->Length - NodeOffset;
             break;
 
+        case ACPI_IORT_NODE_PMCG:
+
+            InfoTable = AcpiDmTableInfoIort5;
+            Length = IortNode->Length - NodeOffset;
+            break;
+
         default:
 
             AcpiOsPrintf ("\n**** Unknown IORT node type 0x%X\n",

Modified: head/sys/contrib/dev/acpica/common/dmtbinfo2.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/dmtbinfo2.c	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/common/dmtbinfo2.c	Mon Jun  4 22:26:47 2018	(r334643)
@@ -290,6 +290,8 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoIort2[] =
     {ACPI_DMT_IORTMEM,  ACPI_IORT2_OFFSET (MemoryProperties),       "Memory Properties", 0},
     {ACPI_DMT_UINT32,   ACPI_IORT2_OFFSET (AtsAttribute),           "ATS Attribute", 0},
     {ACPI_DMT_UINT32,   ACPI_IORT2_OFFSET (PciSegmentNumber),       "PCI Segment Number", 0},
+    {ACPI_DMT_UINT8,    ACPI_IORT2_OFFSET (MemoryAddressLimit),     "Memory Size Limit", 0},
+    {ACPI_DMT_UINT24,   ACPI_IORT2_OFFSET (Reserved[0]),            "Reserved", 0},
     ACPI_DMT_TERMINATOR
 };
 
@@ -350,10 +352,19 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoIort4[] =
     {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (PriGsiv),                "PRI GSIV", 0},
     {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (GerrGsiv),               "GERR GSIV", 0},
     {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (SyncGsiv),               "Sync GSIV", 0},
-    {ACPI_DMT_UINT8,    ACPI_IORT4_OFFSET (Pxm),                    "Proximity Domain", 0},
-    {ACPI_DMT_UINT8,    ACPI_IORT4_OFFSET (Reserved1),              "Reserved", 0},
-    {ACPI_DMT_UINT16,   ACPI_IORT4_OFFSET (Reserved2),              "Reserved", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (Pxm),                    "Proximity Domain", 0},
     {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (IdMappingIndex),         "Device ID Mapping Index", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* 0x05: PMCG */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoIort5[] =
+{
+    {ACPI_DMT_UINT64,   ACPI_IORT5_OFFSET (Page0BaseAddress),       "Page 0 Base Address", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT5_OFFSET (OverflowGsiv),           "Overflow Interrupt GSIV", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT5_OFFSET (NodeReference),          "Node Reference", 0},
+    {ACPI_DMT_UINT64,   ACPI_IORT5_OFFSET (Page1BaseAddress),       "Page 1 Base Address", 0},
     ACPI_DMT_TERMINATOR
 };
 

Modified: head/sys/contrib/dev/acpica/compiler/aslload.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslload.c	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/compiler/aslload.c	Mon Jun  4 22:26:47 2018	(r334643)
@@ -233,7 +233,11 @@ LdLoadNamespace (
 
     /* Dump the namespace if debug is enabled */
 
-    AcpiNsDumpTables (ACPI_NS_ALL, ACPI_UINT32_MAX);
+    if (AcpiDbgLevel & ACPI_LV_TABLES)
+    {
+        AcpiNsDumpTables (ACPI_NS_ALL, ACPI_UINT32_MAX);
+    }
+
     ACPI_FREE (WalkState);
     return (AE_OK);
 }

Modified: head/sys/contrib/dev/acpica/compiler/dttable1.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/dttable1.c	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/compiler/dttable1.c	Mon Jun  4 22:26:47 2018	(r334643)
@@ -1829,6 +1829,19 @@ DtCompileIort (
             NodeLength += Subtable->Length;
             break;
 
+        case ACPI_IORT_NODE_PMCG:
+
+            Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort5,
+                &Subtable);
+            if (ACPI_FAILURE (Status))
+            {
+                return (Status);
+            }
+
+            DtInsertSubtable (ParentTable, Subtable);
+            NodeLength += Subtable->Length;
+            break;
+
         default:
 
             DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "IORT");

Modified: head/sys/contrib/dev/acpica/compiler/dttemplate.h
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/dttemplate.h	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/compiler/dttemplate.h	Mon Jun  4 22:26:47 2018	(r334643)
@@ -696,18 +696,18 @@ const unsigned char TemplateHpet[] =
 
 const unsigned char TemplateIort[] =
 {
-    0x49,0x4F,0x52,0x54,0x90,0x01,0x00,0x00,  /* 00000000    "IORT...." */
-    0x00,0x5F,0x49,0x4E,0x54,0x45,0x4C,0x20,  /* 00000008    "._INTEL " */
+    0x49,0x4F,0x52,0x54,0xF8,0x01,0x00,0x00,  /* 00000000    "IORT...." */
+    0x00,0x72,0x49,0x4E,0x54,0x45,0x4C,0x20,  /* 00000008    ".rINTEL " */
     0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65,  /* 00000010    "Template" */
     0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
-    0x31,0x08,0x17,0x20,0x05,0x00,0x00,0x00,  /* 00000020    "1.. ...." */
+    0x13,0x03,0x18,0x20,0x06,0x00,0x00,0x00,  /* 00000020    "... ...." */
     0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000028    "4......." */
     0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,  /* 00000030    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000038    "........" */
     0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 00000040    "........" */
-    0x00,0x00,0x00,0x00,0x01,0x58,0x00,0x00,  /* 00000048    ".....X.." */
+    0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,  /* 00000048    "........" */
     0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 00000050    "........" */
-    0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000058    "D......." */
+    0x6C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000058    "l......." */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000060    "........" */
     0x00,0x5C,0x5F,0x53,0x42,0x2E,0x50,0x43,  /* 00000068    ".\_SB.PC" */
     0x49,0x30,0x2E,0x44,0x45,0x56,0x30,0x00,  /* 00000070    "I0.DEV0." */
@@ -716,36 +716,49 @@ const unsigned char TemplateIort[] =
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000088    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000090    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000098    "........" */
-    0x00,0x00,0x00,0x00,0x02,0x34,0x00,0x00,  /* 000000A0    ".....4.." */
-    0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 000000A8    "........" */
-    0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000B0    " ......." */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000A0    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000A8    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000B0    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000B8    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000C0    "........" */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000C8    "........" */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000D0    "........" */
-    0x03,0x60,0x00,0x01,0x00,0x00,0x00,0x00,  /* 000000D8    ".`......" */
-    0x01,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,  /* 000000E0    "....L..." */
+    0x00,0x00,0x00,0x00,0x02,0x38,0x00,0x00,  /* 000000C8    ".....8.." */
+    0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 000000D0    "........" */
+    0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000D8    "$......." */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000E0    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000E8    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000F0    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000F8    "........" */
-    0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000100    "<......." */
-    0x4C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000108    "L......." */
+    0x00,0x00,0x00,0x00,0x03,0x60,0x00,0x01,  /* 00000100    ".....`.." */
+    0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 00000108    "........" */
     0x4C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000110    "L......." */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000118    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000120    "........" */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000128    "........" */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000130    "........" */
-    0x04,0x58,0x00,0x01,0x00,0x00,0x00,0x00,  /* 00000138    ".X......" */
-    0x01,0x00,0x00,0x00,0x44,0x00,0x00,0x00,  /* 00000140    "....D..." */
+    0x00,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,  /* 00000128    "....<..." */
+    0x00,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,  /* 00000130    "....L..." */
+    0x00,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,  /* 00000138    "....L..." */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000140    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000148    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000150    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000158    "........" */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000160    "........" */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000168    "........" */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000170    "........" */
+    0x00,0x00,0x00,0x00,0x04,0x58,0x00,0x01,  /* 00000160    ".....X.." */
+    0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 00000168    "........" */
+    0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000170    "D......." */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000178    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000180    "........" */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00   /* 00000188    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000188    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000190    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000198    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000001A0    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000001A8    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000001B0    "........" */
+    0x00,0x00,0x00,0x00,0x05,0x3C,0x00,0x01,  /* 000001B8    ".....<.." */
+    0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 000001C0    "........" */
+    0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000001C8    "(......." */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000001D0    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000001D8    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000001E0    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000001E8    "........" */
+    0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00   /* 000001F0    "........" */
 };
 
 const unsigned char TemplateIvrs[] =

Modified: head/sys/contrib/dev/acpica/components/debugger/dbnames.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/debugger/dbnames.c	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/components/debugger/dbnames.c	Mon Jun  4 22:26:47 2018	(r334643)
@@ -522,6 +522,7 @@ AcpiDbWalkAndMatchName (
     }
     else
     {
+        Info.Count = 0;
         Info.OwnerId = ACPI_OWNER_ID_MAX;
         Info.DebugLevel = ACPI_UINT32_MAX;
         Info.DisplayType = ACPI_DISPLAY_SUMMARY | ACPI_DISPLAY_SHORT;

Modified: head/sys/contrib/dev/acpica/components/debugger/dbobject.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/debugger/dbobject.c	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/components/debugger/dbobject.c	Mon Jun  4 22:26:47 2018	(r334643)
@@ -187,8 +187,18 @@ AcpiDbDumpMethodInfo (
     ACPI_WALK_STATE         *WalkState)
 {
     ACPI_THREAD_STATE       *Thread;
+    ACPI_NAMESPACE_NODE     *Node;
 
 
+    Node = WalkState->MethodNode;
+
+    /* There are no locals or arguments for the module-level code case */
+
+    if (Node == AcpiGbl_RootNode)
+    {
+        return;
+    }
+
     /* Ignore control codes, they are not errors */
 
     if ((Status & AE_CODE_MASK) == AE_CODE_CONTROL)
@@ -556,9 +566,16 @@ AcpiDbDecodeLocals (
     BOOLEAN                 DisplayLocals = FALSE;
 
 
+    Node = WalkState->MethodNode;
     ObjDesc = WalkState->MethodDesc;
-    Node    = WalkState->MethodNode;
 
+    /* There are no locals for the module-level code case */
+
+    if (Node == AcpiGbl_RootNode)
+    {
+        return;
+    }
+
     if (!Node)
     {
         AcpiOsPrintf (
@@ -634,6 +651,13 @@ AcpiDbDecodeArguments (
 
     Node = WalkState->MethodNode;
     ObjDesc = WalkState->MethodDesc;
+
+    /* There are no arguments for the module-level code case */
+
+    if (Node == AcpiGbl_RootNode)
+    {
+        return;
+    }
 
     if (!Node)
     {

Modified: head/sys/contrib/dev/acpica/components/dispatcher/dsdebug.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/dispatcher/dsdebug.c	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/components/dispatcher/dsdebug.c	Mon Jun  4 22:26:47 2018	(r334643)
@@ -251,6 +251,7 @@ AcpiDsDumpMethodStack (
 
     ACPI_FUNCTION_TRACE (DsDumpMethodStack);
 
+
     /* Ignore control codes, they are not errors */
 
     if ((Status & AE_CODE_MASK) == AE_CODE_CONTROL)
@@ -320,8 +321,13 @@ AcpiDsDumpMethodStack (
                 Op->Common.Next = NULL;
 
 #ifdef ACPI_DISASSEMBLER
-                AcpiOsPrintf ("Failed at ");
-                AcpiDmDisassemble (NextWalkState, Op, ACPI_UINT32_MAX);
+                if (WalkState->MethodNode != AcpiGbl_RootNode)
+                {
+                    /* More verbose if not module-level code */
+
+                    AcpiOsPrintf ("Failed at ");
+                    AcpiDmDisassemble (NextWalkState, Op, ACPI_UINT32_MAX);
+                }
 #endif
                 Op->Common.Next = Next;
             }

Modified: head/sys/contrib/dev/acpica/components/executer/exconfig.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/executer/exconfig.c	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/components/executer/exconfig.c	Mon Jun  4 22:26:47 2018	(r334643)
@@ -678,6 +678,17 @@ AcpiExUnloadTable (
         "Received request to unload an ACPI table"));
 
     /*
+     * May 2018: Unload is no longer supported for the following reasons:
+     * 1) A correct implementation on some hosts may not be possible.
+     * 2) Other ACPI implementations do not correctly/fully support it.
+     * 3) It requires host device driver support which does not exist.
+     *    (To properly support namespace unload out from underneath.)
+     * 4) This AML operator has never been seen in the field.
+     */
+    ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
+        "AML Unload operator is not supported"));
+
+    /*
      * Validate the handle
      * Although the handle is partially validated in AcpiExReconfiguration()
      * when it calls AcpiExResolveOperands(), the handle is more completely

Modified: head/sys/contrib/dev/acpica/components/namespace/nsdump.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/namespace/nsdump.c	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/components/namespace/nsdump.c	Mon Jun  4 22:26:47 2018	(r334643)
@@ -293,6 +293,7 @@ AcpiNsDumpPathname (
 }
 #endif
 
+
 /*******************************************************************************
  *
  * FUNCTION:    AcpiNsDumpOneObject
@@ -351,6 +352,7 @@ AcpiNsDumpOneObject (
     }
 
     Type = ThisNode->Type;
+    Info->Count++;
 
     /* Check if the owner matches */
 
@@ -815,6 +817,7 @@ AcpiNsDumpObjects (
         return;
     }
 
+    Info.Count = 0;
     Info.DebugLevel = ACPI_LV_TABLES;
     Info.OwnerId = OwnerId;
     Info.DisplayType = DisplayType;
@@ -823,6 +826,7 @@ AcpiNsDumpObjects (
         ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES,
         AcpiNsDumpOneObject, NULL, (void *) &Info, NULL);
 
+    AcpiOsPrintf ("\nNamespace node count: %u\n\n", Info.Count);
     (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
 }
 

Modified: head/sys/contrib/dev/acpica/components/parser/psloop.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/parser/psloop.c	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/components/parser/psloop.c	Mon Jun  4 22:26:47 2018	(r334643)
@@ -665,6 +665,19 @@ AcpiPsParseLoop (
                 {
                     return_ACPI_STATUS (Status);
                 }
+                if (WalkState->Opcode == AML_SCOPE_OP)
+                {
+                    /*
+                     * If the scope op fails to parse, skip the body of the
+                     * scope op because the parse failure indicates that the
+                     * device may not exist.
+                     */
+                    WalkState->ParserState.Aml = WalkState->Aml + 1;
+                    WalkState->ParserState.Aml =
+                        AcpiPsGetNextPackageEnd(&WalkState->ParserState);
+                    WalkState->Aml = WalkState->ParserState.Aml;
+                    ACPI_ERROR ((AE_INFO, "Skipping Scope block"));
+                }
 
                 continue;
             }
@@ -707,7 +720,32 @@ AcpiPsParseLoop (
                 {
                     return_ACPI_STATUS (Status);
                 }
+                if ((WalkState->ControlState) &&
+                    ((WalkState->ControlState->Control.Opcode == AML_IF_OP) ||
+                    (WalkState->ControlState->Control.Opcode == AML_WHILE_OP)))
+                {
+                    /*
+                     * If the if/while op fails to parse, we will skip parsing
+                     * the body of the op.
+                     */
+                    ParserState->Aml =
+                        WalkState->ControlState->Control.AmlPredicateStart + 1;
+                    ParserState->Aml =
+                        AcpiPsGetNextPackageEnd (ParserState);
+                    WalkState->Aml = ParserState->Aml;
 
+                    ACPI_ERROR ((AE_INFO, "Skipping While/If block"));
+                    if (*WalkState->Aml == AML_ELSE_OP)
+                    {
+                        ACPI_ERROR ((AE_INFO, "Skipping Else block"));
+                        WalkState->ParserState.Aml = WalkState->Aml + 1;
+                        WalkState->ParserState.Aml =
+                            AcpiPsGetNextPackageEnd (ParserState);
+                        WalkState->Aml = ParserState->Aml;
+                    }
+                    ACPI_FREE(AcpiUtPopGenericState (&WalkState->ControlState));
+                }
+                Op = NULL;
                 continue;
             }
         }

Modified: head/sys/contrib/dev/acpica/components/parser/psobject.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/parser/psobject.c	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/components/parser/psobject.c	Mon Jun  4 22:26:47 2018	(r334643)
@@ -154,6 +154,7 @@
 #include <contrib/dev/acpica/include/acparser.h>
 #include <contrib/dev/acpica/include/amlcode.h>
 #include <contrib/dev/acpica/include/acconvert.h>
+#include <contrib/dev/acpica/include/acnamesp.h>
 
 #define _COMPONENT          ACPI_PARSER
         ACPI_MODULE_NAME    ("psobject")
@@ -722,6 +723,20 @@ AcpiPsCompleteOp (
         {
             if (*Op)
             {
+                /*
+                 * These Opcodes need to be removed from the namespace because they
+                 * get created even if these opcodes cannot be created due to
+                 * errors.
+                 */
+                if (((*Op)->Common.AmlOpcode == AML_REGION_OP) ||
+                    ((*Op)->Common.AmlOpcode == AML_DATA_REGION_OP))
+                {
+                    AcpiNsDeleteChildren ((*Op)->Common.Node);
+                    AcpiNsRemoveNode ((*Op)->Common.Node);
+                    (*Op)->Common.Node = NULL;
+                    AcpiPsDeleteParseTree (*Op);
+                }
+
                 Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
                 if (ACPI_FAILURE (Status2))
                 {
@@ -747,6 +762,20 @@ AcpiPsCompleteOp (
 #endif
         WalkState->PrevOp = NULL;
         WalkState->PrevArgTypes = WalkState->ArgTypes;
+
+        if (WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL)
+        {
+            /*
+             * There was something that went wrong while executing code at the
+             * module-level. We need to skip parsing whatever caused the
+             * error and keep going. One runtime error during the table load
+             * should not cause the entire table to not be loaded. This is
+             * because there could be correct AML beyond the parts that caused
+             * the runtime error.
+             */
+            ACPI_ERROR ((AE_INFO, "Ignore error and continue table load"));
+            return_ACPI_STATUS (AE_OK);
+        }
         return_ACPI_STATUS (Status);
     }
 

Modified: head/sys/contrib/dev/acpica/components/parser/pswalk.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/parser/pswalk.c	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/components/parser/pswalk.c	Mon Jun  4 22:26:47 2018	(r334643)
@@ -169,6 +169,8 @@
  *
  ******************************************************************************/
 
+#include <contrib/dev/acpica/include/amlcode.h>
+
 void
 AcpiPsDeleteParseTree (
     ACPI_PARSE_OBJECT       *SubtreeRoot)
@@ -176,19 +178,40 @@ AcpiPsDeleteParseTree (
     ACPI_PARSE_OBJECT       *Op = SubtreeRoot;
     ACPI_PARSE_OBJECT       *Next = NULL;
     ACPI_PARSE_OBJECT       *Parent = NULL;
+    UINT32                  Level = 0;
 
 
     ACPI_FUNCTION_TRACE_PTR (PsDeleteParseTree, SubtreeRoot);
 
+    ACPI_DEBUG_PRINT ((ACPI_DB_PARSE_TREES,
+        " root %p\n", SubtreeRoot));
 
     /* Visit all nodes in the subtree */
 
     while (Op)
     {
-        /* Check if we are not ascending */
-
         if (Op != Parent)
         {
+            /* This is the descending case */
+
+            if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_PARSE_TREES, _COMPONENT))
+            {
+                /* This debug option will print the entire parse tree */
+
+                AcpiOsPrintf ("        %*.s%s %p", (Level * 4), " ",
+                    AcpiPsGetOpcodeName (Op->Common.AmlOpcode), Op);
+
+                if (Op->Named.AmlOpcode == AML_INT_NAMEPATH_OP)
+                {
+                    AcpiOsPrintf ("    %4.4s", Op->Common.Value.String);
+                }
+                if (Op->Named.AmlOpcode == AML_STRING_OP)
+                {
+                    AcpiOsPrintf ("    %s", Op->Common.Value.String);
+                }
+                AcpiOsPrintf ("\n");
+            }
+
             /* Look for an argument or child of the current op */
 
             Next = AcpiPsGetArg (Op, 0);
@@ -197,6 +220,7 @@ AcpiPsDeleteParseTree (
                 /* Still going downward in tree (Op is not completed yet) */
 
                 Op = Next;
+                Level++;
                 continue;
             }
         }
@@ -221,6 +245,7 @@ AcpiPsDeleteParseTree (
         }
         else
         {
+            Level--;
             Op = Parent;
         }
     }

Modified: head/sys/contrib/dev/acpica/components/utilities/uterror.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/utilities/uterror.c	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/components/utilities/uterror.c	Mon Jun  4 22:26:47 2018	(r334643)
@@ -352,20 +352,20 @@ AcpiUtPrefixedNamespaceError (
     {
     case AE_ALREADY_EXISTS:
 
-        AcpiOsPrintf (ACPI_MSG_BIOS_ERROR);
+        AcpiOsPrintf ("\n" ACPI_MSG_BIOS_ERROR);
         Message = "Failure creating";
         break;
 
     case AE_NOT_FOUND:
 
-        AcpiOsPrintf (ACPI_MSG_BIOS_ERROR);
-        Message = "Failure looking up";
+        AcpiOsPrintf ("\n" ACPI_MSG_BIOS_ERROR);
+        Message = "Could not resolve";
         break;
 
     default:
 
-        AcpiOsPrintf (ACPI_MSG_ERROR);
-        Message = "Failure looking up";
+        AcpiOsPrintf ("\n" ACPI_MSG_ERROR);
+        Message = "Failure resolving";
         break;
     }
 

Modified: head/sys/contrib/dev/acpica/include/acdisasm.h
==============================================================================
--- head/sys/contrib/dev/acpica/include/acdisasm.h	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/include/acdisasm.h	Mon Jun  4 22:26:47 2018	(r334643)
@@ -449,6 +449,7 @@ extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort3a[
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort3b[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort3c[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort4[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort5[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIortAcc[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIortHdr[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIortMap[];

Modified: head/sys/contrib/dev/acpica/include/aclocal.h
==============================================================================
--- head/sys/contrib/dev/acpica/include/aclocal.h	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/include/aclocal.h	Mon Jun  4 22:26:47 2018	(r334643)
@@ -284,7 +284,7 @@ typedef enum
  * DescriptorType is used to differentiate between internal descriptors.
  *
  * The node is optimized for both 32-bit and 64-bit platforms:
- * 28 bytes for the 32-bit case, 48 bytes for the 64-bit case.
+ * 20 bytes for the 32-bit case, 32 bytes for the 64-bit case.
  *
  * Note: The DescriptorType and Type fields must appear in the identical
  * position in both the ACPI_NAMESPACE_NODE and ACPI_OPERAND_OBJECT
@@ -301,12 +301,10 @@ typedef struct acpi_namespace_node
     struct acpi_namespace_node      *Parent;        /* Parent node */
     struct acpi_namespace_node      *Child;         /* First child */
     struct acpi_namespace_node      *Peer;          /* First peer */
-    struct acpi_namespace_node      *OwnerList;     /* All nodes owned by a table or method */
 
-/*
- * The following fields are appended to the namespace node and
- * are used by the ASL compiler and AML disassembler only
- */
+    /*
+     * The following fields are used by the ASL compiler and disassembler only
+     */
 #ifdef ACPI_LARGE_NAMESPACE_NODE
     union acpi_parse_object         *Op;
     void                            *MethodLocals;
@@ -314,6 +312,7 @@ typedef struct acpi_namespace_node
     UINT32                          Value;
     UINT32                          Length;
     UINT8                           ArgCount;
+
 #endif
 
 } ACPI_NAMESPACE_NODE;

Modified: head/sys/contrib/dev/acpica/include/acoutput.h
==============================================================================
--- head/sys/contrib/dev/acpica/include/acoutput.h	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/include/acoutput.h	Mon Jun  4 22:26:47 2018	(r334643)
@@ -223,7 +223,8 @@
 #define ACPI_LV_ALLOCATIONS         0x00100000
 #define ACPI_LV_FUNCTIONS           0x00200000
 #define ACPI_LV_OPTIMIZATIONS       0x00400000
-#define ACPI_LV_VERBOSITY2          0x00700000 | ACPI_LV_VERBOSITY1
+#define ACPI_LV_PARSE_TREES         0x00800000
+#define ACPI_LV_VERBOSITY2          0x00F00000 | ACPI_LV_VERBOSITY1
 #define ACPI_LV_ALL                 ACPI_LV_VERBOSITY2
 
 /* Trace verbosity level 3 [Threading, I/O, and Interrupts] */
@@ -275,6 +276,7 @@
 #define ACPI_DB_TABLES              ACPI_DEBUG_LEVEL (ACPI_LV_TABLES)
 #define ACPI_DB_FUNCTIONS           ACPI_DEBUG_LEVEL (ACPI_LV_FUNCTIONS)
 #define ACPI_DB_OPTIMIZATIONS       ACPI_DEBUG_LEVEL (ACPI_LV_OPTIMIZATIONS)
+#define ACPI_DB_PARSE_TREES         ACPI_DEBUG_LEVEL (ACPI_LV_PARSE_TREES)
 #define ACPI_DB_VALUES              ACPI_DEBUG_LEVEL (ACPI_LV_VALUES)
 #define ACPI_DB_OBJECTS             ACPI_DEBUG_LEVEL (ACPI_LV_OBJECTS)
 #define ACPI_DB_ALLOCATIONS         ACPI_DEBUG_LEVEL (ACPI_LV_ALLOCATIONS)

Modified: head/sys/contrib/dev/acpica/include/acpixf.h
==============================================================================
--- head/sys/contrib/dev/acpica/include/acpixf.h	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/include/acpixf.h	Mon Jun  4 22:26:47 2018	(r334643)
@@ -154,7 +154,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20180508
+#define ACPI_CA_VERSION                 0x20180531
 
 #include <contrib/dev/acpica/include/acconfig.h>
 #include <contrib/dev/acpica/include/actypes.h>

Modified: head/sys/contrib/dev/acpica/include/actbinfo.h
==============================================================================
--- head/sys/contrib/dev/acpica/include/actbinfo.h	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/include/actbinfo.h	Mon Jun  4 22:26:47 2018	(r334643)
@@ -257,6 +257,7 @@
 #define ACPI_IORT3_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU,f)
 #define ACPI_IORT3A_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_GSI,f)
 #define ACPI_IORT4_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_V3,f)
+#define ACPI_IORT5_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_PMCG,f)
 #define ACPI_IORTA_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_MEMORY_ACCESS,f)
 #define ACPI_IORTH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_NODE,f)
 #define ACPI_IORTM_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_ID_MAPPING,f)

Modified: head/sys/contrib/dev/acpica/include/actbl2.h
==============================================================================
--- head/sys/contrib/dev/acpica/include/actbl2.h	Mon Jun  4 22:15:24 2018	(r334642)
+++ head/sys/contrib/dev/acpica/include/actbl2.h	Mon Jun  4 22:26:47 2018	(r334643)
@@ -213,7 +213,7 @@
  * IORT - IO Remapping Table
  *
  * Conforms to "IO Remapping Table System Software on ARM Platforms",
- * Document number: ARM DEN 0049C, May 2017
+ * Document number: ARM DEN 0049D, March 2018
  *
  ******************************************************************************/
 
@@ -250,7 +250,8 @@ enum AcpiIortNodeType
     ACPI_IORT_NODE_NAMED_COMPONENT      = 0x01,
     ACPI_IORT_NODE_PCI_ROOT_COMPLEX     = 0x02,
     ACPI_IORT_NODE_SMMU                 = 0x03,
-    ACPI_IORT_NODE_SMMU_V3              = 0x04
+    ACPI_IORT_NODE_SMMU_V3              = 0x04,
+    ACPI_IORT_NODE_PMCG                 = 0x05
 };
 
 
@@ -316,12 +317,18 @@ typedef struct acpi_iort_named_component
 
 } ACPI_IORT_NAMED_COMPONENT;
 
+/* Masks for Flags field above */
 
+#define ACPI_IORT_NC_STALL_SUPPORTED    (1)
+#define ACPI_IORT_NC_PASID_BITS         (31<<1)
+
 typedef struct acpi_iort_root_complex
 {
     UINT64                  MemoryProperties;       /* Memory access properties */
     UINT32                  AtsAttribute;
     UINT32                  PciSegmentNumber;
+    UINT8                   MemoryAddressLimit;     /* Memory address size limit */
+    UINT8                   Reserved[3];            /* Reserved, must be zero */
 
 } ACPI_IORT_ROOT_COMPLEX;
 
@@ -383,9 +390,7 @@ typedef struct acpi_iort_smmu_v3
     UINT32                  PriGsiv;
     UINT32                  GerrGsiv;
     UINT32                  SyncGsiv;
-    UINT8                   Pxm;
-    UINT8                   Reserved1;
-    UINT16                  Reserved2;
+    UINT32                  Pxm;
     UINT32                  IdMappingIndex;
 
 } ACPI_IORT_SMMU_V3;
@@ -399,8 +404,17 @@ typedef struct acpi_iort_smmu_v3
 /* Masks for Flags field above */
 
 #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE   (1)
-#define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE     (1<<1)
+#define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE     (3<<1)
 #define ACPI_IORT_SMMU_V3_PXM_VALID         (1<<3)
+
+typedef struct acpi_iort_pmcg
+{
+    UINT64                  Page0BaseAddress;
+    UINT32                  OverflowGsiv;
+    UINT32                  NodeReference;
+    UINT64                  Page1BaseAddress;
+
+} ACPI_IORT_PMCG;
 
 
 /*******************************************************************************


More information about the svn-src-all mailing list