diff options
Diffstat (limited to 'source/common')
-rw-r--r-- | source/common/adwalk.c | 23 | ||||
-rw-r--r-- | source/common/ahids.c | 5 | ||||
-rw-r--r-- | source/common/ahpredef.c | 5 | ||||
-rw-r--r-- | source/common/dmextern.c | 204 | ||||
-rw-r--r-- | source/common/dmtable.c | 1 | ||||
-rw-r--r-- | source/common/dmtables.c | 5 | ||||
-rw-r--r-- | source/common/dmtbdump.c | 6 | ||||
-rw-r--r-- | source/common/dmtbinfo.c | 22 |
8 files changed, 177 insertions, 94 deletions
diff --git a/source/common/adwalk.c b/source/common/adwalk.c index daa3929d37ff1..28255c6804ab3 100644 --- a/source/common/adwalk.c +++ b/source/common/adwalk.c @@ -760,6 +760,7 @@ AcpiDmXrefDescendingOp ( ACPI_OPERAND_OBJECT *Object; UINT32 ParamCount = 0; char *Pathname; + UINT16 Flags = 0; WalkState = Info->WalkState; @@ -774,7 +775,24 @@ AcpiDmXrefDescendingOp ( { goto Exit; } + else if (Op->Common.Parent && + Op->Common.Parent->Common.AmlOpcode == AML_EXTERNAL_OP) + { + /* External() NamePath */ + + Path = Op->Common.Value.String; + ObjectType = (ACPI_OBJECT_TYPE) Op->Common.Next->Common.Value.Integer; + if (ObjectType == ACPI_TYPE_METHOD) + { + ParamCount = (UINT32) + Op->Common.Next->Common.Next->Common.Value.Integer; + } + + AcpiDmAddOpToExternalList (Op, Path, + (UINT8) ObjectType, ParamCount, Flags); + goto Exit; + } /* Get the NamePath from the appropriate place */ @@ -842,6 +860,7 @@ AcpiDmXrefDescendingOp ( /* Node was created by an External() statement */ Status = AE_NOT_FOUND; + Flags = ACPI_EXT_RESOLVED_REFERENCE; } if (ACPI_FAILURE (Status)) @@ -861,12 +880,12 @@ AcpiDmXrefDescendingOp ( if (Node) { AcpiDmAddNodeToExternalList (Node, - (UINT8) ObjectType, 0, 0); + (UINT8) ObjectType, 0, Flags); } else { AcpiDmAddOpToExternalList (Op, Path, - (UINT8) ObjectType, 0, 0); + (UINT8) ObjectType, 0, Flags); } } } diff --git a/source/common/ahids.c b/source/common/ahids.c index 2a5fdc7bc6c18..51dc8dc803211 100644 --- a/source/common/ahids.c +++ b/source/common/ahids.c @@ -75,6 +75,10 @@ const AH_DEVICE_ID AslDeviceIds[] = {"ACPI000D", "Power Meter Device"}, {"ACPI000E", "Time and Alarm Device"}, {"ACPI000F", "User Presence Detection Device"}, + {"ACPI0010", "Processor Container Device"}, + {"ACPI0011", "Generic Buttons Device"}, + {"ACPI0012", "NVDIMM Root Device"}, + {"ACPI0013", "Generic Event Device"}, {"ADMA0F28", "Intel Audio DMA"}, {"AMCR0F28", "Intel Audio Machine Driver"}, {"ATK4001", "Asus Radio Control Button"}, @@ -185,6 +189,7 @@ const AH_DEVICE_ID AslDeviceIds[] = {"PNP0C12", "Device Bay Controller"}, {"PNP0C14", "Windows Management Instrumentation Device"}, {"PNP0C15", "Docking Station"}, + {"PNP0C33", "Error Device"}, {"PNP0C40", "Standard Button Controller"}, {"PNP0C50", "HID Protocol Device (I2C bus)"}, {"PNP0C60", "Display Sensor Device"}, diff --git a/source/common/ahpredef.c b/source/common/ahpredef.c index 845e68508a287..c3991be3a296d 100644 --- a/source/common/ahpredef.c +++ b/source/common/ahpredef.c @@ -140,6 +140,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_FDI", "Floppy Drive Information", "Returns a floppy drive information block"), AH_PREDEF ("_FDM", "Floppy Drive Mode", "Sets a floppy drive speed"), AH_PREDEF ("_FIF", "Fan Information", "Returns fan device information"), + AH_PREDEF ("_FIT", "Firmware Interface Table", "Returns a list of NFIT structures"), AH_PREDEF ("_FIX", "Fixed Register Resource Provider", "Returns a list of devices that implement FADT register blocks"), AH_PREDEF ("_FLC", "Flow Control", "Flow control, Resource Descriptor field"), AH_PREDEF ("_FPS", "Fan Performance States", "Returns a list of supported fan performance states"), @@ -332,8 +333,10 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_UPP", "User Presence Polling", "Returns the recommended user presence polling interval"), AH_PREDEF ("_VEN", "Vendor Data", "Resource Descriptor field"), AH_PREDEF ("_VPO", "Video Post Options", "Returns the implemented video post options"), - AH_PREDEF ("_WAK", "Wake", "Inform AML that the system has just awakened"), AH_PREDEF ("_Wxx", "Wake Event", "Method executed as a result of a wake event"), + AH_PREDEF ("_WAK", "Wake", "Inform AML that the system has just awakened"), + AH_PREDEF ("_WPC", "Wireless Power Calibration", "Calibrate power and notify wireless device"), + AH_PREDEF ("_WPP", "Wireless Power Polling", "Get recommended polling interval"), AH_PREDEF (NULL, NULL, NULL) }; diff --git a/source/common/dmextern.c b/source/common/dmextern.c index 403e684b1eb37..bb44b88748a57 100644 --- a/source/common/dmextern.c +++ b/source/common/dmextern.c @@ -754,6 +754,46 @@ AcpiDmAddPathToExternalList ( /******************************************************************************* * + * FUNCTION: AcpiDmEternalIsMatch + * + * PARAMETERS: NamePath - Path to match to External Name + * ExternalPath - External NamePath to be matched + * + * RETURN: BOOLEAN + * + * DESCRIPTION: Returns TRUE if NamePath matches the last NamePath-length + * characters of ExternalPath. + * + * External (_SB_.DEV0.ABCD) will match: + * _SB_.DEV0.ABCD + * DEV0.ABCD + * ABCD + * + ******************************************************************************/ + +static BOOLEAN +AcpiDmExternalIsMatch ( + const char * NamePath, + const char * ListNamePath) +{ + BOOLEAN Match = FALSE; + + + if (strlen (ListNamePath) >= strlen (NamePath)) + { + if (!strcmp (ListNamePath + + (strlen (ListNamePath) - strlen (NamePath)), NamePath)) + { + return (TRUE); + } + } + + return (Match); +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmCreateNewExternal * * PARAMETERS: ExternalPath - External path to the object @@ -808,11 +848,14 @@ AcpiDmCreateNewExternal ( NextExternal = AcpiGbl_ExternalList; while (NextExternal) { - if (!strcmp (ExternalPath, NextExternal->Path)) + /* Check for duplicates */ + + if (AcpiDmExternalIsMatch (ExternalPath, NextExternal->Path)) { /* Duplicate method, check that the Value (ArgCount) is the same */ if ((NextExternal->Type == ACPI_TYPE_METHOD) && + (NextExternal->Flags & ANOBJ_IS_EXTERNAL) && (NextExternal->Value != Value) && (Value > 0)) { @@ -830,6 +873,11 @@ AcpiDmCreateNewExternal ( NextExternal->Value = Value; } + /* Update flags. */ + + NextExternal->Flags |= Flags; + NextExternal->Flags &= ~ACPI_EXT_INTERNAL_PATH_ALLOCATED; + return_ACPI_STATUS (AE_ALREADY_EXISTS); } @@ -1266,76 +1314,85 @@ appearing in an SSDT, the disassembler does not know what to do unless the owning SSDT has been loaded via the -e option. #endif +static char ExternalWarningPart1[600]; +static char ExternalWarningPart2[400]; +static char ExternalWarningPart3[400]; +static char ExternalWarningPart4[200]; + void AcpiDmUnresolvedWarning ( UINT8 Type) { + char *Format; + char Pad[] = " *"; + char NoPad[] = ""; + if (!AcpiGbl_NumExternalMethods) { return; } + if (AcpiGbl_NumExternalMethods == AcpiGbl_ResolvedExternalMethods) + { + return; + } + + Format = Type ? Pad : NoPad; + + sprintf (ExternalWarningPart1, + "%s iASL Warning: There were %u external control methods found during\n" + "%s disassembly, but only %u %s resolved (%u unresolved). Additional\n" + "%s ACPI tables may be required to properly disassemble the code. This\n" + "%s resulting disassembler output file may not compile because the\n" + "%s disassembler did not know how many arguments to assign to the\n" + "%s unresolved methods. Note: SSDTs can be dynamically loaded at\n" + "%s runtime and may or may not be available via the host OS.\n", + Format, AcpiGbl_NumExternalMethods, Format, AcpiGbl_ResolvedExternalMethods, + (AcpiGbl_ResolvedExternalMethods > 1 ? "were" : "was"), + (AcpiGbl_NumExternalMethods - AcpiGbl_ResolvedExternalMethods), + Format, Format, Format, Format, Format); + + sprintf (ExternalWarningPart2, + "%s To specify the tables needed to resolve external control method\n" + "%s references, the -e option can be used to specify the filenames.\n" + "%s Example iASL invocations:\n" + "%s iasl -e ssdt1.aml ssdt2.aml ssdt3.aml -d dsdt.aml\n" + "%s iasl -e dsdt.aml ssdt2.aml -d ssdt1.aml\n" + "%s iasl -e ssdt*.aml -d dsdt.aml\n", + Format, Format, Format, Format, Format, Format); + + sprintf (ExternalWarningPart3, + "%s In addition, the -fe option can be used to specify a file containing\n" + "%s control method external declarations with the associated method\n" + "%s argument counts. Each line of the file must be of the form:\n" + "%s External (<method pathname>, MethodObj, <argument count>)\n" + "%s Invocation:\n" + "%s iasl -fe refs.txt -d dsdt.aml\n", + Format, Format, Format, Format, Format, Format); + + sprintf (ExternalWarningPart4, + "%s The following methods were unresolved and many not compile properly\n" + "%s because the disassembler had to guess at the number of arguments\n" + "%s required for each:\n", + Format, Format, Format); + if (Type) { if (!AcpiGbl_ExternalFileList) { /* The -e option was not specified */ - AcpiOsPrintf (" /*\n" - " * iASL Warning: There were %u external control methods found during\n" - " * disassembly, but additional ACPI tables to resolve these externals\n" - " * were not specified. This resulting disassembler output file may not\n" - " * compile because the disassembler did not know how many arguments\n" - " * to assign to these methods. To specify the tables needed to resolve\n" - " * external control method references, the -e option can be used to\n" - " * specify the filenames. Note: SSDTs can be dynamically loaded at\n" - " * runtime and may or may not be available via the host OS.\n" - " * Example iASL invocations:\n" - " * iasl -e ssdt1.aml ssdt2.aml ssdt3.aml -d dsdt.aml\n" - " * iasl -e dsdt.aml ssdt2.aml -d ssdt1.aml\n" - " * iasl -e ssdt*.aml -d dsdt.aml\n" - " *\n" - " * In addition, the -fe option can be used to specify a file containing\n" - " * control method external declarations with the associated method\n" - " * argument counts. Each line of the file must be of the form:\n" - " * External (<method pathname>, MethodObj, <argument count>)\n" - " * Invocation:\n" - " * iasl -fe refs.txt -d dsdt.aml\n" - " *\n" - " * The following methods were unresolved and many not compile properly\n" - " * because the disassembler had to guess at the number of arguments\n" - " * required for each:\n" - " */\n", - AcpiGbl_NumExternalMethods); + AcpiOsPrintf (" /*\n%s *\n%s *\n%s *\n%s */\n", + ExternalWarningPart1, ExternalWarningPart2, ExternalWarningPart3, + ExternalWarningPart4); } - else if (AcpiGbl_NumExternalMethods != AcpiGbl_ResolvedExternalMethods) + else { /* The -e option was specified, but there are still some unresolved externals */ - AcpiOsPrintf (" /*\n" - " * iASL Warning: There were %u external control methods found during\n" - " * disassembly, but only %u %s resolved (%u unresolved). Additional\n" - " * ACPI tables may be required to properly disassemble the code. This\n" - " * resulting disassembler output file may not compile because the\n" - " * disassembler did not know how many arguments to assign to the\n" - " * unresolved methods. Note: SSDTs can be dynamically loaded at\n" - " * runtime and may or may not be available via the host OS.\n" - " *\n" - " * If necessary, the -fe option can be used to specify a file containing\n" - " * control method external declarations with the associated method\n" - " * argument counts. Each line of the file must be of the form:\n" - " * External (<method pathname>, MethodObj, <argument count>)\n" - " * Invocation:\n" - " * iasl -fe refs.txt -d dsdt.aml\n" - " *\n" - " * The following methods were unresolved and many not compile properly\n" - " * because the disassembler had to guess at the number of arguments\n" - " * required for each:\n" - " */\n", - AcpiGbl_NumExternalMethods, AcpiGbl_ResolvedExternalMethods, - (AcpiGbl_ResolvedExternalMethods > 1 ? "were" : "was"), - (AcpiGbl_NumExternalMethods - AcpiGbl_ResolvedExternalMethods)); + AcpiOsPrintf (" /*\n%s *\n *\n */\n", + ExternalWarningPart1, ExternalWarningPart3, ExternalWarningPart4); } } else @@ -1344,50 +1401,15 @@ AcpiDmUnresolvedWarning ( { /* The -e option was not specified */ - fprintf (stderr, "\n" - "iASL Warning: There were %u external control methods found during\n" - "disassembly, but additional ACPI tables to resolve these externals\n" - "were not specified. The resulting disassembler output file may not\n" - "compile because the disassembler did not know how many arguments\n" - "to assign to these methods. To specify the tables needed to resolve\n" - "external control method references, the -e option can be used to\n" - "specify the filenames. Note: SSDTs can be dynamically loaded at\n" - "runtime and may or may not be available via the host OS.\n" - "Example iASL invocations:\n" - " iasl -e ssdt1.aml ssdt2.aml ssdt3.aml -d dsdt.aml\n" - " iasl -e dsdt.aml ssdt2.aml -d ssdt1.aml\n" - " iasl -e ssdt*.aml -d dsdt.aml\n" - "\n" - "In addition, the -fe option can be used to specify a file containing\n" - "control method external declarations with the associated method\n" - "argument counts. Each line of the file must be of the form:\n" - " External (<method pathname>, MethodObj, <argument count>)\n" - "Invocation:\n" - " iasl -fe refs.txt -d dsdt.aml\n", - AcpiGbl_NumExternalMethods); + fprintf (stderr, "\n%s\n%s\n%s\n", + ExternalWarningPart1, ExternalWarningPart2, ExternalWarningPart3); } - else if (AcpiGbl_NumExternalMethods != AcpiGbl_ResolvedExternalMethods) + else { /* The -e option was specified, but there are still some unresolved externals */ - fprintf (stderr, "\n" - "iASL Warning: There were %u external control methods found during\n" - "disassembly, but only %u %s resolved (%u unresolved). Additional\n" - "ACPI tables may be required to properly disassemble the code. The\n" - "resulting disassembler output file may not compile because the\n" - "disassembler did not know how many arguments to assign to the\n" - "unresolved methods. Note: SSDTs can be dynamically loaded at\n" - "runtime and may or may not be available via the host OS.\n" - "\n" - "If necessary, the -fe option can be used to specify a file containing\n" - "control method external declarations with the associated method\n" - "argument counts. Each line of the file must be of the form:\n" - " External (<method pathname>, MethodObj, <argument count>)\n" - "Invocation:\n" - " iasl -fe refs.txt -d dsdt.aml\n", - AcpiGbl_NumExternalMethods, AcpiGbl_ResolvedExternalMethods, - (AcpiGbl_ResolvedExternalMethods > 1 ? "were" : "was"), - (AcpiGbl_NumExternalMethods - AcpiGbl_ResolvedExternalMethods)); + fprintf (stderr, "\n%s\n%s\n", + ExternalWarningPart1, ExternalWarningPart3); } } } diff --git a/source/common/dmtable.c b/source/common/dmtable.c index b66f2d8081b2b..89f6db084f3b1 100644 --- a/source/common/dmtable.c +++ b/source/common/dmtable.c @@ -196,6 +196,7 @@ static const char *AcpiDmHestSubnames[] = "PCI Express AER (AER Endpoint)", "PCI Express/PCI-X Bridge AER", "Generic Hardware Error Source", + "Generic Hardware Error Source V2", "Unknown Subtable Type" /* Reserved */ }; diff --git a/source/common/dmtables.c b/source/common/dmtables.c index 5df445720662b..5758b9d372f26 100644 --- a/source/common/dmtables.c +++ b/source/common/dmtables.c @@ -145,6 +145,11 @@ AdCreateTableHeader ( UINT8 Checksum; + /* Reset globals for External statements */ + + AcpiGbl_NumExternalMethods = 0; + AcpiGbl_ResolvedExternalMethods = 0; + /* * Print file header and dump original table header */ diff --git a/source/common/dmtbdump.c b/source/common/dmtbdump.c index 3c5ce776c3bfa..c6e0c4e78872d 100644 --- a/source/common/dmtbdump.c +++ b/source/common/dmtbdump.c @@ -1616,6 +1616,12 @@ AcpiDmDumpHest ( SubTableLength = sizeof (ACPI_HEST_GENERIC); break; + case ACPI_HEST_TYPE_GENERIC_ERROR_V2: + + InfoTable = AcpiDmTableInfoHest10; + SubTableLength = sizeof (ACPI_HEST_GENERIC_V2); + break; + default: /* Cannot continue on unknown type - no length */ diff --git a/source/common/dmtbinfo.c b/source/common/dmtbinfo.c index 5ccea2a1f738d..dde36d3f6623b 100644 --- a/source/common/dmtbinfo.c +++ b/source/common/dmtbinfo.c @@ -163,6 +163,7 @@ #define ACPI_HEST7_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_AER,f) #define ACPI_HEST8_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_AER_BRIDGE,f) #define ACPI_HEST9_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_GENERIC,f) +#define ACPI_HEST10_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_GENERIC_V2,f) #define ACPI_HESTN_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_NOTIFY,f) #define ACPI_HESTB_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_ERROR_BANK,f) #define ACPI_IORT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_ITS_GROUP,f) @@ -1342,6 +1343,26 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoHest9[] = ACPI_DMT_TERMINATOR }; +/* 10: Generic Hardware Error Source - Version 2 */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoHest10[] = +{ + ACPI_DM_HEST_HEADER, + {ACPI_DMT_UINT16, ACPI_HEST10_OFFSET (RelatedSourceId), "Related Source Id", 0}, + {ACPI_DMT_UINT8, ACPI_HEST10_OFFSET (Reserved), "Reserved", 0}, + {ACPI_DMT_UINT8, ACPI_HEST10_OFFSET (Enabled), "Enabled", 0}, + {ACPI_DMT_UINT32, ACPI_HEST10_OFFSET (RecordsToPreallocate), "Records To Preallocate", 0}, + {ACPI_DMT_UINT32, ACPI_HEST10_OFFSET (MaxSectionsPerRecord), "Max Sections Per Record", 0}, + {ACPI_DMT_UINT32, ACPI_HEST10_OFFSET (MaxRawDataLength), "Max Raw Data Length", 0}, + {ACPI_DMT_GAS, ACPI_HEST10_OFFSET (ErrorStatusAddress), "Error Status Address", 0}, + {ACPI_DMT_HESTNTFY, ACPI_HEST10_OFFSET (Notify), "Notify", 0}, + {ACPI_DMT_UINT32, ACPI_HEST10_OFFSET (ErrorBlockLength), "Error Status Block Length", 0}, + {ACPI_DMT_GAS, ACPI_HEST10_OFFSET (ReadAckRegister), "Read Ack Register", 0}, + {ACPI_DMT_UINT64, ACPI_HEST10_OFFSET (ReadAckPreserve), "Read Ack Preserve", 0}, + {ACPI_DMT_UINT64, ACPI_HEST10_OFFSET (ReadAckWrite), "Read Ack Write", 0}, + ACPI_DMT_TERMINATOR +}; + ACPI_DMTABLE_INFO AcpiDmTableInfoHestNotify[] = { {ACPI_DMT_HESTNTYP, ACPI_HESTN_OFFSET (Type), "Notify Type", 0}, @@ -2141,6 +2162,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoNfit1[] = {ACPI_DMT_FLAG3, ACPI_NFIT1_FLAG_OFFSET (Flags,0), "Device not armed", 0}, {ACPI_DMT_FLAG4, ACPI_NFIT1_FLAG_OFFSET (Flags,0), "Health events observed", 0}, {ACPI_DMT_FLAG5, ACPI_NFIT1_FLAG_OFFSET (Flags,0), "Health events enabled", 0}, + {ACPI_DMT_FLAG6, ACPI_NFIT1_FLAG_OFFSET (Flags,0), "Mapping failed", 0}, {ACPI_DMT_UINT16, ACPI_NFIT1_OFFSET (Reserved), "Reserved", 0}, ACPI_DMT_TERMINATOR }; |