Author: jkim Date: Fri Apr 25 16:53:42 2014 New Revision: 264919 URL: http://svnweb.freebsd.org/changeset/base/264919
Log: Import ACPICA 20140424. Added: vendor-sys/acpica/dist/source/compiler/aslmessages.c (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/Makefile.config vendor-sys/acpica/dist/generate/unix/iasl/Makefile vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/ahpredef.c vendor-sys/acpica/dist/source/common/dmtable.c vendor-sys/acpica/dist/source/common/dmtbdump.c vendor-sys/acpica/dist/source/common/dmtbinfo.c vendor-sys/acpica/dist/source/compiler/aslanalyze.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslerror.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/aslmethod.c vendor-sys/acpica/dist/source/compiler/aslprepkg.c vendor-sys/acpica/dist/source/compiler/asltypes.h vendor-sys/acpica/dist/source/compiler/dtcompiler.h vendor-sys/acpica/dist/source/compiler/dttable.c vendor-sys/acpica/dist/source/compiler/dttemplate.h vendor-sys/acpica/dist/source/compiler/dtutils.c vendor-sys/acpica/dist/source/compiler/preprocess.h vendor-sys/acpica/dist/source/compiler/prutils.c vendor-sys/acpica/dist/source/components/debugger/dbcmds.c vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/events/evgpe.c vendor-sys/acpica/dist/source/components/events/evgpeblk.c vendor-sys/acpica/dist/source/components/events/evgpeinit.c vendor-sys/acpica/dist/source/components/events/evxfgpe.c vendor-sys/acpica/dist/source/components/hardware/hwpci.c vendor-sys/acpica/dist/source/components/resources/rscreate.c vendor-sys/acpica/dist/source/components/tables/tbfadt.c vendor-sys/acpica/dist/source/components/tables/tbutils.c vendor-sys/acpica/dist/source/components/utilities/utglobal.c vendor-sys/acpica/dist/source/components/utilities/utobject.c vendor-sys/acpica/dist/source/components/utilities/utxferror.c vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/acevents.h vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acnames.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acpredef.h vendor-sys/acpica/dist/source/include/actbl1.h vendor-sys/acpica/dist/source/include/actbl2.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/platform/aclinux.h vendor-sys/acpica/dist/source/os_specific/service_layers/oslinuxtbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/source/tools/acpidump/acpidump.h vendor-sys/acpica/dist/source/tools/acpidump/apmain.c vendor-sys/acpica/dist/source/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Fri Apr 25 15:27:19 2014 (r264918) +++ vendor-sys/acpica/dist/changes.txt Fri Apr 25 16:53:42 2014 (r264919) @@ -1,4 +1,71 @@ ---------------------------------------- +24 April 2014. Summary of changes for version 20140424: + +1) ACPICA kernel-resident subsystem: + +Implemented support to skip/ignore NULL address entries in the RSDT/XSDT. +Some of these tables are known to contain a trailing NULL entry. Lv +Zheng. + +Removed an extraneous error message for the case where there are a large +number of system GPEs (> 124). This was the "32-bit FADT register is too +long to convert to GAS struct" message, which is irrelevant for GPEs +since the GPEx_BLK_LEN fields of the FADT are always used instead of the +(limited capacity) GAS bit length. Also, several changes to ensure proper +support for GPE numbers > 255, where some "GPE number" fields were 8-bits +internally. + +Implemented and deployed additional configuration support for the public +ACPICA external interfaces. Entire classes of interfaces can now be +easily modified or configured out, replaced by stubbed inline functions +by default. Lv Zheng. + +Moved all public ACPICA runtime configuration globals to the public +ACPICA external interface file for convenience. Also, removed some +obsolete/unused globals. See the file acpixf.h. Lv Zheng. + +Documentation: Added a new section to the ACPICA reference describing the +maximum number of GPEs that can be supported by the FADT-defined GPEs in +block zero and one. About 1200 total. See section 4.4.1 of the ACPICA +reference. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 96.8K Code, 27.2K Data, 124.0K Total + Debug Version: 189.5K Code, 79.7K Data, 269.2K Total + Previous Release: + Non-Debug Version: 97.0K Code, 27.2K Data, 124.2K Total + Debug Version: 189.7K Code, 79.5K Data, 269.2K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL and disassembler: Add full support for the LPIT table (Low Power +Idle Table). Includes support in the disassembler, data table compiler, +and template generator. + +AcpiDump utility: +1) Add option to force the use of the RSDT (over the XSDT). +2) Improve validation of the RSDP signature (use 8 chars instead of 4). + +iASL: Add check for predefined packages that are too large. For +predefined names that contain subpackages, check if each subpackage is +too large. (Check for too small already exists.) + +Debugger: Updated the GPE command (which simulates a GPE by executing the +GPE code paths in ACPICA). The GPE device is now optional, and defaults +to the GPE 0/1 FADT-defined blocks. + +Unix application OSL: Update line-editing support. Add additional error +checking and take care not to reset terminal attributes on exit if they +were never set. This should help guarantee that the terminal is always +left in the previous state on program exit. + +---------------------------------------- 25 March 2014. Summary of changes for version 20140325: 1) ACPICA kernel-resident subsystem: Modified: vendor-sys/acpica/dist/generate/unix/Makefile.config ============================================================================== --- vendor-sys/acpica/dist/generate/unix/Makefile.config Fri Apr 25 15:27:19 2014 (r264918) +++ vendor-sys/acpica/dist/generate/unix/Makefile.config Fri Apr 25 16:53:42 2014 (r264919) @@ -46,6 +46,18 @@ COMPILEOBJ = $(CC) -c $(CFLAGS) $(OPT_CF LINKPROG = $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS) PREFIX ?= /usr INSTALLDIR = $(PREFIX)/bin +UNAME_S := $(shell uname -s) + +# +# Host detection and configuration +# +ifeq ($(UNAME_S), Darwin) # Mac OS X +HOST = _APPLE +endif + +ifeq ($(UNAME_S), FreeBSD) +HOST = _FreeBSD +endif ifeq ($(HOST), _APPLE) INSTALL = cp Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/iasl/Makefile Fri Apr 25 15:27:19 2014 (r264918) +++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile Fri Apr 25 16:53:42 2014 (r264919) @@ -64,6 +64,7 @@ OBJECTS = \ $(OBJDIR)/asllookup.o\ $(OBJDIR)/aslmain.o\ $(OBJDIR)/aslmap.o\ + $(OBJDIR)/aslmessages.o\ $(OBJDIR)/aslmethod.o\ $(OBJDIR)/aslnamesp.o\ $(OBJDIR)/asloffset.o\ Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Fri Apr 25 15:27:19 2014 (r264918) +++ vendor-sys/acpica/dist/source/common/adisasm.c Fri Apr 25 16:53:42 2014 (r264919) @@ -357,6 +357,7 @@ AdAmlDisassemble ( { fprintf (stderr, "Could not open output file %s\n", DisasmFilename); Status = AE_ERROR; + ACPI_FREE (DisasmFilename); goto Cleanup; } Modified: vendor-sys/acpica/dist/source/common/ahpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahpredef.c Fri Apr 25 15:27:19 2014 (r264918) +++ vendor-sys/acpica/dist/source/common/ahpredef.c Fri Apr 25 16:53:42 2014 (r264919) @@ -172,6 +172,7 @@ const AH_PREDEFINED_NAME AslPredefine AH_PREDEF ("_LID", "Lid Status", "Returns the open/closed status of the lid on a mobile system"), AH_PREDEF ("_LIN", "Lines In Use", "Handshake lines, Resource Descriptor field"), AH_PREDEF ("_LL_", "Low Level", "Interrupt polarity, Resource Descriptor field"), + AH_PREDEF ("_LPD", "Low Power Dependencies", "Returns a list of dependencies for low power idle entry"), AH_PREDEF ("_MAF", "Maximum Address Fixed", "Resource Descriptor field"), AH_PREDEF ("_MAT", "Multiple APIC Table Entry", "Returns a list of MADT APIC structure entries"), AH_PREDEF ("_MAX", "Maximum Base Address", "Resource Descriptor field"), @@ -216,6 +217,7 @@ const AH_PREDEFINED_NAME AslPredefine AH_PREDEF ("_PR3", "Power Resources for D3hot", "Returns a list of dependent power resources to enter state D3hot"), AH_PREDEF ("_PRE", "Power Resources for Enumeration", "Returns a list of dependent power resources to enumerate devices on a bus"), AH_PREDEF ("_PRL", "Power Source Redundancy List", "Returns a list of power source devices in the same redundancy grouping"), + AH_PREDEF ("_PRP", "Device Properties", "Returns a list of device property information"), AH_PREDEF ("_PRS", "Possible Resource Settings", "Returns a list of a device's possible resource settings"), AH_PREDEF ("_PRT", "PCI Routing Table", "Returns a list of PCI interrupt mappings"), AH_PREDEF ("_PRW", "Power Resources for Wake", "Returns a list of dependent power resources for waking"), Modified: vendor-sys/acpica/dist/source/common/dmtable.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtable.c Fri Apr 25 15:27:19 2014 (r264918) +++ vendor-sys/acpica/dist/source/common/dmtable.c Fri Apr 25 16:53:42 2014 (r264919) @@ -241,6 +241,12 @@ static const char *AcpiDmIvrsS "Unknown SubTable Type" /* Reserved */ }; +static const char *AcpiDmLpitSubnames[] = +{ + "Native C-state Idle Structure", + "Simple I/O Idle Structure", + "Unknown SubTable Type" /* Reserved */ +}; #define ACPI_FADT_PM_RESERVED 9 @@ -304,6 +310,7 @@ ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_HEST, NULL, AcpiDmDumpHest, DtCompileHest, TemplateHest, "Hardware Error Source Table"}, {ACPI_SIG_HPET, AcpiDmTableInfoHpet, NULL, NULL, TemplateHpet, "High Precision Event Timer table"}, {ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, DtCompileIvrs, TemplateIvrs, "I/O Virtualization Reporting Structure"}, + {ACPI_SIG_LPIT, NULL, AcpiDmDumpLpit, DtCompileLpit, TemplateLpit, "Low Power Idle Table"}, {ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, DtCompileMadt, TemplateMadt, "Multiple APIC Description Table (MADT)"}, {ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, DtCompileMcfg, TemplateMcfg, "Memory Mapped Configuration table"}, {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, TemplateMchi, "Management Controller Host Interface table"}, @@ -729,6 +736,7 @@ AcpiDmDumpTable ( case ACPI_DMT_NAME4: case ACPI_DMT_SIG: case ACPI_DMT_SLIC: + case ACPI_DMT_LPIT: ByteLength = 4; break; @@ -1232,6 +1240,32 @@ AcpiDmDumpTable ( AcpiOsPrintf (UINT8_FORMAT, *Target, Name); break; + case ACPI_DMT_LPIT: + + /* LPIT subtable types */ + + Temp8 = *Target; + switch (Temp8) + { + case ACPI_LPIT_TYPE_NATIVE_CSTATE: + + Name = AcpiDmLpitSubnames[0]; + break; + + case ACPI_LPIT_TYPE_SIMPLE_IO: + + Name = AcpiDmLpitSubnames[1]; + break; + + default: + + Name = AcpiDmLpitSubnames[2]; + break; + } + + AcpiOsPrintf (UINT32_FORMAT, *Target, Name); + break; + case ACPI_DMT_EXIT: return (AE_OK); Modified: vendor-sys/acpica/dist/source/common/dmtbdump.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbdump.c Fri Apr 25 15:27:19 2014 (r264918) +++ vendor-sys/acpica/dist/source/common/dmtbdump.c Fri Apr 25 16:53:42 2014 (r264919) @@ -419,12 +419,12 @@ AcpiDmDumpAsf ( UINT8 Type; - /* No main table, only sub-tables */ + /* No main table, only subtables */ SubTable = ACPI_ADD_PTR (ACPI_ASF_INFO, Table, Offset); while (Offset < Table->Length) { - /* Common sub-table header */ + /* Common subtable header */ Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, SubTable->Header.Length, AcpiDmTableInfoAsfHdr); @@ -479,7 +479,7 @@ AcpiDmDumpAsf ( default: - AcpiOsPrintf ("\n**** Unknown ASF sub-table type 0x%X\n", SubTable->Header.Type); + AcpiOsPrintf ("\n**** Unknown ASF subtable type 0x%X\n", SubTable->Header.Type); return; } @@ -541,7 +541,7 @@ AcpiDmDumpAsf ( AcpiOsPrintf ("\n"); - /* Point to next sub-table */ + /* Point to next subtable */ if (!SubTable->Header.Length) { @@ -586,7 +586,7 @@ AcpiDmDumpCpep ( return; } - /* Sub-tables */ + /* Subtables */ SubTable = ACPI_ADD_PTR (ACPI_CPEP_POLLING, Table, Offset); while (Offset < Table->Length) @@ -599,7 +599,7 @@ AcpiDmDumpCpep ( return; } - /* Point to next sub-table */ + /* Point to next subtable */ Offset += SubTable->Header.Length; SubTable = ACPI_ADD_PTR (ACPI_CPEP_POLLING, SubTable, @@ -638,7 +638,7 @@ AcpiDmDumpCsrt ( /* The main table only contains the ACPI header, thus already handled */ - /* Sub-tables (Resource Groups) */ + /* Subtables (Resource Groups) */ SubTable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Table, Offset); while (Offset < Table->Length) @@ -702,7 +702,7 @@ AcpiDmDumpCsrt ( SubSubTable->Length); } - /* Point to next sub-table */ + /* Point to next subtable */ Offset += SubTable->Length; SubTable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, SubTable, @@ -746,7 +746,7 @@ AcpiDmDumpDbg2 ( return; } - /* Sub-tables */ + /* Subtables */ SubTable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, Table, Offset); while (Offset < Table->Length) @@ -815,7 +815,7 @@ AcpiDmDumpDbg2 ( Offset + SubTable->OemDataOffset, "OEM Data"); } - /* Point to next sub-table */ + /* Point to next subtable */ Offset += SubTable->Length; SubTable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, SubTable, @@ -861,12 +861,12 @@ AcpiDmDumpDmar ( return; } - /* Sub-tables */ + /* Subtables */ SubTable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, Table, Offset); while (Offset < Table->Length) { - /* Common sub-table header */ + /* Common subtable header */ AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Length, Offset, SubTable, @@ -905,7 +905,7 @@ AcpiDmDumpDmar ( default: - AcpiOsPrintf ("\n**** Unknown DMAR sub-table type 0x%X\n\n", SubTable->Type); + AcpiOsPrintf ("\n**** Unknown DMAR subtable type 0x%X\n\n", SubTable->Type); return; } @@ -956,7 +956,7 @@ AcpiDmDumpDmar ( ScopeTable, ScopeTable->Length); } - /* Point to next sub-table */ + /* Point to next subtable */ Offset += SubTable->Length; SubTable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, SubTable, SubTable->Length); @@ -995,7 +995,7 @@ AcpiDmDumpEinj ( return; } - /* Sub-tables */ + /* Subtables */ SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset); while (Offset < Table->Length) @@ -1008,7 +1008,7 @@ AcpiDmDumpEinj ( return; } - /* Point to next sub-table (each subtable is of fixed length) */ + /* Point to next subtable (each subtable is of fixed length) */ Offset += sizeof (ACPI_WHEA_HEADER); SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, SubTable, @@ -1048,7 +1048,7 @@ AcpiDmDumpErst ( return; } - /* Sub-tables */ + /* Subtables */ SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset); while (Offset < Table->Length) @@ -1061,7 +1061,7 @@ AcpiDmDumpErst ( return; } - /* Point to next sub-table (each subtable is of fixed length) */ + /* Point to next subtable (each subtable is of fixed length) */ Offset += sizeof (ACPI_WHEA_HEADER); SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, SubTable, @@ -1096,12 +1096,12 @@ AcpiDmDumpFpdt ( /* There is no main table (other than the standard ACPI header) */ - /* Sub-tables */ + /* Subtables */ SubTable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, Table, Offset); while (Offset < Table->Length) { - /* Common sub-table header */ + /* Common subtable header */ AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Length, Offset, SubTable, @@ -1125,7 +1125,7 @@ AcpiDmDumpFpdt ( default: - AcpiOsPrintf ("\n**** Unknown FPDT sub-table type 0x%X\n\n", SubTable->Type); + AcpiOsPrintf ("\n**** Unknown FPDT subtable type 0x%X\n\n", SubTable->Type); /* Attempt to continue */ @@ -1145,7 +1145,7 @@ AcpiDmDumpFpdt ( } NextSubTable: - /* Point to next sub-table */ + /* Point to next subtable */ Offset += SubTable->Length; SubTable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, SubTable, SubTable->Length); @@ -1188,7 +1188,7 @@ AcpiDmDumpHest ( return; } - /* Sub-tables */ + /* Subtables */ SubTable = ACPI_ADD_PTR (ACPI_HEST_HEADER, Table, Offset); while (Offset < Table->Length) @@ -1246,7 +1246,7 @@ AcpiDmDumpHest ( /* Cannot continue on unknown type - no length */ - AcpiOsPrintf ("\n**** Unknown HEST sub-table type 0x%X\n", SubTable->Type); + AcpiOsPrintf ("\n**** Unknown HEST subtable type 0x%X\n", SubTable->Type); return; } @@ -1284,7 +1284,7 @@ AcpiDmDumpHest ( } } - /* Point to next sub-table */ + /* Point to next subtable */ SubTable = ACPI_ADD_PTR (ACPI_HEST_HEADER, SubTable, SubTableLength); } @@ -1327,12 +1327,12 @@ AcpiDmDumpIvrs ( return; } - /* Sub-tables */ + /* Subtables */ SubTable = ACPI_ADD_PTR (ACPI_IVRS_HEADER, Table, Offset); while (Offset < Table->Length) { - /* Common sub-table header */ + /* Common subtable header */ AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, @@ -1358,7 +1358,7 @@ AcpiDmDumpIvrs ( default: - AcpiOsPrintf ("\n**** Unknown IVRS sub-table type 0x%X\n", + AcpiOsPrintf ("\n**** Unknown IVRS subtable type 0x%X\n", SubTable->Type); /* Attempt to continue */ @@ -1461,7 +1461,7 @@ AcpiDmDumpIvrs ( } NextSubTable: - /* Point to next sub-table */ + /* Point to next subtable */ Offset += SubTable->Length; SubTable = ACPI_ADD_PTR (ACPI_IVRS_HEADER, SubTable, SubTable->Length); @@ -1471,6 +1471,85 @@ NextSubTable: /******************************************************************************* * + * FUNCTION: AcpiDmDumpLpit + * + * PARAMETERS: Table - A LPIT table + * + * RETURN: None + * + * DESCRIPTION: Format the contents of a LPIT. This table type consists + * of an open-ended number of subtables. Note: There are no + * entries in the main table. An LPIT consists of the table + * header and then subtables only. + * + ******************************************************************************/ + +void +AcpiDmDumpLpit ( + ACPI_TABLE_HEADER *Table) +{ + ACPI_STATUS Status; + ACPI_LPIT_HEADER *SubTable; + UINT32 Length = Table->Length; + UINT32 Offset = sizeof (ACPI_TABLE_LPIT); + ACPI_DMTABLE_INFO *InfoTable; + UINT32 SubTableLength; + + + /* Subtables */ + + SubTable = ACPI_ADD_PTR (ACPI_LPIT_HEADER, Table, Offset); + while (Offset < Table->Length) + { + /* Common subtable header */ + + Status = AcpiDmDumpTable (Length, Offset, SubTable, + sizeof (ACPI_LPIT_HEADER), AcpiDmTableInfoLpitHdr); + if (ACPI_FAILURE (Status)) + { + return; + } + + switch (SubTable->Type) + { + case ACPI_LPIT_TYPE_NATIVE_CSTATE: + + InfoTable = AcpiDmTableInfoLpit0; + SubTableLength = sizeof (ACPI_LPIT_NATIVE); + break; + + case ACPI_LPIT_TYPE_SIMPLE_IO: + + InfoTable = AcpiDmTableInfoLpit1; + SubTableLength = sizeof (ACPI_LPIT_IO); + break; + + default: + + /* Cannot continue on unknown type - no length */ + + AcpiOsPrintf ("\n**** Unknown LPIT subtable type 0x%X\n", SubTable->Type); + return; + } + + Status = AcpiDmDumpTable (Length, Offset, SubTable, + SubTableLength, InfoTable); + if (ACPI_FAILURE (Status)) + { + return; + } + AcpiOsPrintf ("\n"); + + /* Point to next subtable */ + + Offset += SubTableLength; + SubTable = ACPI_ADD_PTR (ACPI_LPIT_HEADER, SubTable, SubTableLength); + } +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmDumpMadt * * PARAMETERS: Table - A MADT table @@ -1501,12 +1580,12 @@ AcpiDmDumpMadt ( return; } - /* Sub-tables */ + /* Subtables */ SubTable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Table, Offset); while (Offset < Table->Length) { - /* Common sub-table header */ + /* Common subtable header */ AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Length, Offset, SubTable, @@ -1585,7 +1664,7 @@ AcpiDmDumpMadt ( default: - AcpiOsPrintf ("\n**** Unknown MADT sub-table type 0x%X\n\n", SubTable->Type); + AcpiOsPrintf ("\n**** Unknown MADT subtable type 0x%X\n\n", SubTable->Type); /* Attempt to continue */ @@ -1605,7 +1684,7 @@ AcpiDmDumpMadt ( } NextSubTable: - /* Point to next sub-table */ + /* Point to next subtable */ Offset += SubTable->Length; SubTable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, SubTable, SubTable->Length); @@ -1642,7 +1721,7 @@ AcpiDmDumpMcfg ( return; } - /* Sub-tables */ + /* Subtables */ SubTable = ACPI_ADD_PTR (ACPI_MCFG_ALLOCATION, Table, Offset); while (Offset < Table->Length) @@ -1662,7 +1741,7 @@ AcpiDmDumpMcfg ( return; } - /* Point to next sub-table (each subtable is of fixed length) */ + /* Point to next subtable (each subtable is of fixed length) */ Offset += sizeof (ACPI_MCFG_ALLOCATION); SubTable = ACPI_ADD_PTR (ACPI_MCFG_ALLOCATION, SubTable, @@ -1844,12 +1923,12 @@ AcpiDmDumpMsct ( return; } - /* Sub-tables */ + /* Subtables */ SubTable = ACPI_ADD_PTR (ACPI_MSCT_PROXIMITY, Table, Offset); while (Offset < Table->Length) { - /* Common sub-table header */ + /* Common subtable header */ AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, @@ -1859,7 +1938,7 @@ AcpiDmDumpMsct ( return; } - /* Point to next sub-table */ + /* Point to next subtable */ Offset += sizeof (ACPI_MSCT_PROXIMITY); SubTable = ACPI_ADD_PTR (ACPI_MSCT_PROXIMITY, SubTable, sizeof (ACPI_MSCT_PROXIMITY)); @@ -1896,12 +1975,12 @@ AcpiDmDumpMtmr ( return; } - /* Sub-tables */ + /* Subtables */ SubTable = ACPI_ADD_PTR (ACPI_MTMR_ENTRY, Table, Offset); while (Offset < Table->Length) { - /* Common sub-table header */ + /* Common subtable header */ AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, @@ -1911,7 +1990,7 @@ AcpiDmDumpMtmr ( return; } - /* Point to next sub-table */ + /* Point to next subtable */ Offset += sizeof (ACPI_MTMR_ENTRY); SubTable = ACPI_ADD_PTR (ACPI_MTMR_ENTRY, SubTable, sizeof (ACPI_MTMR_ENTRY)); @@ -2232,7 +2311,7 @@ AcpiDmDumpS3pt ( SubTable = ACPI_ADD_PTR (ACPI_S3PT_HEADER, S3ptTable, Offset); while (Offset < S3ptTable->Length) { - /* Common sub-table header */ + /* Common subtable header */ AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (S3ptTable->Length, Offset, SubTable, @@ -2256,7 +2335,7 @@ AcpiDmDumpS3pt ( default: - AcpiOsPrintf ("\n**** Unknown S3PT sub-table type 0x%X\n", SubTable->Type); + AcpiOsPrintf ("\n**** Unknown S3PT subtable type 0x%X\n", SubTable->Type); /* Attempt to continue */ @@ -2277,7 +2356,7 @@ AcpiDmDumpS3pt ( } NextSubTable: - /* Point to next sub-table */ + /* Point to next subtable */ Offset += SubTable->Length; SubTable = ACPI_ADD_PTR (ACPI_S3PT_HEADER, SubTable, SubTable->Length); @@ -2314,7 +2393,7 @@ AcpiDmDumpSlic ( SubTable = ACPI_ADD_PTR (ACPI_SLIC_HEADER, Table, Offset); while (Offset < Table->Length) { - /* Common sub-table header */ + /* Common subtable header */ AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, @@ -2338,7 +2417,7 @@ AcpiDmDumpSlic ( default: - AcpiOsPrintf ("\n**** Unknown SLIC sub-table type 0x%X\n", SubTable->Type); + AcpiOsPrintf ("\n**** Unknown SLIC subtable type 0x%X\n", SubTable->Type); /* Attempt to continue */ @@ -2359,7 +2438,7 @@ AcpiDmDumpSlic ( } NextSubTable: - /* Point to next sub-table */ + /* Point to next subtable */ Offset += SubTable->Length; SubTable = ACPI_ADD_PTR (ACPI_SLIC_HEADER, SubTable, SubTable->Length); @@ -2475,12 +2554,12 @@ AcpiDmDumpSrat ( return; } - /* Sub-tables */ + /* Subtables */ SubTable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Table, Offset); while (Offset < Table->Length) { - /* Common sub-table header */ + /* Common subtable header */ AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, @@ -2508,7 +2587,7 @@ AcpiDmDumpSrat ( break; default: - AcpiOsPrintf ("\n**** Unknown SRAT sub-table type 0x%X\n", SubTable->Type); + AcpiOsPrintf ("\n**** Unknown SRAT subtable type 0x%X\n", SubTable->Type); /* Attempt to continue */ @@ -2529,7 +2608,7 @@ AcpiDmDumpSrat ( } NextSubTable: - /* Point to next sub-table */ + /* Point to next subtable */ Offset += SubTable->Length; SubTable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, SubTable, SubTable->Length); @@ -2566,12 +2645,12 @@ AcpiDmDumpVrtc ( return; } - /* Sub-tables */ + /* Subtables */ SubTable = ACPI_ADD_PTR (ACPI_VRTC_ENTRY, Table, Offset); while (Offset < Table->Length) { - /* Common sub-table header */ + /* Common subtable header */ AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, @@ -2581,7 +2660,7 @@ AcpiDmDumpVrtc ( return; } - /* Point to next sub-table */ + /* Point to next subtable */ Offset += sizeof (ACPI_VRTC_ENTRY); SubTable = ACPI_ADD_PTR (ACPI_VRTC_ENTRY, SubTable, sizeof (ACPI_VRTC_ENTRY)); @@ -2618,12 +2697,12 @@ AcpiDmDumpWdat ( return; } - /* Sub-tables */ + /* Subtables */ SubTable = ACPI_ADD_PTR (ACPI_WDAT_ENTRY, Table, Offset); while (Offset < Table->Length) { - /* Common sub-table header */ + /* Common subtable header */ AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, @@ -2633,7 +2712,7 @@ AcpiDmDumpWdat ( return; } - /* Point to next sub-table */ + /* Point to next subtable */ Offset += sizeof (ACPI_WDAT_ENTRY); SubTable = ACPI_ADD_PTR (ACPI_WDAT_ENTRY, SubTable, sizeof (ACPI_WDAT_ENTRY)); Modified: vendor-sys/acpica/dist/source/common/dmtbinfo.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbinfo.c Fri Apr 25 15:27:19 2014 (r264918) +++ vendor-sys/acpica/dist/source/common/dmtbinfo.c Fri Apr 25 16:53:42 2014 (r264919) @@ -158,6 +158,9 @@ #define ACPI_IVRS8A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8A,f) #define ACPI_IVRS8B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8B,f) #define ACPI_IVRS8C_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8C,f) +#define ACPI_LPITH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_LPIT_HEADER,f) +#define ACPI_LPIT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_LPIT_NATIVE,f) +#define ACPI_LPIT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_LPIT_IO,f) #define ACPI_MADT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC,f) #define ACPI_MADT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_IO_APIC,f) #define ACPI_MADT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_INTERRUPT_OVERRIDE,f) @@ -213,6 +216,7 @@ #define ACPI_SRAT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_MEM_AFFINITY,f,o) #define ACPI_SRAT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f,o) #define ACPI_GTDT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_GTDT,f,o) +#define ACPI_LPITH_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_LPIT_HEADER,f,o) #define ACPI_MADT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_MADT,f,o) #define ACPI_MADT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_LOCAL_APIC,f,o) #define ACPI_MADT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_INTERRUPT_OVERRIDE,f,o) @@ -1307,6 +1311,59 @@ ACPI_DMTABLE_INFO AcpiDmTableI /******************************************************************************* * + * LPIT - Low Power Idle Table + * + ******************************************************************************/ + +/* Main table consists only of the standard ACPI table header */ + +/* Common Subtable header (one per Subtable) */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoLpitHdr[] = +{ + {ACPI_DMT_LPIT, ACPI_LPITH_OFFSET (Type), "Subtable Type", 0}, + {ACPI_DMT_UINT32, ACPI_LPITH_OFFSET (Length), "Length", DT_LENGTH}, + {ACPI_DMT_UINT16, ACPI_LPITH_OFFSET (UniqueId), "Unique ID", 0}, + {ACPI_DMT_UINT16, ACPI_LPITH_OFFSET (Reserved), "Reserved", 0}, + {ACPI_DMT_UINT32, ACPI_LPITH_OFFSET (Flags), "Flags (decoded below)", DT_FLAG}, + {ACPI_DMT_FLAG0, ACPI_LPITH_FLAG_OFFSET (Flags, 0), "State Disabled", 0}, + {ACPI_DMT_FLAG1, ACPI_LPITH_FLAG_OFFSET (Flags, 0), "No Counter", 0}, + ACPI_DMT_TERMINATOR +}; + +/* LPIT Subtables */ + +/* 0: Native C-state */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoLpit0[] = +{ + {ACPI_DMT_GAS, ACPI_LPIT0_OFFSET (EntryTrigger), "Entry Trigger", 0}, + {ACPI_DMT_UINT32, ACPI_LPIT0_OFFSET (Residency), "Residency", 0}, + {ACPI_DMT_UINT32, ACPI_LPIT0_OFFSET (Latency), "Latency", 0}, + {ACPI_DMT_GAS, ACPI_LPIT0_OFFSET (ResidencyCounter), "Residency Counter", 0}, + {ACPI_DMT_UINT64, ACPI_LPIT0_OFFSET (CounterFrequency), "Counter Frequency", 0}, + ACPI_DMT_TERMINATOR +}; + +/* 1: Simple I/O */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoLpit1[] = +{ + {ACPI_DMT_GAS, ACPI_LPIT1_OFFSET (EntryTrigger), "Entry Trigger", 0}, + {ACPI_DMT_UINT32, ACPI_LPIT1_OFFSET (TriggerAction), "Trigger Action", 0}, + {ACPI_DMT_UINT64, ACPI_LPIT1_OFFSET (TriggerValue), "Trigger Value", 0}, + {ACPI_DMT_UINT64, ACPI_LPIT1_OFFSET (TriggerMask), "Trigger Mask", 0}, + {ACPI_DMT_GAS, ACPI_LPIT1_OFFSET (MinimumIdleState), "Minimum Idle State", 0}, + {ACPI_DMT_UINT32, ACPI_LPIT1_OFFSET (Residency), "Residency", 0}, + {ACPI_DMT_UINT32, ACPI_LPIT1_OFFSET (Latency), "Latency", 0}, + {ACPI_DMT_GAS, ACPI_LPIT1_OFFSET (ResidencyCounter), "Residency Counter", 0}, + {ACPI_DMT_UINT64, ACPI_LPIT1_OFFSET (CounterFrequency), "Counter Frequency", 0}, + ACPI_DMT_TERMINATOR +}; + + +/******************************************************************************* + * * MADT - Multiple APIC Description Table and subtables * ******************************************************************************/ Modified: vendor-sys/acpica/dist/source/compiler/aslanalyze.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslanalyze.c Fri Apr 25 15:27:19 2014 (r264918) +++ vendor-sys/acpica/dist/source/compiler/aslanalyze.c Fri Apr 25 16:53:42 2014 (r264919) @@ -569,3 +569,51 @@ ApCheckRegMethod ( AslError (ASL_WARNING, ASL_MSG_NO_REGION, Op, NULL); } + + +/******************************************************************************* + * + * FUNCTION: ApFindNameInScope + * + * PARAMETERS: Name - Name to search for + * Op - Current parse op + * + * RETURN: TRUE if name found in the same scope as Op. + * + * DESCRIPTION: Determine if a name appears in the same scope as Op, as either + * a Method() or a Name(). + * + ******************************************************************************/ + +BOOLEAN +ApFindNameInScope ( + char *Name, + ACPI_PARSE_OBJECT *Op) +{ + ACPI_PARSE_OBJECT *Next; + ACPI_PARSE_OBJECT *Parent; + + + /* Get the start of the current scope */ + + Parent = Op->Asl.Parent; + Next = Parent->Asl.Child; + + /* Search entire scope for a match to the name */ + + while (Next) + { + if ((Next->Asl.ParseOpcode == PARSEOP_METHOD) || + (Next->Asl.ParseOpcode == PARSEOP_NAME)) + { + if (ACPI_COMPARE_NAME (Name, Next->Asl.NameSeg)) + { + return (TRUE); + } + } + + Next = Next->Asl.Next; + } + + return (FALSE); +} Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Fri Apr 25 15:27:19 2014 (r264918) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Fri Apr 25 16:53:42 2014 (r264919) @@ -275,6 +275,11 @@ void ApCheckRegMethod ( ACPI_PARSE_OBJECT *Op); +BOOLEAN +ApFindNameInScope ( + char *Name, + ACPI_PARSE_OBJECT *Op); + /* * aslerror - error handling/reporting @@ -286,7 +291,7 @@ AslAbort ( void AslError ( UINT8 Level, - UINT8 MessageId, + UINT16 MessageId, ACPI_PARSE_OBJECT *Op, char *ExtraMessage); @@ -297,7 +302,7 @@ AslDisableException ( BOOLEAN AslIsExceptionDisabled ( UINT8 Level, - UINT8 MessageId); + UINT16 MessageId); void AslCoreSubsystemError ( @@ -313,7 +318,7 @@ AslCompilererror( void AslCommonError ( UINT8 Level, - UINT8 MessageId, + UINT16 MessageId, UINT32 CurrentLineNumber, UINT32 LogicalLineNumber, UINT32 LogicalByteOffset, @@ -324,7 +329,7 @@ AslCommonError ( void AslCommonError2 ( UINT8 Level, - UINT8 MessageId, + UINT16 MessageId, UINT32 LineNumber, UINT32 Column, char *SourceLine, @@ -439,6 +444,22 @@ OpcAmlConstantWalk ( /* + * aslmessages - exception strings + */ +const char * +AeDecodeMessageId ( + UINT16 MessageId); + +const char * +AeDecodeExceptionLevel ( + UINT8 Level); + +UINT16 +AeBuildFullExceptionCode ( + UINT8 Level, + UINT16 MessageId); + +/* * asloffset - generate C offset file for BIOS support */ ACPI_STATUS Modified: vendor-sys/acpica/dist/source/compiler/aslerror.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslerror.c Fri Apr 25 15:27:19 2014 (r264918) +++ vendor-sys/acpica/dist/source/compiler/aslerror.c Fri Apr 25 16:53:42 2014 (r264919) @@ -41,7 +41,6 @@ * POSSIBILITY OF SUCH DAMAGES. */ -#define ASL_EXCEPTIONS #include "aslcompiler.h" #define _COMPONENT ACPI_COMPILER @@ -204,7 +203,7 @@ AePrintException ( int Actual; size_t RActual; UINT32 MsgLength; - char *MainMessage; + const char *MainMessage; char *ExtraMessage; UINT32 SourceColumn; UINT32 ErrorColumn; @@ -399,109 +398,93 @@ AePrintException ( } } - /* NULL message ID, just print the raw message */ + /* If a NULL message ID, just print the raw message */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"