Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/intel]: src/sys/external/bsd/acpica/dist Import acpica-20211217



details:   https://anonhg.NetBSD.org/src/rev/24cb8c007cfd
branches:  intel
changeset: 1027749:24cb8c007cfd
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Dec 18 16:18:30 2021 +0000

description:
Import acpica-20211217

17 December 2021. Summary of changes for version 20211217:

This release is available at https://acpica.org/downloads

1) ACPICA kernel-resident subsystem:

Hardware: Do not flush CPU cache when entering S4 and S5. According
to ACPI 6.4, Section 16.2, the CPU cache flushing is required on
entering to S1, S2, and S3, but the ACPICA code flushes the CPU
cache regardless of the sleep state. Blind cache flush on entering
S5 causes problems for TDX.

Avoid subobject buffer overflow when validating RSDP signature.
Since the Signature member is accessed through an ACPI_TABLE_HEADER,
the pointer to it is only to a 4-char array, and so trying to read
past the 4th character, as will be done when it is an RSDP, reads
beyond the bounds of the accessed member. Contributed by jrtc27.

Add support for PCC Opregion special context data. PCC Opregion
added in ACPIC 6.3 requires special context data similar to GPIO
and Generic Serial Bus as it needs to know the internal PCC buffer
and its length as well as the PCC channel index when the opregion
handler is being executed by the OSPM. Adds support for the special
context data needed by PCC Opregion. Submitted by Sudeep Holla

2) iASL Compiler/Disassembler and ACPICA tools:

iASL: Completed compiler support for the NHLT ACPI table.

iASL/NHLT table: Fixed a reported problem where a fault would occur
during disassembly of a "Linux-Specific" section if the "Specific
Data" part was not present.

iASL: Added full support (compiler and disassembler) for the AGDI
ACPI table. Contributed by: Ilkka Koskinen .

iASL: Added full support for the TDEL ACPI table.

iASL table compiler: FADT support updates:
1) Allow the 32-bit DSDT address to be zero.
2) Issue error if both the 32-bit and 64-bit DSDT addresses are zero.

iASL: Fix unaligned accesses to local cache allocations. Contributed
by jrtc27.

iASL: Open binary input files in binary mode, not text mode Affects
binary input AML files, as well as binary data table files, for
disassembly.

