git: 07c64d74917e - main - acpica: Import ACPICA 20230628

From: Jung-uk Kim <jkim_at_FreeBSD.org>
Date: Wed, 31 Jan 2024 04:06:11 UTC
The branch main has been updated by jkim:

URL: https://cgit.FreeBSD.org/src/commit/?id=07c64d74917e7c8ca61c77413dbd533390e7dca7

commit 07c64d74917e7c8ca61c77413dbd533390e7dca7
Author:     Jung-uk Kim <jkim@FreeBSD.org>
AuthorDate: 2024-01-30 21:49:20 +0000
Commit:     Jung-uk Kim <jkim@FreeBSD.org>
CommitDate: 2024-01-31 03:58:33 +0000

    acpica: Import ACPICA 20230628
    
    (cherry picked from commit ef3ba9d625927fd4592a8c071698a562821485bd)
---
 sys/contrib/dev/acpica/changes.txt                 |  30 ++++
 sys/contrib/dev/acpica/common/ahpredef.c           |   1 +
 sys/contrib/dev/acpica/common/dmtable.c            |  26 ++++
 sys/contrib/dev/acpica/common/dmtbdump2.c          |  83 +++++++++-
 sys/contrib/dev/acpica/common/dmtbinfo1.c          |   2 +-
 sys/contrib/dev/acpica/common/dmtbinfo2.c          | 173 ++++++++++++++++++++-
 sys/contrib/dev/acpica/compiler/aslrestype2.c      |   6 +-
 sys/contrib/dev/acpica/compiler/dttable2.c         |  67 +++++++-
 sys/contrib/dev/acpica/compiler/dttemplate.h       |  51 ++++--
 .../dev/acpica/components/debugger/dbcmds.c        |  59 ++++++-
 .../dev/acpica/components/debugger/dbinput.c       |   8 +
 .../dev/acpica/components/disassembler/dmresrcl.c  |   2 +-
 .../dev/acpica/components/dispatcher/dswstate.c    |   4 +-
 sys/contrib/dev/acpica/components/events/evevent.c |  11 +-
 .../dev/acpica/components/executer/exserial.c      |   3 +-
 .../dev/acpica/components/hardware/hwsleep.c       |  11 --
 .../dev/acpica/components/parser/psopcode.c        |   2 +-
 .../dev/acpica/components/resources/rsaddr.c       |   2 +-
 .../dev/acpica/components/resources/rscreate.c     |   8 +-
 .../dev/acpica/components/resources/rsdumpinfo.c   |   8 +-
 .../dev/acpica/components/resources/rsirq.c        |  12 +-
 .../dev/acpica/components/utilities/utdebug.c      |   5 +
 .../dev/acpica/components/utilities/utglobal.c     |   1 -
 sys/contrib/dev/acpica/include/acdebug.h           |   4 +
 sys/contrib/dev/acpica/include/acdisasm.h          |  13 ++
 sys/contrib/dev/acpica/include/acglobal.h          |   1 +
 sys/contrib/dev/acpica/include/aclocal.h           |  29 ++--
 sys/contrib/dev/acpica/include/acnames.h           |   1 +
 sys/contrib/dev/acpica/include/acpixf.h            |   2 +-
 sys/contrib/dev/acpica/include/acpredef.h          |   3 +
 sys/contrib/dev/acpica/include/acrestyp.h          |   8 +-
 sys/contrib/dev/acpica/include/actbinfo.h          |  15 +-
 sys/contrib/dev/acpica/include/actbl1.h            |   4 +-
 sys/contrib/dev/acpica/include/actbl2.h            |  81 +++++++++-
 sys/contrib/dev/acpica/include/actbl3.h            |   4 +-
 sys/contrib/dev/acpica/include/actypes.h           |   3 +-
 sys/contrib/dev/acpica/include/amlresrc.h          |   2 +-
 sys/contrib/dev/acpica/include/platform/acgcc.h    |   2 +-
 38 files changed, 651 insertions(+), 96 deletions(-)

diff --git a/sys/contrib/dev/acpica/changes.txt b/sys/contrib/dev/acpica/changes.txt
index af896ec7e0b0..edcc674d90ab 100644
--- a/sys/contrib/dev/acpica/changes.txt
+++ b/sys/contrib/dev/acpica/changes.txt
@@ -1,4 +1,34 @@
 ----------------------------------------
+28 June 2023. Summary of changes for version 20230628:
+
+0) Global changes:
+
+Fixed a problem with the ASL/AML Timer() operator. Discovered by UBSAN: ?array-index-out-of-bounds in acpica/dswexec.c:401:12 index -1 is out of range for type 'acpi_operand_object?. Added AML_NO_OPERAND_RESOLVE flag to Timer (since there are no runtime arguments). Reported by: Abhishek Mainkar abmainkar@nvidia.com.
+
+Added a define for size of acpi_srat_generic_affinity DeviceHandle. Replaced a magic number with a define. The Linux kernel code will utilize this. Reported by Dave Jiang dave.jiang@intel.com. 
+
+Added support for _DSC (Deepest State for Configuration) as per ACPI 6.5.
+
+1) ACPICA kernel-resident subsystem:
+
+Added port definitions for CDAT SSLBIS. Add upstream port and any port definitions for SSLBIS. Reported by: Dave Jiang dave.jiang@intel.com.
+
+Fixed misspelled CDAT DSMAS define: ACPI_CEDT_DSMAS_NON_VOLATILE -> ACPI_CDAT_DSMAS_NON_VOLATILE. Reported by: Dave Jiang dave.jiang@intel.com.
+
+1) ACPICA kernel-resident subsystem:
+
+Fix GCC 12 dangling-pointer warning.  We're storing a persistent pointer to an ephemeral local variable which technically is a dangling pointer and the compiler is correct. However, since we never indirect the pointer, this is a safe operation and we can suppress the warning.
+
+Also, some C run-times (like MUSL) aren't including <stdint.h> indirectly so we must include it explicitly or we won't have the type definition for uintptr_t.
+
+2) iASL Compiler/Disassembler and ACPICA tools:. 
+
+IASL/RHCT: Enable dumping and compiling newly added nodes. The RHCT table is updated with new nodes. Add compile and dump functionality for these new structures.
+
+AcpiExec: Added a new command, ?interrupt?. The Interrupt command simulates an interrupt with a IntID (GSIV) equal to the first argument of the call/invocation. The acpiexec code simulates the behavior by OSPM: execute the _EVT method of the GED device associated with that IntID. Submitted by: Jose Marinho jose.marinho@arm.com.
+
+AcpiExec: Detect GED device and keep track of _EVT. The GED device is described by a _HID of ACPI0013. This code traverses the namespace identifying all GED devices. For each GED device in the namespace we record the Interrupt object and the _EVT method. This information is used when an interrupt is simulated via the ?interrupt? command. Submitted by: Jose Marinho jose.marinho@arm.com.
+----------------------------------------
 31 March 2023. Summary of changes for version 20230331:
 
 This release is available at https://acpica.org/downloads
