ahaslops.c revision 1.1.1.1 1 /******************************************************************************
2 *
3 * Module Name: ahaslops - Table of all known ASL operators
4 *
5 *****************************************************************************/
6
7 /*
8 * Copyright (C) 2000 - 2011, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44 #include "acpihelp.h"
45
46 /*
47 * ASL operators with syntax (directly from ACPI specification).
48 * Note: All tokens require a space separator.
49 * Long lines are automatically split during output.
50 */
51 const AH_ASL_OPERATOR AslOperatorInfo[] =
52 {
53 {"Acquire", "(SyncObject, TimeoutValue) => Boolean",
54 "Acquire a mutex"},
55 {"Add", "(Addend1, Addend2, Result) => Integer",
56 "Integer Add"},
57 {"Alias", "(SourceObject, AliasObject)",
58 "Define a name alias"},
59 {"And", "(Source1, Source2, Result) => Integer",
60 "Integer Bitwise And"},
61 {"Arg", "Arg0 - Arg6",
62 "Method argument data objects"},
63 {"BankField", "(RegionName, BankName, BankValue, AccessType, LockRule, UpdateRule) {FieldUnitList}",
64 "Declare fields in a banked configuration object"},
65 {"Break", NULL,
66 "Continue following the innermost enclosing While"},
67 {"BreakPoint", NULL,
68 "Used for debugging, stops execution in the debugger"},
69 {"Buffer", "(BufferSize) {String or ByteList} => Buffer",
70 "Declare Buffer object"},
71 {"Case", "(Value) {TermList}",
72 "Expression for conditional execution"},
73 {"Concatenate", "(Source1, Source2, Result) => ComputationalData",
74 "Concatenate two strings}, integers or buffers"},
75 {"ConcatenateResTemplate", "(Source1, Source2, Result) => Buffer",
76 "Concatenate two resource templates"},
77 {"CondRefOf", "(Source, Result) => Boolean",
78 "Conditional reference to an object"},
79 {"Continue", NULL,
80 "Continue innermost enclosing While loop"},
81 {"CopyObject", "(Source, Destination) => DataRefObject",
82 "Copy and existing object"},
83 {"CreateBitField", "(SourceBuffer, BitIndex, BitFieldName)",
84 "Declare a bit field object of a buffer object"},
85 {"CreateByteField", "(SourceBuffer, ByteIndex, ByteFieldName)",
86 "Declare a byte field object of a buffer object"},
87 {"CreateDWordField", "(SourceBuffer, ByteIndex, DWordFieldName)",
88 "Declare a DWord field object of a buffer object"},
89 {"CreateField", "(SourceBuffer, BitIndex, NumBits, FieldName)",
90 "Declare an arbitrary length bit field of a buffer object"},
91 {"CreateQWordField", "(SourceBuffer, ByteIndex, QWordFieldName)",
92 "Declare a QWord field object of a buffer object"},
93 {"CreateWordField", "(SourceBuffer, ByteIndex, WordFieldName)",
94 "Declare a Word field object of a buffer object"},
95 {"DataTableRegion", "(RegionName, SignatureString, OemIDString, OemTableIDString)",
96 "Declare a Data Table Region"},
97 {"Debug", NULL,
98 "Debugger output"},
99 {"Decrement", "(Minuend) => Integer",
100 "Decrement an Integer"},
101 {"Default", "{TermList}",
102 "Default execution path in Switch()"},
103 {"DefinitionBlock", "(AMLFileName, TableSignature, ComplianceRevision, OEMID, TableID, OEMRevision) {TermList}",
104 "Declare a Definition Block"},
105 {"DerefOf", "(Source) => Object",
106 "Dereference an object reference"},
107 {"Device", "(DeviceName) {ObjectList}",
108 "Declare a bus/device object"},
109 {"Divide", "(Dividend, Divisor, Remainder, Result) => Integer",
110 "Integer Divide"},
111 {"DMA", "(DmaType, IsBusMaster, DmaTransferSize, DescriptorName) {DmaChannelList} => Buffer",
112 "DMA Resource Descriptor macro"},
113 {"DWordIO", "(ResourceUsage, IsMinFixed, IsMaxFixed, Decode, ISARanges, AddressGranularity, "
114 "AddressMinimum, AddressMaximum, AddressTranslation, RangeLength, ResourceSourceIndex, "
115 "ResourceSource, DescriptorName, TranslationType, TranslationDensity)",
116 "DWord IO Resource Descriptor macro"},
117 {"DWordMemory", "(ResourceUsage, Decode, IsMinFixed, IsMaxFixed, Cacheable, ReadAndWrite, "
118 "AddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, "
119 "RangeLength, ResourceSourceIndex, ResourceSource, DescriptorName, MemoryType, "
120 "TranslationType)",
121 "DWord Memory Resource Descriptor macro"},
122 {"DWordSpace", "(ResourceType, ResourceUsage, Decode, IsMinFixed, IsMaxFixed, TypeSpecificFlags, "
123 "AddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, RangeLength, "
124 "ResourceSourceIndex, ResourceSource, DescriptorName)",
125 "DWord Space Resource Descriptor macro"},
126 {"EISAID", "(EisaIdString) => DWordConst",
127 "EISA ID String to Integer conversion macro"},
128 {"Else", "{TermList}",
129 "Alternate conditional execution"},
130 {"ElseIf", "(Predicate)",
131 "Conditional execution"},
132 {"EndDependentFn", "() => Buffer",
133 "End Dependent Function Resource Descriptor macro"},
134 {"Event", "(EventName)",
135 "Declare an event synchronization object"},
136 {"ExtendedIO", "(ResourceUsage, IsMinFixed, IsMaxFixed, Decode, ISARanges, AddressGranularity, "
137 "AddressMinimum, AddressMaximum, AddressTranslation, RangeLength, "
138 "TypeSpecificAttributes, DescriptorName, TranslationType, TranslationDensity)",
139 "Extended IO Resource Descriptor macro"},
140 {"ExtendedMemory", "(ResourceUsage, Decode, IsMinFixed, IsMaxFixed, Cacheable, ReadAndWrite, "
141 "AddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, "
142 "RangeLength, TypeSpecificAttributes, DescriptorName, MemoryType, TranslationType)",
143 "Extended Memory Resource Descriptor macro"},
144 {"ExtendedSpace", "(ResourceType, ResourceUsage, Decode, IsMinFixed, IsMaxFixed, TypeSpecificFlags, "
145 "AddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, "
146 "RangeLength, TypeSpecificAttributes, DescriptorName)",
147 "Extended Space Resource Descriptor macro"},
148 {"External", "(ObjectName, ObjectType, ReturnType, ParameterTypes)",
149 "Declare external objects"},
150 {"Fatal", "(Type, Code, Arg)",
151 "Fatal error check"},
152 {"Field", "(RegionName, AccessType, LockRule, UpdateRule) {FieldUnitList}",
153 "Declare fields of an operation region object"},
154 {"FindSetLeftBit", "(Source, Result) => Integer",
155 "Index of first least significant bit set"},
156 {"FindSetRightBit", "(Source, Result) => Integer",
157 "Index of first most significant bit set"},
158 {"FixedIO", "(AddressBase, RangeLength, DescriptorName) => Buffer",
159 "Fixed I/O Resource Descriptor macro"},
160 {"FromBCD", "(BCDValue, Result) => Integer",
161 "Convert from BCD to numeric"},
162 {"Function", "(FunctionName, ReturnType, ParameterTypes) {TermList}",
163 "Declare control method"},
164 {"If", "(Predicate) {TermList}",
165 "Conditional execution"},
166 {"Include", "(FilePathName)",
167 "Include another ASL file"},
168 {"Increment", "(Addend) => Integer",
169 "Increment a Integer"},
170 {"Index", "(Source, Index, Destination) => ObjectReference",
171 "Indexed Reference to member object"},
172 {"IndexField", "(IndexName, DataName, AccessType, LockRule, UpdateRule) {FieldUnitList}",
173 "Declare Index/Data Fields"},
174 {"Interrupt", "(ResourceUsage, EdgeLevel, ActiveLevel, Shared, ResourceSourceIndex, "
175 "ResourceSource, DescriptorName) {InterruptList} => Buffer",
176 "Interrupt Resource Descriptor macro"},
177 {"IO", "(Decode, AddressMin, AddressMax, AddressAlignment, RangeLength, DescriptorName) => Buffer",
178 "IO Resource Descriptor macro"},
179 {"IRQ", "(EdgeLevel, ActiveLevel, Shared, DescriptorName) {InterruptList} => Buffer",
180 "Interrupt Resource Descriptor macro"},
181 {"IRQNoFlags", "(DescriptorName) {InterruptList} => Buffer",
182 "Short Interrupt Resource Descriptor macro"},
183 {"LAnd", "(Source1, Source2) => Boolean",
184 "Logical And"},
185 {"LEqual", "(Source1, Source2) => Boolean",
186 "Logical Equal"},
187 {"LGreater", "(Source1, Source2) => Boolean",
188 "Logical Greater"},
189 {"LGreaterEqual", "(Source1, Source2) => Boolean",
190 "Logical Not less"},
191 {"LLess", "(Source1, Source2) => Boolean",
192 "Logical Less"},
193 {"LLessEqual", "(Source1, Source2) => Boolean",
194 "Logical Not greater"},
195 {"LNot", "(Source) => Boolean",
196 "Logical Not"},
197 {"LNotEqual", "(Source1, Source2) => Boolean",
198 "Logical Not equal"},
199 {"Load", "(Object, DDBHandle)",
200 "Load differentiating definition block"},
201 {"LoadTable", "(SignatureString, OEMIDString, OEMTableIDString, RootPathString, "
202 "ParameterPathString, ParameterData) => DDBHandle",
203 "Load Table from RSDT/XSDT"},
204 {"Local", "Local0 - Local 7",
205 "Method local data objects"},
206 {"LOr", "(Source1, Source2) => Boolean",
207 "Logical Or"},
208 {"Match", "(SearchPackage, Op1, MatchObject1, Op2, MatchObject2, StartIndex) => Ones | Integer",
209 "Search for match in package array"},
210 {"Memory24", "(ReadAndWrite, AddressMinimum, AddressMaximum, AddressAlignment, "
211 "RangeLength, DescriptorName)",
212 "Memory Resource Descriptor macro"},
213 {"Memory32", "(ReadAndWrite, AddressMinimum, AddressMaximum, AddressAlignment, "
214 "RangeLength, DescriptorName)",
215 "Memory Resource Descriptor macro"},
216 {"Memory32Fixed", "(ReadAndWrite, AddressBase, RangeLength, DescriptorName)",
217 "Memory Resource Descriptor macro"},
218 {"Method", "(MethodName, NumArgs, SerializeRule, SyncLevel, ReturnType, ParameterTypes) "
219 "{TermList}",
220 "Declare a control method"},
221 {"Mid", "(Source, Index, Length, Result) => Buffer or String",
222 "Return a portion of buffer or string"},
223 {"Mod", "(Dividend, Divisor, Result) => Integer",
224 "Integer Modulo"},
225 {"Multiply", "(Multiplicand, Multiplier, Result) => Integer",
226 "Integer Multiply"},
227 {"Mutex", "(MutexName, SyncLevel)",
228 "Declare a mutex synchronization object"},
229 {"Name", "(ObjectName, Object)",
230 "Declare a Named object"},
231 {"NAnd", "(Source1, Source2, Result) => Integer",
232 "Integer Bitwise Nand"},
233 {"NoOp", NULL,
234 "No operation"},
235 {"NOr", "(Source1, Source2, Result) => Integer",
236 "Integer Bitwise Nor"},
237 {"Not", "(Source, Result) => Integer",
238 "Integer Bitwise Not"},
239 {"Notify", "(Object, NotificationValue)",
240 "Notify Object of event"},
241 {"ObjectType", "(Object) => Integer",
242 "Type of object"},
243 {"One", "=> Integer",
244 "Constant One Object (1)"},
245 {"Ones", "=> Integer",
246 "Constant Ones Object (-1)"},
247 {"OperationRegion", "(RegionName, RegionSpace, Offset, Length)",
248 "Declare an operational region"},
249 {"Or", "(Source1, Source2, Result) => Integer",
250 "Integer Bitwise Or"},
251 {"Package", "(NumElements) {PackageList} => Package",
252 "Declare a package object"},
253 {"PowerResource", "(ResourceName, SystemLevel, ResourceOrder) {ObjectList}",
254 "Declare a power resource object"},
255 {"Processor", "(ProcessorName, ProcessorID, PBlockAddress, PblockLength) {ObjectList}",
256 "Declare a processor package"},
257 {"QWordIO", "(ResourceUsage, IsMinFixed, IsMaxFixed, Decode, ISARanges, AddressGranularity, "
258 "AddressMinimum, AddressMaximum, AddressTranslation, RangeLength, "
259 "ResourceSourceIndex, ResourceSource, DescriptorName, TranslationType, "
260 "TranslationDensity)",
261 "QWord IO Resource Descriptor macro"},
262 {"QWordMemory", "(ResourceUsage, Decode, IsMinFixed, IsMaxFixed, Cacheable, ReadAndWrite, "
263 "AddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, "
264 "RangeLength, ResourceSourceIndex, ResourceSource, DescriptorName, MemoryType, "
265 "TranslationType)",
266 "QWord Memory Resource Descriptor macro"},
267 {"QWordSpace", "(ResourceType, ResourceUsage, Decode, IsMinFixed, IsMaxFixed, TypeSpecificFlags, "
268 "AddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, "
269 "RangeLength, ResourceSourceIndex, ResourceSource, DescriptorName)",
270 "Qword Space Resource Descriptor macro"},
271 {"RefOf", "(Object) => ObjectReference",
272 "Create Reference to an object"},
273 {"Register", "(AddressSpaceKeyword, RegisterBitWidth, RegisterBitOffset, RegisterAddress, "
274 "AccessSize, DescriptorName)",
275 "Generic register Resource Descriptor macro"},
276 {"Release", "(SyncObject)",
277 "Release a synchronization object"},
278 {"Reset", "(SyncObject)",
279 "Reset a synchronization object"},
280 {"ResourceTemplate", "() {ResourceMacroList} => Buffer",
281 "Resource to buffer conversion macro"},
282 {"Return", "None | () | (ReturnArg)",
283 "Return from method execution"},
284 {"Revision", "=> Integer",
285 "Constant revision object"},
286 {"Scope", "(Location) {ObjectList}",
287 "Open named scope "},
288 {"ShiftLeft", "(Source, ShiftCount, Result) => Integer",
289 "Integer shift value left"},
290 {"ShiftRight", "(Source, ShiftCount, Result) => Integer",
291 "Integer shift value right"},
292 {"Signal", "(SyncObject)",
293 "Signal a synchronization object"},
294 {"SizeOf", "(ObjectName) => Integer",
295 "Get the size of a buffer}, string}, or package"},
296 {"Sleep", "(MilliSeconds)",
297 "Sleep n milliseconds (yields the processor)"},
298 {"Stall", "(MicroSeconds)",
299 "Delay n microseconds (does not yield the processor)"},
300 {"StartDependentFn", "(CompatibilityPriority, PerformancePriority) {ResourceList}",
301 "Start Dependent Function Resource Descriptor macro"},
302 {"StartDependentFnNoPri", "() {ResourceList}",
303 "Start Dependent Function Resource Descriptor macro"},
304 {"Store", "(Source, Destination) => DataRefObject",
305 "Store object"},
306 {"Subtract", "(Minuend, Subtrahend, Result) => Integer",
307 "Integer Subtract"},
308 {"Switch", "(Expression) {CaseTermList}",
309 "Select code to execute based on expression value"},
310 {"ThermalZone", "(ThermalZoneName) {ObjectList}",
311 "Declare a thermal zone package"},
312 {"Timer", "=> Integer",
313 "Get 64-bit timer value"},
314 {"ToBCD", "(Value, Result) => Integer",
315 "Convert Integer to BCD"},
316 {"ToBuffer", "(Data, Result) => Buffer",
317 "Convert data type to buffer"},
318 {"ToDecimalString", "(Data, Result) => String",
319 "Convert data type to decimal string"},
320 {"ToHexString", "(Data, Result) => String",
321 "Convert data type to hexadecimal string"},
322 {"ToInteger", "(Data, Result) => Integer",
323 "Convert data type to integer"},
324 {"ToString", "(Source, Length, Result) => String",
325 "Copy ASCII string from buffer"},
326 {"ToUUID", "(AsciiString) => Buffer",
327 "Convert Ascii string to UUID"},
328 {"Unicode", "(String) => Buffer",
329 "String to Unicode conversion macro"},
330 {"Unload", "(Handle)",
331 "Unload definition block"},
332 {"VendorLong", "(DescriptorName) {VendorByteList}",
333 "Vendor Resource Descriptor"},
334 {"VendorShort", "(DescriptorName) {VendorByteList}",
335 "Vendor Resource Descriptor"},
336 {"Wait", "(SyncObject, TimeoutValue) => Boolean",
337 "Wait on an Event"},
338 {"While", "(Predicate) {TermList}",
339 "Conditional loop"},
340 {"WordBusNumber", "(ResourceUsage, IsMinFixed, IsMaxFixed, Decode, AddressGranularity, AddressMinimum, "
341 "AddressMaximum, AddressTranslation, RangeLength, ResourceSourceIndex, "
342 "ResourceSource, DescriptorName)",
343 "Word Bus number Resource Descriptor macro"},
344 {"WordIO", "(ResourceUsage, IsMinFixed, IsMaxFixed, Decode, ISARanges, AddressGranularity, "
345 "AddressMinimum, AddressMaximum, AddressTranslation, RangeLength, "
346 "ResourceSourceIndex, ResourceSource, DescriptorName, TranslationType, "
347 "TranslationDensity)",
348 "Word IO Resource Descriptor macro"},
349 {"WordSpace", "(ResourceType, ResourceUsage, Decode, IsMinFixed, IsMaxFixed, TypeSpecificFlags, "
350 "AddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, "
351 "RangeLength, ResourceSourceIndex, ResourceSource, DescriptorName)",
352 "Word Space Resource Descriptor macro"},
353 {"XOr", "(Source1, Source2, Result) => Integer",
354 "Integer Bitwise Xor"},
355 {"Zero", "=> Integer",
356 "Constant Zero object (0)"},
357 {NULL, NULL, NULL}
358 };
359