diffstat:

 sys/external/bsd/acpica/dist/changes.txt             |   48 ++
 sys/external/bsd/acpica/dist/common/acfileio.c       |   11 +-
 sys/external/bsd/acpica/dist/common/ahtable.c        |    3 +
 sys/external/bsd/acpica/dist/common/dmtable.c        |  158 +++++++-
 sys/external/bsd/acpica/dist/common/dmtbdump.c       |   70 +++-
 sys/external/bsd/acpica/dist/common/dmtbdump1.c      |    2 -
 sys/external/bsd/acpica/dist/common/dmtbdump2.c      |  283 +++++++++----
 sys/external/bsd/acpica/dist/common/dmtbinfo.c       |    6 +-
 sys/external/bsd/acpica/dist/common/dmtbinfo2.c      |   79 +++-
 sys/external/bsd/acpica/dist/common/dmtbinfo3.c      |   14 +
 sys/external/bsd/acpica/dist/compiler/aslcache.c     |    5 +
 sys/external/bsd/acpica/dist/compiler/aslfiles.c     |    4 +-
 sys/external/bsd/acpica/dist/compiler/aslmessages.c  |    2 +
 sys/external/bsd/acpica/dist/compiler/aslmessages.h  |    2 +
 sys/external/bsd/acpica/dist/compiler/aslstartup.c   |   23 +-
 sys/external/bsd/acpica/dist/compiler/asluuid.c      |    1 -
 sys/external/bsd/acpica/dist/compiler/dtcompiler.h   |    3 +
 sys/external/bsd/acpica/dist/compiler/dttable.c      |   59 ++-
 sys/external/bsd/acpica/dist/compiler/dttable2.c     |  385 ++++++++++++++++++-
 sys/external/bsd/acpica/dist/compiler/dttemplate.h   |   93 ++++
 sys/external/bsd/acpica/dist/compiler/dtutils.c      |   11 +
 sys/external/bsd/acpica/dist/dispatcher/dsopcode.c   |    1 +
 sys/external/bsd/acpica/dist/events/evhandler.c      |    2 +-
 sys/external/bsd/acpica/dist/events/evregion.c       |    9 +
 sys/external/bsd/acpica/dist/events/evrgnini.c       |   58 ++
 sys/external/bsd/acpica/dist/executer/exconfig.c     |    2 +-
 sys/external/bsd/acpica/dist/executer/excreate.c     |    1 +
 sys/external/bsd/acpica/dist/executer/exfield.c      |    4 +-
 sys/external/bsd/acpica/dist/executer/exoparg1.c     |    2 +-
 sys/external/bsd/acpica/dist/executer/exregion.c     |   14 +-
 sys/external/bsd/acpica/dist/hardware/hwesleep.c     |    5 +-
 sys/external/bsd/acpica/dist/hardware/hwsleep.c      |    7 +-
 sys/external/bsd/acpica/dist/hardware/hwxfsleep.c    |    2 -
 sys/external/bsd/acpica/dist/include/acdisasm.h      |   16 +
 sys/external/bsd/acpica/dist/include/acevents.h      |    7 +
 sys/external/bsd/acpica/dist/include/acobject.h      |    1 +
 sys/external/bsd/acpica/dist/include/acpixf.h        |   10 +-
 sys/external/bsd/acpica/dist/include/actables.h      |    5 +-
 sys/external/bsd/acpica/dist/include/actbinfo.h      |    7 +
 sys/external/bsd/acpica/dist/include/actbl2.h        |  154 +++++-
 sys/external/bsd/acpica/dist/include/actypes.h       |   26 +-
 sys/external/bsd/acpica/dist/tables/tbdata.c         |   85 +++-
 sys/external/bsd/acpica/dist/tables/tbfadt.c         |    6 +-
 sys/external/bsd/acpica/dist/tables/tbinstal.c       |   12 +-
 sys/external/bsd/acpica/dist/tables/tbprint.c        |    3 +-
 sys/external/bsd/acpica/dist/tables/tbutils.c        |    3 +-
 sys/external/bsd/acpica/dist/tables/tbxfload.c       |   57 +-
 sys/external/bsd/acpica/dist/tools/acpisrc/astable.c |   25 +-
 sys/external/bsd/acpica/dist/utilities/utdelete.c    |    1 +
 49 files changed, 1532 insertions(+), 255 deletions(-)

diffs (truncated from 3149 to 300 lines):

diff -r 3a9e6ec1c78c -r 24cb8c007cfd sys/external/bsd/acpica/dist/changes.txt
--- a/sys/external/bsd/acpica/dist/changes.txt  Thu Oct 28 14:43:14 2021 +0000
+++ b/sys/external/bsd/acpica/dist/changes.txt  Sat Dec 18 16:18:30 2021 +0000
@@ -1,4 +1,52 @@
 ----------------------------------------