diff --git a/sys/contrib/dev/acpica/common/ahpredef.c b/sys/contrib/dev/acpica/common/ahpredef.c
index 97655cfab6f7..38653468560e 100644
--- a/sys/contrib/dev/acpica/common/ahpredef.c
+++ b/sys/contrib/dev/acpica/common/ahpredef.c
@@ -234,6 +234,7 @@ const AH_PREDEFINED_NAME    AslPredefinedInfo[] =
     AH_PREDEF ("_DMA",    "Direct Memory Access", "Returns device current resources for DMA transactions, and resource field"),
     AH_PREDEF ("_DOD",    "Display Output Devices", "Enumerate all devices attached to the display adapter"),
     AH_PREDEF ("_DOS",    "Disable Output Switching", "Sets the display output switching mode"),
+    AH_PREDEF ("_DSC",    "Deepest State for Configuration", "Returns the deepest D-state of the device to the OSPM"),
     AH_PREDEF ("_DPL",    "Device Selection Polarity", "Polarity of Device Selection signal, Resource Descriptor field"),
     AH_PREDEF ("_DRS",    "Drive Strength", "Drive Strength setting for GPIO connection, Resource Descriptor field"),
     AH_PREDEF ("_DSD",    "Device-Specific Data", "Returns a list of device property information"),
diff --git a/sys/contrib/dev/acpica/common/dmtable.c b/sys/contrib/dev/acpica/common/dmtable.c
index 0d7cdceb5b4a..80aa700bb5e7 100644
--- a/sys/contrib/dev/acpica/common/dmtable.c
+++ b/sys/contrib/dev/acpica/common/dmtable.c
@@ -430,6 +430,9 @@ static const char           *AcpiDmMadtSubnames[] =
     "Bridge I/O Interrupt Controller",  /* ACPI_MADT_TYPE_BIO_PIC */
     "LPC Interrupt Controller",         /* ACPI_MADT_TYPE_LPC_PIC */
     "RISC-V Interrupt Controller",      /* ACPI_MADT_TYPE_RINTC */
+    "RISC-V Incoming MSI Controller",   /* ACPI_MADT_TYPE_IMSIC */
+    "RISC-V APLIC Controller",          /* ACPI_MADT_TYPE_APLIC */
+    "RISC-V PLIC Controller",           /* ACPI_MADT_TYPE_PLIC */
     "Unknown Subtable Type",            /* Reserved */
     "Types 80-FF are used for OEM data" /* Reserved for OEM data */
 };
@@ -669,6 +672,14 @@ static const char           *AcpiDmGasAccessWidth[] =
     "Unknown Width Encoding"
 };
 
+static const char           *AcpiDmRhctSubnames[] =
+{
+    "RISC-V ISA string structure",  /* ACPI_RHCT_ISA_STRING */
+    "RISC-V CMO node structure",    /* ACPI_RHCT_CMO_NODE */
+    "RISC-V MMU node structure",    /* ACPI_RHCT_MMU_NODE */
+    "RISC-V Hart Info structure",   /* ACPI_RHCT_HART_INFO */
+};
+
 
 /*******************************************************************************
  *
@@ -1190,6 +1201,7 @@ AcpiDmDumpTable (
         case ACPI_DMT_NFIT:
         case ACPI_DMT_NHLT1e:
         case ACPI_DMT_PHAT:
+        case ACPI_DMT_RHCT:
 
             ByteLength = 2;
             break;
@@ -2169,6 +2181,20 @@ AcpiDmDumpTable (
                 AcpiDmRgrtSubnames[Temp8]);
             break;
 
+        case ACPI_DMT_RHCT:
+
+            /* RHCT subtable types */
+
+            Temp16 = ACPI_GET16 (Target);
+            if (Temp16 == ACPI_RHCT_NODE_TYPE_HART_INFO)
+            {
+                Temp16 = ACPI_RHCT_NODE_TYPE_RESERVED;
+            }
+
+            AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
+                AcpiDmRhctSubnames[Temp16]);
+            break;
+
         case ACPI_DMT_SDEV:
 
             /* SDEV subtable types */
