From owner-dev-commits-src-all@freebsd.org Thu Apr 1 23:37:29 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3B495BA76C; Thu, 1 Apr 2021 23:37:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FBKNT62lRz3Frf; Thu, 1 Apr 2021 23:37:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C1D4615D4F; Thu, 1 Apr 2021 23:37:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 131NbTa2051274; Thu, 1 Apr 2021 23:37:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 131NbTtb051273; Thu, 1 Apr 2021 23:37:29 GMT (envelope-from git) Date: Thu, 1 Apr 2021 23:37:29 GMT Message-Id: <202104012337.131NbTtb051273@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jung-uk Kim Subject: git: cfd1ed46817c - main - Merge ACPICA 20210331. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cfd1ed46817c680fa7822bc523b054ff644055dc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2021 23:37:30 -0000 The branch main has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=cfd1ed46817c680fa7822bc523b054ff644055dc commit cfd1ed46817c680fa7822bc523b054ff644055dc Author: Jung-uk Kim AuthorDate: 2021-04-01 22:01:03 +0000 Commit: Jung-uk Kim CommitDate: 2021-04-01 23:36:59 +0000 Merge ACPICA 20210331. (cherry picked from commit 1e02e5b0ba8634758c128dcb43c67342c7219cd4) --- sys/contrib/dev/acpica/changes.txt | 40 ++ sys/contrib/dev/acpica/common/acfileio.c | 3 + sys/contrib/dev/acpica/common/ahids.c | 2 + sys/contrib/dev/acpica/common/ahpredef.c | 4 + sys/contrib/dev/acpica/common/ahtable.c | 3 + sys/contrib/dev/acpica/common/ahuuids.c | 1 + sys/contrib/dev/acpica/common/cmfsize.c | 2 +- sys/contrib/dev/acpica/common/dmrestag.c | 14 +- sys/contrib/dev/acpica/common/dmtable.c | 103 ++++- sys/contrib/dev/acpica/common/dmtbdump1.c | 76 ++++ sys/contrib/dev/acpica/common/dmtbdump2.c | 468 ++++++++++++++------- sys/contrib/dev/acpica/common/dmtbdump3.c | 100 +++++ sys/contrib/dev/acpica/common/dmtbinfo1.c | 34 +- sys/contrib/dev/acpica/common/dmtbinfo2.c | 247 +++++++++-- sys/contrib/dev/acpica/common/dmtbinfo3.c | 72 ++++ sys/contrib/dev/acpica/compiler/aslallocate.c | 2 +- sys/contrib/dev/acpica/compiler/aslascii.c | 4 +- sys/contrib/dev/acpica/compiler/aslcompiler.h | 4 + sys/contrib/dev/acpica/compiler/aslcompiler.l | 1 + sys/contrib/dev/acpica/compiler/aslerror.c | 6 +- sys/contrib/dev/acpica/compiler/aslhelpers.y | 5 + sys/contrib/dev/acpica/compiler/aslmap.c | 1 + sys/contrib/dev/acpica/compiler/aslmessages.c | 3 +- sys/contrib/dev/acpica/compiler/aslmessages.h | 1 + sys/contrib/dev/acpica/compiler/aslnamesp.c | 3 +- sys/contrib/dev/acpica/compiler/aslopcodes.c | 2 +- sys/contrib/dev/acpica/compiler/asloperands.c | 2 +- sys/contrib/dev/acpica/compiler/aslparser.y | 2 +- sys/contrib/dev/acpica/compiler/aslprintf.c | 2 +- sys/contrib/dev/acpica/compiler/aslresource.c | 5 + sys/contrib/dev/acpica/compiler/aslresources.y | 20 +- sys/contrib/dev/acpica/compiler/aslrestype2s.c | 136 ++++++ sys/contrib/dev/acpica/compiler/asltokens.y | 1 + sys/contrib/dev/acpica/compiler/asltransform.c | 5 + sys/contrib/dev/acpica/compiler/asltypes.y | 2 + sys/contrib/dev/acpica/compiler/dtcompiler.h | 15 + sys/contrib/dev/acpica/compiler/dttable1.c | 143 ++++++- sys/contrib/dev/acpica/compiler/dttable2.c | 454 +++++++++++++++++--- sys/contrib/dev/acpica/compiler/dttemplate.h | 343 +++++++++------ sys/contrib/dev/acpica/compiler/dtutils.c | 5 + .../dev/acpica/components/disassembler/dmresrcl2.c | 90 +++- .../dev/acpica/components/events/evhandler.c | 7 + .../dev/acpica/components/events/evregion.c | 75 ++-- .../dev/acpica/components/events/evxfregn.c | 1 + .../dev/acpica/components/namespace/nsaccess.c | 3 +- .../dev/acpica/components/namespace/nsrepair2.c | 18 +- .../dev/acpica/components/resources/rscalc.c | 4 +- .../dev/acpica/components/resources/rsdump.c | 10 + .../dev/acpica/components/resources/rsdumpinfo.c | 15 + .../dev/acpica/components/resources/rsinfo.c | 6 +- .../dev/acpica/components/resources/rslist.c | 10 +- .../dev/acpica/components/resources/rsmisc.c | 18 + .../dev/acpica/components/resources/rsserial.c | 70 +++ .../dev/acpica/components/utilities/utresdecode.c | 11 +- .../dev/acpica/components/utilities/utresrc.c | 1 + sys/contrib/dev/acpica/include/acdisasm.h | 44 +- sys/contrib/dev/acpica/include/acobject.h | 1 + sys/contrib/dev/acpica/include/acoutput.h | 2 +- sys/contrib/dev/acpica/include/acpixf.h | 2 +- sys/contrib/dev/acpica/include/acpredef.h | 15 + sys/contrib/dev/acpica/include/acresrc.h | 4 + sys/contrib/dev/acpica/include/acrestyp.h | 12 +- sys/contrib/dev/acpica/include/actbinfo.h | 26 +- sys/contrib/dev/acpica/include/actbl1.h | 63 ++- sys/contrib/dev/acpica/include/actbl2.h | 280 ++++++++++-- sys/contrib/dev/acpica/include/actbl3.h | 84 +++- sys/contrib/dev/acpica/include/acutils.h | 1 + sys/contrib/dev/acpica/include/acuuid.h | 1 + sys/contrib/dev/acpica/include/amlresrc.h | 25 +- sys/contrib/dev/acpica/include/platform/acgcc.h | 2 +- 70 files changed, 2757 insertions(+), 480 deletions(-) diff --git a/sys/contrib/dev/acpica/changes.txt b/sys/contrib/dev/acpica/changes.txt index e58f906382b5..0b71b266a6ba 100644 --- a/sys/contrib/dev/acpica/changes.txt +++ b/sys/contrib/dev/acpica/changes.txt @@ -1,3 +1,43 @@ +---------------------------------------- +31 March 2021. Summary of changes for version 20210331: + +This release is available at https://acpica.org/downloads, and includes +all ACPI 6.4 support + +1) ACPICA kernel-resident subsystem: +ACPI 6.4: iASL: deprecate DDBHandleObj keyword +Always create namespace nodes using AcpiNsCreateNode(). ACPICA is +allocating an object using kmalloc(), but then frees it +using kmem_cache_free(<"Acpi-Namespace" kmem_cache>). This is wrong. +Fixed a race condition in generic serial bus operation region handler. +Fixed by Hans de Goede. + +2) iASL Compiler/Disassembler and ACPICA tools: + +ACPI 6.4: NFIT: add Location Cookie field +ACPI 6.4: HMAT: add new fields/flags +ACPI 6.4: Add new flags in SRAT +ACPI 6.4: add SDEV secure access components +ACPI 6.4: add Csi2Bus resource template +ACPI 6.4: add support for PHAT table +ACPI 6.4: add support for PMTT table +Add disassembly support for the IVRS table. Compilation of the table is +not yet complete. +Fixed a potential infinite loop due to type mismatch. The for-loop is +using a UINT8 counter and comparing the upper +limit against a UINT32 AslGbl_ExpectedMessagesIndex maximum. In +the case where AslGbl_ExpectedMessagesIndex is > 255 the counter i +will wrap around to zero and the loop will never exit. I suspect +the AslGbl_ExpectedMessagesIndex is never that high, but fixing +this does future proof the code and cleans up static analysis +warnings.Colin King. +iASL/TableCompiler: update it with IORT table E.b revision changes. From +shamiali2008. +iASL/TableCompiler: Add compilation support for the VIOT table. Signed- +off-by: Jean-Philippe Brucker. +iASL/TableCompiler: Add compilation support for CEDT table. Also, update +the CEDT template. + ---------------------------------------- 05 January 2021. Summary of changes for version 20210105: diff --git a/sys/contrib/dev/acpica/common/acfileio.c b/sys/contrib/dev/acpica/common/acfileio.c index 5124e2d7f1ed..b93b14d3e654 100644 --- a/sys/contrib/dev/acpica/common/acfileio.c +++ b/sys/contrib/dev/acpica/common/acfileio.c @@ -559,6 +559,9 @@ AcValidateTableHeader ( if (Actual < sizeof (ACPI_TABLE_HEADER)) { + fprintf (stderr, + "Could not read entire table header: Actual %u, Requested %u\n", + (UINT32) Actual, (UINT32) sizeof (ACPI_TABLE_HEADER)); return (AE_ERROR); } diff --git a/sys/contrib/dev/acpica/common/ahids.c b/sys/contrib/dev/acpica/common/ahids.c index 6249fa40369a..35d17513a57b 100644 --- a/sys/contrib/dev/acpica/common/ahids.c +++ b/sys/contrib/dev/acpica/common/ahids.c @@ -188,6 +188,8 @@ const AH_DEVICE_ID AslDeviceIds[] = {"ACPI0012", "NVDIMM Root Device"}, {"ACPI0013", "Generic Event Device"}, {"ACPI0014", "Wireless Power Calibration Device"}, + {"ACPI0015", "USB4 host interface device"}, + {"ACPI0016", "Compute Express Link Host Bridge"}, {"ADMA0F28", "Intel Audio DMA"}, {"AMCR0F28", "Intel Audio Machine Driver"}, {"ATK4001", "Asus Radio Control Button"}, diff --git a/sys/contrib/dev/acpica/common/ahpredef.c b/sys/contrib/dev/acpica/common/ahpredef.c index 5f407bcbf2f4..89f8a784efd3 100644 --- a/sys/contrib/dev/acpica/common/ahpredef.c +++ b/sys/contrib/dev/acpica/common/ahpredef.c @@ -200,12 +200,16 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_BMC", "Battery Maintenance Control", "Sets battery maintenance and control features"), AH_PREDEF ("_BMD", "Battery Maintenance Data", "Returns battery maintenance, control, and state data"), AH_PREDEF ("_BMS", "Battery Measurement Sampling Time", "Sets the battery measurement sampling time"), + AH_PREDEF ("_BPC", "Battery Power Characteristics", "Returns static values used to configure power threshold support in the platform firmware"), + AH_PREDEF ("_BPS", "Battery Power State", "Returns the power delivery capabilities of the battery at the present time"), + AH_PREDEF ("_BPT", "Battery Power Threshold", "Set a relative battery peak power capability change threshold"), AH_PREDEF ("_BQC", "Brightness Query Current", "Returns the current display brightness level"), AH_PREDEF ("_BST", "Battery Status", "Returns a Control Method Battery status block"), AH_PREDEF ("_BTH", "Battery Throttle Limit", "Thermal limit for charging and discharging"), AH_PREDEF ("_BTM", "Battery Time", "Returns the battery runtime"), AH_PREDEF ("_BTP", "Battery Trip Point", "Sets a Control Method Battery trip point"), AH_PREDEF ("_CBA", "Configuration Base Address", "Sets the base address for a PCI Express host bridge"), + AH_PREDEF ("_CBR", "CXL Host Bridge Register Info", "Get the memory location of CXL Host Bridge Registers"), AH_PREDEF ("_CCA", "Cache Coherency Attribute", "Returns a device's support level for cache coherency"), AH_PREDEF ("_CDM", "Clock Domain", "Returns a logical processor's clock domain identifier"), AH_PREDEF ("_CID", "Compatible ID", "Returns a device's Plug and Play Compatible ID list"), diff --git a/sys/contrib/dev/acpica/common/ahtable.c b/sys/contrib/dev/acpica/common/ahtable.c index cf369e4c0695..3d3eee5b41b4 100644 --- a/sys/contrib/dev/acpica/common/ahtable.c +++ b/sys/contrib/dev/acpica/common/ahtable.c @@ -203,6 +203,7 @@ const AH_TABLE AcpiGbl_SupportedTables[] = {ACPI_SIG_BERT, "Boot Error Record Table"}, {ACPI_SIG_BGRT, "Boot Graphics Resource Table"}, {ACPI_SIG_BOOT, "Simple Boot Flag Table"}, + {ACPI_SIG_CEDT, "CXL Early Discovery Table"}, {ACPI_SIG_CPEP, "Corrected Platform Error Polling table"}, {ACPI_SIG_CSRT, "Core System Resource Table"}, {ACPI_SIG_DBG2, "Debug Port table type 2"}, @@ -231,6 +232,7 @@ const AH_TABLE AcpiGbl_SupportedTables[] = {ACPI_SIG_MSDM, "Microsoft Data Management table"}, {ACPI_SIG_NFIT, "NVDIMM Firmware Interface Table"}, {ACPI_SIG_PCCT, "Platform Communications Channel Table"}, + {ACPI_SIG_PHAT, "Platform Health Assessment Table"}, {ACPI_SIG_PDTT, "Platform Debug Trigger Table"}, {ACPI_SIG_PMTT, "Platform Memory Topology Table"}, {ACPI_SIG_PPTT, "Processor Properties Topology Table"}, @@ -251,6 +253,7 @@ const AH_TABLE AcpiGbl_SupportedTables[] = {ACPI_SIG_TCPA, "Trusted Computing Platform Alliance 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"}, {ACPI_SIG_WAET, "Windows ACPI Emulated Devices Table"}, {ACPI_SIG_WDAT, "Watchdog Action Table"}, {ACPI_SIG_WDDT, "Watchdog Description Table"}, diff --git a/sys/contrib/dev/acpica/common/ahuuids.c b/sys/contrib/dev/acpica/common/ahuuids.c index 13c764d298a8..73585e81c4da 100644 --- a/sys/contrib/dev/acpica/common/ahuuids.c +++ b/sys/contrib/dev/acpica/common/ahuuids.c @@ -208,6 +208,7 @@ const AH_UUID Gbl_AcpiUuids[] = {"Device Graphs for _DSD", UUID_DEVICE_GRAPHS}, {"Hierarchical Data Extension", UUID_HIERARCHICAL_DATA_EXTENSION}, {"ARM Coresight Graph", UUID_CORESIGHT_GRAPH}, + {"USB4 Capabilities", UUID_USB4_CAPABILITIES}, {NULL, NULL} }; diff --git a/sys/contrib/dev/acpica/common/cmfsize.c b/sys/contrib/dev/acpica/common/cmfsize.c index 7026c17b43bc..eb419a94f9af 100644 --- a/sys/contrib/dev/acpica/common/cmfsize.c +++ b/sys/contrib/dev/acpica/common/cmfsize.c @@ -1,6 +1,6 @@ /****************************************************************************** * - * Module Name: cfsize - Common get file size function + * Module Name: cmfsize - Common get file size function * *****************************************************************************/ diff --git a/sys/contrib/dev/acpica/common/dmrestag.c b/sys/contrib/dev/acpica/common/dmrestag.c index 15ddb8f2da44..a430a6d7a1c7 100644 --- a/sys/contrib/dev/acpica/common/dmrestag.c +++ b/sys/contrib/dev/acpica/common/dmrestag.c @@ -384,6 +384,14 @@ static const ACPI_RESOURCE_TAG AcpiDmGpioIoTags[] = /* Subtype tables for SerialBus descriptors */ +static const ACPI_RESOURCE_TAG AcpiDmCsi2SerialBusTags[] = /* ACPI 6.4 */ +{ + {( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE}, + {( 7 * 8) + 0, ACPI_RESTAG_PHYTYPE}, + {( 7 * 8) + 2, ACPI_RESTAG_LOCALPORT}, + {0, NULL} +}; + static const ACPI_RESOURCE_TAG AcpiDmI2cSerialBusTags[] = { {( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE}, @@ -424,6 +432,7 @@ static const ACPI_RESOURCE_TAG AcpiDmUartSerialBusTags[] = {0, NULL} }; + /* Subtype tables for PinFunction descriptor */ static const ACPI_RESOURCE_TAG AcpiDmPinFunctionTags[] = @@ -539,7 +548,8 @@ static const ACPI_RESOURCE_TAG *AcpiGbl_SerialResourceTags[] = NULL, /* 0x00 Reserved */ AcpiDmI2cSerialBusTags, /* 0x01 I2C SerialBus */ AcpiDmSpiSerialBusTags, /* 0x02 SPI SerialBus */ - AcpiDmUartSerialBusTags /* 0x03 UART SerialBus */ + AcpiDmUartSerialBusTags, /* 0x03 UART SerialBus */ + AcpiDmCsi2SerialBusTags /* 0x04 CSI2 SerialBus */ }; /* @@ -987,7 +997,7 @@ AcpiDmGetResourceTag ( case ACPI_RESOURCE_NAME_SERIAL_BUS: - /* SerialBus has 3 subtypes: I2C, SPI, and UART */ + /* SerialBus has 4 subtypes: I2C, SPI, UART, and CSI2 */ if ((Resource->CommonSerialBus.Type == 0) || (Resource->CommonSerialBus.Type > AML_RESOURCE_MAX_SERIALBUSTYPE)) diff --git a/sys/contrib/dev/acpica/common/dmtable.c b/sys/contrib/dev/acpica/common/dmtable.c index 565a76071aad..6f34e82c1b62 100644 --- a/sys/contrib/dev/acpica/common/dmtable.c +++ b/sys/contrib/dev/acpica/common/dmtable.c @@ -184,6 +184,12 @@ static const char *AcpiDmAsfSubnames[] = "Unknown Subtable Type" /* Reserved */ }; +static const char *AcpiDmCedtSubnames[] = +{ + "CXL Host Bridge Structure", + "Unknown Subtable Type" /* Reserved */ +}; + static const char *AcpiDmDmarSubnames[] = { "Hardware Unit Definition", @@ -367,15 +373,24 @@ static const char *AcpiDmPcctSubnames[] = "HW-Reduced Comm Subspace Type2", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 */ "Extended PCC Master Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE */ "Extended PCC Slave Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE */ + "HW Registers based Comm Subspace", /* ACPI_PCCT_TYPE_HW_REG_COMM_SUBSPACE */ "Unknown Subtable Type" /* Reserved */ }; +static const char *AcpiDmPhatSubnames[] = +{ + "Firmware Version Data", /* ACPI_PHAT_TYPE_FW_VERSION_DATA */ + "Firmware Health Data", /* ACPI_PHAT_TYPE_FW_HEALTH_DATA */ + "Unknown Subtable Type" /* Reserved */ +}; + static const char *AcpiDmPmttSubnames[] = { "Socket", /* ACPI_PMTT_TYPE_SOCKET */ "Memory Controller", /* ACPI_PMTT_TYPE_CONTROLLER */ "Physical Component (DIMM)", /* ACPI_PMTT_TYPE_DIMM */ - "Unknown Subtable Type" /* Reserved */ + "Unknown Subtable Type", /* Reserved */ + "Vendor Specific" /* ACPI_PMTT_TYPE_VENDOR */ }; static const char *AcpiDmPpttSubnames[] = @@ -434,6 +449,16 @@ static const char *AcpiDmLpitSubnames[] = "Unknown Subtable Type" /* Reserved */ }; +static const char *AcpiDmViotSubnames[] = +{ + "Unknown Subtable Type", /* 0 -Reserved */ + "PCI Range", + "MMIO Endpoint", + "VirtIO-PCI IOMMU", + "VirtIO-MMIO IOMMU", + "Unknown Subtable Type" /* Reserved */ +}; + #define ACPI_FADT_PM_RESERVED 9 static const char *AcpiDmFadtProfiles[] = @@ -474,8 +499,8 @@ static const char *AcpiDmGasAccessWidth[] = * handler. This table must be NULL terminated. RSDP and FACS are * special-cased elsewhere. * - * Note: Any tables added here should be duplicated within AcpiSupportedTables - * in the file common/ahtable.c + * Note: Any tables added here should be duplicated within + * AcpiGbl_SupportedTables in the file common/ahtable.c * ******************************************************************************/ @@ -485,6 +510,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, TemplateBert}, {ACPI_SIG_BGRT, AcpiDmTableInfoBgrt, NULL, NULL, TemplateBgrt}, {ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, TemplateBoot}, + {ACPI_SIG_CEDT, NULL, AcpiDmDumpCedt, DtCompileCedt, TemplateCedt}, {ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, TemplateCpep}, {ACPI_SIG_CSRT, NULL, AcpiDmDumpCsrt, DtCompileCsrt, TemplateCsrt}, {ACPI_SIG_DBG2, AcpiDmTableInfoDbg2, AcpiDmDumpDbg2, DtCompileDbg2, TemplateDbg2}, @@ -512,6 +538,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_NFIT, AcpiDmTableInfoNfit, AcpiDmDumpNfit, DtCompileNfit, TemplateNfit}, {ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct}, {ACPI_SIG_PDTT, AcpiDmTableInfoPdtt, AcpiDmDumpPdtt, DtCompilePdtt, TemplatePdtt}, + {ACPI_SIG_PHAT, NULL, AcpiDmDumpPhat, DtCompilePhat, TemplatePhat}, {ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt}, {ACPI_SIG_PPTT, NULL, AcpiDmDumpPptt, DtCompilePptt, TemplatePptt}, {ACPI_SIG_RASF, AcpiDmTableInfoRasf, NULL, NULL, TemplateRasf}, @@ -529,6 +556,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_TCPA, NULL, AcpiDmDumpTcpa, DtCompileTcpa, TemplateTcpa}, {ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, AcpiDmDumpTpm2, DtCompileTpm2, TemplateTpm2}, {ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, DtCompileUefi, TemplateUefi}, + {ACPI_SIG_VIOT, AcpiDmTableInfoViot, AcpiDmDumpViot, DtCompileViot, TemplateViot}, {ACPI_SIG_WAET, AcpiDmTableInfoWaet, NULL, NULL, TemplateWaet}, {ACPI_SIG_WDAT, NULL, AcpiDmDumpWdat, DtCompileWdat, TemplateWdat}, {ACPI_SIG_WDDT, AcpiDmTableInfoWddt, NULL, NULL, TemplateWddt}, @@ -936,6 +964,7 @@ AcpiDmDumpTable ( case ACPI_DMT_CHKSUM: case ACPI_DMT_SPACEID: case ACPI_DMT_ACCWIDTH: + case ACPI_DMT_CEDT: case ACPI_DMT_IVRS: case ACPI_DMT_GTDT: case ACPI_DMT_MADT: @@ -952,6 +981,7 @@ AcpiDmDumpTable ( case ACPI_DMT_ERSTACT: case ACPI_DMT_ERSTINST: case ACPI_DMT_DMAR_SCOPE: + case ACPI_DMT_VIOT: ByteLength = 1; break; @@ -961,6 +991,7 @@ AcpiDmDumpTable ( case ACPI_DMT_HEST: case ACPI_DMT_HMAT: case ACPI_DMT_NFIT: + case ACPI_DMT_PHAT: ByteLength = 2; break; @@ -1030,6 +1061,17 @@ AcpiDmDumpTable ( ByteLength = SubtableLength; break; + case ACPI_DMT_PMTT_VENDOR: + /* + * Calculate the length of the vendor data for the PMTT table: + * Length = (Current Subtable ptr + Subtable length) - + * Start of the vendor data (Target) + */ + ByteLength = ((ACPI_CAST_PTR (char, Table) + + (ACPI_CAST_PTR (ACPI_PMTT_HEADER, Table)->Length)) - + ACPI_CAST_PTR (char, Target)); + break; + case ACPI_DMT_STRING: ByteLength = strlen (ACPI_CAST_PTR (char, Target)) + 1; @@ -1346,6 +1388,20 @@ AcpiDmDumpTable ( AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmAsfSubnames[Temp16]); break; + case ACPI_DMT_CEDT: + + /* CEDT subtable types */ + + Temp8 = *Target; + if (Temp8 > ACPI_CEDT_TYPE_RESERVED) + { + Temp8 = ACPI_CEDT_TYPE_RESERVED; + } + + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmCedtSubnames[Temp8]); + break; + case ACPI_DMT_DMAR: /* DMAR subtable types */ @@ -1559,16 +1615,33 @@ AcpiDmDumpTable ( AcpiDmPcctSubnames[Temp8]); break; + case ACPI_DMT_PHAT: + + /* PMTT subtable types */ + + Temp16 = *Target; + if (Temp16 > ACPI_PHAT_TYPE_RESERVED) + { + Temp16 = ACPI_PHAT_TYPE_RESERVED; + } + + AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16(Target), + AcpiDmPhatSubnames[Temp16]); + break; + case ACPI_DMT_PMTT: /* PMTT subtable types */ Temp8 = *Target; - if (Temp8 > ACPI_PMTT_TYPE_RESERVED) + if (Temp8 == ACPI_PMTT_TYPE_VENDOR) + { + Temp8 = ACPI_PMTT_TYPE_RESERVED + 1; + } + else if (Temp8 > ACPI_PMTT_TYPE_RESERVED) { Temp8 = ACPI_PMTT_TYPE_RESERVED; } - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmPmttSubnames[Temp8]); break; @@ -1599,6 +1672,8 @@ AcpiDmDumpTable ( break; case ACPI_DMT_RAW_BUFFER: + case ACPI_DMT_BUFFER: + case ACPI_DMT_PMTT_VENDOR: if (ByteLength == 0) { @@ -1606,8 +1681,7 @@ AcpiDmDumpTable ( break; } - AcpiDmDumpBuffer (Table, CurrentOffset, ByteLength, - CurrentOffset, NULL); + AcpiDmDumpBuffer (Target, 0, ByteLength, 0, NULL); break; case ACPI_DMT_SDEV: @@ -1676,6 +1750,7 @@ AcpiDmDumpTable ( { case ACPI_IVRS_TYPE_HARDWARE1: case ACPI_IVRS_TYPE_HARDWARE2: + case ACPI_IVRS_TYPE_HARDWARE3: Name = AcpiDmIvrsSubnames[0]; break; @@ -1710,6 +1785,20 @@ AcpiDmDumpTable ( AcpiDmLpitSubnames[Temp32]); break; + case ACPI_DMT_VIOT: + + /* VIOT subtable types */ + + Temp8 = *Target; + if (Temp8 > ACPI_VIOT_RESERVED) + { + Temp8 = ACPI_VIOT_RESERVED; + } + + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmViotSubnames[Temp8]); + break; + case ACPI_DMT_EXIT: return (AE_OK); diff --git a/sys/contrib/dev/acpica/common/dmtbdump1.c b/sys/contrib/dev/acpica/common/dmtbdump1.c index b9b30dc2f4a5..d134c63f856a 100644 --- a/sys/contrib/dev/acpica/common/dmtbdump1.c +++ b/sys/contrib/dev/acpica/common/dmtbdump1.c @@ -329,6 +329,82 @@ AcpiDmDumpAsf ( } } +/******************************************************************************* + * + * FUNCTION: AcpiDmDumpCedt + * + * PARAMETERS: Table - A CEDT table + * + * RETURN: None + * + * DESCRIPTION: Format the contents of a CEDT. This table type consists + * of an open-ended number of subtables. + * + ******************************************************************************/ + +void +AcpiDmDumpCedt ( + ACPI_TABLE_HEADER *Table) +{ + ACPI_STATUS Status; + ACPI_CEDT_HEADER *Subtable; + UINT32 Length = Table->Length; + UINT32 Offset = sizeof (ACPI_TABLE_CEDT); + ACPI_DMTABLE_INFO *InfoTable; + + + /* There is no main table (other than the standard ACPI header) */ + + Subtable = ACPI_ADD_PTR (ACPI_CEDT_HEADER, Table, Offset); + while (Offset < Table->Length) + { + /* Common subtable header */ + + AcpiOsPrintf ("\n"); + Status = AcpiDmDumpTable (Length, Offset, Subtable, + Subtable->Length, AcpiDmTableInfoCedtHdr); + if (ACPI_FAILURE (Status)) + { + return; + } + + switch (Subtable->Type) + { + case ACPI_CEDT_TYPE_CHBS: + + InfoTable = AcpiDmTableInfoCedt0; + break; + + default: + + AcpiOsPrintf ("\n**** Unknown CEDT subtable type 0x%X\n\n", + Subtable->Type); + + /* Attempt to continue */ + + if (!Subtable->Length) + { + AcpiOsPrintf ("Invalid zero length subtable\n"); + return; + } + goto NextSubtable; + } + + Status = AcpiDmDumpTable (Length, Offset, Subtable, + Subtable->Length, InfoTable); + if (ACPI_FAILURE (Status)) + { + return; + } + +NextSubtable: + /* Point to next subtable */ + + Offset += Subtable->Length; + Subtable = ACPI_ADD_PTR (ACPI_CEDT_HEADER, Subtable, + Subtable->Length); + } +} /******************************************************************************* * diff --git a/sys/contrib/dev/acpica/common/dmtbdump2.c b/sys/contrib/dev/acpica/common/dmtbdump2.c index e5124a26d587..e3ab39b53078 100644 --- a/sys/contrib/dev/acpica/common/dmtbdump2.c +++ b/sys/contrib/dev/acpica/common/dmtbdump2.c @@ -181,6 +181,7 @@ AcpiDmDumpIort ( ACPI_IORT_NODE *IortNode; ACPI_IORT_ITS_GROUP *IortItsGroup = NULL; ACPI_IORT_SMMU *IortSmmu = NULL; + ACPI_IORT_RMR *IortRmr = NULL; UINT32 Offset; UINT32 NodeOffset; UINT32 Length; @@ -188,6 +189,7 @@ AcpiDmDumpIort ( char *String; UINT32 i; UINT32 MappingByteLength; + UINT8 Revision; /* Main table */ @@ -198,6 +200,17 @@ AcpiDmDumpIort ( return; } + Revision = Table->Revision; + + /* Both IORT Rev E and E.a have known issues and are not supported */ + + if (Revision == 1 || Revision == 2) + { + AcpiOsPrintf ("\n**** Unsupported IORT revision 0x%X\n", + Revision); + return; + } + Iort = ACPI_CAST_PTR (ACPI_TABLE_IORT, Table); Offset = sizeof (ACPI_TABLE_IORT); @@ -221,8 +234,18 @@ AcpiDmDumpIort ( IortNode = ACPI_ADD_PTR (ACPI_IORT_NODE, Table, Offset); AcpiOsPrintf ("\n"); Length = ACPI_OFFSET (ACPI_IORT_NODE, NodeData); - Status = AcpiDmDumpTable (Table->Length, Offset, - IortNode, Length, AcpiDmTableInfoIortHdr); + + if (Revision == 0) + { + Status = AcpiDmDumpTable (Table->Length, Offset, + IortNode, Length, AcpiDmTableInfoIortHdr); + } + else if (Revision >= 3) + { + Status = AcpiDmDumpTable (Table->Length, Offset, + IortNode, Length, AcpiDmTableInfoIortHdr3); + } + if (ACPI_FAILURE (Status)) { return; @@ -272,6 +295,13 @@ AcpiDmDumpIort ( Length = IortNode->Length - NodeOffset; break; + case ACPI_IORT_NODE_RMR: + + InfoTable = AcpiDmTableInfoIort6; + Length = IortNode->Length - NodeOffset; + IortRmr = ACPI_ADD_PTR (ACPI_IORT_RMR, IortNode, NodeOffset); + break; + default: AcpiOsPrintf ("\n**** Unknown IORT node type 0x%X\n", @@ -391,7 +421,30 @@ AcpiDmDumpIort ( } break; - default: + case ACPI_IORT_NODE_RMR: + + /* Validate IortRmr to avoid compiler warnings */ + if (IortRmr) + { + NodeOffset = IortRmr->RmrOffset; + Length = sizeof (ACPI_IORT_RMR_DESC); + for (i = 0; i < IortRmr->RmrCount; i++) + { + AcpiOsPrintf ("\n"); + Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, + ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset), + Length, AcpiDmTableInfoIort6a); + if (ACPI_FAILURE (Status)) + { + return; + } + + NodeOffset += Length; + } + } + break; + + default: break; } @@ -434,8 +487,6 @@ NextSubtable: * ******************************************************************************/ -static UINT8 EntrySizes[] = {4,8,16,32}; - void AcpiDmDumpIvrs ( ACPI_TABLE_HEADER *Table) @@ -445,6 +496,7 @@ AcpiDmDumpIvrs ( UINT32 EntryOffset; UINT32 EntryLength; UINT32 EntryType; + ACPI_IVRS_DEVICE_HID *HidSubtable; ACPI_IVRS_DE_HEADER *DeviceEntry; ACPI_IVRS_HEADER *Subtable; ACPI_DMTABLE_INFO *InfoTable; @@ -481,6 +533,7 @@ AcpiDmDumpIvrs ( break; case ACPI_IVRS_TYPE_HARDWARE2: + case ACPI_IVRS_TYPE_HARDWARE3: InfoTable = AcpiDmTableInfoIvrs01; break; @@ -520,7 +573,8 @@ AcpiDmDumpIvrs ( /* The hardware subtable can contain multiple device entries */ if (Subtable->Type == ACPI_IVRS_TYPE_HARDWARE1 || - Subtable->Type == ACPI_IVRS_TYPE_HARDWARE2) + Subtable->Type == ACPI_IVRS_TYPE_HARDWARE2 || + Subtable->Type == ACPI_IVRS_TYPE_HARDWARE3) { if (Subtable->Type == ACPI_IVRS_TYPE_HARDWARE1) { @@ -545,11 +599,10 @@ AcpiDmDumpIvrs ( * * 00 = 4 byte * 01 = 8 byte - * 10 = 16 byte - currently no entries defined - * 11 = 32 byte - currently no entries defined + * 1x = variable length */ EntryType = DeviceEntry->Type; - EntryLength = EntrySizes [EntryType >> 6]; + EntryLength = EntryType >> 6 == 1 ? 8 : 4; switch (EntryType) { @@ -588,6 +641,14 @@ AcpiDmDumpIvrs ( InfoTable = AcpiDmTableInfoIvrs8c; break; + /* Variable-length entries */ + + case ACPI_IVRS_TYPE_HID: + + EntryLength = 22; + InfoTable = AcpiDmTableInfoIvrsHid; + break; + default: InfoTable = AcpiDmTableInfoIvrs4; AcpiOsPrintf ( @@ -606,9 +667,24 @@ AcpiDmDumpIvrs ( return; } + HidSubtable = ACPI_CAST_PTR (ACPI_IVRS_DEVICE_HID, DeviceEntry); EntryOffset += EntryLength; DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, DeviceEntry, EntryLength); + + if (EntryType == ACPI_IVRS_TYPE_HID) + { + EntryLength = HidSubtable->UidLength; + Status = AcpiDmDumpTable (Table->Length, EntryOffset, + Table, EntryLength, AcpiDmTableInfoIvrsHid1); + if (ACPI_FAILURE (Status)) + { + return; + } + EntryOffset += EntryLength; + DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, + DeviceEntry, EntryLength); + } } } @@ -825,6 +901,11 @@ AcpiDmDumpMadt ( InfoTable = AcpiDmTableInfoMadt15; break; + case ACPI_MADT_TYPE_MULTIPROC_WAKEUP: + + InfoTable = AcpiDmTableInfoMadt16; + break; + default: AcpiOsPrintf ("\n**** Unknown MADT subtable type 0x%X\n\n", @@ -1380,6 +1461,11 @@ AcpiDmDumpPcct ( InfoTable = AcpiDmTableInfoPcct4; break; + case ACPI_PCCT_TYPE_HW_REG_COMM_SUBSPACE: + + InfoTable = AcpiDmTableInfoPcct5; + break; + default: AcpiOsPrintf ( @@ -1461,201 +1547,224 @@ AcpiDmDumpPdtt ( /******************************************************************************* * - * FUNCTION: AcpiDmDumpPmtt + * FUNCTION: AcpiDmDumpPhat * - * PARAMETERS: Table - A PMTT table + * PARAMETERS: Table - A PHAT table * * RETURN: None * - * DESCRIPTION: Format the contents of a PMTT. This table type consists - * of an open-ended number of subtables. + * DESCRIPTION: Format the contents of a PHAT. * ******************************************************************************/ void -AcpiDmDumpPmtt ( +AcpiDmDumpPhat ( ACPI_TABLE_HEADER *Table) { ACPI_STATUS Status; - ACPI_PMTT_HEADER *Subtable; - ACPI_PMTT_HEADER *MemSubtable; - ACPI_PMTT_HEADER *DimmSubtable; - ACPI_PMTT_DOMAIN *DomainArray; + ACPI_DMTABLE_INFO *InfoTable; + ACPI_PHAT_HEADER *Subtable; + ACPI_PHAT_VERSION_DATA *VersionData; + UINT32 RecordCount; UINT32 Length = Table->Length; - UINT32 Offset = sizeof (ACPI_TABLE_PMTT); - UINT32 MemOffset; - UINT32 DimmOffset; - UINT32 DomainOffset; - UINT32 DomainCount; - + UINT32 Offset = sizeof (ACPI_TABLE_PHAT); + UINT32 SubtableLength; + UINT32 PathLength; + UINT32 VendorLength; - /* Main table */ - Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoPmtt); - if (ACPI_FAILURE (Status)) - { - return; - } + Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Table, sizeof (ACPI_TABLE_PHAT)); - /* Subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, Table, Offset); while (Offset < Table->Length) { /* Common subtable header */ AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, Offset, Subtable, - Subtable->Length, AcpiDmTableInfoPmttHdr); + Status = AcpiDmDumpTable (Length, 0, Subtable, + sizeof (ACPI_PHAT_HEADER), AcpiDmTableInfoPhatHdr); if (ACPI_FAILURE (Status)) { return; } - /* Only Socket subtables are expected at this level */ - - if (Subtable->Type != ACPI_PMTT_TYPE_SOCKET) + switch (Subtable->Type) { - AcpiOsPrintf ( - "\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n", + case ACPI_PHAT_TYPE_FW_VERSION_DATA: + + InfoTable = AcpiDmTableInfoPhat0; + SubtableLength = sizeof (ACPI_PHAT_VERSION_DATA); + break; + + case ACPI_PHAT_TYPE_FW_HEALTH_DATA: + + InfoTable = AcpiDmTableInfoPhat1; + SubtableLength = sizeof (ACPI_PHAT_HEALTH_DATA); + break; + + default: + + AcpiOsPrintf ("\n**** Unknown PHAT subtable type 0x%X\n\n", Subtable->Type); + return; } - /* Dump the fixed-length portion of the subtable */ - - Status = AcpiDmDumpTable (Length, Offset, Subtable, - Subtable->Length, AcpiDmTableInfoPmtt0); + Status = AcpiDmDumpTable (Length, 0, Subtable, + SubtableLength, InfoTable); if (ACPI_FAILURE (Status)) { return; } - /* Walk the memory controller subtables */ - - MemOffset = sizeof (ACPI_PMTT_SOCKET); - MemSubtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, Subtable, - sizeof (ACPI_PMTT_SOCKET)); - - while (((Offset + MemOffset) < Table->Length) && - (MemOffset < Subtable->Length)) + switch (Subtable->Type) { - /* Common subtable header */ + case ACPI_PHAT_TYPE_FW_VERSION_DATA: - AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, - Offset + MemOffset, MemSubtable, - MemSubtable->Length, AcpiDmTableInfoPmttHdr); - if (ACPI_FAILURE (Status)) + VersionData = ACPI_CAST_PTR (ACPI_PHAT_VERSION_DATA, Subtable); + RecordCount = VersionData->ElementCount; + while (RecordCount) { - return; + Status = AcpiDmDumpTable (Length, Offset, + ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_VERSION_DATA)), + sizeof (ACPI_PHAT_VERSION_ELEMENT), AcpiDmTableInfoPhat0a); + if (ACPI_FAILURE (Status)) + { + return; + } + + RecordCount--; } - /* Only memory controller subtables are expected at this level */ + break; + + case ACPI_PHAT_TYPE_FW_HEALTH_DATA: - if (MemSubtable->Type != ACPI_PMTT_TYPE_CONTROLLER) + /* account for the null terminator */ + + PathLength = strlen (ACPI_ADD_PTR (char, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA))) + 1; + Status = AcpiDmDumpTable (Length, Offset, + ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA)), + PathLength, AcpiDmTableInfoPhat1a); + if (ACPI_FAILURE (Status)) { - AcpiOsPrintf ( - "\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n", - MemSubtable->Type); return; *** 4684 LINES SKIPPED ***