+17 December 2021. Summary of changes for version 20211217:
+
+1) ACPICA kernel-resident subsystem:
+
+Hardware: Do not flush CPU cache when entering S4 and S5. According to 
+ACPI 6.4, Section 16.2, the CPU cache flushing is required on entering to 
+S1, S2, and S3, but the ACPICA code flushes the CPU cache regardless of 
+the sleep state. Blind cache flush on entering S5 causes problems for 
+TDX.
+
+Avoid subobject buffer overflow when validating RSDP signature. Since the 
+Signature member is accessed through an ACPI_TABLE_HEADER, the pointer to 
+it is only to a 4-char array, and so trying to read past the 4th 
+character, as will be done when it is an RSDP, reads beyond the bounds of 
+the accessed member. Contributed by jrtc27.
+
+Add support for PCC Opregion special context data. PCC Opregion added in 
+ACPIC 6.3 requires special context data similar to GPIO and Generic 
+Serial Bus as it needs to know the internal PCC buffer and its length as 
+well as the PCC channel index when the opregion handler is being executed 
+by the OSPM. Adds support for the special context data needed by PCC 
+Opregion. Submitted by Sudeep Holla <sudeep.holla%arm.com@localhost>
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iASL: Completed compiler support for the NHLT ACPI table.
+
+iASL/NHLT table: Fixed a reported problem where a fault would occur 
+during disassembly of a "Linux-Specific" section if the "Specific Data" 
+part was not present.
+
+iASL: Added full support (compiler and disassembler) for the AGDI ACPI 
+table. Contributed by: Ilkka Koskinen <ilkka%os.amperecomputing.com@localhost>.
+
+iASL: Added full support for the TDEL ACPI table.
+
+iASL table compiler: FADT support updates:
+1) Allow the 32-bit DSDT address to be zero.
+2) Issue error if both the 32-bit and 64-bit DSDT addresses are zero.
+
+iASL: Fix unaligned accesses to local cache allocations. Contributed by 
+jrtc27.
+
+iASL: Open binary input files in binary mode, not text mode Affects 
+binary input AML files, as well as binary data table files, for 
+disassembly.
+
+----------------------------------------
 30 September 2021. Summary of changes for version 20210930:
 
 This release is available at https://acpica.org/downloads
diff -r 3a9e6ec1c78c -r 24cb8c007cfd sys/external/bsd/acpica/dist/common/acfileio.c
--- a/sys/external/bsd/acpica/dist/common/acfileio.c    Thu Oct 28 14:43:14 2021 +0000
+++ b/sys/external/bsd/acpica/dist/common/acfileio.c    Sat Dec 18 16:18:30 2021 +0000
@@ -444,10 +444,15 @@
     /* Read a potential table header */
 
     OriginalOffset = ftell (File);
-    fseek (File, TableOffset, SEEK_SET);
-
+    if (fseek (File, TableOffset, SEEK_SET))
+    {
+        fprintf (stderr, "SEEK error\n");
+    }
     Actual = fread (&TableHeader, 1, sizeof (ACPI_TABLE_HEADER), File);