diff --git a/sys/contrib/dev/acpica/common/dmtbdump2.c b/sys/contrib/dev/acpica/common/dmtbdump2.c
index 61f62fee8315..6c94ac7bf04a 100644
--- a/sys/contrib/dev/acpica/common/dmtbdump2.c
+++ b/sys/contrib/dev/acpica/common/dmtbdump2.c
@@ -990,6 +990,61 @@ AcpiDmDumpMadt (
             InfoTable = AcpiDmTableInfoMadt16;
             break;
 
+        case ACPI_MADT_TYPE_CORE_PIC:
+
+            InfoTable = AcpiDmTableInfoMadt17;
+            break;
+
+        case ACPI_MADT_TYPE_LIO_PIC:
+
+            InfoTable = AcpiDmTableInfoMadt18;
+            break;
+
+        case ACPI_MADT_TYPE_HT_PIC:
+
+            InfoTable = AcpiDmTableInfoMadt19;
+            break;
+
+        case ACPI_MADT_TYPE_EIO_PIC:
+
+            InfoTable = AcpiDmTableInfoMadt20;
+            break;
+
+        case ACPI_MADT_TYPE_MSI_PIC:
+
+            InfoTable = AcpiDmTableInfoMadt21;
+            break;
+
+        case ACPI_MADT_TYPE_BIO_PIC:
+
+            InfoTable = AcpiDmTableInfoMadt22;
+            break;
+
+        case ACPI_MADT_TYPE_LPC_PIC:
+
+            InfoTable = AcpiDmTableInfoMadt23;
+            break;
+
+        case ACPI_MADT_TYPE_RINTC:
+
+            InfoTable = AcpiDmTableInfoMadt24;
+            break;
+
+        case ACPI_MADT_TYPE_IMSIC:
+
+            InfoTable = AcpiDmTableInfoMadt25;
+            break;
+
+        case ACPI_MADT_TYPE_APLIC:
+
+            InfoTable = AcpiDmTableInfoMadt26;
+            break;
+
+        case ACPI_MADT_TYPE_PLIC:
+
+            InfoTable = AcpiDmTableInfoMadt27;
+            break;
+
         default:
 
             if ((Subtable->Type >= ACPI_MADT_TYPE_RESERVED) &&
@@ -1021,7 +1076,7 @@ AcpiDmDumpMadt (
             /* Dump the OEM data */
 
             Status = AcpiDmDumpTable (Length, Offset, ACPI_CAST_PTR (UINT8, Table) + Offset,
-                Subtable->Length - sizeof (ACPI_SUBTABLE_HEADER), AcpiDmTableInfoMadt17);
+                Subtable->Length - sizeof (ACPI_SUBTABLE_HEADER), AcpiDmTableInfoMadt128);
             if (ACPI_FAILURE (Status))
             {
                 return;
@@ -1058,16 +1113,16 @@ NextSubtable:
         Subtable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable,
             Subtable->Length);
 
-        DbgPrint (ASL_PARSE_OUTPUT, "//[5) Next Subtable %p, length %X]\n",
-            Subtable, Subtable->Length);
-        DbgPrint (ASL_PARSE_OUTPUT, "//[5B) Offset from table start: 0x%8.8X%8.8X (%p)]\n",
-            ACPI_FORMAT_UINT64 (ACPI_CAST_PTR (char, Subtable) - ACPI_CAST_PTR (char, Table)), Subtable);
-
         Offset = ACPI_CAST_PTR (char, Subtable) - ACPI_CAST_PTR (char, Table);
         if (Offset >= Table->Length)
         {
             return;
         }
+
+        DbgPrint (ASL_PARSE_OUTPUT, "//[5) Next Subtable %p, length %X]\n",
+            Subtable, Subtable->Length);
+        DbgPrint (ASL_PARSE_OUTPUT, "//[5B) Offset from table start: 0x%8.8X%8.8X (%p)]\n",
+            ACPI_FORMAT_UINT64 (ACPI_CAST_PTR (char, Subtable) - ACPI_CAST_PTR (char, Table)), Subtable);
     }
 }
 
@@ -2765,6 +2820,8 @@ AcpiDmDumpRhct (
     ACPI_RHCT_NODE_HEADER   *Subtable;
     ACPI_RHCT_HART_INFO     *RhctHartInfo;
     ACPI_RHCT_ISA_STRING    *RhctIsaString;
+    ACPI_RHCT_CMO_NODE      *RhctCmoNode;
+    ACPI_RHCT_MMU_NODE      *RhctMmuNode;
     UINT32                  Length = Table->Length;
     UINT8                   SubtableOffset, IsaPadOffset;
     UINT32                  Offset = sizeof (ACPI_TABLE_RHCT);
@@ -2850,6 +2907,20 @@ AcpiDmDumpRhct (
                          (Subtable->Length - IsaPadOffset), AcpiDmTableInfoRhctIsaPad);
             }
 
+            break;
+
+        case ACPI_RHCT_NODE_TYPE_CMO:
+            RhctCmoNode = ACPI_ADD_PTR (ACPI_RHCT_CMO_NODE, Subtable, SubtableOffset);
+            Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
+                                      RhctCmoNode, 4, AcpiDmTableInfoRhctCmo1);
+            break;
+
+        case ACPI_RHCT_NODE_TYPE_MMU:
+            RhctMmuNode = ACPI_ADD_PTR (ACPI_RHCT_MMU_NODE, Subtable, SubtableOffset);
+            Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
+                                      RhctMmuNode, 2, AcpiDmTableInfoRhctMmu1);
+            break;
+
         default:
             break;
         }
diff --git a/sys/contrib/dev/acpica/common/dmtbinfo1.c b/sys/contrib/dev/acpica/common/dmtbinfo1.c
index 058bb2e72215..d53ec515cbde 100644
--- a/sys/contrib/dev/acpica/common/dmtbinfo1.c
+++ b/sys/contrib/dev/acpica/common/dmtbinfo1.c
@@ -947,7 +947,7 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoDmar4[] =
 {
     {ACPI_DMT_UINT24,   ACPI_DMAR4_OFFSET (Reserved[0]),            "Reserved", 0},
     {ACPI_DMT_UINT8,    ACPI_DMAR4_OFFSET (DeviceNumber),           "Device Number", 0},
-    {ACPI_DMT_STRING,   ACPI_DMAR4_OFFSET (u.DeviceName[0]),          "Device Name", 0},
+    {ACPI_DMT_STRING,   ACPI_DMAR4_OFFSET (DeviceName[0]),          "Device Name", 0},
     ACPI_DMT_TERMINATOR
 };
 
diff --git a/sys/contrib/dev/acpica/common/dmtbinfo2.c b/sys/contrib/dev/acpica/common/dmtbinfo2.c
index e1e325dec277..9a3bf952fe40 100644
--- a/sys/contrib/dev/acpica/common/dmtbinfo2.c
+++ b/sys/contrib/dev/acpica/common/dmtbinfo2.c
@@ -678,8 +678,6 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoLpit0[] =
     {ACPI_DMT_UINT64,   ACPI_LPIT0_OFFSET (CounterFrequency),       "Counter Frequency", 0},
     ACPI_DMT_TERMINATOR
 };
-
-
 /*******************************************************************************
  *
  * MADT - Multiple APIC Description Table and subtables
@@ -926,12 +924,155 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoMadt16[] =
    ACPI_DMT_TERMINATOR
 };
 
-/* 17: OEM data structure */
+/* 17: core interrupt controller */
 
 ACPI_DMTABLE_INFO           AcpiDmTableInfoMadt17[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_MADT17_OFFSET (Version),               "Version", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT17_OFFSET (ProcessorId),           "ProcessorId", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT17_OFFSET (CoreId),                "CoreId", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT17_OFFSET (Flags),                 "Flags", 0},
