diff options
Diffstat (limited to 'tools/acpihelp')
-rw-r--r-- | tools/acpihelp/acpihelp.h | 1 | ||||
-rw-r--r-- | tools/acpihelp/ahaslkey.c | 55 | ||||
-rw-r--r-- | tools/acpihelp/ahaslops.c | 157 | ||||
-rw-r--r-- | tools/acpihelp/ahdecode.c | 72 | ||||
-rw-r--r-- | tools/acpihelp/ahpredef.c | 34 |
5 files changed, 258 insertions, 61 deletions
diff --git a/tools/acpihelp/acpihelp.h b/tools/acpihelp/acpihelp.h index 928187348a9e1..eb0a7574f1de8 100644 --- a/tools/acpihelp/acpihelp.h +++ b/tools/acpihelp/acpihelp.h @@ -54,6 +54,7 @@ #include <sys/types.h> #include <fcntl.h> #include <ctype.h> +#include <string.h> #ifdef WIN32 #include <io.h> #include <direct.h> diff --git a/tools/acpihelp/ahaslkey.c b/tools/acpihelp/ahaslkey.c index 48d2110e9c49c..186889835b711 100644 --- a/tools/acpihelp/ahaslkey.c +++ b/tools/acpihelp/ahaslkey.c @@ -49,11 +49,15 @@ */ const AH_ASL_KEYWORD AslKeywordInfo[] = { - {"AccessAttribKeyword", "SMBus Attributes", - ":= SMBQuick | SMBSendReceive | SMBByte | SMBWord | " - "SMBBlock | SMBProcessCall | SMBBlockProcessCall"}, + {"AccessAttribKeyword", "Serial Bus Attributes (with legacy SMBus aliases)", + ":= AttribQuick (SMBusQuick) | AttribSendReceive (SMBusSendReceive) | " + "AttribByte (SMBusByte) | AttribWord (SMBusWord) | " + "AttribBlock (SMBusBlock) | AttribProcessCall (SMBusProcessCall) | " + "AttribBlockProcessCall (SMBusProcessCall)"}, {"AccessTypeKeyword", "Field Access Types", ":= AnyAcc | ByteAcc | WordAcc | DWordAcc | QWordAcc | BufferAcc"}, + {"AddressingModeKeyword", "Mode - Resource Descriptors", + ":= AddressingMode7Bit | AddressingMode10Bit"}, {"AddressKeyword", "ACPI memory range types", ":= AddressRangeMemory | AddressRangeReserved | " "AddressRangeNVS | AddressRangeACPI"}, @@ -61,16 +65,32 @@ const AH_ASL_KEYWORD AslKeywordInfo[] = ":= RegionSpaceKeyword | FFixedHW"}, {"BusMasterKeyword", "DMA Bus Mastering", ":= BusMaster | NotBusMaster"}, + {"ByteLengthKeyword", "Bits per Byte - Resource Descriptors", + ":= DataBitsFive | DataBitsSix | DataBitsSeven | DataBitsEight | DataBitsNine"}, + {"ClockPhaseKeyword", "Resource Descriptors", + ":= ClockPhaseFirst | ClockPhaseSecond"}, + {"ClockPolarityKeyword", "Resource Descriptors", + ":= ClockPolarityLow | ClockPolarityHigh"}, {"DecodeKeyword", "Type of Memory Decoding - Resource Descriptors", ":= SubDecode | PosDecode"}, - {"DMATypeKeyword", "DMA Types - DMA Resource Descriptor", + {"DmaTypeKeyword", "DMA Types - DMA Resource Descriptor", ":= Compatibility | TypeA | TypeB | TypeF"}, + {"EndianKeyword", "Endian type - Resource Descriptor", + ":= BigEndian | LittleEndian"}, + {"ExtendedAttribKeyword", "Extended Bus Attributes", + ":= AttribBytes (AccessLength) | AttribRawBytes (AccessLength) | " + "AttribRawProcessBytes (AccessLength)"}, + {"FlowControlKeyword", "Resource Descriptor", + ":= FlowControlNone | FlowControlXon | FlowControlHardware"}, + {"InterruptLevelKeyword", "Interrupt Active Types", + ":= ActiveHigh | ActiveLow | ActiveBoth"}, {"InterruptTypeKeyword", "Interrupt Types", ":= Edge | Level"}, - {"InterruptLevel", "Interrupt Active Types", - ":= ActiveHigh | ActiveLow"}, - {"IODecodeKeyword", "I/O Decoding - IO Resource Descriptor", + {"IoDecodeKeyword", "I/O Decoding - IO Resource Descriptor", ":= Decode16 | Decode10"}, + {"IoRestrictionKeyword", "I/O Restriction - GPIO Resource Descriptors", + ":= IoRestrictionNone | IoRestrictionInputOnly | " + "IoRestrictionOutputOnly | IoRestrictionNoneAndPreserve"}, {"LockRuleKeyword", "Global Lock use for Field Operator", ":= Lock | NoLock"}, {"MatchOpKeyword", "Types for Match Operator", @@ -85,19 +105,34 @@ const AH_ASL_KEYWORD AslKeywordInfo[] = ":= UnknownObj | IntObj | StrObj | BuffObj | PkgObj | FieldUnitObj | " "DeviceObj | EventObj | MethodObj | MutexObj | OpRegionObj | PowerResObj | " "ProcessorObj | ThermalZoneObj | BuffFieldObj | DDBHandleObj"}, + {"ParityKeyword", "Resource Descriptors", + ":= ParityTypeNone | ParityTypeSpace | ParityTypeMark | " + "ParityTypeOdd | ParityTypeEven"}, + {"PinConfigKeyword", "Pin Configuration - GPIO Resource Descriptors", + ":= PullDefault | PullUp | PullDown | PullNone"}, + {"PolarityKeyword", "Resource Descriptors", + ":= PolarityHigh | PolarityLow"}, {"RangeTypeKeyword", "I/O Range Types - Resource Descriptors", ":= ISAOnlyRanges | NonISAOnlyRanges | EntireRange"}, {"ReadWriteKeyword", "Memory Access Types - Resource Descriptors", ":= ReadWrite | ReadOnly"}, {"RegionSpaceKeyword", "Operation Region Address Space Types", ":= UserDefRegionSpace | SystemIO | SystemMemory | PCI_Config | " - "EmbeddedControl | SMBus | SystemCMOS | PciBarTarget | IPMI"}, + "EmbeddedControl | SMBus | SystemCMOS | PciBarTarget | IPMI | " + "GeneralPurposeIo, GenericSerialBus"}, {"ResourceTypeKeyword", "Resource Usage - Resource Descriptors", ":= ResourceConsumer | ResourceProducer"}, {"SerializeRuleKeyword", "Control Method Serialization", ":= Serialized | NotSerialized"}, {"ShareTypeKeyword", "Interrupt Sharing - Resource Descriptors", - ":= Shared | Exclusive"}, + ":= Shared | Exclusive | SharedAndWake | ExclusiveAndWake"}, + {"SlaveModeKeyword", "Resource Descriptors", + ":= ControllerInitiated | DeviceInitiated"}, + {"StopBitsKeyword", "Resource Descriptors", + ":= StopBitsZero | StopBitsOne | StopBitsOnePlusHalf | StopBitsTwo"}, + {"TransferWidthKeyword", "DMA Widths - Fixed DMA Resource Descriptor", + ":= Width8bit | Width16bit | Width32bit | Width64bit | " + "Width128bit | Width256bit"}, {"TranslationKeyword", "Translation Density Types - Resource Descriptors", ":= SparseTranslation | DenseTranslation"}, {"TypeKeyword", "Translation Types - Resource Descriptors", @@ -106,6 +141,8 @@ const AH_ASL_KEYWORD AslKeywordInfo[] = ":= Preserve | WriteAsOnes | WriteAsZeros"}, {"UserDefRegionSpace", "User defined address spaces", ":= IntegerData => 0x80 - 0xFF"}, + {"WireModeKeyword", "SPI Wire Mode - Resource Descriptors", + ":= ThreeWireMode | FourWireMode"}, {"XferTypeKeyword", "DMA Transfer Types", ":= Transfer8 | Transfer16 | Transfer8_16"}, {NULL, NULL, NULL} diff --git a/tools/acpihelp/ahaslops.c b/tools/acpihelp/ahaslops.c index b1ad645e466e7..1a18282fc5f04 100644 --- a/tools/acpihelp/ahaslops.c +++ b/tools/acpihelp/ahaslops.c @@ -50,7 +50,8 @@ */ const AH_ASL_OPERATOR AslOperatorInfo[] = { - {"AccessAs", "(AccessType, AccessAttibute)", + {"AccessAs", "(AccessType, AccessAttribKeyword | " + "ExtendedAttribKeyword (AccessLength))", "ChangeFieldUnitAccess"}, {"Acquire", "(SyncObject, TimeoutValue) => Boolean", "Acquire a mutex"}, @@ -62,11 +63,13 @@ const AH_ASL_OPERATOR AslOperatorInfo[] = "Integer Bitwise And"}, {"Arg", "Arg0 - Arg6", "Method argument data objects"}, - {"BankField", "(RegionName, BankName, BankValue, AccessType, LockRule, UpdateRule) {FieldUnitList}", + {"BankField", "(RegionName, BankName, BankValue, " + "AccessTypeKeyword, LockRuleKeyword, " + "UpdateRuleKeyword) {FieldUnitList}", "Declare fields in a banked configuration object"}, - {"Break", NULL, + {"Break", "No parameters", "Continue following the innermost enclosing While"}, - {"BreakPoint", NULL, + {"BreakPoint", "No parameters", "Used for debugging, stops execution in the debugger"}, {"Buffer", "(BufferSize) {String or ByteList} => Buffer", "Declare Buffer object"}, @@ -78,7 +81,9 @@ const AH_ASL_OPERATOR AslOperatorInfo[] = "Concatenate two resource templates"}, {"CondRefOf", "(Source, Result) => Boolean", "Conditional reference to an object"}, - {"Continue", NULL, + {"Connection", "(ResourceMacro)", + "Associate connection with FieldUnits within a Field object"}, + {"Continue", "No parameters", "Continue innermost enclosing While loop"}, {"CopyObject", "(Source, Destination) => DataRefObject", "Copy and existing object"}, @@ -96,13 +101,14 @@ const AH_ASL_OPERATOR AslOperatorInfo[] = "Declare a Word field object of a buffer object"}, {"DataTableRegion", "(RegionName, SignatureString, OemIDString, OemTableIDString)", "Declare a Data Table Region"}, - {"Debug", NULL, + {"Debug", "No parameters", "Debugger output"}, {"Decrement", "(Minuend) => Integer", "Decrement an Integer"}, {"Default", "{TermList}", "Default execution path in Switch()"}, - {"DefinitionBlock", "(AMLFileName, TableSignature, ComplianceRevision, OEMID, TableID, OEMRevision) {TermList}", + {"DefinitionBlock", "(AMLFileName, TableSignature, ComplianceRevision, " + "OEMID, TableID, OEMRevision) {TermList}", "Declare a Definition Block"}, {"DerefOf", "(Source) => Object", "Dereference an object reference"}, @@ -110,19 +116,25 @@ const AH_ASL_OPERATOR AslOperatorInfo[] = "Declare a bus/device object"}, {"Divide", "(Dividend, Divisor, Remainder, Result) => Integer", "Integer Divide"}, - {"DMA", "(DmaType, IsBusMaster, DmaTransferSize, DescriptorName) {DmaChannelList} => Buffer", + {"DMA", "(DmaTypeKeyword, BusMasterKeyword, XferTypeKeyword, " + "DescriptorName) {DmaChannelList} => Buffer", "DMA Resource Descriptor macro"}, - {"DWordIO", "(ResourceUsage, IsMinFixed, IsMaxFixed, Decode, ISARanges, AddressGranularity, " - "AddressMinimum, AddressMaximum, AddressTranslation, RangeLength, ResourceSourceIndex, " - "ResourceSource, DescriptorName, TranslationType, TranslationDensity)", + {"DWordIO", "(ResourceTypeKeyword, MinKeyword, MaxKeyword, " + "DecodeKeyword, RangeTypeKeyword, AddressGranularity, " + "AddressMinimum, AddressMaximum, AddressTranslation, " + "RangeLength, ResourceSourceIndex, " + "ResourceSource, DescriptorName, TypeKeyword, TranslationKeyword)", "DWord IO Resource Descriptor macro"}, - {"DWordMemory", "(ResourceUsage, Decode, IsMinFixed, IsMaxFixed, Cacheable, ReadAndWrite, " + {"DWordMemory", "(ResourceTypeKeyword, DecodeKeyword, MinKeyword, " + "MaxKeyword, MemTypeKeyword, ReadWriteKeyword, " "AddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, " - "RangeLength, ResourceSourceIndex, ResourceSource, DescriptorName, MemoryType, " - "TranslationType)", + "RangeLength, ResourceSourceIndex, ResourceSource, DescriptorName, AddressKeyword, " + "TypeKeyword)", "DWord Memory Resource Descriptor macro"}, - {"DWordSpace", "(ResourceType, ResourceUsage, Decode, IsMinFixed, IsMaxFixed, TypeSpecificFlags, " - "AddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, RangeLength, " + {"DWordSpace", "(ResourceType, ResourceTypeKeyword, DecodeKeyword, " + "MinKeyword, MaxKeyword, TypeSpecificFlags, " + "AddressGranularity, AddressMinimum, AddressMaximum, " + "AddressTranslation, RangeLength, " "ResourceSourceIndex, ResourceSource, DescriptorName)", "DWord Space Resource Descriptor macro"}, {"EISAID", "(EisaIdString) => DWordConst", @@ -135,34 +147,57 @@ const AH_ASL_OPERATOR AslOperatorInfo[] = "End Dependent Function Resource Descriptor macro"}, {"Event", "(EventName)", "Declare an event synchronization object"}, - {"ExtendedIO", "(ResourceUsage, IsMinFixed, IsMaxFixed, Decode, ISARanges, AddressGranularity, " + {"ExtendedIO", "(ResourceTypeKeyword, MinKeyword, MaxKeyword, " + "DecodeKeyword, RangeTypeKeyword, AddressGranularity, " "AddressMinimum, AddressMaximum, AddressTranslation, RangeLength, " - "TypeSpecificAttributes, DescriptorName, TranslationType, TranslationDensity)", + "TypeSpecificAttributes, DescriptorName, TypeKeyword, TranslationKeyword)", "Extended IO Resource Descriptor macro"}, - {"ExtendedMemory", "(ResourceUsage, Decode, IsMinFixed, IsMaxFixed, Cacheable, ReadAndWrite, " + {"ExtendedMemory", "(ResourceTypeKeyword, DecodeKeyword, MinKeyword, " + "MaxKeyword, MemTypeKeyword, ReadWriteKeyword, " "AddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, " - "RangeLength, TypeSpecificAttributes, DescriptorName, MemoryType, TranslationType)", + "RangeLength, TypeSpecificAttributes, DescriptorName, " + "AddressKeyword, TypeKeyword)", "Extended Memory Resource Descriptor macro"}, - {"ExtendedSpace", "(ResourceType, ResourceUsage, Decode, IsMinFixed, IsMaxFixed, TypeSpecificFlags, " + {"ExtendedSpace", "(ResourceType, ResourceTypeKeyword, DecodeKeyword, " + "MinKeyword, MaxKeyword, TypeSpecificFlags, " "AddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, " "RangeLength, TypeSpecificAttributes, DescriptorName)", "Extended Space Resource Descriptor macro"}, - {"External", "(ObjectName, ObjectType, ReturnType, ParameterTypes)", + {"External", "(ObjectName, ObjectTypeKeyword, ReturnType, ParameterTypes)", "Declare external objects"}, {"Fatal", "(Type, Code, Arg)", "Fatal error check"}, - {"Field", "(RegionName, AccessType, LockRule, UpdateRule) {FieldUnitList}", + {"Field", "(RegionName, AccessTypeKeyword, LockRuleKeyword, " + "UpdateRuleKeyword) {FieldUnitList}", "Declare fields of an operation region object"}, {"FindSetLeftBit", "(Source, Result) => Integer", "Index of first least significant bit set"}, {"FindSetRightBit", "(Source, Result) => Integer", "Index of first most significant bit set"}, + {"FixedDMA", "(DmaRequestLine, Channel, TransferWidthKeyword, DescriptorName) => Buffer", + "Fixed DMA Resource Descriptor macro"}, {"FixedIO", "(AddressBase, RangeLength, DescriptorName) => Buffer", "Fixed I/O Resource Descriptor macro"}, {"FromBCD", "(BCDValue, Result) => Integer", "Convert from BCD to numeric"}, {"Function", "(FunctionName, ReturnType, ParameterTypes) {TermList}", "Declare control method"}, + {"GpioInt", "(InterruptTypeKeyword, InterruptLevelKeyword, " + "ShareTypeKeyword, PinConfigKeyword, " + "DebounceTimeout, ResourceSource, " + "ResourceSourceIndex, ResourceTypeKeyword, DescriptorName, " + "RawDataBuffer() {VendorData}) {Pin}", + "GPIO Interrupt Connection Resource Descriptor Macro"}, + {"GpioIo", "(ShareTypeKeyword, PinConfigKeyword, DebounceTimeout, DriveStrength, " + "IoRestrictionKeyword, ResourceSource, " + "ResourceSourceIndex, ResourceTypeKeyword, DescriptorName, " + "RawDataBuffer() {VendorData}) {PinList}", + "GPIO I/O Connection Resource Descriptor Macro"}, + {"I2cSerialBus", "(SlaveAddress, SlaveModeKeyword, ConnectionSpeed, " + "AddressingModeKeyword, ResourceSource, " + "ResourceSourceIndex, ResourceTypeKeyword, DescriptorName, " + "RawDataBuffer() {VendorData})", + "I2C Serial Bus Connection Resource Descriptor Macro"}, {"If", "(Predicate) {TermList}", "Conditional execution"}, {"Include", "(FilePathName)", @@ -171,14 +206,18 @@ const AH_ASL_OPERATOR AslOperatorInfo[] = "Increment a Integer"}, {"Index", "(Source, Index, Destination) => ObjectReference", "Indexed Reference to member object"}, - {"IndexField", "(IndexName, DataName, AccessType, LockRule, UpdateRule) {FieldUnitList}", + {"IndexField", "(IndexName, DataName, AccessTypeKeyword, LockRuleKeyword, " + "UpdateRuleKeyword) {FieldUnitList}", "Declare Index/Data Fields"}, - {"Interrupt", "(ResourceUsage, EdgeLevel, ActiveLevel, Shared, ResourceSourceIndex, " + {"Interrupt", "(ResourceTypeKeyword, InterruptTypeKeyword, InterruptLevelKeyword, " + "ShareTypeKeyword, ResourceSourceIndex, " "ResourceSource, DescriptorName) {InterruptList} => Buffer", "Interrupt Resource Descriptor macro"}, - {"IO", "(Decode, AddressMin, AddressMax, AddressAlignment, RangeLength, DescriptorName) => Buffer", + {"IO", "(IoDecodeKeyword, AddressMin, AddressMax, AddressAlignment, " + "RangeLength, DescriptorName) => Buffer", "IO Resource Descriptor macro"}, - {"IRQ", "(EdgeLevel, ActiveLevel, Shared, DescriptorName) {InterruptList} => Buffer", + {"IRQ", "(InterruptTypeKeyword, InterruptLevelKeyword, ShareTypeKeyword, " + "DescriptorName) {InterruptList} => Buffer", "Interrupt Resource Descriptor macro"}, {"IRQNoFlags", "(DescriptorName) {InterruptList} => Buffer", "Short Interrupt Resource Descriptor macro"}, @@ -207,17 +246,19 @@ const AH_ASL_OPERATOR AslOperatorInfo[] = "Method local data objects"}, {"LOr", "(Source1, Source2) => Boolean", "Logical Or"}, - {"Match", "(SearchPackage, Op1, MatchObject1, Op2, MatchObject2, StartIndex) => Ones | Integer", + {"Match", "(SearchPackage, MatchOpKeyword, MatchObject1, MatchOpKeyword, " + "MatchObject2, StartIndex) => Ones | Integer", "Search for match in package array"}, - {"Memory24", "(ReadAndWrite, AddressMinimum, AddressMaximum, AddressAlignment, " + {"Memory24", "(ReadWriteKeyword, AddressMinimum, AddressMaximum, AddressAlignment, " "RangeLength, DescriptorName)", "Memory Resource Descriptor macro"}, - {"Memory32", "(ReadAndWrite, AddressMinimum, AddressMaximum, AddressAlignment, " + {"Memory32", "(ReadWriteKeyword, AddressMinimum, AddressMaximum, AddressAlignment, " "RangeLength, DescriptorName)", "Memory Resource Descriptor macro"}, - {"Memory32Fixed", "(ReadAndWrite, AddressBase, RangeLength, DescriptorName)", + {"Memory32Fixed", "(ReadWriteKeyword, AddressBase, RangeLength, DescriptorName)", "Memory Resource Descriptor macro"}, - {"Method", "(MethodName, NumArgs, SerializeRule, SyncLevel, ReturnType, ParameterTypes) " + {"Method", "(MethodName, NumArgs, SerializeRuleKeyword, " + "SyncLevel, ReturnType, ParameterTypes) " "{TermList}", "Declare a control method"}, {"Mid", "(Source, Index, Length, Result) => Buffer or String", @@ -232,7 +273,7 @@ const AH_ASL_OPERATOR AslOperatorInfo[] = "Declare a Named object"}, {"NAnd", "(Source1, Source2, Result) => Integer", "Integer Bitwise Nand"}, - {"NoOp", NULL, + {"NoOp", "No parameters", "No operation"}, {"NOr", "(Source1, Source2, Result) => Integer", "Integer Bitwise Nor"}, @@ -248,7 +289,7 @@ const AH_ASL_OPERATOR AslOperatorInfo[] = "Constant One Object (1)"}, {"Ones", "=> Integer", "Constant Ones Object (-1)"}, - {"OperationRegion", "(RegionName, RegionSpace, Offset, Length)", + {"OperationRegion", "(RegionName, RegionSpaceKeyword, Offset, Length)", "Declare an operational region"}, {"Or", "(Source1, Source2, Result) => Integer", "Integer Bitwise Or"}, @@ -258,23 +299,30 @@ const AH_ASL_OPERATOR AslOperatorInfo[] = "Declare a power resource object"}, {"Processor", "(ProcessorName, ProcessorID, PBlockAddress, PblockLength) {ObjectList}", "Declare a processor package"}, - {"QWordIO", "(ResourceUsage, IsMinFixed, IsMaxFixed, Decode, ISARanges, AddressGranularity, " + {"QWordIO", "(ResourceTypeKeyword, MinKeyword, MaxKeyword, DecodeKeyword, " + "RangeTypeKeyword, AddressGranularity, " "AddressMinimum, AddressMaximum, AddressTranslation, RangeLength, " - "ResourceSourceIndex, ResourceSource, DescriptorName, TranslationType, " - "TranslationDensity)", + "ResourceSourceIndex, ResourceSource, DescriptorName, TypeKeyword, " + "TranslationKeyword)", "QWord IO Resource Descriptor macro"}, - {"QWordMemory", "(ResourceUsage, Decode, IsMinFixed, IsMaxFixed, Cacheable, ReadAndWrite, " + {"QWordMemory", "(ResourceTypeKeyword, DecodeKeyword, MinKeyword, MaxKeyword, " + "MemTypeKeyword, ReadWriteKeyword, " "AddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, " - "RangeLength, ResourceSourceIndex, ResourceSource, DescriptorName, MemoryType, " - "TranslationType)", + "RangeLength, ResourceSourceIndex, ResourceSource, " + "DescriptorName, AddressKeyword, " + "TypeKeyword)", "QWord Memory Resource Descriptor macro"}, - {"QWordSpace", "(ResourceType, ResourceUsage, Decode, IsMinFixed, IsMaxFixed, TypeSpecificFlags, " + {"QWordSpace", "(ResourceType, ResourceTypeKeyword, DecodeKeyword, " + "MinKeyword, MaxKeyword, TypeSpecificFlags, " "AddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, " "RangeLength, ResourceSourceIndex, ResourceSource, DescriptorName)", "Qword Space Resource Descriptor macro"}, + {"RawDataBuffer", "(BufferSize) {ByteList} => RawDataBuffer", + "Create a raw data buffer (does not use Buffer AML opcode)"}, {"RefOf", "(Object) => ObjectReference", "Create Reference to an object"}, - {"Register", "(AddressSpaceKeyword, RegisterBitWidth, RegisterBitOffset, RegisterAddress, " + {"Register", "(AddressSpaceKeyword, RegisterBitWidth, " + "RegisterBitOffset, RegisterAddress, " "AccessSize, DescriptorName)", "Generic register Resource Descriptor macro"}, {"Release", "(SyncObject)", @@ -299,6 +347,12 @@ const AH_ASL_OPERATOR AslOperatorInfo[] = "Get the size of a buffer}, string}, or package"}, {"Sleep", "(MilliSeconds)", "Sleep n milliseconds (yields the processor)"}, + {"SpiSerialBus", "(DeviceSelection, PolarityKeyword, WireModeKeyword, " + "DataBitLength, SlaveModeKeyword, " + "ConnectionSpeed, ClockPolarityKeyword, ClockPhaseKeyword, " + "ResourceSource, ResourceSourceIndex, " + "ResourceTypeKeyword, DescriptorName, RawDataBuffer() {VendorData})", + "SPI Serial Bus Connection Resource Descriptor Macro"}, {"Stall", "(MicroSeconds)", "Delay n microseconds (does not yield the processor)"}, {"StartDependentFn", "(CompatibilityPriority, PerformancePriority) {ResourceList}", @@ -329,6 +383,12 @@ const AH_ASL_OPERATOR AslOperatorInfo[] = "Copy ASCII string from buffer"}, {"ToUUID", "(AsciiString) => Buffer", "Convert Ascii string to UUID"}, + {"UartSerialBus", "(ConnectionSpeed, ByteLengthKeyword, StopBitsKeyword, " + "LinesInUse, EndianKeyword, ParityKeyword, " + "FlowControlKeyword, ReceiveBufferSize, TransmitBufferSize, ResourceSource, " + "ResourceSourceIndex, ResourceTypeKeyword, DescriptorName, " + "RawDataBuffer() {VendorData})", + "UART Serial Bus Connection Resource Descriptor Macro"}, {"Unicode", "(String) => Buffer", "String to Unicode conversion macro"}, {"Unload", "(Handle)", @@ -341,16 +401,19 @@ const AH_ASL_OPERATOR AslOperatorInfo[] = "Wait on an Event"}, {"While", "(Predicate) {TermList}", "Conditional loop"}, - {"WordBusNumber", "(ResourceUsage, IsMinFixed, IsMaxFixed, Decode, AddressGranularity, AddressMinimum, " + {"WordBusNumber", "(ResourceTypeKeyword, MinKeyword, MaxKeyword, DecodeKeyword, " + "AddressGranularity, AddressMinimum, " "AddressMaximum, AddressTranslation, RangeLength, ResourceSourceIndex, " "ResourceSource, DescriptorName)", "Word Bus number Resource Descriptor macro"}, - {"WordIO", "(ResourceUsage, IsMinFixed, IsMaxFixed, Decode, ISARanges, AddressGranularity, " + {"WordIO", "(ResourceTypeKeyword, MinKeyword, MaxKeyword, DecodeKeyword, " + "RangeTypeKeyword, AddressGranularity, " "AddressMinimum, AddressMaximum, AddressTranslation, RangeLength, " - "ResourceSourceIndex, ResourceSource, DescriptorName, TranslationType, " - "TranslationDensity)", + "ResourceSourceIndex, ResourceSource, DescriptorName, TypeKeyword, " + "TranslationKeyword)", "Word IO Resource Descriptor macro"}, - {"WordSpace", "(ResourceType, ResourceUsage, Decode, IsMinFixed, IsMaxFixed, TypeSpecificFlags, " + {"WordSpace", "(ResourceType, ResourceTypeKeyword, DecodeKeyword, MinKeyword, " + "MaxKeyword, TypeSpecificFlags, " "AddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, " "RangeLength, ResourceSourceIndex, ResourceSource, DescriptorName)", "Word Space Resource Descriptor macro"}, diff --git a/tools/acpihelp/ahdecode.c b/tools/acpihelp/ahdecode.c index aaeae4a031602..34d816fc1d0e8 100644 --- a/tools/acpihelp/ahdecode.c +++ b/tools/acpihelp/ahdecode.c @@ -46,7 +46,11 @@ #define ACPI_CREATE_PREDEFINED_TABLE #include "acpredef.h" -static char Gbl_Buffer[64]; +#define BUFFER_LENGTH 128 +#define LINE_BUFFER_LENGTH 512 + +static char Gbl_Buffer[BUFFER_LENGTH]; +static char Gbl_LineBuffer[LINE_BUFFER_LENGTH]; static const char *AcpiRtypeNames[] = { "/Integer", @@ -82,6 +86,10 @@ AhDisplayAslOperator ( const AH_ASL_OPERATOR *Op); static void +AhDisplayOperatorKeywords ( + const AH_ASL_OPERATOR *Op); + +static void AhDisplayAslKeyword ( const AH_ASL_KEYWORD *Op); @@ -386,7 +394,6 @@ AhDecodeAmlOpcode ( { const AH_AML_OPCODE *Op; UINT32 Opcode; - BOOLEAN Found = FALSE; UINT8 Prefix; @@ -421,7 +428,6 @@ AhDecodeAmlOpcode ( (Opcode <= Op->OpcodeRangeEnd)) { AhDisplayAmlOpcode (Op); - Found = TRUE; } } } @@ -561,7 +567,7 @@ AhDisplayAslKeyword ( /* ASL keyword name and description */ - printf ("%20s: %s\n", Op->Name, Op->Description); + printf ("%22s: %s\n", Op->Name, Op->Description); if (!Op->KeywordList) { return; @@ -569,7 +575,7 @@ AhDisplayAslKeyword ( /* List of actual keywords */ - AhPrintOneField (22, 0, AH_MAX_ASL_LINE_LENGTH, Op->KeywordList); + AhPrintOneField (24, 0, AH_MAX_ASL_LINE_LENGTH, Op->KeywordList); printf ("\n"); } @@ -658,6 +664,62 @@ AhDisplayAslOperator ( AhPrintOneField (18, 0, AH_MAX_ASL_LINE_LENGTH, Op->Syntax); printf ("\n"); + + AhDisplayOperatorKeywords (Op); + printf ("\n"); +} + + +/******************************************************************************* + * + * FUNCTION: AhDisplayOperatorKeywords + * + * PARAMETERS: Op - Pointer to ASL keyword with syntax info + * + * RETURN: None + * + * DESCRIPTION: Display any/all keywords that are associated with the ASL + * operator. + * + ******************************************************************************/ + +static void +AhDisplayOperatorKeywords ( + const AH_ASL_OPERATOR *Op) +{ + char *Token; + char *Separators = "(){}, "; + BOOLEAN FirstKeyword = TRUE; + + + if (!Op || !Op->Syntax) + { + return; + } + + /* + * Find all parameters that have the word "keyword" within, and then + * display the info about that keyword + */ + strcpy (Gbl_LineBuffer, Op->Syntax); + Token = strtok (Gbl_LineBuffer, Separators); + while (Token) + { + if (strstr (Token, "Keyword")) + { + if (FirstKeyword) + { + printf ("\n"); + FirstKeyword = FALSE; + } + + /* Found a keyword, display keyword information */ + + AhFindAslKeywords (Token); + } + + Token = strtok (NULL, Separators); + } } diff --git a/tools/acpihelp/ahpredef.c b/tools/acpihelp/ahpredef.c index d56bea36f4065..3836bcdc186a6 100644 --- a/tools/acpihelp/ahpredef.c +++ b/tools/acpihelp/ahpredef.c @@ -51,6 +51,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = { {"_ACx", "Active Cooling", "Returns the active cooling policy threshold values"}, {"_ADR", "Address", "Returns the address of a device on its parent bus"}, + {"_AEI", "ACPI Event Interrupts", "Returns a list of GPIO events to be used as ACPI events"}, {"_ALC", "Ambient Light Chromaticity", "Returns the ambient light color chromaticity"}, {"_ALI", "Ambient Light Illuminance", "Returns the ambient light brightness"}, {"_ALN", "Alignment", "Base alignment, Resource Descriptor field"}, @@ -84,20 +85,28 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = {"_CBA", "Configuration Base Address", "Sets the CBA for a PCI Express host bridge"}, {"_CDM", "Clock Domain", "Returns a logical processor's clock domain identifier"}, {"_CID", "Compatible ID", "Returns a device's Plug and Play Compatible ID list"}, + {"_CLS", "Class Code", "Returns PCI class code and subclass"}, + {"_CPC", "Continuous Performance Control", "Returns a list of performance control interfaces"}, {"_CRS", "Current Resource Settings", "Returns the current resource settings for a device"}, {"_CRT", "Critical Temperature", "Returns the shutdown critical temperature"}, {"_CSD", "C State Dependencies", "Returns a list of C-state dependencies"}, {"_CST", "C States", "Returns a list of supported C-states"}, + {"_CWS", "Clear Wake Alarm Status", "Clear the status of wake alarms"}, + {"_DBT", "Debounce Timeout", "Timeout value, Resource Descriptor field"}, {"_DCK", "Dock", "Sets docking isolation. Presence indicates device is a docking station"}, {"_DCS", "Display Current Status", "Returns status of the display output device"}, {"_DDC", "Display Data Current", "Returns the EDID for the display output device"}, {"_DDN", "Dos Device Name", "Returns a device logical name"}, {"_DEC", "Decode", "Device decoding type, Resource Descriptor field"}, + {"_DEP", "Dependencies", "Returns a list of operation region dependencies"}, {"_DGS", "Display Graphics State", "Return the current state of the output device"}, {"_DIS", "Disable", "Disables a device"}, + {"_DLM", "Device Lock Mutex", "Defines mutex for OS/AML sharing"}, {"_DMA", "Direct Memory Access", "Returns a device's current resources for DMA transactions"}, {"_DOD", "Display Output Devices", "Enumerate all devices attached to the display adapter"}, {"_DOS", "Disable Output Switching", "Sets the display output switching mode"}, + {"_DPL", "Device Selection Polarity", "Polarity of Device Selection signal, Resource Descriptor field"}, + {"_DRS", "Drive Strength", "Drive Strength setting for GPIO connection, Resource Descriptor field"}, {"_DSM", "Device Specific Method", "Executes device-specific functions"}, {"_DSS", "Device Set State", "Sets the display device state"}, {"_DSW", "Device Sleep Wake", "Sets the sleep and wake transition states for a device"}, @@ -107,15 +116,19 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = {"_EDL", "Eject Device List", "Returns a list of devices that are dependent on a device (docking)"}, {"_EJD", "Ejection Dependent Device", "Returns the name of dependent (parent) device (docking)"}, {"_EJx", "Eject", "Begin or cancel a device ejection request (docking)"}, + {"_END", "Endian-ness", "Endian orientation, Resource Descriptor field"}, + {"_EVT", "Event", "Event method for GPIO events"}, {"_FDE", "Floppy Disk Enumerate", "Returns floppy disk configuration information"}, {"_FDI", "Floppy Drive Information", "Returns a floppy drive information block"}, {"_FDM", "Floppy Drive Mode", "Sets a floppy drive speed"}, {"_FIF", "Fan Information", "Returns fan device information"}, {"_FIX", "Fixed Register Resource Provider", "Returns a list of devices that implement FADT register blocks"}, + {"_FLC", "Flow Control", "Flow control, Resource Descriptor field"}, {"_FPS", "Fan Performance States", "Returns a list of supported fan performance states"}, {"_FSL", "Fan Set Level", "Control method that sets the fan device's speed level (performance state)"}, {"_FST", "Fan Status", "Returns current status information for a fan device"}, {"_GAI", "Get Averaging Interval", "Returns the power meter averaging interval"}, + {"_GCP", "Get Capability", "Get device time capabilities"}, {"_GHL", "Get Hardware Limit", "Returns the hardware limit enforced by the power meter"}, {"_GL_", "Global Lock", "OS-defined Global Lock mutex object"}, {"_GLK", "Global Lock", "Returns a device's Global Lock requirement for device access"}, @@ -123,22 +136,27 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = {"_GPE", "General Purpose Events", "(1) predefined Scope (\\_GPE.)"}, {"_GRA", "Granularity", "Address space granularity, Resource Descriptor field"}, {"_GSB", "Global System Interrupt Base", "Returns the GSB for a I/O APIC device"}, + {"_GRT", "Get Real Time", "Returns current time-of-day"}, {"_GTF", "Get Task File", "Returns a list of ATA commands to restore a drive to default state"}, {"_GTM", "Get Timing Mode", "Returns a list of IDE controller timing information"}, {"_GTS", "Going To Sleep", "Inform AML of pending sleep"}, + {"_GWS", "Get Wake Status", "Return status of wake alarms"}, {"_HE_", "High-Edge", "Interrupt triggering, Resource Descriptor field"}, {"_HID", "Hardware ID", "Returns a device's Plug and Play Hardware ID"}, {"_HOT", "Hot Temperature", "Returns the critical temperature for sleep (entry to S4)"}, {"_HPP", "Hot Plug Parameters", "Returns a list of hot-plug information for a PCI device"}, {"_HPX", "Hot Plug Parameter Extensions", "Returns a list of hot-plug information for a PCI device. Supersedes _HPP"}, + {"_HRV", "Hardware Revision", "Returns a hardware revision value"}, {"_IFT", "IPMI Interface Type", "See the Intelligent Platform Management Interface Specification"}, {"_INI", "Initialize", "Performs device specific initialization"}, {"_INT", "Interrupts", "Interrupt mask bits, Resource Descriptor field"}, + {"_IOR", "I/O Restriction", "Restriction type, Resource Descriptor field"}, {"_IRC", "Inrush Current", "Presence indicates that a device has a significant inrush current draw"}, {"_Lxx", "Level GPE", "Control method executed as a result of a general-purpose event"}, {"_LCK", "Lock", "Locks or unlocks a device (docking)"}, {"_LEN", "Length", "Range length, Resource Descriptor field"}, {"_LID", "Lid", "Returns the open/closed status of the lid on a mobile system"}, + {"_LIN", "Lines In Use", "Handshake lines, Resource Descriptor field"}, {"_LL_", "Low Level", "Interrupt polarity, Resource Descriptor field"}, {"_MAF", "Maximum Address Fixed", "Resource Descriptor field"}, {"_MAT", "Multiple Apic Table Entry", "Returns a list of MADT APIC structure entries"}, @@ -148,6 +166,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = {"_MIF", "Minimum Address Fixed", "Resource Descriptor field"}, {"_MIN", "Minimum Base Address", "Resource Descriptor field"}, {"_MLS", "Multiple Language String", "Returns a device description in multiple languages"}, + {"_MOD", "Mode", "Interrupt mode, Resource Descriptor field"}, {"_MSG", "Message", "Sets the system message waiting status indicator"}, {"_MSM", "Memory Set Monitoring", "Sets bandwidth monitoring parameters for a memory device"}, {"_MTP", "Memory Type", "Resource Descriptor field"}, @@ -159,23 +178,29 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = {"_OSI", "Operating System Interfaces", "Returns supported interfaces, behaviors, and features"}, {"_OST", "Ospm Status Indication", "Inform AML of event processing status"}, {"_PAI", "Power Averaging Interval", "Sets the averaging interval for a power meter"}, + {"_PAR", "Parity", "Parity bits, Resource Descriptor field"}, {"_PCL", "Power Consumer List", "Returns a list of devices powered by a power source"}, {"_PCT", "Performance Control", "Returns processor performance control and status registers"}, {"_PDC", "Processor Driver Capabilities", "Inform AML of processor driver capabilities"}, {"_PDL", "P-state Depth Limit", "Returns the lowest available performance P-state"}, + {"_PHA", "Phase", "Clock phase, Resource Descriptor field"}, {"_PIC", "PIC", "Inform AML of the interrupt model in use"}, {"_PIF", "Power Source Information", "Returns a Power Source information block"}, + {"_PIN", "Pins", "Pin list, Resource Descriptor field"}, {"_PLD", "Physical Device Location", "Returns a device's physical location information"}, {"_PMC", "Power Meter Capabilities", "Returns a list of Power Meter capabilities info"}, {"_PMD", "Power Metered Devices", "Returns a list of devices that are measured by the power meter device"}, {"_PMM", "Power Meter Measurement", "Returns the current value of the Power Meter"}, + {"_POL", "Polarity", "Interrupt polarity, Resource Descriptor field"}, {"_PPC", "Performance Present Capabilites", "Returns a list of the performance states currently supported by the platform"}, {"_PPE", "Polling for Platform Error", "Returns the polling interval to retrieve Corrected Platform Error information"}, + {"_PPI", "Pin Configuration", "Resource Descriptor field"}, {"_PR", "Processor", "Predefined scope for processor objects"}, {"_PR0", "Power Resources for D0", "Returns a list of dependent power resources to enter state D0 (fully on)"}, {"_PR1", "Power Resources for D1", "Returns a list of dependent power resources to enter state D1"}, {"_PR2", "Power Resources for D2", "Returns a list of dependent power resources to enter state D2"}, {"_PR3", "Power Resources for D3hot", "Returns a list of dependent power resources to enter state D3hot"}, + {"_PRE", "Power Resources for Enumeration", "Returns a list of dependent power resources to enumerate devices on a bus"}, {"_PRL", "Power Source Redundancy List", "Returns a list of power source devices in the same redundancy grouping"}, {"_PRS", "Possible Resource Settings", "Returns a list of a device's possible resource settings"}, {"_PRT", "Pci Routing Table", "Returns a list of PCI interrupt mappings"}, @@ -186,6 +211,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = {"_PS3", "Power State 3", "Sets a device's power state to D3 (device off)"}, {"_PSC", "Power State Current", "Returns a device's current power state"}, {"_PSD", "Processor State Dependencies", "Returns processor P-State dependencies"}, + {"_PSE", "Power State for Enumeration", "Put a bus into enumeration power mode"}, {"_PSL", "Passive List", "Returns a list of passive cooling device objects"}, {"_PSR", "Power Source", "Returns the power source device currently in use"}, {"_PSS", "Performance Supported States", "Returns a list of supported processor performance states"}, @@ -207,6 +233,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = {"_RT_", "Resource Type", "Resource Descriptor field"}, {"_RTV", "Relative Temperature Values", "Returns temperature value information"}, {"_RW_", "Read-Write Status", "Resource Descriptor field"}, + {"_RXL", "Receive Buffer Size", "Serial channel buffer, Resource Descriptor field"}, {"_S0_", "S0 System State", "Returns values to enter the system into the S0 state"}, {"_S1_", "S1 System State", "Returns values to enter the system into the S1 state"}, {"_S2_", "S2 System State", "Returns values to enter the system into the S2 state"}, @@ -232,15 +259,20 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = {"_SI_", "System Indicators", "Predefined scope"}, {"_SIZ", "Size", "DMA transfer size, Resource Descriptor field"}, {"_SLI", "System Locality Information", "Returns a list of NUMA system localities"}, + {"_SLV", "Slave Mode", "Mode setting, Resource Descriptor field"}, {"_SPD", "Set Post Device", "Sets which video device will be posted at boot"}, + {"_SPE", "Speed", "Connection speed, Resource Descriptor field"}, {"_SRS", "Set Resource Settings", "Sets a device's resource allocation"}, + {"_SRT", "Set Real Time", "Interrupt triggering, Resource Descriptor field"}, {"_SRV", "IPMI Spec Revision", "See the Intelligent Platform Management Interface Specification"}, {"_SST", "System Status", "Sets the system status indicator"}, {"_STA", "Status", " (1) returns the current status of a device"}, + {"_STB", "Stop Bits", "Serial channel stop bits, Resource Descriptor field"}, {"_STM", "Set Timing Mode", "Sets an IDE controller transfer timings"}, {"_STP", "Set Expired Timer Wake Policy", "Sets expired timer policies of the wake alarm device"}, {"_STR", "String", "Returns a device's description string"}, {"_STV", "Set Timer Value", "Set timer values of the wake alarm device"}, + {"_SUB", "Subsystem ID", "Returns the subsystem ID for a device"}, {"_SUN", "Slot User Number", "Returns the slot unique ID number"}, {"_SWS", "System Wake Source", "Returns the source event that caused the system to wake"}, {"_T_x", "Temporary", "Reserved for use by ASL compilers"}, @@ -262,6 +294,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = {"_TST", "Temperature Sensor Threshold", "Returns the minimum separation for a device's temperature trip points"}, {"_TTP", "Translation Type", "Translation/static flag, Resource Descriptor field"}, {"_TTS", "Transition To State", "Inform AML of an S-state transition"}, + {"_TXL", "Transmit Buffer Size", "Serial Channel buffer, Resource Descriptor field"}, {"_TYP", "Type", "DMA channel type (speed), Resource Descriptor field"}, {"_TZ_", "Thermal Zone", "Predefined scope: ACPI 1.0"}, {"_TZD", "Thermal Zone Devices", "Returns a list of device names associated with a Thermal Zone"}, @@ -271,6 +304,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = {"_UPC", "USB Port Capabilities", "Returns a list of USB port capabilities"}, {"_UPD", "User Presence Detect", "Returns user detection information"}, {"_UPP", "User Presence Polling", "Returns the recommended user presence polling interval"}, + {"_VEN", "Vendor Data", "Resource Descriptor field"}, {"_VPO", "Video Post Options", "Returns the implemented video post options"}, {"_WAK", "Wake", "Inform AML that the system has just awakened"}, {"_Wxx", "Wake Event", "Method executed as a result of a wake event"}, |