-    fseek (File, OriginalOffset, SEEK_SET);
+    if (fseek (File, OriginalOffset, SEEK_SET))
+    {
+        fprintf (stderr, "SEEK error\n");
+    }
 
     if (Actual < sizeof (ACPI_TABLE_HEADER))
     {
diff -r 3a9e6ec1c78c -r 24cb8c007cfd sys/external/bsd/acpica/dist/common/ahtable.c
--- a/sys/external/bsd/acpica/dist/common/ahtable.c     Thu Oct 28 14:43:14 2021 +0000
+++ b/sys/external/bsd/acpica/dist/common/ahtable.c     Sat Dec 18 16:18:30 2021 +0000
@@ -92,6 +92,7 @@
 const AH_TABLE      AcpiGbl_SupportedTables[] =
 {
     {ACPI_SIG_AEST, "Arm Error Source Table"},
+    {ACPI_SIG_AGDI, "Arm Generic Diagnostic Dump and Reset Device Interface Table"},
     {ACPI_SIG_ASF,  "Alert Standard Format Table"},
     {ACPI_SIG_BDAT, "BIOS Data ACPI Table"},
     {ACPI_SIG_BERT, "Boot Error Record Table"},
@@ -125,6 +126,7 @@
     {ACPI_SIG_MSCT, "Maximum System Characteristics Table"},
     {ACPI_SIG_MSDM, "Microsoft Data Management Table"},
     {ACPI_SIG_NFIT, "NVDIMM Firmware Interface Table"},
+    {ACPI_SIG_NHLT, "Non HD Audio Link Table"},
     {ACPI_SIG_PCCT, "Platform Communications Channel Table"},
     {ACPI_SIG_PDTT, "Platform Debug Trigger Table"},
     {ACPI_SIG_PHAT, "Platform Health Assessment Table"},
@@ -148,6 +150,7 @@
     {ACPI_SIG_STAO, "Status Override Table"},
     {ACPI_SIG_SVKL, "Storage Volume Key Location Table"},
     {ACPI_SIG_TCPA, "Trusted Computing Platform Alliance Table"},
+    {ACPI_SIG_TDEL, "TD-Event Log Table"},
     {ACPI_SIG_TPM2, "Trusted Platform Module hardware interface Table"},
     {ACPI_SIG_UEFI, "UEFI Boot Optimization Table"},
     {ACPI_SIG_VIOT, "Virtual I/O Translation Table"},
diff -r 3a9e6ec1c78c -r 24cb8c007cfd sys/external/bsd/acpica/dist/common/dmtable.c
--- a/sys/external/bsd/acpica/dist/common/dmtable.c     Thu Oct 28 14:43:14 2021 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtable.c     Sat Dec 18 16:18:30 2021 +0000
@@ -59,10 +59,11 @@
 
 /* Common format strings for commented values */
 
-#define UINT8_FORMAT        "%2.2X [%s]\n"
-#define UINT16_FORMAT       "%4.4X [%s]\n"
-#define UINT32_FORMAT       "%8.8X [%s]\n"
-#define STRING_FORMAT       "[%s]\n"
+#define UINT8_FORMAT            "%2.2X [%s]\n"
+#define UINT8_FORMAT_NO_NEWLINE "%2.2X [%s]"
+#define UINT16_FORMAT           "%4.4X [%s]\n"
+#define UINT32_FORMAT           "%8.8X [%s]\n"
+#define STRING_FORMAT           "[%s]\n"
 
 /* These tables map a subtable type to a description string */
 
@@ -329,6 +330,50 @@
     "Unknown Direction"                 /* Reserved */
 };
 
+static const char           *AcpiDmNhltMicTypeNames[] =
+{
+    "Omnidirectional",                  /* ACPI_NHLT_MIC_OMNIDIRECTIONAL */
+    "Subcardioid",                      /* ACPI_NHLT_MIC_SUBCARDIOID */
+    "Cardioid",                         /* ACPI_NHLT_MIC_CARDIOID */
+    "SuperCardioid",                    /* ACPI_NHLT_MIC_SUPER_CARDIOID */
+    "HyperCardioid",                    /* ACPI_NHLT_MIC_HYPER_CARDIOID */
+    "8 Shaped",                         /* ACPI_NHLT_MIC_8_SHAPED */
+    "Reserved Mic Type",                /* Reserved */
+    "Vendor Defined",                   /* ACPI_NHLT_MIC_VENDOR_DEFINED */
+    "Unknown Mic Type"                  /* ACPI_NHLT_MIC_RESERVED */
+};
+
+static const char           *AcpiDmNhltMicPositionNames[] =
+{
+    "Top",                              /* ACPI_NHLT_MIC_POSITION_TOP */
+    "Bottom",                           /* ACPI_NHLT_MIC_POSITION_BOTTOM */
+    "Left",                             /* ACPI_NHLT_MIC_POSITION_LEFT */
+    "Right",                            /* ACPI_NHLT_MIC_POSITION_RIGHT */
+    "Front",                            /* ACPI_NHLT_MIC_POSITION_FRONT */
+    "Back",                             /* ACPI_NHLT_MIC_POSITION_BACK */
+    "Unknown Mic Position"              /* 6 and above are reserved */
+};
+
+static const char           *AcpiDmNhltMicArrayTypeNames[] =
+{
+    "Unknown Array Type",               /* ACPI_NHLT_ARRAY_TYPE_RESERVED */
+    "Small Linear 2-element",           /* ACPI_NHLT_SMALL_LINEAR_2ELEMENT */
+    "Big Linear 2-element",             /* ACPI_NHLT_BIG_LINEAR_2ELEMENT */
+    "Linear 4-element 1st Geometry",    /* ACPI_NHLT_FIRST_GEOMETRY_LINEAR_4ELEMENT */
+    "Planar L-shaped 4-element",        /* ACPI_NHLT_PLANAR_LSHAPED_4ELEMENT */
+    "Linear 4-element 2nd Geometry",    /* ACPI_NHLT_SECOND_GEOMETRY_LINEAR_4ELEMENT */
+    "Vendor Defined"                    /* ACPI_NHLT_VENDOR_DEFINED */
+};
+
+static const char           *AcpiDmNhltConfigTypeNames[] =
+{
+    "Generic Type",                     /* ACPI_NHLT_CONFIG_TYPE_GENERIC */
+    "Microphone Array",                 /* ACPI_NHLT_CONFIG_TYPE_MIC_ARRAY */
+    "Reserved",                         /* ACPI_NHLT_CONFIG_TYPE_RESERVED */
+    "Render Feedback",                  /* ACPI_NHLT_CONFIG_TYPE_RENDER_FEEDBACK */
+    "Unknown Config Type"               /* ACPI_NHLT_CONFIG_TYPE_RESERVED */
+};
+
 static const char           *AcpiDmPcctSubnames[] =
 {
     "Generic Communications Subspace",  /* ACPI_PCCT_TYPE_GENERIC_SUBSPACE */
@@ -496,6 +541,7 @@
 const ACPI_DMTABLE_DATA     AcpiDmTableData[] =
 {
     {ACPI_SIG_AEST, NULL,                   AcpiDmDumpAest, DtCompileAest,  TemplateAest},
+    {ACPI_SIG_AGDI, AcpiDmTableInfoAgdi,    NULL,           NULL,           TemplateAgdi},
     {ACPI_SIG_ASF,  NULL,                   AcpiDmDumpAsf,  DtCompileAsf,   TemplateAsf},
     {ACPI_SIG_BDAT, AcpiDmTableInfoBdat,    NULL,           NULL,           TemplateBdat},
     {ACPI_SIG_BERT, AcpiDmTableInfoBert,    NULL,           NULL,           TemplateBert},
@@ -527,7 +573,7 @@
     {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_NHLT, AcpiDmTableInfoNhlt,    AcpiDmDumpNhlt, DtCompileNhlt,  TemplateNhlt},
     {ACPI_SIG_PCCT, AcpiDmTableInfoPcct,    AcpiDmDumpPcct, DtCompilePcct,  TemplatePcct},
     {ACPI_SIG_PDTT, AcpiDmTableInfoPdtt,    AcpiDmDumpPdtt, DtCompilePdtt,  TemplatePdtt},
     {ACPI_SIG_PHAT, NULL,                   AcpiDmDumpPhat, DtCompilePhat,  TemplatePhat},
@@ -549,6 +595,7 @@
     {ACPI_SIG_STAO, NULL,                   AcpiDmDumpStao, DtCompileStao,  TemplateStao},
     {ACPI_SIG_SVKL, AcpiDmTableInfoSvkl,    AcpiDmDumpSvkl, DtCompileSvkl,  TemplateSvkl},
     {ACPI_SIG_TCPA, NULL,                   AcpiDmDumpTcpa, DtCompileTcpa,  TemplateTcpa},
+    {ACPI_SIG_TDEL, AcpiDmTableInfoTdel,    NULL,           NULL,           TemplateTdel},
     {ACPI_SIG_TPM2, AcpiDmTableInfoTpm2,    AcpiDmDumpTpm2, DtCompileTpm2,  TemplateTpm2},
     {ACPI_SIG_UEFI, AcpiDmTableInfoUefi,    NULL,           DtCompileUefi,  TemplateUefi},
     {ACPI_SIG_VIOT, AcpiDmTableInfoViot,    AcpiDmDumpViot, DtCompileViot,  TemplateViot},
@@ -687,7 +734,8 @@
             return;
         }
     }
-    else if (ACPI_VALIDATE_RSDP_SIG (Table->Signature))
+    else if (ACPI_VALIDATE_RSDP_SIG (ACPI_CAST_PTR (ACPI_TABLE_RSDP,
+        Table)->Signature))
     {
         Length = AcpiDmDumpRsdp (Table);
     }
@@ -932,7 +980,7 @@
 
         /* Check for beyond subtable end or (worse) beyond EOT */
 
-        if (SubtableLength && (Info->Offset >= SubtableLength))
+        if (SubtableLength && (Info->Offset > SubtableLength))
         {
             AcpiOsPrintf (
                 "/**** ACPI subtable terminates early (Len %u) - "
@@ -966,6 +1014,10 @@
         case ACPI_DMT_MADT:
         case ACPI_DMT_NHLT1:
         case ACPI_DMT_NHLT1a:
+        case ACPI_DMT_NHLT1b:
+        case ACPI_DMT_NHLT1c:
+        case ACPI_DMT_NHLT1d:
+        case ACPI_DMT_NHLT1f:
         case ACPI_DMT_PCCT:
         case ACPI_DMT_PMTT:
         case ACPI_DMT_PPTT:
@@ -994,6 +1046,7 @@
         case ACPI_DMT_HEST:
         case ACPI_DMT_HMAT:
         case ACPI_DMT_NFIT:
+        case ACPI_DMT_NHLT1e:
         case ACPI_DMT_PHAT:
 
             ByteLength = 2;
@@ -1740,6 +1793,95 @@
                 AcpiDmNhltDirectionNames[Temp8]);
             break;
 
+        case ACPI_DMT_NHLT1b:
+
+            /* NHLT microphone type */
+
+            Temp8 = *Target;
+            if (Temp8 > ACPI_NHLT_MIC_RESERVED)
+            {
+                Temp8 = ACPI_NHLT_MIC_RESERVED;
+            }
+
+            AcpiOsPrintf (UINT8_FORMAT, *Target,
+                AcpiDmNhltMicTypeNames[Temp8]);
+            break;
+
+        case ACPI_DMT_NHLT1c:
+
+            /* NHLT microphone position */
+
+            Temp8 = *Target;
+            if (Temp8 > ACPI_NHLT_MIC_POSITION_RESERVED)
+            {
+                Temp8 = ACPI_NHLT_MIC_POSITION_RESERVED;
+            }
+
+            AcpiOsPrintf (UINT8_FORMAT, *Target,
+                AcpiDmNhltMicPositionNames[Temp8]);
+            break;
+
+        case ACPI_DMT_NHLT1d:
+
+            /* NHLT microphone array type */
+
+            Temp8 = *Target & ACPI_NHLT_ARRAY_TYPE_MASK;
+            if (Temp8 < ACPI_NHLT_ARRAY_TYPE_RESERVED)
+            {
+                Temp8 = ACPI_NHLT_ARRAY_TYPE_RESERVED;
+            }
+
+            AcpiOsPrintf (UINT8_FORMAT_NO_NEWLINE, *Target,
+                AcpiDmNhltMicArrayTypeNames[Temp8 - ACPI_NHLT_ARRAY_TYPE_RESERVED]);
+
+            Temp8 = *Target;
+            if (Temp8 & ACPI_NHLT_MIC_SNR_SENSITIVITY_EXT)
+            {
+                AcpiOsPrintf (" [%s]", "SNR and Sensitivity");
+            }
+
+            AcpiOsPrintf ("\n");
+            break;
+
+        case ACPI_DMT_NHLT1e:
+
+            /* NHLT Endpoint Device ID */
+
+            Temp16 = ACPI_GET16 (Target);
+            if (Temp16 == 0xAE20)
+            {
+                Name = "PDM DMIC";



Home | Main Index | Thread Index | Old Index