+   ACPI_DMT_TERMINATOR
+};
+
+/* 18: Legacy I/O interrupt controller */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMadt18[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_MADT18_OFFSET (Version),               "Version", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT18_OFFSET (Address),               "Address", 0},
+    {ACPI_DMT_UINT16,   ACPI_MADT18_OFFSET (Size),                  "Size", 0},
+    {ACPI_DMT_UINT16,   ACPI_MADT18_OFFSET (Cascade),               "Cascade", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT18_OFFSET (CascadeMap),            "CascadeMap", 0},
+   ACPI_DMT_TERMINATOR
+};
+
+/* 19: HT interrupt controller */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMadt19[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_MADT19_OFFSET (Version),               "Version", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT19_OFFSET (Address),               "Address", 0},
+    {ACPI_DMT_UINT16,   ACPI_MADT19_OFFSET (Size),                  "Size", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT19_OFFSET (Cascade),               "Cascade", 0},
+   ACPI_DMT_TERMINATOR
+};
+
+/* 20: Extend I/O interrupt controller */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMadt20[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_MADT20_OFFSET (Version),               "Version", 0},
+    {ACPI_DMT_UINT8,    ACPI_MADT20_OFFSET (Cascade),               "Cascade", 0},
+    {ACPI_DMT_UINT8,    ACPI_MADT20_OFFSET (Node),                  "Node", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT20_OFFSET (NodeMap),               "NodeMap", 0},
+   ACPI_DMT_TERMINATOR
+};
+
+/* 21: MSI controller */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMadt21[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_MADT21_OFFSET (Version),               "Version", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT21_OFFSET (MsgAddress),            "MsgAddress", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT21_OFFSET (Start),                 "Start", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT21_OFFSET (Count),                 "Count", 0},
+   ACPI_DMT_TERMINATOR
+};
+
+/* 22: BIO interrupt controller */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMadt22[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_MADT22_OFFSET (Version),               "Version", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT22_OFFSET (Address),               "Address", 0},
+    {ACPI_DMT_UINT16,   ACPI_MADT22_OFFSET (Size),                  "Size", 0},
+    {ACPI_DMT_UINT16,   ACPI_MADT22_OFFSET (Id),                    "Id", 0},
+    {ACPI_DMT_UINT16,   ACPI_MADT22_OFFSET (GsiBase),               "GsiBase", 0},
+   ACPI_DMT_TERMINATOR
+};
+
+/* 23: LPC interrupt controller */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMadt23[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_MADT23_OFFSET (Version),               "Version", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT23_OFFSET (Address),               "Address", 0},
+    {ACPI_DMT_UINT16,   ACPI_MADT23_OFFSET (Size),                  "Size", 0},
+    {ACPI_DMT_UINT8,    ACPI_MADT23_OFFSET (Cascade),               "Cascade", 0},
+   ACPI_DMT_TERMINATOR
+};
+
+/* 24: RINTC interrupt controller */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMadt24[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_MADT24_OFFSET (Version),               "Version", 0},
+    {ACPI_DMT_UINT8,    ACPI_MADT24_OFFSET (Reserved),              "Reserved", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT24_OFFSET (Flags),                 "Flags", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT24_OFFSET (HartId),                "HartId", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT24_OFFSET (Uid),                   "Uid", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT24_OFFSET (ExtIntcId),             "ExtIntcId", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT24_OFFSET (ImsicAddr),             "ImsicAddr", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT24_OFFSET (ImsicSize),             "ImsicSize", 0},
+   ACPI_DMT_TERMINATOR
+};
+
+/* 25: RISC-V IMSIC interrupt controller */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMadt25[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_MADT25_OFFSET (Version),               "Version", 0},
+    {ACPI_DMT_UINT8,    ACPI_MADT25_OFFSET (Reserved),              "Reserved", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT25_OFFSET (Flags),                 "Flags", 0},
+    {ACPI_DMT_UINT16,   ACPI_MADT25_OFFSET (NumIds),                "NumIds", 0},
+    {ACPI_DMT_UINT16,   ACPI_MADT25_OFFSET (NumGuestIds),           "NumGuestIds", 0},
+    {ACPI_DMT_UINT8,    ACPI_MADT25_OFFSET (GuestIndexBits),        "GuestIndexBits", 0},
+    {ACPI_DMT_UINT8,    ACPI_MADT25_OFFSET (HartIndexBits),         "HartIndexBits", 0},
+    {ACPI_DMT_UINT8,    ACPI_MADT25_OFFSET (GroupIndexBits),        "GroupIndexBits", 0},
+    {ACPI_DMT_UINT8,    ACPI_MADT25_OFFSET (GroupIndexShift),       "GroupIndexShift", 0},
+   ACPI_DMT_TERMINATOR
+};
+
+/* 26: RISC-V APLIC interrupt controller */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMadt26[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_MADT26_OFFSET (Version),               "Version", 0},
+    {ACPI_DMT_UINT8,    ACPI_MADT26_OFFSET (Id),                    "Id", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT26_OFFSET (Flags),                 "Flags", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT26_OFFSET (HwId),                  "HwId", 0},
+    {ACPI_DMT_UINT16,   ACPI_MADT26_OFFSET (NumIdcs),               "NumIdcs", 0},
+    {ACPI_DMT_UINT16,   ACPI_MADT26_OFFSET (NumSources),            "NumSources", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT26_OFFSET (GsiBase),               "GsiBase", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT26_OFFSET (BaseAddr),              "BaseAddr", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT26_OFFSET (Size),                  "Size", 0},
+   ACPI_DMT_TERMINATOR
+};
+
+/* 27: RISC-V PLIC interrupt controller */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMadt27[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_MADT27_OFFSET (Version),               "Version", 0},
+    {ACPI_DMT_UINT8,    ACPI_MADT27_OFFSET (Id),                    "Id", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT27_OFFSET (Flags),                 "Flags", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT27_OFFSET (HwId),                  "HwId", 0},
+    {ACPI_DMT_UINT16,   ACPI_MADT27_OFFSET (NumIrqs),               "NumIrqs", 0},
+    {ACPI_DMT_UINT16,   ACPI_MADT27_OFFSET (MaxPrio),               "MaxPrio", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT27_OFFSET (Flags),                 "Flags", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT27_OFFSET (Size),                  "Size", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT27_OFFSET (BaseAddr),              "BaseAddr", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT27_OFFSET (GsiBase),               "GsiBase", 0},
+   ACPI_DMT_TERMINATOR
+};
+
+/* 128: OEM data structure */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMadt128[] =
 {
     {ACPI_DMT_RAW_BUFFER, 0,                                        "OEM Data", 0},
-    ACPI_DMT_TERMINATOR
+   ACPI_DMT_TERMINATOR
 };
 
 /*******************************************************************************
@@ -2080,7 +2221,7 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoRgrt0[] =
 
 ACPI_DMTABLE_INFO           AcpiDmTableInfoRhct[] =
 {
-    {ACPI_DMT_UINT32,   ACPI_RHCT_OFFSET (Reserved),         "Reserved", 0},
+    {ACPI_DMT_UINT32,   ACPI_RHCT_OFFSET (Flags),            "Flags", 0},
     {ACPI_DMT_UINT64,   ACPI_RHCT_OFFSET (TimeBaseFreq),     "Timer Base Frequency", 0},
     {ACPI_DMT_UINT32,   ACPI_RHCT_OFFSET (NodeCount),        "Number of nodes", 0},
     {ACPI_DMT_UINT32,   ACPI_RHCT_OFFSET (NodeOffset),       "Offset to the node array", 0},
@@ -2092,7 +2233,7 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoRhct[] =
 
 ACPI_DMTABLE_INFO           AcpiDmTableInfoRhctNodeHdr[] =
 {
-    {ACPI_DMT_UINT16,    ACPI_RHCTH_OFFSET (Type),            "Subtable Type", 0},
+    {ACPI_DMT_RHCT,      ACPI_RHCTH_OFFSET (Type),            "Subtable Type", 0},
     {ACPI_DMT_UINT16,    ACPI_RHCTH_OFFSET (Length),          "Length", 0},
     {ACPI_DMT_UINT16,    ACPI_RHCTH_OFFSET (Revision),        "Revision", 0},
     ACPI_DMT_TERMINATOR
@@ -2116,6 +2257,26 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoRhctIsaPad[] =
     ACPI_DMT_TERMINATOR
 };
 
+/* 1: CMO node type */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoRhctCmo1[] =
+{
+    {ACPI_DMT_UINT8,   ACPI_RHCT1_OFFSET (Reserved),          "Reserved", 0},
+    {ACPI_DMT_UINT8,   ACPI_RHCT1_OFFSET (CbomSize),          "CBOM Block Size", 0},
+    {ACPI_DMT_UINT8,   ACPI_RHCT1_OFFSET (CbopSize),          "CBOP Block Size", 0},
+    {ACPI_DMT_UINT8,   ACPI_RHCT1_OFFSET (CbozSize),          "CBOZ Block Size", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* 2: MMU node type */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoRhctMmu1[] =
+{
+    {ACPI_DMT_UINT8,   ACPI_RHCT2_OFFSET (Reserved),          "Reserved", 0},
+    {ACPI_DMT_UINT8,   ACPI_RHCT2_OFFSET (MmuType),           "MMU Type", 0},
+    ACPI_DMT_TERMINATOR
+};
+
 /* 0xFFFF: Hart Info type */
 
 ACPI_DMTABLE_INFO           AcpiDmTableInfoRhctHartInfo1[] =
diff --git a/sys/contrib/dev/acpica/compiler/aslrestype2.c b/sys/contrib/dev/acpica/compiler/aslrestype2.c
index ab021866cd02..9406a2172481 100644
--- a/sys/contrib/dev/acpica/compiler/aslrestype2.c
+++ b/sys/contrib/dev/acpica/compiler/aslrestype2.c
@@ -337,7 +337,7 @@ RsDoInterruptDescriptor (
     Descriptor->ExtendedIrq.InterruptCount  = 0;
 
     Rover = ACPI_CAST_PTR (AML_RESOURCE,
-        (&(Descriptor->ExtendedIrq.u.Interrupts[0])));
+        (&(Descriptor->ExtendedIrq.Interrupts[0])));
 
     /* Process all child initialization nodes */
 
@@ -466,7 +466,7 @@ RsDoInterruptDescriptor (
 
                 RsCreateDwordField (InitializerOp, ACPI_RESTAG_INTERRUPT,
                     CurrentByteOffset +
-                    ASL_RESDESC_OFFSET (ExtendedIrq.u.Interrupts[0]));
+                    ASL_RESDESC_OFFSET (ExtendedIrq.Interrupts[0]));
             }
         }
 
