aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2021-09-30 20:23:21 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2021-10-01 02:05:52 +0000
commit1b7a2680fba589daf6f700565214919cb941ab56 (patch)
treef4662f1d0f995fc0ad9662fb6f46f19a30bd5408
parentce73f768b76486b1562f207a6fc1cef87065418a (diff)
downloadsrc-1b7a2680fba589daf6f700565214919cb941ab56.tar.gz
src-1b7a2680fba589daf6f700565214919cb941ab56.zip
Import ACPICA 20210930
(cherry picked from commit c509b6ab0d7e5bafc5348b08653b8738bd40716e)
-rw-r--r--sys/contrib/dev/acpica/changes.txt50
-rw-r--r--sys/contrib/dev/acpica/common/dmtable.c58
-rw-r--r--sys/contrib/dev/acpica/common/dmtbdump2.c300
-rw-r--r--sys/contrib/dev/acpica/common/dmtbdump3.c5
-rw-r--r--sys/contrib/dev/acpica/common/dmtbinfo2.c183
-rw-r--r--sys/contrib/dev/acpica/common/dmtbinfo3.c28
-rw-r--r--sys/contrib/dev/acpica/compiler/aslmethod.c70
-rw-r--r--sys/contrib/dev/acpica/compiler/dtcompiler.h4
-rw-r--r--sys/contrib/dev/acpica/compiler/dttable2.c5
-rw-r--r--sys/contrib/dev/acpica/compiler/dtutils.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/preprocess.h2
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsfield.c2
-rw-r--r--sys/contrib/dev/acpica/components/hardware/hwesleep.c7
-rw-r--r--sys/contrib/dev/acpica/components/hardware/hwsleep.c10
-rw-r--r--sys/contrib/dev/acpica/components/hardware/hwxfsleep.c6
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utosi.c1
-rw-r--r--sys/contrib/dev/acpica/include/acdisasm.h25
-rw-r--r--sys/contrib/dev/acpica/include/acglobal.h2
-rw-r--r--sys/contrib/dev/acpica/include/acpixf.h2
-rw-r--r--sys/contrib/dev/acpica/include/actbinfo.h14
-rw-r--r--sys/contrib/dev/acpica/include/actbl2.h289
-rw-r--r--sys/contrib/dev/acpica/include/actbl3.h10
-rw-r--r--sys/contrib/dev/acpica/include/actypes.h1
23 files changed, 1005 insertions, 71 deletions
diff --git a/sys/contrib/dev/acpica/changes.txt b/sys/contrib/dev/acpica/changes.txt
index 64ca5cccdce4..ad2323971aea 100644
--- a/sys/contrib/dev/acpica/changes.txt
+++ b/sys/contrib/dev/acpica/changes.txt
@@ -1,4 +1,54 @@
----------------------------------------
+30 September 2021. Summary of changes for version 20210930:
+
+This release is available at https://acpica.org/downloads
+
+1) ACPICA kernel-resident subsystem:
+
+Hardware: Avoid evaluating methods too early during system resume. During
+wakeup from system-wide sleep states, AcpiGetSleepTypeData() is called
+and it tries to get memory from the OS in order to evaluate a control
+method, but if KFENCE is enabled in the Linux kernel, the memory
+allocation attempt causes an IRQ work to be queued and a self-IPI to be
+sent to the CPU running the code which requires the memory controller to
+be ready, so if that happens too early in the wakeup path, it doesn't
+work.
+
+Prevent that from taking place by calling AcpiGetSleepTypeData() for S0
+upfront, when preparing to enter a given sleep state, and saving the data
+obtained by it for later use during system wakeup.
+
+Added a new _OSI string, "Windows 2020". Posted by superm1.
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iASL compiler: Updated the check for usage of _CRS, _DIS, _PRS, and _SRS
+objects:
+New/latest rules: Under a Device Object:
+ 1) If _PRS is present, must have _CRS and _SRS
+ 2) If _SRS is present, must have _PRS (_PRS requires _CRS and
+_SRS)
+ 3) If _DIS is present, must have _SRS (_SRS requires _PRS, _PRS
+requires _CRS and _SRS)
+ 4) If _SRS is present, probably should have a _DIS (Remark only)
+
+iASL table disassembler: Added disassembly support for the NHLT ACPI
+table. Note: support for Vendor-defined microphone arrays and SNR
+extensions are not supported at this time -- mostly due to a lack of
+example tables. Actual compiler support for NHLT is forthcoming.
+
+Added a new subtable type for ACPI 6.4 SRAT Generic Port Affinity. It
+uses the same subtable structure as the existing Generic Initiator
+Affinity type.
+
+Added the flag for online capable in the MADT, introduced in ACPI 6.3.
+Posted by superm1.
+
+3) ACPICA documentation: Updated the legal info (that appears at the
+start of the Documents) to clarify distribution rights that are granted.
+
+
+----------------------------------------
30 July 2021. Summary of changes for version 20210730:
This release is available at https://acpica.org/downloads
diff --git a/sys/contrib/dev/acpica/common/dmtable.c b/sys/contrib/dev/acpica/common/dmtable.c
index cbef83364e73..5e3f2ef748da 100644
--- a/sys/contrib/dev/acpica/common/dmtable.c
+++ b/sys/contrib/dev/acpica/common/dmtable.c
@@ -417,6 +417,26 @@ static const char *AcpiDmNfitSubnames[] =
"Unknown Subtable Type" /* Reserved */
};
+static const char *AcpiDmNhltLinkTypeNames[] =
+{
+ "Reserved for HD-Audio", /* ACPI_NHLT_RESERVED_HD_AUDIO */
+ "Reserved for DSP", /* ACPI_NHLT_RESERVED_DSP */
+ "Type PDM", /* ACPI_NHLT_PDM */
+ "Type SSP", /* ACPI_NHLT_SSP */
+ "Reserved for SlimBus", /* ACPI_NHLT_RESERVED_SLIMBUS */
+ "Reserved for SoundWire", /* ACPI_NHLT_RESERVED_SOUNDWIRE */
+ "Unknown Link Type" /* Reserved */
+};
+
+static const char *AcpiDmNhltDirectionNames[] =
+{
+ "Render", /* ACPI_NHLT_DIR_RENDER */
+ "Capture", /* ACPI_NHLT_DIR_CAPTURE */
+ "Render with Loopback", /* ACPI_NHLT_DIR_RENDER_LOOPBACK */
+ "Feedback for Render", /* ACPI_NHLT_DIR_RENDER_FEEDBACK */
+ "Unknown Direction" /* Reserved */
+};
+
static const char *AcpiDmPcctSubnames[] =
{
"Generic Communications Subspace", /* ACPI_PCCT_TYPE_GENERIC_SUBSPACE */
@@ -473,6 +493,7 @@ static const char *AcpiDmSratSubnames[] =
"GICC Affinity",
"GIC ITS Affinity", /* Acpi 6.2 */
"Generic Initiator Affinity", /* Acpi 6.3 */
+ "Generic Port Affinity", /* Acpi 6.4 */
"Unknown Subtable Type" /* Reserved */
};
@@ -614,6 +635,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] =
{ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct},
{ACPI_SIG_MSDM, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateMsdm},
{ACPI_SIG_NFIT, AcpiDmTableInfoNfit, AcpiDmDumpNfit, DtCompileNfit, TemplateNfit},
+ {ACPI_SIG_NHLT, AcpiDmTableInfoNhlt, AcpiDmDumpNhlt, NULL, NULL},
{ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct},
{ACPI_SIG_PDTT, AcpiDmTableInfoPdtt, AcpiDmDumpPdtt, DtCompilePdtt, TemplatePdtt},
{ACPI_SIG_PHAT, NULL, AcpiDmDumpPhat, DtCompilePhat, TemplatePhat},
@@ -1050,6 +1072,8 @@ AcpiDmDumpTable (
case ACPI_DMT_IVRS_DE:
case ACPI_DMT_GTDT:
case ACPI_DMT_MADT:
+ case ACPI_DMT_NHLT1:
+ case ACPI_DMT_NHLT1a:
case ACPI_DMT_PCCT:
case ACPI_DMT_PMTT:
case ACPI_DMT_PPTT:
@@ -1138,6 +1162,11 @@ AcpiDmDumpTable (
ByteLength = 16;
break;
+ case ACPI_DMT_BUF18:
+
+ ByteLength = 18;
+ break;
+
case ACPI_DMT_BUF128:
ByteLength = 128;
@@ -1343,6 +1372,7 @@ AcpiDmDumpTable (
case ACPI_DMT_BUF10:
case ACPI_DMT_BUF12:
case ACPI_DMT_BUF16:
+ case ACPI_DMT_BUF18:
case ACPI_DMT_BUF128:
/*
* Buffer: Size depends on the opcode and was set above.
@@ -1790,6 +1820,34 @@ AcpiDmDumpTable (
AcpiDmNfitSubnames[Temp16]);
break;
+ case ACPI_DMT_NHLT1:
+
+ /* NHLT link types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_NHLT_TYPE_RESERVED)
+ {
+ Temp8 = ACPI_NHLT_TYPE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmNhltLinkTypeNames[Temp8]);
+ break;
+
+ case ACPI_DMT_NHLT1a:
+
+ /* NHLT direction */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_NHLT_DIR_RESERVED)
+ {
+ Temp8 = ACPI_NHLT_DIR_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmNhltDirectionNames[Temp8]);
+ break;
+
case ACPI_DMT_PCCT:
/* PCCT subtable types */
diff --git a/sys/contrib/dev/acpica/common/dmtbdump2.c b/sys/contrib/dev/acpica/common/dmtbdump2.c
index a13e77e5c03b..e3ad649479b0 100644
--- a/sys/contrib/dev/acpica/common/dmtbdump2.c
+++ b/sys/contrib/dev/acpica/common/dmtbdump2.c
@@ -1469,6 +1469,306 @@ NextSubtable:
/*******************************************************************************
*
+ * FUNCTION: AcpiDmDumpNhlt
+ *
+ * PARAMETERS: Table - A NHLT table
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Format the contents of an NHLT.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmDumpNhlt (
+ ACPI_TABLE_HEADER *Table)
+{
+ ACPI_STATUS Status;
+ UINT32 Offset;
+ UINT32 TableLength = Table->Length;
+ UINT32 EndpointCount;
+ UINT8 FormatsCount;
+ ACPI_NHLT_ENDPOINT *Subtable;
+ ACPI_NHLT_FORMAT_CONFIG *FormatSubtable;
+ ACPI_TABLE_NHLT *InfoTable;
+ UINT32 CapabilitiesSize;
+ UINT32 i;
+ UINT32 j;
+ UINT32 k;
+ UINT32 EndpointEndOffset;
+ UINT8 ConfigType = 0;
+ UINT8 ArrayType;
+ ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A *DevSpecific;
+ ACPI_NHLT_FORMATS_CONFIG *FormatsConfig;
+ ACPI_NHLT_LINUX_SPECIFIC_COUNT *Count;
+ ACPI_NHLT_LINUX_SPECIFIC_DATA *LinuxData;
+
+
+ /* Main table */
+
+ AcpiOsPrintf ("/* Main table */\n");
+
+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoNhlt);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Get the Endpoint Descriptor Count */
+
+ InfoTable = ACPI_ADD_PTR (ACPI_TABLE_NHLT, Table, 0);
+ EndpointCount = InfoTable->EndpointCount;
+
+ /* Subtables */
+
+ Offset = sizeof (ACPI_TABLE_NHLT);
+
+ while (Offset < TableLength)
+ {
+ /* A variable number of Endpoint Descriptors - process each */
+
+ for (i = 0; i < EndpointCount; i++)
+ {
+ /* Do the Endpoint Descriptor table */
+
+ Subtable = ACPI_ADD_PTR (ACPI_NHLT_ENDPOINT, Table, Offset);
+ if (Subtable->DescriptorLength > TableLength)
+ {
+ Offset += 1;
+ AcpiOsPrintf ("\n/* Endpoint Descriptor Length larger than"
+ " table size: %X, table %X, adjusting table offset (+1) */\n",
+ Subtable->DescriptorLength, TableLength);
+
+ Subtable = ACPI_ADD_PTR (ACPI_NHLT_ENDPOINT, Table, Offset);
+ }
+
+ AcpiOsPrintf ("\n/* Endpoint Descriptor #%u */\n", i+1);
+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
+ Subtable->DescriptorLength, AcpiDmTableInfoNhlt0);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ EndpointEndOffset = Subtable->DescriptorLength + Offset;
+
+ /* Check for endpoint descriptor beyond end-of-table */
+
+ if (Subtable->DescriptorLength > TableLength)
+ {
+ AcpiOsPrintf ("\n/* Endpoint Descriptor Length larger than table size: %X, table %X */\n",
+ Subtable->DescriptorLength, TableLength);
+ }
+ Offset += sizeof (ACPI_NHLT_ENDPOINT);
+ Subtable = ACPI_ADD_PTR (ACPI_NHLT_ENDPOINT, Table, Offset);
+
+ /* Do the Device Specific table */
+
+ AcpiOsPrintf ("\n/* Endpoint Device_Specific_Config table */\n");
+ DevSpecific = ACPI_CAST_PTR (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A, Subtable);
+ CapabilitiesSize = DevSpecific->CapabilitiesSize;
+
+ /* Different subtables based upon capabilities_size */
+
+ switch (CapabilitiesSize)
+ {
+ case 0:
+ Status = AcpiDmDumpTable (TableLength, Offset, DevSpecific,
+ sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B), AcpiDmTableInfoNhlt5b);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ Offset += sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B);
+ break;
+
+ case 1:
+ Status = AcpiDmDumpTable (TableLength, Offset, DevSpecific,
+ sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_C), AcpiDmTableInfoNhlt5c);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ Offset += sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_C);
+ break;
+
+ case 2:
+ Status = AcpiDmDumpTable (TableLength, Offset, DevSpecific,
+ sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG), AcpiDmTableInfoNhlt5);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ Offset += sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG);
+ break;
+
+ case 3:
+ ConfigType = DevSpecific->ConfigType;
+ ArrayType = DevSpecific->ArrayType;
+
+ Status = AcpiDmDumpTable (TableLength, Offset, DevSpecific,
+ sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A), AcpiDmTableInfoNhlt5a);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Capabilities Size == 3 */
+ Offset += sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A);
+
+ /* Check for a vendor-defined mic array */
+
+ if ((ConfigType == ACPI_NHLT_TYPE_MIC_ARRAY) && ((ArrayType & ARRAY_TYPE_MASK) == VENDOR_DEFINED))
+ {
+ /* Vendor-defined microphone array */
+
+ AcpiOsPrintf ("\n/* Vendor-defined microphone array */\n");
+
+ Status = AcpiDmDumpTable (TableLength, Offset, DevSpecific,
+ sizeof (ACPI_NHLT_VENDOR_MIC_CONFIG), AcpiDmTableInfoNhlt6);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ Offset += sizeof (ACPI_NHLT_VENDOR_MIC_CONFIG);
+ }
+ break;
+
+ default:
+ Status = AcpiDmDumpTable (TableLength, Offset, DevSpecific,
+ sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B), AcpiDmTableInfoNhlt5b);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ Offset += sizeof (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B);
+ Status = AcpiDmDumpTable (TableLength, Offset, DevSpecific,
+ CapabilitiesSize, AcpiDmTableInfoNhlt3a);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ Offset += CapabilitiesSize;
+ break;
+ }
+
+ /* Do the Formats_Config table */
+
+ FormatsConfig = ACPI_ADD_PTR (ACPI_NHLT_FORMATS_CONFIG, Table, Offset);
+ FormatsCount = FormatsConfig->FormatsCount;
+
+ AcpiOsPrintf ("\n/* Formats_Config table */\n");
+
+ Status = AcpiDmDumpTable (TableLength, Offset, FormatsConfig,
+ sizeof (ACPI_NHLT_FORMATS_CONFIG), AcpiDmTableInfoNhlt4);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ Offset += sizeof (ACPI_NHLT_FORMATS_CONFIG);
+
+ /* A variable number of Format_Config Descriptors - process each */
+
+ for (j = 0; j < FormatsCount; j++)
+ {
+ FormatSubtable = ACPI_ADD_PTR (ACPI_NHLT_FORMAT_CONFIG, Table, Offset);
+ CapabilitiesSize = FormatSubtable->CapabilitySize;
+
+ /* Do the Wave_extensible struct */
+
+ AcpiOsPrintf ("\n/* Wave_Format_Extensible table #%u */\n", j+1);
+ Status = AcpiDmDumpTable (TableLength, Offset, FormatSubtable,
+ sizeof (ACPI_NHLT_FORMAT_CONFIG), AcpiDmTableInfoNhlt3);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ Offset += sizeof (ACPI_NHLT_WAVE_EXTENSIBLE);
+
+ /* Do the Capabilities array */
+
+ Offset += sizeof (UINT32);
+ AcpiOsPrintf ("\n/* Specific_Config table #%u */\n", j+1);
+ FormatSubtable = ACPI_ADD_PTR (ACPI_NHLT_FORMAT_CONFIG, Table, Offset);
+ Status = AcpiDmDumpTable (TableLength, Offset, FormatSubtable,
+ CapabilitiesSize, AcpiDmTableInfoNhlt3a);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ Offset += CapabilitiesSize;
+ }
+
+ /*
+ * If we are not done with the Endpoint(s) yet, then there must be
+ * some Linux-specific structure(s) yet to be processed.
+ */
+ if (Offset < EndpointEndOffset)
+ {
+ AcpiOsPrintf ("\n");
+ Count = ACPI_ADD_PTR (ACPI_NHLT_LINUX_SPECIFIC_COUNT, Table, Offset);
+ Status = AcpiDmDumpTable (TableLength, Offset, Count,
+ sizeof (ACPI_NHLT_LINUX_SPECIFIC_COUNT), AcpiDmTableInfoNhlt7);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ Offset += sizeof (ACPI_NHLT_LINUX_SPECIFIC_COUNT);
+
+ /* Variable number of linux-specific structures */
+
+ for (k = 0; k < Count->StructureCount; k++)
+ {
+ LinuxData = ACPI_ADD_PTR (ACPI_NHLT_LINUX_SPECIFIC_DATA, Table, Offset);
+
+ AcpiOsPrintf ("\n/* Linux-specific structure #%u */\n", k+1);
+
+ Status = AcpiDmDumpTable (TableLength, Offset, LinuxData,
+ sizeof (ACPI_NHLT_LINUX_SPECIFIC_DATA), AcpiDmTableInfoNhlt7a);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ Offset += sizeof (ACPI_NHLT_LINUX_SPECIFIC_DATA);
+ }
+
+ /* Should be at the end of the Endpoint structure. Skip any extra bytes */
+
+ if (Offset < EndpointEndOffset)
+ {
+ AcpiOsPrintf ("\n/* Endpoint descriptor ended before endpoint size was reached. "
+ "skipped %X input bytes, current offset: %X, Endpoint End Offset: %X */\n",
+ EndpointEndOffset - Offset, Offset, EndpointEndOffset);
+ AcpiUtDumpBuffer (((UINT8 *)Table)+Offset,
+ EndpointEndOffset - Offset, DB_BYTE_DISPLAY, Offset);
+ Offset = EndpointEndOffset;
+ }
+ }
+ }
+
+ /* Emit the table terminator (if present) */
+
+ if (Offset == TableLength - sizeof (ACPI_NHLT_TABLE_TERMINATOR))
+ {
+ LinuxData = ACPI_ADD_PTR (ACPI_NHLT_LINUX_SPECIFIC_DATA, Table, Offset);
+ AcpiOsPrintf ("\n/* Table terminator structure */\n");
+
+ Status = AcpiDmDumpTable (TableLength, Offset, LinuxData,
+ sizeof (ACPI_NHLT_TABLE_TERMINATOR), AcpiDmTableInfoNhlt8);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ }
+
+ return;
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmDumpPcct
*
* PARAMETERS: Table - A PCCT table
diff --git a/sys/contrib/dev/acpica/common/dmtbdump3.c b/sys/contrib/dev/acpica/common/dmtbdump3.c
index 26cfe2f9b695..f23aeaf8ee64 100644
--- a/sys/contrib/dev/acpica/common/dmtbdump3.c
+++ b/sys/contrib/dev/acpica/common/dmtbdump3.c
@@ -338,6 +338,11 @@ AcpiDmDumpSrat (
InfoTable = AcpiDmTableInfoSrat5;
break;
+ case ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY:
+
+ InfoTable = AcpiDmTableInfoSrat6;
+ break;
+
default:
AcpiOsPrintf ("\n**** Unknown SRAT subtable type 0x%X\n",
Subtable->Type);
diff --git a/sys/contrib/dev/acpica/common/dmtbinfo2.c b/sys/contrib/dev/acpica/common/dmtbinfo2.c
index 3eb4e44902d3..52173c5f8a0e 100644
--- a/sys/contrib/dev/acpica/common/dmtbinfo2.c
+++ b/sys/contrib/dev/acpica/common/dmtbinfo2.c
@@ -1196,6 +1196,189 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoNfit7[] =
/*******************************************************************************
*
+ * NHLT - Non HD Audio Link Table. Conforms to Intel Smart Sound Technology
+ * NHLT Specification, January 2020 Revision 0.8.1
+ *
+ ******************************************************************************/
+
+/* Main table */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt[] =
+{
+ {ACPI_DMT_UINT8, ACPI_NHLT_OFFSET (EndpointCount), "Endpoint Count", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Endpoint config */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt0[] =
+{
+ {ACPI_DMT_UINT32, ACPI_NHLT0_OFFSET (DescriptorLength), "Descriptor Length", DT_LENGTH},
+ {ACPI_DMT_NHLT1, ACPI_NHLT0_OFFSET (LinkType), "Link Type", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT0_OFFSET (InstanceId), "Instance Id", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT0_OFFSET (VendorId), "Vendor Id", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT0_OFFSET (DeviceId), "Device Id", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT0_OFFSET (RevisionId), "Revision Id", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT0_OFFSET (SubsystemId), "Subsystem Id", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT0_OFFSET (DeviceType), "Device Type", 0},
+ {ACPI_DMT_NHLT1a, ACPI_NHLT0_OFFSET (Direction), "Direction", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT0_OFFSET (VirtualBusId), "Virtual Bus Id", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Device_Specific config */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt1[] =
+{
+ {ACPI_DMT_UINT32, ACPI_NHLT1_OFFSET (CapabilitiesSize), "Capabilities Size", DT_LENGTH},
+ {ACPI_DMT_UINT8, ACPI_NHLT1_OFFSET (VirtualSlot), "Virtual Slot", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT1_OFFSET (ConfigType), "Config Type", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Wave Format Extensible */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt2[] =
+{
+ {ACPI_DMT_UINT16, ACPI_NHLT2_OFFSET (FormatTag), "Format Tag", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT2_OFFSET (ChannelCount), "Channel Count", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT2_OFFSET (SamplesPerSec), "Samples Per Second", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT2_OFFSET (AvgBytesPerSec), "Average Bytes Per Second", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT2_OFFSET (BlockAlign), "Block Alignment", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT2_OFFSET (BitsPerSample), "Bits Per Sample", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT2_OFFSET (ExtraFormatSize), "Extra Format Size", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT2_OFFSET (ValidBitsPerSample), "Valid Bits Per Sample", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT2_OFFSET (ChannelMask), "Channel Mask", 0},
+ {ACPI_DMT_UUID, ACPI_NHLT2_OFFSET (SubFormatGuid), "SubFormat GUID", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Format Config */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt3[] =
+{
+ {ACPI_DMT_UINT16, ACPI_NHLT3_OFFSET (Format.FormatTag), "Format Tag", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT3_OFFSET (Format.ChannelCount), "Channel Count", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT3_OFFSET (Format.SamplesPerSec), "Samples Per Second", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT3_OFFSET (Format.AvgBytesPerSec), "Average Bytes Per Second", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT3_OFFSET (Format.BlockAlign), "Block Alignment", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT3_OFFSET (Format.BitsPerSample), "Bits Per Sample", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT3_OFFSET (Format.ExtraFormatSize), "Extra Format Size", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT3_OFFSET (Format.ValidBitsPerSample), "Valid Bits Per Sample", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT3_OFFSET (Format.ChannelMask), "Channel Mask", 0},
+ {ACPI_DMT_UUID, ACPI_NHLT3_OFFSET (Format.SubFormatGuid), "SubFormat GUID", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT3_OFFSET (CapabilitySize), "Capabilities Length", DT_LENGTH},
+ ACPI_DMT_TERMINATOR
+};
+
+/*
+ * We treat the binary Capabilities field as its own subtable (to make
+ * ACPI_DMT_RAW_BUFFER work properly).
+ */
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt3a[] =
+{
+ {ACPI_DMT_RAW_BUFFER, 0, "Capabilities", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+
+/* Formats Config */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt4[] =
+{
+ {ACPI_DMT_UINT8, ACPI_NHLT4_OFFSET (FormatsCount), "Formats Count", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Specific Config, CapabilitiesSize == 2 */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5[] =
+{
+ {ACPI_DMT_UINT32, ACPI_NHLT5_OFFSET (CapabilitiesSize), "Capabilities Size", DT_LENGTH},
+ {ACPI_DMT_UINT8, ACPI_NHLT5_OFFSET (VirtualSlot), "Virtual Slot", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT5_OFFSET (ConfigType), "Config Type", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Specific Config, CapabilitiesSize == 3 */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5a[] =
+{
+ {ACPI_DMT_UINT32, ACPI_NHLT5A_OFFSET (CapabilitiesSize), "Capabilities Size", DT_LENGTH},
+ {ACPI_DMT_UINT8, ACPI_NHLT5A_OFFSET (VirtualSlot), "Virtual Slot", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT5A_OFFSET (ConfigType), "Config Type", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT5A_OFFSET (ArrayType), "Array Type", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Specific Config, CapabilitiesSize == 0 */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5b[] =
+{
+ {ACPI_DMT_UINT32, ACPI_NHLT5B_OFFSET (CapabilitiesSize), "Capabilities Size", DT_LENGTH},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Specific Config, CapabilitiesSize == 1 */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5c[] =
+{
+ {ACPI_DMT_UINT32, ACPI_NHLT5C_OFFSET (CapabilitiesSize), "Capabilities Size", DT_LENGTH},
+ {ACPI_DMT_UINT8, ACPI_NHLT5C_OFFSET (VirtualSlot), "Virtual Slot", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Microphone array Config */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt6[] =
+{
+ {ACPI_DMT_UINT8, ACPI_NHLT6_OFFSET (Type), "Type", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT6_OFFSET (Panel), "Panel", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (SpeakerPositionDistance), "Speaker Position Distance", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (HorizontalOffset), "Horizontal Offset", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (VerticalOffset), "Vertical Offset", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT6_OFFSET (FrequencyLowBand), "Frequency Low Band", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT6_OFFSET (FrequencyHighBand), "Frequency High Band", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (DirectionAngle), "Direction Angle", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (ElevationAngle), "Elevation Angle", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (WorkVerticalAngleBegin), "Work Vertical Angle Begin", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (WorkVerticalAngleEnd), "Work Vertical Angle End", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (WorkHorizontalAngleBegin), "Work Horizontal Angle Begin", 0},
+ {ACPI_DMT_UINT16, ACPI_NHLT6_OFFSET (WorkHorizontalAngleEnd), "Work Horizontal Angle End", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Number of Linux-specific structures */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt7[] =
+{
+ {ACPI_DMT_UINT8, ACPI_NHLT7_OFFSET (StructureCount), "Linux-specific struct count", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* The Linux-specific structure */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt7a[] =
+{
+ {ACPI_DMT_BUF16, ACPI_NHLT7A_OFFSET (DeviceId), "Device ID", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT7A_OFFSET (DeviceInstanceId), "Device Instance ID", 0},
+ {ACPI_DMT_UINT8, ACPI_NHLT7A_OFFSET (DevicePortId), "Device Port ID", 0},
+ {ACPI_DMT_BUF18, ACPI_NHLT7A_OFFSET (Filler), "Specific Data", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Table terminator (may or may not be present) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt8[] =
+{
+ {ACPI_DMT_UINT32, ACPI_NHLT8_OFFSET (TerminatorValue), "Terminator Value", 0},
+ {ACPI_DMT_UINT32, ACPI_NHLT8_OFFSET (TerminatorSignature), "Terminator Signature", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
* PCCT - Platform Communications Channel Table (ACPI 5.0)
*
******************************************************************************/
diff --git a/sys/contrib/dev/acpica/common/dmtbinfo3.c b/sys/contrib/dev/acpica/common/dmtbinfo3.c
index 9b2e30814921..63c49f2680e4 100644
--- a/sys/contrib/dev/acpica/common/dmtbinfo3.c
+++ b/sys/contrib/dev/acpica/common/dmtbinfo3.c
@@ -368,21 +368,33 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSrat4[] =
ACPI_DMT_TERMINATOR
};
+/* Common SRAT structure for Generic Affinity Subtables */
+
+#define ACPI_DM_SRAT_GENERIC_AFFINITY \
+ {ACPI_DMT_UINT8, ACPI_SRAT5_OFFSET (Reserved), "Reserved1", 0}, \
+ {ACPI_DMT_UINT8, ACPI_SRAT5_OFFSET (DeviceHandleType), "Device Handle Type", 0}, \
+ {ACPI_DMT_UINT32, ACPI_SRAT5_OFFSET (ProximityDomain), "Proximity Domain", 0}, \
+ {ACPI_DMT_BUF16, ACPI_SRAT5_OFFSET (DeviceHandle), "Device Handle", 0}, \
+ {ACPI_DMT_UINT32, ACPI_SRAT5_OFFSET (Flags), "Flags (decoded below)", DT_FLAG}, \
+ {ACPI_DMT_FLAG0, ACPI_SRAT5_FLAG_OFFSET (Flags,0), "Enabled", 0}, \
+ {ACPI_DMT_FLAG1, ACPI_SRAT5_FLAG_OFFSET (Flags,0), "Architectural Transactions", 0}, \
+ {ACPI_DMT_UINT32, ACPI_SRAT5_OFFSET (Reserved1), "Reserved2", 0}
+
/* 5: Generic Initiator Affinity Structure (ACPI 6.3) */
ACPI_DMTABLE_INFO AcpiDmTableInfoSrat5[] =
{
- {ACPI_DMT_UINT8, ACPI_SRAT5_OFFSET (Reserved), "Reserved1", 0},
- {ACPI_DMT_UINT8, ACPI_SRAT5_OFFSET (DeviceHandleType), "Device Handle Type", 0},
- {ACPI_DMT_UINT32, ACPI_SRAT5_OFFSET (ProximityDomain), "Proximity Domain", 0},
- {ACPI_DMT_BUF16, ACPI_SRAT5_OFFSET (DeviceHandle), "Device Handle", 0},
- {ACPI_DMT_UINT32, ACPI_SRAT5_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
- {ACPI_DMT_FLAG0, ACPI_SRAT5_FLAG_OFFSET (Flags,0), "Enabled", 0},
- {ACPI_DMT_FLAG1, ACPI_SRAT5_FLAG_OFFSET (Flags,0), "Architectural Transactions", 0},
- {ACPI_DMT_UINT32, ACPI_SRAT5_OFFSET (Reserved1), "Reserved2", 0},
+ ACPI_DM_SRAT_GENERIC_AFFINITY,
ACPI_DMT_TERMINATOR
};
+/* 6: Generic Port Affinity Structure (ACPI 6.4) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoSrat6[] =
+{
+ ACPI_DM_SRAT_GENERIC_AFFINITY,
+ ACPI_DMT_TERMINATOR
+};
/*******************************************************************************
*
diff --git a/sys/contrib/dev/acpica/compiler/aslmethod.c b/sys/contrib/dev/acpica/compiler/aslmethod.c
index a0cb02ae6dc8..889f2baf5e95 100644
--- a/sys/contrib/dev/acpica/compiler/aslmethod.c
+++ b/sys/contrib/dev/acpica/compiler/aslmethod.c
@@ -559,74 +559,56 @@ MtMethodAnalysisWalkBegin (
*
* Under the Device Object:
*
- * 1) If _DIS is present, must have a _CRS, _PRS, and _SRS
- * 2) If _PRS is present, must have a _CRS and _SRS
- * 3) If _SRS is present, must have a _CRS and _PRS
+ * 1) If _PRS present, must have _CRS and _SRS
+ * 2) If _SRS present, must have _PRS (_PRS requires _CRS and _SRS)
+ * 3) If _DIS present, must have _SRS (_SRS requires _PRS, _PRS requires _CRS and _SRS)
+ * 4) If _SRS present, probably should have a _DIS (Remark only)
*/
CrsExists = ApFindNameInDeviceTree (METHOD_NAME__CRS, Op);
DisExists = ApFindNameInDeviceTree (METHOD_NAME__DIS, Op);
PrsExists = ApFindNameInDeviceTree (METHOD_NAME__PRS, Op);
SrsExists = ApFindNameInDeviceTree (METHOD_NAME__SRS, Op);
- /* 1) If _DIS is present, must have a _CRS, _PRS, and _SRS */
+ /* 1) If _PRS is present, must have a _CRS and _SRS */
- if (DisExists)
+ if (PrsExists)
{
if (!CrsExists)
{
AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
- "_DIS is missing a _CRS, requires a _CRS, _PRS, and a _SRS");
- }
-
- if (!PrsExists)
- {
- AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
- "_DIS is missing a _PRS, requires a _CRS, _PRS, and a _SRS");
+ "Device has a _PRS, missing a _CRS, required");
}
-
if (!SrsExists)
{
AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
- "_DIS is missing a _SRS, requires a _CRS, _PRS, and a _SRS");
+ "Device has a _PRS, missing a _SRS, required");
}
}
- /* 2) If _PRS is present, must have a _CRS and _SRS */
+ /* 2) If _SRS is present, must have _PRS (_PRS requires _CRS and _SRS) */
- if (PrsExists)
+ if ((SrsExists) && (!PrsExists))
{
- if (!CrsExists)
- {
- AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
- "_PRS is missing a _CRS, requires a _CRS and a _SRS");
- }
-
- if (!SrsExists)
- {
- AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
- "_PRS is missing a _SRS, requires a _CRS and a _SRS");
- }
+ AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "Device has a _SRS, missing a _PRS, required");
}
- /* 3) If _SRS is present, must have a _CRS and _PRS */
+ /* 3) If _DIS is present, must have a _SRS */
- if (SrsExists)
+ if ((DisExists) && (!SrsExists))
{
- if (!CrsExists)
- {
- AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
- "_SRS is missing a _CRS, requires a _CRS and a _PRS");
- }
- if (!PrsExists)
- {
- AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
- "_SRS is missing a _PRS, requires a _CRS and a _PRS");
- }
- if (!DisExists)
- {
- AslError (ASL_REMARK, ASL_MSG_MISSING_DEPENDENCY, Op,
- "_SRS is missing a _DIS");
- }
+ AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "Device has a _DIS, missing a _SRS, required");
+ }
+
+ /*
+ * 4) If _SRS is present, should have a _DIS (_PRS requires _CRS
+ * and _SRS) Remark only.
+ */
+ if ((SrsExists) && (!DisExists))
+ {
+ AslError (ASL_REMARK, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "Device has a _SRS, no corresponding _DIS");
}
break;
diff --git a/sys/contrib/dev/acpica/compiler/dtcompiler.h b/sys/contrib/dev/acpica/compiler/dtcompiler.h
index c58ad55cd6cb..e31566e0c3d3 100644
--- a/sys/contrib/dev/acpica/compiler/dtcompiler.h
+++ b/sys/contrib/dev/acpica/compiler/dtcompiler.h
@@ -658,6 +658,10 @@ DtCompileNfit (
void **PFieldList);
ACPI_STATUS
+DtCompileNhlt (
+ void **PFieldList);
+
+ACPI_STATUS
DtCompilePcct (
void **PFieldList);
diff --git a/sys/contrib/dev/acpica/compiler/dttable2.c b/sys/contrib/dev/acpica/compiler/dttable2.c
index 13a4a562d3ed..a8c81e2c4729 100644
--- a/sys/contrib/dev/acpica/compiler/dttable2.c
+++ b/sys/contrib/dev/acpica/compiler/dttable2.c
@@ -2062,6 +2062,11 @@ DtCompileSrat (
InfoTable = AcpiDmTableInfoSrat5;
break;
+ case ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY:
+
+ InfoTable = AcpiDmTableInfoSrat6;
+ break;
+
default:
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "SRAT");
diff --git a/sys/contrib/dev/acpica/compiler/dtutils.c b/sys/contrib/dev/acpica/compiler/dtutils.c
index a847539289a1..78c0bdd8528e 100644
--- a/sys/contrib/dev/acpica/compiler/dtutils.c
+++ b/sys/contrib/dev/acpica/compiler/dtutils.c
@@ -581,6 +581,8 @@ DtGetFieldLength (
case ACPI_DMT_IVRS_DE:
case ACPI_DMT_GTDT:
case ACPI_DMT_MADT:
+ case ACPI_DMT_NHLT1:
+ case ACPI_DMT_NHLT1a:
case ACPI_DMT_PCCT:
case ACPI_DMT_PMTT:
case ACPI_DMT_PPTT:
diff --git a/sys/contrib/dev/acpica/compiler/preprocess.h b/sys/contrib/dev/acpica/compiler/preprocess.h
index 6343a49c1ff2..f4c8c30966a2 100644
--- a/sys/contrib/dev/acpica/compiler/preprocess.h
+++ b/sys/contrib/dev/acpica/compiler/preprocess.h
@@ -355,7 +355,7 @@ PrEvaluateExpression (
/*
- * prutils - Preprocesor utilities
+ * prutils - Preprocessor utilities
*/
char *
PrGetNextToken (
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsfield.c b/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
index 5067a7aa1689..70ba3fbd8124 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
@@ -797,7 +797,7 @@ AcpiDsInitFieldObjects (
}
#ifdef ACPI_EXEC_APP
- Flags |= ACPI_NS_OVERRIDE_IF_FOUND;
+ Flags |= ACPI_NS_OVERRIDE_IF_FOUND;
#endif
/*
* Walk the list of entries in the FieldList
diff --git a/sys/contrib/dev/acpica/components/hardware/hwesleep.c b/sys/contrib/dev/acpica/components/hardware/hwesleep.c
index 6fb1a6718378..97554dfb9880 100644
--- a/sys/contrib/dev/acpica/components/hardware/hwesleep.c
+++ b/sys/contrib/dev/acpica/components/hardware/hwesleep.c
@@ -312,18 +312,15 @@ ACPI_STATUS
AcpiHwExtendedWakePrep (
UINT8 SleepState)
{
- ACPI_STATUS Status;
UINT8 SleepTypeValue;
ACPI_FUNCTION_TRACE (HwExtendedWakePrep);
- Status = AcpiGetSleepTypeData (ACPI_STATE_S0,
- &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
- if (ACPI_SUCCESS (Status))
+ if (AcpiGbl_SleepTypeAS0 != ACPI_SLEEP_TYPE_INVALID)
{
- SleepTypeValue = ((AcpiGbl_SleepTypeA << ACPI_X_SLEEP_TYPE_POSITION) &
+ SleepTypeValue = ((AcpiGbl_SleepTypeAS0 << ACPI_X_SLEEP_TYPE_POSITION) &
ACPI_X_SLEEP_TYPE_MASK);
(void) AcpiWrite ((UINT64) (SleepTypeValue | ACPI_X_SLEEP_ENABLE),
diff --git a/sys/contrib/dev/acpica/components/hardware/hwsleep.c b/sys/contrib/dev/acpica/components/hardware/hwsleep.c
index 9ce6fe3f93cf..63e9c69cbdb4 100644
--- a/sys/contrib/dev/acpica/components/hardware/hwsleep.c
+++ b/sys/contrib/dev/acpica/components/hardware/hwsleep.c
@@ -339,7 +339,7 @@ ACPI_STATUS
AcpiHwLegacyWakePrep (
UINT8 SleepState)
{
- ACPI_STATUS Status;
+ ACPI_STATUS Status = AE_OK;
ACPI_BIT_REGISTER_INFO *SleepTypeRegInfo;
ACPI_BIT_REGISTER_INFO *SleepEnableRegInfo;
UINT32 Pm1aControl;
@@ -353,9 +353,7 @@ AcpiHwLegacyWakePrep (
* This is unclear from the ACPI Spec, but it is required
* by some machines.
*/
- Status = AcpiGetSleepTypeData (ACPI_STATE_S0,
- &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
- if (ACPI_SUCCESS (Status))
+ if (AcpiGbl_SleepTypeAS0 != ACPI_SLEEP_TYPE_INVALID)
{
SleepTypeRegInfo =
AcpiHwGetBitRegisterInfo (ACPI_BITREG_SLEEP_TYPE);
@@ -376,9 +374,9 @@ AcpiHwLegacyWakePrep (
/* Insert the SLP_TYP bits */
- Pm1aControl |= (AcpiGbl_SleepTypeA <<
+ Pm1aControl |= (AcpiGbl_SleepTypeAS0 <<
SleepTypeRegInfo->BitPosition);
- Pm1bControl |= (AcpiGbl_SleepTypeB <<
+ Pm1aControl |= (AcpiGbl_SleepTypeBS0 <<
SleepTypeRegInfo->BitPosition);
/* Write the control registers and ignore any errors */
diff --git a/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c b/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c
index 011e8a15d8b0..e56d49773fd4 100644
--- a/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c
+++ b/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c
@@ -471,6 +471,12 @@ AcpiEnterSleepStatePrep (
return_ACPI_STATUS (Status);
}
+ Status = AcpiGetSleepTypeData (ACPI_STATE_S0,
+ &AcpiGbl_SleepTypeAS0, &AcpiGbl_SleepTypeBS0);
+ if (ACPI_FAILURE (Status)) {
+ AcpiGbl_SleepTypeAS0 = ACPI_SLEEP_TYPE_INVALID;
+ }
+
/* Execute the _PTS method (Prepare To Sleep) */
ArgList.Count = 1;
diff --git a/sys/contrib/dev/acpica/components/utilities/utosi.c b/sys/contrib/dev/acpica/components/utilities/utosi.c
index 44faa19a672c..e7410e205cb4 100644
--- a/sys/contrib/dev/acpica/components/utilities/utosi.c
+++ b/sys/contrib/dev/acpica/components/utilities/utosi.c
@@ -220,6 +220,7 @@ static ACPI_INTERFACE_INFO AcpiDefaultSupportedInterfaces[] =
{"Windows 2018", NULL, 0, ACPI_OSI_WIN_10_RS4}, /* Windows 10 version 1803 - Added 11/2018 */
{"Windows 2018.2", NULL, 0, ACPI_OSI_WIN_10_RS5}, /* Windows 10 version 1809 - Added 11/2018 */
{"Windows 2019", NULL, 0, ACPI_OSI_WIN_10_19H1}, /* Windows 10 version 1903 - Added 08/2019 */
+ {"Windows 2020", NULL, 0, ACPI_OSI_WIN_10_20H1}, /* Windows 10 version 2004 - Added 08/2021 */
/* Feature Group Strings */
diff --git a/sys/contrib/dev/acpica/include/acdisasm.h b/sys/contrib/dev/acpica/include/acdisasm.h
index cad31a5379d5..7b9c29a08fa9 100644
--- a/sys/contrib/dev/acpica/include/acdisasm.h
+++ b/sys/contrib/dev/acpica/include/acdisasm.h
@@ -224,6 +224,7 @@ typedef enum
ACPI_DMT_BUF10,
ACPI_DMT_BUF12,
ACPI_DMT_BUF16,
+ ACPI_DMT_BUF18,
ACPI_DMT_BUF128,
ACPI_DMT_SIG,
ACPI_DMT_STRING,
@@ -277,6 +278,8 @@ typedef enum
ACPI_DMT_LPIT,
ACPI_DMT_MADT,
ACPI_DMT_NFIT,
+ ACPI_DMT_NHLT1,
+ ACPI_DMT_NHLT1a,
ACPI_DMT_PCCT,
ACPI_DMT_PHAT,
ACPI_DMT_PMTT,
@@ -544,7 +547,21 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit5[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit6[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit6a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit7[];
-extern ACPI_DMTABLE_INFO AcpiDmTableInfoPdtt[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt0[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt1[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt2[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt3[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt3a[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt4[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5a[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5b[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5c[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt6[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt7[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt7a[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt8[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhatHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhat0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhat0a[];
@@ -565,6 +582,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct3[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct4[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct5[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoPdtt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPdtt0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt0a[];
@@ -609,6 +627,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat3[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat4[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat5[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat6[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoStao[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoStaoStr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSvkl[];
@@ -792,6 +811,10 @@ AcpiDmDumpNfit (
ACPI_TABLE_HEADER *Table);
void
+AcpiDmDumpNhlt (
+ ACPI_TABLE_HEADER *Table);
+
+void
AcpiDmDumpPcct (
ACPI_TABLE_HEADER *Table);
diff --git a/sys/contrib/dev/acpica/include/acglobal.h b/sys/contrib/dev/acpica/include/acglobal.h
index c2107df0e1cc..354268655220 100644
--- a/sys/contrib/dev/acpica/include/acglobal.h
+++ b/sys/contrib/dev/acpica/include/acglobal.h
@@ -365,6 +365,8 @@ ACPI_INIT_GLOBAL (ACPI_COMMENT_NODE, *AcpiGbl_LastListHead, NULL);
extern ACPI_BIT_REGISTER_INFO AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG];
ACPI_GLOBAL (UINT8, AcpiGbl_SleepTypeA);
ACPI_GLOBAL (UINT8, AcpiGbl_SleepTypeB);
+ACPI_GLOBAL (UINT8, AcpiGbl_SleepTypeAS0);
+ACPI_GLOBAL (UINT8, AcpiGbl_SleepTypeBS0);
/*****************************************************************************
diff --git a/sys/contrib/dev/acpica/include/acpixf.h b/sys/contrib/dev/acpica/include/acpixf.h
index d19bbf550262..396a37ae26cb 100644
--- a/sys/contrib/dev/acpica/include/acpixf.h
+++ b/sys/contrib/dev/acpica/include/acpixf.h
@@ -154,7 +154,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20210730
+#define ACPI_CA_VERSION 0x20210930
#include <contrib/dev/acpica/include/acconfig.h>
#include <contrib/dev/acpica/include/actypes.h>
diff --git a/sys/contrib/dev/acpica/include/actbinfo.h b/sys/contrib/dev/acpica/include/actbinfo.h
index f2a1a48cd214..8a9ff736c9da 100644
--- a/sys/contrib/dev/acpica/include/actbinfo.h
+++ b/sys/contrib/dev/acpica/include/actbinfo.h
@@ -180,6 +180,7 @@
#define ACPI_MPST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MPST,f)
#define ACPI_MSCT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MSCT,f)
#define ACPI_NFIT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_NFIT,f)
+#define ACPI_NHLT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_NHLT,f)
#define ACPI_PCCT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PCCT,f)
#define ACPI_PDTT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PDTT,f)
#define ACPI_PMTT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PMTT,f)
@@ -328,6 +329,19 @@
#define ACPI_NFIT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_DATA_REGION,f)
#define ACPI_NFIT6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_FLUSH_ADDRESS,f)
#define ACPI_NFIT7_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_CAPABILITIES,f)
+#define ACPI_NHLT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_ENDPOINT,f)
+#define ACPI_NHLT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG,f)
+#define ACPI_NHLT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_WAVE_EXTENSIBLE,f)
+#define ACPI_NHLT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_FORMAT_CONFIG,f)
+#define ACPI_NHLT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_FORMATS_CONFIG,f)
+#define ACPI_NHLT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG,f)
+#define ACPI_NHLT5A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A,f)
+#define ACPI_NHLT5B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B,f)
+#define ACPI_NHLT5C_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_C,f)
+#define ACPI_NHLT6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_VENDOR_MIC_CONFIG,f)
+#define ACPI_NHLT7_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_LINUX_SPECIFIC_COUNT,f)
+#define ACPI_NHLT7A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_LINUX_SPECIFIC_DATA,f)
+#define ACPI_NHLT8_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_TABLE_TERMINATOR,f)
#define ACPI_PCCT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_SUBSPACE,f)
#define ACPI_PCCT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED,f)
#define ACPI_PCCT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f)
diff --git a/sys/contrib/dev/acpica/include/actbl2.h b/sys/contrib/dev/acpica/include/actbl2.h
index 58c1570c805c..0c80aae24f99 100644
--- a/sys/contrib/dev/acpica/include/actbl2.h
+++ b/sys/contrib/dev/acpica/include/actbl2.h
@@ -179,6 +179,7 @@
#define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */
#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
#define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */
+#define ACPI_SIG_NHLT "NHLT" /* Non HD Audio Link Table */
#define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */
#define ACPI_SIG_PDTT "PDTT" /* Platform Debug Trigger Table */
#define ACPI_SIG_PHAT "PHAT" /* Platform Health Assessment Table */
@@ -190,7 +191,6 @@
#define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
#define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */
#define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */
-#define ACPI_SIG_NHLT "NHLT" /* Non-HDAudio Link Table */
#define ACPI_SIG_SVKL "SVKL" /* Storage Volume Key Location Table */
@@ -1271,6 +1271,7 @@ typedef struct acpi_madt_multiproc_wakeup_mailbox
/* MADT Local APIC flags */
#define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
+#define ACPI_MADT_ONLINE_CAPABLE (2) /* 01: System HW supports enabling processor at runtime */
/* MADT MPS INTI flags (IntiFlags) */
@@ -1779,6 +1780,292 @@ typedef struct nfit_device_handle
/*******************************************************************************
*
+ * NHLT - Non HD Audio Link Table
+ *
+ * Conforms to: Intel Smart Sound Technology NHLT Specification
+ * Version 0.8.1, January 2020.
+ *
+ ******************************************************************************/
+
+/* Main table */
+
+typedef struct acpi_table_nhlt
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT8 EndpointCount;
+
+} ACPI_TABLE_NHLT;
+
+typedef struct acpi_nhlt_endpoint
+{
+ UINT32 DescriptorLength;
+ UINT8 LinkType;
+ UINT8 InstanceId;
+ UINT16 VendorId;
+ UINT16 DeviceId;
+ UINT16 RevisionId;
+ UINT32 SubsystemId;
+ UINT8 DeviceType;
+ UINT8 Direction;
+ UINT8 VirtualBusId;
+
+} ACPI_NHLT_ENDPOINT;
+
+/* Types for LinkType field above */
+
+#define ACPI_NHLT_RESERVED_HD_AUDIO 0
+#define ACPI_NHLT_RESERVED_DSP 1
+#define ACPI_NHLT_PDM 2
+#define ACPI_NHLT_SSP 3
+#define ACPI_NHLT_RESERVED_SLIMBUS 4
+#define ACPI_NHLT_RESERVED_SOUNDWIRE 5
+#define ACPI_NHLT_TYPE_RESERVED 6 /* 6 and above are reserved */
+
+/* All other values above are reserved */
+
+/* Values for DeviceId field above */
+
+#define ACPI_NHLT_PDM_DMIC 0xAE20
+#define ACPI_NHLT_BT_SIDEBAND 0xAE30
+#define ACPI_NHLT_I2S_TDM_CODECS 0xAE23
+
+/* Values for DeviceType field above */
+
+/* SSP Link */
+
+#define ACPI_NHLT_LINK_BT_SIDEBAND 0
+#define ACPI_NHLT_LINK_FM 1
+#define ACPI_NHLT_LINK_MODEM 2
+/* 3 is reserved */
+#define ACPI_NHLT_LINK_SSP_ANALOG_CODEC 4
+
+/* PDM Link */
+
+#define ACPI_NHLT_PDM_ON_CAVS_1P8 0
+#define ACPI_NHLT_PDM_ON_CAVS_1P5 1
+
+/* Values for Direction field above */
+
+#define ACPI_NHLT_DIR_RENDER 0
+#define ACPI_NHLT_DIR_CAPTURE 1
+#define ACPI_NHLT_DIR_RENDER_LOOPBACK 2
+#define ACPI_NHLT_DIR_RENDER_FEEDBACK 3
+#define ACPI_NHLT_DIR_RESERVED 4 /* 4 and above are reserved */
+
+typedef struct acpi_nhlt_device_specific_config
+{
+ UINT32 CapabilitiesSize;
+ UINT8 VirtualSlot;
+ UINT8 ConfigType;
+
+} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG;
+
+typedef struct acpi_nhlt_device_specific_config_a
+{
+ UINT32 CapabilitiesSize;
+ UINT8 VirtualSlot;
+ UINT8 ConfigType;
+ UINT8 ArrayType;
+
+} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A;
+
+/* Values for Config Type above */
+
+#define ACPI_NHLT_TYPE_MIC_ARRAY 0x01
+#define ACPI_NHLT_TYPE_GENERIC 0x00
+
+/* Mask for Extension field of ArrayType */
+
+#define ACPI_NHLT_ARRAY_TYPE_MASK 0x10
+
+typedef struct acpi_nhlt_device_specific_config_b
+{
+ UINT32 CapabilitiesSize;
+
+} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B;
+
+typedef struct acpi_nhlt_device_specific_config_c
+{
+ UINT32 CapabilitiesSize;
+ UINT8 VirtualSlot;
+
+} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_C;
+
+typedef struct acpi_nhlt_wave_extensible
+{
+ UINT16 FormatTag;
+ UINT16 ChannelCount;
+ UINT32 SamplesPerSec;
+ UINT32 AvgBytesPerSec;
+ UINT16 BlockAlign;
+ UINT16 BitsPerSample;
+ UINT16 ExtraFormatSize;
+ UINT16 ValidBitsPerSample;
+ UINT32 ChannelMask;
+ UINT8 SubFormatGuid[16];
+
+} ACPI_NHLT_WAVE_EXTENSIBLE;
+
+/* Values for ChannelMask above */
+
+#define ACPI_NHLT_SPKR_FRONT_LEFT 0x1
+#define ACPI_NHLT_SPKR_FRONT_RIGHT 0x2
+#define ACPI_NHLT_SPKR_FRONT_CENTER 0x4
+#define ACPI_NHLT_SPKR_LOW_FREQ 0x8
+#define ACPI_NHLT_SPKR_BACK_LEFT 0x10
+#define ACPI_NHLT_SPKR_BACK_RIGHT 0x20
+#define ACPI_NHLT_SPKR_FRONT_LEFT_OF_CENTER 0x40
+#define ACPI_NHLT_SPKR_FRONT_RIGHT_OF_CENTER 0x80
+#define ACPI_NHLT_SPKR_BACK_CENTER 0x100
+#define ACPI_NHLT_SPKR_SIDE_LEFT 0x200
+#define ACPI_NHLT_SPKR_SIDE_RIGHT 0x400
+#define ACPI_NHLT_SPKR_TOP_CENTER 0x800
+#define ACPI_NHLT_SPKR_TOP_FRONT_LEFT 0x1000
+#define ACPI_NHLT_SPKR_TOP_FRONT_CENTER 0x2000
+#define ACPI_NHLT_SPKR_TOP_FRONT_RIGHT 0x4000
+#define ACPI_NHLT_SPKR_TOP_BACK_LEFT 0x8000
+#define ACPI_NHLT_SPKR_TOP_BACK_CENTER 0x10000
+#define ACPI_NHLT_SPKR_TOP_BACK_RIGHT 0x20000
+
+typedef struct acpi_nhlt_format_config
+{
+ ACPI_NHLT_WAVE_EXTENSIBLE Format;
+ UINT32 CapabilitySize;
+ UINT8 Capabilities[];
+
+} ACPI_NHLT_FORMAT_CONFIG;
+
+typedef struct acpi_nhlt_formats_config
+{
+ UINT8 FormatsCount;
+
+} ACPI_NHLT_FORMATS_CONFIG;
+
+typedef struct acpi_nhlt_device_specific_hdr
+{
+ UINT8 VirtualSlot;
+ UINT8 ConfigType;
+
+} ACPI_NHLT_DEVICE_SPECIFIC_HDR;
+
+/* Types for ConfigType above */
+
+#define ACPI_NHLT_GENERIC 0
+#define ACPI_NHLT_MIC 1
+#define ACPI_NHLT_RENDER 3
+
+typedef struct acpi_nhlt_mic_device_specific_config
+{
+ ACPI_NHLT_DEVICE_SPECIFIC_HDR DeviceConfig;
+ UINT8 ArrayTypeExt;
+
+} ACPI_NHLT_MIC_DEVICE_SPECIFIC_CONFIG;
+
+/* Values for ArrayTypeExt above */
+
+#define SMALL_LINEAR_2ELEMENT 0x0A
+#define BIG_LINEAR_2ELEMENT 0x0B
+#define FIRST_GEOMETRY_LINEAR_4ELEMENT 0x0C
+#define PLANAR_LSHAPED_4ELEMENT 0x0D
+#define SECOND_GEOMETRY_LINEAR_4ELEMENT 0x0E
+#define VENDOR_DEFINED 0x0F
+#define ARRAY_TYPE_MASK 0x0F
+#define ARRAY_TYPE_EXT_MASK 0x10
+
+#define NO_EXTENSION 0x0
+#define MIC_SNR_SENSITIVITY_EXT 0x1
+
+
+typedef struct acpi_nhlt_vendor_mic_config
+{
+ UINT8 Type;
+ UINT8 Panel;
+ UINT16 SpeakerPositionDistance; // mm
+ UINT16 HorizontalOffset; // mm
+ UINT16 VerticalOffset; // mm
+ UINT8 FrequencyLowBand; // 5*Hz
+ UINT8 FrequencyHighBand; // 500*Hz
+ UINT16 DirectionAngle; // -180 - + 180
+ UINT16 ElevationAngle; // -180 - + 180
+ UINT16 WorkVerticalAngleBegin; // -180 - + 180 with 2 deg step
+ UINT16 WorkVerticalAngleEnd; // -180 - + 180 with 2 deg step
+ UINT16 WorkHorizontalAngleBegin; // -180 - + 180 with 2 deg step
+ UINT16 WorkHorizontalAngleEnd; // -180 - + 180 with 2 deg step
+
+} ACPI_NHLT_VENDOR_MIC_CONFIG;
+
+/* Values for Type field above */
+
+#define MIC_OMNIDIRECTIONAL 0
+#define MIC_SUBCARDIOID 1
+#define MIC_CARDIOID 2
+#define MIC_SUPER_CARDIOID 3
+#define MIC_HYPER_CARDIOID 4
+#define MIC_8_SHAPED 5
+#define MIC_VENDOR_DEFINED 7
+
+/* Values for Panel field above */
+
+#define MIC_TOP 0
+#define MIC_BOTTOM 1
+#define MIC_LEFT 2
+#define MIC_RIGHT 3
+#define MIC_FRONT 4
+#define MIC_REAR 5
+
+typedef struct acpi_nhlt_vendor_mic_device_specific_config
+{
+ ACPI_NHLT_MIC_DEVICE_SPECIFIC_CONFIG MicArrayDeviceConfig;
+ UINT8 NumberOfMicrophones;
+ ACPI_NHLT_VENDOR_MIC_CONFIG MicConfig[]; // Indexed by NumberOfMicrophones
+
+} ACPI_NHLT_VENDOR_MIC_DEVICE_SPECIFIC_CONFIG;
+
+/* Microphone SNR and Sensitivity extension */
+
+typedef struct acpi_nhlt_mic_snr_sensitivity_extension
+{
+ UINT32 SNR;
+ UINT32 Sensitivity;
+
+} ACPI_NHLT_MIC_SNR_SENSITIVITY_EXTENSION;
+
+typedef struct acpi_nhlt_render_feedback_device_specific_config
+{
+ ACPI_NHLT_DEVICE_SPECIFIC_CONFIG DeviceConfig;
+ UINT8 FeedbackVirtualSlot; // Render slot in case of capture
+ UINT16 FeedbackChannels; // Informative only
+ UINT16 FeedbackValidBitsPerSample;
+
+} ACPI_NHLT_RENDER_FEEDBACK_DEVICE_SPECIFIC_CONFIG;
+
+/* Linux-specific structures */
+
+typedef struct acpi_nhlt_linux_specific_count
+{
+ UINT8 StructureCount;
+
+} ACPI_NHLT_LINUX_SPECIFIC_COUNT;
+
+typedef struct acpi_nhlt_linux_specific_data
+{
+ UINT8 DeviceId[16];
+ UINT8 DeviceInstanceId;
+ UINT8 DevicePortId;
+ UINT8 Filler[18];
+
+} ACPI_NHLT_LINUX_SPECIFIC_DATA;
+
+typedef struct acpi_nhlt_table_terminator
+{
+ UINT32 TerminatorValue;
+ UINT32 TerminatorSignature;
+
+} ACPI_NHLT_TABLE_TERMINATOR;
+
+
+/*******************************************************************************
+ *
* PCCT - Platform Communications Channel Table (ACPI 5.0)
* Version 2 (ACPI 6.2)
*
diff --git a/sys/contrib/dev/acpica/include/actbl3.h b/sys/contrib/dev/acpica/include/actbl3.h
index d0f7025fab54..40cf71306af4 100644
--- a/sys/contrib/dev/acpica/include/actbl3.h
+++ b/sys/contrib/dev/acpica/include/actbl3.h
@@ -352,7 +352,8 @@ enum AcpiSratType
ACPI_SRAT_TYPE_GICC_AFFINITY = 3,
ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4, /* ACPI 6.2 */
ACPI_SRAT_TYPE_GENERIC_AFFINITY = 5, /* ACPI 6.3 */
- ACPI_SRAT_TYPE_RESERVED = 6 /* 5 and greater are reserved */
+ ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY = 6, /* ACPI 6.4 */
+ ACPI_SRAT_TYPE_RESERVED = 7 /* 7 and greater are reserved */
};
/*
@@ -447,8 +448,11 @@ typedef struct acpi_srat_gic_its_affinity
} ACPI_SRAT_GIC_ITS_AFFINITY;
-
-/* 5: Generic Initiator Affinity Structure (ACPI 6.3) */
+/*
+ * Common structure for SRAT subtable types:
+ * 5: ACPI_SRAT_TYPE_GENERIC_AFFINITY
+ * 6: ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY
+ */
typedef struct acpi_srat_generic_affinity
{
diff --git a/sys/contrib/dev/acpica/include/actypes.h b/sys/contrib/dev/acpica/include/actypes.h
index 5069c59ee339..2906b7febc69 100644
--- a/sys/contrib/dev/acpica/include/actypes.h
+++ b/sys/contrib/dev/acpica/include/actypes.h
@@ -1536,6 +1536,7 @@ typedef enum
#define ACPI_OSI_WIN_10_RS4 0x12
#define ACPI_OSI_WIN_10_RS5 0x13
#define ACPI_OSI_WIN_10_19H1 0x14
+#define ACPI_OSI_WIN_10_20H1 0x15
/* Definitions of getopt */