@@ -494,7 +494,7 @@ RsDoInterruptDescriptor (
     }
 
     Rnode->BufferLength =
-        (ASL_RESDESC_OFFSET (ExtendedIrq.u.Interrupts[0]) -
+        (ASL_RESDESC_OFFSET (ExtendedIrq.Interrupts[0]) -
         ASL_RESDESC_OFFSET (ExtendedIrq.DescriptorType))
         + OptionIndex + StringLength;
     return (Rnode);
diff --git a/sys/contrib/dev/acpica/compiler/dttable2.c b/sys/contrib/dev/acpica/compiler/dttable2.c
index 9046851e313c..af6ac5f6319e 100644
--- a/sys/contrib/dev/acpica/compiler/dttable2.c
+++ b/sys/contrib/dev/acpica/compiler/dttable2.c
@@ -371,11 +371,66 @@ DtCompileMadt (
             InfoTable = AcpiDmTableInfoMadt16;
             break;
 
+        case ACPI_MADT_TYPE_CORE_PIC:
+
+            InfoTable = AcpiDmTableInfoMadt17;
+            break;
+
+        case ACPI_MADT_TYPE_LIO_PIC:
+
+            InfoTable = AcpiDmTableInfoMadt18;
+            break;
+
+        case ACPI_MADT_TYPE_HT_PIC:
+
+            InfoTable = AcpiDmTableInfoMadt19;
+            break;
+
+        case ACPI_MADT_TYPE_EIO_PIC:
+
+            InfoTable = AcpiDmTableInfoMadt20;
+            break;
+
+        case ACPI_MADT_TYPE_MSI_PIC:
+
+            InfoTable = AcpiDmTableInfoMadt21;
+            break;
+
+        case ACPI_MADT_TYPE_BIO_PIC:
+
+            InfoTable = AcpiDmTableInfoMadt22;
+            break;
+
+        case ACPI_MADT_TYPE_LPC_PIC:
+
+            InfoTable = AcpiDmTableInfoMadt23;
+            break;
+
+        case ACPI_MADT_TYPE_RINTC:
+
+            InfoTable = AcpiDmTableInfoMadt24;
+            break;
+
+        case ACPI_MADT_TYPE_IMSIC:
+
+            InfoTable = AcpiDmTableInfoMadt25;
+            break;
+
+        case ACPI_MADT_TYPE_APLIC:
+
+            InfoTable = AcpiDmTableInfoMadt26;
+            break;
+
+        case ACPI_MADT_TYPE_PLIC:
+
+            InfoTable = AcpiDmTableInfoMadt27;
+            break;
+
         default:
 
             if (MadtHeader->Type >= ACPI_MADT_TYPE_OEM_RESERVED)
             {
-                InfoTable = AcpiDmTableInfoMadt17;
+                InfoTable = AcpiDmTableInfoMadt128;
             }
             else
             {
@@ -2190,6 +2245,16 @@ DtCompileRhct (
             InfoTable = AcpiDmTableInfoRhctHartInfo1;
             break;
 
+        case ACPI_RHCT_NODE_TYPE_CMO:
+
+            InfoTable = AcpiDmTableInfoRhctCmo1;
+            break;
+
+        case ACPI_RHCT_NODE_TYPE_MMU:
+
+            InfoTable = AcpiDmTableInfoRhctMmu1;
+            break;
+
         default:
 
             DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "RHCT");
diff --git a/sys/contrib/dev/acpica/compiler/dttemplate.h b/sys/contrib/dev/acpica/compiler/dttemplate.h
index 755da40224e4..c97a8ed24eee 100644
--- a/sys/contrib/dev/acpica/compiler/dttemplate.h
+++ b/sys/contrib/dev/acpica/compiler/dttemplate.h
@@ -1128,11 +1128,11 @@ const unsigned char TemplateLpit[] =
 
 const unsigned char TemplateMadt[] =
 {
-    0x41,0x50,0x49,0x43,0x6A,0x01,0x00,0x00,  /* 00000000    "APICj..." */
-    0x05,0x9D,0x49,0x4E,0x54,0x45,0x4C,0x20,  /* 00000008    "..INTEL " */
+    0x41,0x50,0x49,0x43,0x60,0x02,0x00,0x00,  /* 00000000    "APIC...." */
+    0x05,0x69,0x49,0x4E,0x54,0x45,0x4C,0x20,  /* 00000008    "..INTEL " */
     0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65,  /* 00000010    "Template" */
     0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
-    0x13,0x11,0x20,0x20,0x00,0x00,0x00,0x00,  /* 00000020    "..  ...." */
+    0x31,0x03,0x22,0x20,0x00,0x00,0x00,0x00,  /* 00000020    "1." ...." */
     0x01,0x00,0x00,0x00,0x00,0x08,0x00,0x00,  /* 00000028    "........" */
     0x01,0x00,0x00,0x00,0x01,0x0C,0x01,0x00,  /* 00000030    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000038    "........" */
@@ -1173,7 +1173,37 @@ const unsigned char TemplateMadt[] =
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000150    "........" */
     0x00,0x00,0x10,0x10,0x00,0x00,0x00,0x00,  /* 00000158    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000160    "........" */
-    0x00,0x00                                 /* 00000168    ".."       */
+    0x00,0x00,0x11,0x0F,0x01,0x01,0x00,0x00,  /* 00000168    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,  /* 00000170    "........" */
+    0x00,0x12,0x17,0x01,0x00,0x14,0xE0,0x1F,  /* 00000178    "........" */
+    0x00,0x00,0x00,0x00,0x80,0x00,0x02,0x03,  /* 00000180    "........" */
+    0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0xFF,  /* 00000188    "........" */
+    0x13,0x15,0x01,0x80,0x00,0x00,0xFB,0xFD,  /* 00000190    "........" */
+    0x0E,0x00,0x00,0x40,0x00,0x00,0x00,0x00,  /* 00000198    "...@...." */
+    0xFF,0x00,0x00,0x00,0x00,0x14,0x0D,0x01,  /* 000001A0    "........" */
+    0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000001A8    "........" */
+    0x00,0x00,0x15,0x13,0x01,0x00,0x00,0xF0,  /* 000001B0    "........" */
+    0x2F,0x00,0x00,0x00,0x00,0x40,0x00,0x00,  /* 000001B8    "/....@.." */
+    0x00,0xC0,0x00,0x00,0x00,0x16,0x11,0x01,  /* 000001C0    "........" */
+    0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,  /* 000001C8    "........" */
+    0x00,0x10,0x00,0x00,0x40,0x00,0x17,0x0E,  /* 000001D0    "....@..." */
+    0x01,0x00,0x20,0x00,0x10,0x00,0x00,0x00,  /* 000001D8    ".. ....." */
+    0x00,0x00,0x10,0x13,0x18,0x24,0x01,0x00,  /* 000001E0    "........" */
+    0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000001E8    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000001F0    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,  /* 000001F8    ".......(" */
+    0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,  /* 00000200    "........" */
+    0x19,0x10,0x01,0x00,0x00,0x00,0x00,0x00,  /* 00000208    "........" */
+    0xFF,0x00,0xFF,0x00,0x00,0x00,0x00,0x18,  /* 00000210    "........" */
+    0x1A,0x24,0x01,0x00,0x00,0x00,0x00,0x00,  /* 00000218    ".$......" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000220    "........" */
+    0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,  /* 00000228    "..`....." */
+    0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0x00,  /* 00000230    "........" */
+    0x00,0x80,0x00,0x00,0x1B,0x24,0x01,0x00,  /* 00000238    ".....$.." */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000240    "........" */
+    0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000248    "`.....`." */
+    0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x0C,  /* 00000250    "..`....." */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00   /* 00000258    "........" */
 };
 
 const unsigned char TemplateMcfg[] =
@@ -1718,8 +1748,8 @@ const unsigned char TemplateRgrt[] =
 
 const unsigned char TemplateRhct[] =
 {
-    0x52,0x48,0x43,0x54,0x7C,0x00,0x00,0x00,  /* 00000000    "RHCT|..." */
-    0x01,0x7D,0x4F,0x45,0x4D,0x43,0x41,0x00,  /* 00000008    "..OEMCA." */
+    0x52,0x48,0x43,0x54,0x96,0x00,0x00,0x00,  /* 00000000    "RHCT|..." */
+    0x01,0x24,0x4F,0x45,0x4D,0x43,0x41,0x00,  /* 00000008    "..OEMCA." */
     0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45,  /* 00000010    "TEMPLATE" */
     0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
     0x28,0x09,0x22,0x20,0x00,0x00,0x00,0x00,  /* 00000020    "... ...." */
@@ -1731,9 +1761,12 @@ const unsigned char TemplateRhct[] =
     0x72,0x5F,0x7A,0x69,0x66,0x65,0x6E,0x63,  /* 00000050    "r_zifenc" */
     0x65,0x69,0x5F,0x7A,0x62,0x61,0x5F,0x7A,  /* 00000058    "ei_zba_z" */
     0x62,0x62,0x5F,0x7A,0x62,0x63,0x5F,0x7A,  /* 00000060    "bb_zbc_z" */
-    0x62,0x73,0x00,0x00,0xFF,0xFF,0x10,0x00,  /* 00000068    "bs......" */
-    0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,  /* 00000070    "........" */
-    0x38,0x00,0x00,0x00                       /* 00000078    "........" */
+    0x62,0x73,0x00,0x00,0xFF,0xFF,0x18,0x00,  /* 00000068    "bs......" */
+    0x01,0x00,0x03,0x00,0x00,0x00,0x00,0x00,  /* 00000070    "........" */
+    0x38,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,  /* 00000078    "........" */
+    0x8E,0x00,0x00,0x00,0x01,0x00,0x0A,0x00,  /* 00000080    "........" */
+    0x01,0x00,0x00,0x06,0x06,0x06,0x02,0x00,  /* 00000088    "........" */
+    0x08,0x00,0x01,0x00,0x00,0x02             /* 00000090    "........" */
 };
 
 const unsigned char TemplateRsdp[] =
diff --git a/sys/contrib/dev/acpica/components/debugger/dbcmds.c b/sys/contrib/dev/acpica/components/debugger/dbcmds.c
index dca5468870ed..4c8f091f126c 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbcmds.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbcmds.c
@@ -157,7 +157,6 @@
 #include <contrib/dev/acpica/include/acresrc.h>
 #include <contrib/dev/acpica/include/actables.h>
 
-
 #define _COMPONENT          ACPI_CA_DEBUGGER
         ACPI_MODULE_NAME    ("dbcmds")
 
@@ -1291,6 +1290,64 @@ AcpiDbDisplayResources (
 }
 
 
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDbGenerateGed
+ *
+ * PARAMETERS:  GedArg              - Raw GED number, ascii string
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Simulate firing of a GED
+ *
+ ******************************************************************************/
+
+void
+AcpiDbGenerateInterrupt (
+    char *GsivArg)
+{
+    UINT32      GsivNumber;
+    ACPI_GED_HANDLER_INFO *GedInfo = AcpiGbl_GedHandlerList;
+
+	if (!GedInfo) {
+		AcpiOsPrintf ("No GED handling present\n");
+	}
+
+    GsivNumber = strtoul (GsivArg, NULL, 0);
+
+	while (GedInfo) {
+
+		if (GedInfo->IntId == GsivNumber) {
+			ACPI_OBJECT_LIST ArgList;
+			ACPI_OBJECT Arg0;
+			ACPI_HANDLE EvtHandle = GedInfo->EvtMethod;
+			ACPI_STATUS Status;
+
+			AcpiOsPrintf ("Evaluate GED _EVT (GSIV=%d)\n", GsivNumber);
+
+			if (!EvtHandle) {
+				AcpiOsPrintf ("Undefined _EVT method\n");
+				return;
+			}
+
+			Arg0.Integer.Type = ACPI_TYPE_INTEGER;
+			Arg0.Integer.Value = GsivNumber;
+
+			ArgList.Count = 1;
+			ArgList.Pointer = &Arg0;
+
+			Status = AcpiEvaluateObject (EvtHandle, NULL, &ArgList, NULL);
+			if (ACPI_FAILURE (Status))
+			{
+				AcpiOsPrintf ("Could not evaluate _EVT\n");
+				return;
+			}
+
+		}
+		GedInfo = GedInfo->Next;
+	}
+}
+
 #if (!ACPI_REDUCED_HARDWARE)
 /*******************************************************************************
  *
diff --git a/sys/contrib/dev/acpica/components/debugger/dbinput.c b/sys/contrib/dev/acpica/components/debugger/dbinput.c
index 84173d0c14e4..c900c4ec7acf 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbinput.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbinput.c
@@ -264,6 +264,7 @@ enum AcpiExDebuggerCommands
     CMD_THREADS,
 
     CMD_TEST,
+	CMD_INTERRUPT,
 #endif
 };
 
@@ -345,6 +346,7 @@ static const ACPI_DB_COMMAND_INFO   AcpiGbl_DbCommands[] =
     {"THREADS",      3},
 
     {"TEST",         1},
+    {"INTERRUPT",    1},
 #endif
     {NULL,           0}
 };
@@ -461,6 +463,7 @@ static const ACPI_DB_COMMAND_HELP   AcpiGbl_DbCommandHelp[] =
     {1, "  Gpes",                               "Display info on all GPE devices\n"},
     {1, "  Sci",                                "Generate an SCI\n"},
     {1, "  Sleep [SleepState]",                 "Simulate sleep/wake sequence(s) (0-5)\n"},
+    {1, "  Interrupt <GSIV>",                   "Simulate an interrupt\n"},
 #endif
     {0, NULL, NULL}
 };
@@ -1263,6 +1266,11 @@ AcpiDbCommandDispatch (
         AcpiOsPrintf ("Event command not implemented\n");
         break;
 
+	case CMD_INTERRUPT:
+
+		AcpiDbGenerateInterrupt (AcpiGbl_DbArgs[1]);
+		break;
+
     case CMD_GPE:
 
         AcpiDbGenerateGpe (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
diff --git a/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c b/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c
index 19e6eb884d0c..1df288229457 100644
--- a/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c
@@ -1112,7 +1112,7 @@ AcpiDmInterruptDescriptor (
     {
         AcpiDmIndent (Level + 1);
         AcpiOsPrintf ("0x%8.8X,\n",
-            (UINT32) Resource->ExtendedIrq.u.Interrupts[i]);
+            (UINT32) Resource->ExtendedIrq.Interrupts[i]);
     }
 
     AcpiDmIndent (Level);
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dswstate.c b/sys/contrib/dev/acpica/components/dispatcher/dswstate.c
index 2c8cfa8a57b8..9b49696423b8 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dswstate.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dswstate.c
@@ -310,8 +310,8 @@ AcpiDsResultPush (
     if (!Object)
     {
         ACPI_ERROR ((AE_INFO,
-            "Null Object! Obj=%p State=%p Num=%u",
-            Object, WalkState, WalkState->ResultCount));
+            "Null Object! State=%p Num=%u",
+            WalkState, WalkState->ResultCount));
         return (AE_BAD_PARAMETER);
     }
 
diff --git a/sys/contrib/dev/acpica/components/events/evevent.c b/sys/contrib/dev/acpica/components/events/evevent.c
index 7c2e21ae7375..70255aae9bd0 100644
--- a/sys/contrib/dev/acpica/components/events/evevent.c
+++ b/sys/contrib/dev/acpica/components/events/evevent.c
@@ -312,8 +312,7 @@ AcpiEvFixedEventInitialize (
         {
             Status = AcpiWriteBitRegister (
                 AcpiGbl_FixedEventInfo[i].EnableRegisterId,
-                (i == ACPI_EVENT_PCIE_WAKE) ?
-                ACPI_ENABLE_EVENT : ACPI_DISABLE_EVENT);
+                ACPI_DISABLE_EVENT);
             if (ACPI_FAILURE (Status))
             {
                 return (Status);
@@ -362,11 +361,6 @@ AcpiEvFixedEventDetect (
         return (IntStatus);
     }
 
-    if (FixedEnable & ACPI_BITMASK_PCIEXP_WAKE_DISABLE)
-         FixedEnable &= ~ACPI_BITMASK_PCIEXP_WAKE_DISABLE;
-    else
-         FixedEnable |= ACPI_BITMASK_PCIEXP_WAKE_DISABLE;
-
     ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS,
         "Fixed Event Block: Enable %08X Status %08X\n",
         FixedEnable, FixedStatus));
@@ -437,8 +431,7 @@ AcpiEvFixedEventDispatch (
     {
         (void) AcpiWriteBitRegister (
             AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
-            (Event == ACPI_EVENT_PCIE_WAKE) ?
-            ACPI_ENABLE_EVENT : ACPI_DISABLE_EVENT);
+            ACPI_DISABLE_EVENT);
 
         ACPI_ERROR ((AE_INFO,
             "No installed handler for fixed event - %s (%u), disabling",
diff --git a/sys/contrib/dev/acpica/components/executer/exserial.c b/sys/contrib/dev/acpica/components/executer/exserial.c
index 0f756dfaefd1..ef1eaf37daa1 100644
--- a/sys/contrib/dev/acpica/components/executer/exserial.c
+++ b/sys/contrib/dev/acpica/components/executer/exserial.c
@@ -505,8 +505,7 @@ AcpiExWriteSerialBus (
     /* Copy the input buffer data to the transfer buffer */
 
     Buffer = BufferDesc->Buffer.Pointer;
-    DataLength = (BufferLength < SourceDesc->Buffer.Length ?
-        BufferLength : SourceDesc->Buffer.Length);
+    DataLength = ACPI_MIN (BufferLength, SourceDesc->Buffer.Length);
     memcpy (Buffer, SourceDesc->Buffer.Pointer, DataLength);
 
     /* Lock entire transaction if requested */
diff --git a/sys/contrib/dev/acpica/components/hardware/hwsleep.c b/sys/contrib/dev/acpica/components/hardware/hwsleep.c
index 4a352fb9b7d2..7ddb6c2b30d3 100644
--- a/sys/contrib/dev/acpica/components/hardware/hwsleep.c
+++ b/sys/contrib/dev/acpica/components/hardware/hwsleep.c
@@ -475,17 +475,6 @@ AcpiHwLegacyWake (
             AcpiGbl_FixedEventInfo[ACPI_EVENT_SLEEP_BUTTON].StatusRegisterId,
             ACPI_CLEAR_STATUS);
 
-    /* Enable pcie wake event if support */
-    if ((AcpiGbl_FADT.Flags & ACPI_FADT_PCI_EXPRESS_WAKE))
-    {
-        (void) AcpiWriteBitRegister (
-            AcpiGbl_FixedEventInfo[ACPI_EVENT_PCIE_WAKE].EnableRegisterId,
-            ACPI_DISABLE_EVENT);
-        (void) AcpiWriteBitRegister (
-            AcpiGbl_FixedEventInfo[ACPI_EVENT_PCIE_WAKE].StatusRegisterId,
-            ACPI_CLEAR_STATUS);
-    }
-
     AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING);
     return_ACPI_STATUS (Status);
 }
diff --git a/sys/contrib/dev/acpica/components/parser/psopcode.c b/sys/contrib/dev/acpica/components/parser/psopcode.c
index 0ec2590cc42f..a36148ebcd31 100644
--- a/sys/contrib/dev/acpica/components/parser/psopcode.c
+++ b/sys/contrib/dev/acpica/components/parser/psopcode.c
@@ -436,7 +436,7 @@ const ACPI_OPCODE_INFO    AcpiGbl_AmlOpInfo[AML_NUM_OPCODES] =
 
 /* ACPI 3.0 opcodes */
 
-/* 7E */ ACPI_OP ("Timer",              ARGP_TIMER_OP,             ARGI_TIMER_OP,              ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_0A_0T_1R,   AML_FLAGS_EXEC_0A_0T_1R),
+/* 7E */ ACPI_OP ("Timer",              ARGP_TIMER_OP,             ARGI_TIMER_OP,              ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_0A_0T_1R,   AML_FLAGS_EXEC_0A_0T_1R | AML_NO_OPERAND_RESOLVE),
 
 /* ACPI 5.0 opcodes */
 
diff --git a/sys/contrib/dev/acpica/components/resources/rsaddr.c b/sys/contrib/dev/acpica/components/resources/rsaddr.c
index 3a719a80d737..4a2d02f4562f 100644
--- a/sys/contrib/dev/acpica/components/resources/rsaddr.c
+++ b/sys/contrib/dev/acpica/components/resources/rsaddr.c
@@ -431,11 +431,11 @@ AcpiRsGetAddressCommon (
     ACPI_RESOURCE           *Resource,
     AML_RESOURCE            *Aml)
 {
+
     /* Avoid undefined behavior: member access within misaligned address */
 
     AML_RESOURCE_ADDRESS Address;
     memcpy(&Address, Aml, sizeof(Address));
-
     ACPI_FUNCTION_ENTRY();
 
     /* Validate the Resource Type */
diff --git a/sys/contrib/dev/acpica/components/resources/rscreate.c b/sys/contrib/dev/acpica/components/resources/rscreate.c
index 60694d470b72..5cb7e0923c16 100644
--- a/sys/contrib/dev/acpica/components/resources/rscreate.c
+++ b/sys/contrib/dev/acpica/components/resources/rscreate.c
@@ -475,9 +475,9 @@ AcpiRsCreatePciRoutingTable (
                 /* Use *remaining* length of the buffer as max for pathname */
 
                 PathBuffer.Length = OutputBuffer->Length -
-                    (UINT32) ((UINT8 *) UserPrt->u.Source -
+                    (UINT32) ((UINT8 *) UserPrt->Source -
                     (UINT8 *) OutputBuffer->Pointer);
-                PathBuffer.Pointer = UserPrt->u.Source;
+                PathBuffer.Pointer = UserPrt->Source;
 
                 Status = AcpiNsHandleToPathname (
                     (ACPI_HANDLE) Node, &PathBuffer, FALSE);
*** 637 LINES SKIPPED ***