-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathacpiHelp.json
More file actions
3586 lines (3586 loc) · 416 KB
/
acpiHelp.json
File metadata and controls
3586 lines (3586 loc) · 416 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
[
{
"title": "AccessAs (Change Field Unit Access)",
"syntax": "AccessAs (AccessType, AccessAttribute)\nAccessAs (AccessType, AccessAttribute (AccessLength))",
"arguments": "AccessType is an AccessTypeKeyword that specifies the type of access desired (ByteAcc, WordAcc, etc.). AccessAttribute is an optional argument of type AccessAttributeKeyword that specifies additional protocols to be used, such as AttribQuick, AttribSendReceive, etc. AccessLength is a required argument for some of the Access Attributes.",
"description": "The AccessAs operator is used within a FieldList to specify the Access Type, Access Attributes, and Access Length for the remaining FieldUnits within the list (or until another AccessAs operator is encountered.) It allows FieldUnits to have different access types within a single Field definition.\nSupported AccessTypes:\n\u2022 AnyAcc\n\u2022 ByteAcc\n\u2022 WordAcc\n\u2022 DwordAcc\n\u2022 QWordAcc\n\u2022 BufferAcc\nSupported simple AccessAttributes (with SMBus synonyms):\n\u2022 AttribQuick (SMBQuick)\n\u2022 AttribSendReceive (SMBSendReceive)\n\u2022 AttribByte (SMBByte)\n\u2022 AttribWord (SMBWord)\n\u2022 AttribBlock (SMBBlock)\n\u2022 AttribProcessCall (SMBProcessCall)\n\u2022 AttribBlockProcessCall (SMBBlockProcessCall)\nAccess Attributes that require an AccessLength argument:\n\u2022 AttribBytes (AccessLength)\n\u2022 AttribRawBytes (AccessLength)\n\u2022 AttribRawProcessBytes (AccessLength)",
"example": ""
},
{
"title": "Acquire (Acquire a Mutex)",
"syntax": "Acquire (SyncObject, TimeoutValue) => Boolean",
"arguments": "SynchObject must be a mutex synchronization object. TimeoutValue is evaluated as an Integer.",
"description": "Ownership of the Mutex is obtained. If the Mutex is already owned by a different invocation, the current execution thread is suspended until the owner of the Mutex releases it or until at least TimeoutValue milliseconds have elapsed. A Mutex can be acquired more than once by the same invocation.\nNote: For Mutex objects referenced by a _DLM object, the host OS may also contend for ownership.\nThis operation returns True if a timeout occurred and the mutex ownership was not acquired. A TimeoutValue of 0xFFFF (or greater) indicates that there is no timeout and the operation will wait indefinitely.",
"example": ""
},
{
"title": "Add (Integer Add)",
"syntax": "Add (Addend1, Addend2, Result) => Integer\nResult = Addend1 + Addend2 => Integer\nResult += Addend => Integer",
"arguments": "Addend1 and Addend2 are evaluated as Integers.",
"description": "The operands are added and the result is optionally stored into Result. Overflow conditions are ignored and the result of overflows simply loses the most significant bits.",
"example": ""
},
{
"title": "Alias (Declare Name Alias)",
"syntax": "Alias (SourceObject, AliasObject)",
"arguments": "SourceObject is any named object. AliasObject is a NameString.",
"description": "Creates a new object named AliasObject that refers to and acts exactly the same as SourceObject.\nAliasObject is created as an alias of SourceObject in the namespace. The SourceObject name must already exist in the namespace. If the alias is to a name within the same definition block, the SourceObject name must be logically ahead of this definition in the block.",
"example": "The following example shows the use of an Alias term:\nAlias (\\SUS.SET.EVEN, SSE)"
},
{
"title": "And (Integer Bitwise And)",
"syntax": "And (Source1, Source2, Result) => Integer\nResult = Source1 & Source2 => Integer\nResult &= Source => Integer",
"arguments": "Source1 and Source2 are evaluated as Integers.",
"description": "A bitwise AND is performed and the result is optionally stored into Result.",
"example": ""
},
{
"title": "Argx (Method Argument Data Objects)",
"syntax": "Arg0 | Arg1 | Arg2 | Arg3 | Arg4 | Arg5 | Arg6",
"arguments": "",
"description": "Up to 7 argument-object references can be passed to a control method. On entry to a control method, only the argument objects that are passed are usable.",
"example": ""
},
{
"title": "BankField (Declare Bank/Data Field)",
"syntax": "BankField (RegionName, BankName, BankValue, AccessType, LockRule, UpdateRule) {FieldUnitList}",
"arguments": "RegionName is evaluated as a Namestring, and is the name of the host Operation Region.\nBankName is evaluated as a Namestring, and is the name of the bank selection register.\nBankValue is the bank selection ID (Integer) that is written to the BankName register before the FieldUnitList is accessed.\nThe AccessType, LockRule, UpdateRule, and FieldUnitList are the same format as the Field operator.",
"description": "Accessing the contents of a banked field data object will occur automatically through the proper bank setting, with synchronization occurring on the operation region that contains the BankName data variable, and on the Global Lock if specified by the LockRule.\nThis operator creates data field objects. The contents of the created objects are obtained by a reference to a bank selection register.\nThis encoding is used to define named data field objects whose data values are fields within a larger object selected by a bank-selected register.",
"example": "The following is a block of ASL sample code using BankField:\n\u2022 Creates a 4-bit bank-selected register in system I/O space.\n\u2022 Creates overlapping fields in the same system I/O space that are selected via the bank register.\n//\n// Define a 256-byte operational region in SystemIO space\n// and name it GIO0\nOperationRegion (GIO0, SystemIO, 0x125, 0x100)\n// Create some fields in GIO including a 4-bit bank select register\nField (GIO0, ByteAcc, NoLock, Preserve) {\n GLB1, 1,\n GLB2, 1,\n Offset (1), // Move to offset for byte 1\n BNK1, 4\n}\n// Create FET0 & FET1 in bank 0 at byte offset 0x30\nBankField (GIO0, BNK1, 0, ByteAcc, NoLock, Preserve) {\n Offset (0x30), \n FET0, 1,\n FET1, 1\n}\n // Create BLVL & BAC in bank 1 at the same offset\nBankField (GIO0, BNK1, 1, ByteAcc, NoLock, Preserve) {\n Offset (0x30),\n BLVL, 7,\n BAC, 1\n}"
},
{
"title": "Break (Break from While)",
"syntax": "Break",
"arguments": "",
"description": "Break causes execution to continue immediately following the innermost enclosing While or Switch scope, in the current Method. If there is no enclosing While or Switch within the current Method, a fatal error is generated.\nCompatibility Note: In ACPI 1.0, the Break operator continued immediately following the innermost\n\u201ccode package.\u201d Starting in ACPI 2.0, the Break operator was changed to exit the innermost \u201cWhile\u201d or \u201cSwitch\u201d package. This should have no impact on existing code, since the ACPI 1.0 definition was, in practice, useless.",
"example": ""
},
{
"title": "BreakPoint (Execution Break Point)",
"syntax": "BreakPoint",
"arguments": "",
"description": "Used for debugging, the Breakpoint opcode stops the execution and enters the AML debugger. In the non-debug version of the AML interpreter, BreakPoint is equivalent to Noop.",
"example": ""
},
{
"title": "Buffer (Declare Buffer Object)",
"syntax": "Buffer (BufferSize) {Initializer} => Buffer",
"arguments": "Declares a Buffer of optional size BufferSize and an optional initial value of Initializer. The Initializer is must be either a ByteList or a String.",
"description": "The optional BufferSize argument specifies the size of the buffer and an optional initial value of the buffer is specified via the Initializer. The initial value can be either an ASCII String or a list of byte values separated by commas. Strings are automatically null terminated with a single zero byte.\nThe relationship between the BufferSize and the Initializer is summarized by the rules below.\nIn the typical case, the BufferSize is identical to the length of the Initializer:\n Name (BUF0, Buffer(4) {0x01,0x02,0x03,0x04}) // Length = 4\nIf the BufferSize is not specified, the length of the Initializer is used as the buffer size:\n Name (BUF1, Buffer() {0,1,2,3,4,5})// Length = 6\n Name (BUF2, Buffer() {\"abcde\"}) // Length = 6\nIf the BufferSize is larger than the length of the Initializer, the BufferSize is used as the final buffer size. At runtime, the AML interpreter will automatically pad zeros to the Initializer to match the BufferSize:\n Name (BUF3, Buffer(1024) {4,5,6,7,8})// Length = 1024\n Name (BUF4, Buffer(1024) {\"abcde\"})// Length = 1024\nIf the BufferSize is smaller than the length of the Initializer, the length of the Initializer is used as the buffer size:\n Name (BUF5, Buffer(1) {5,4,3,2,1}) // Length = 5\nIf the Initializer is not specified, the AML interpreter creates a buffer containing all zeros, the length of which matches the BufferSize:\n Name (BUF6, Buffer(32} {}) // Length = 32\nIf neither the BufferSize nor the Initializer are specified, a buffer of zero length is created:\n Name (BUF7, Buffer() {}) // Length = 0",
"example": ""
},
{
"title": "Case (Expression for Conditional Execution)",
"syntax": "Case (Value) {TermList}",
"arguments": "Value specifies an Integer, Buffer, String or Package object. TermList is a sequence of executable ASL expressions.",
"description": "Execute code based upon the value of a Switch statement.\nIf the Case Value is an Integer, Buffer or String, then control passes to the statement that matches the value of the enclosing Switch (Value). If the Case value is a Package, then control passes if any member of the package matches the Switch (Value). The Switch CaseTermList can include any number of Case instances, but no two Case Values (or members of a Value, if Value is a Package) within the same Switch statement can contain the same value.\nExecution of the statement body begins at the start of the TermList and proceeds until the end of the TermList body or until a Break or Continue operator transfers control out of the body.",
"example": ""
},
{
"title": "Concatenate (Concatenate Data)",
"syntax": "Concatenate (Source1, Source2, Result) => Buffer or String",
"arguments": "Source1 and Source2 must each evaluate to any valid ACPI object. For the basic data object types\n(Integer, String, or Buffer), the value of the object is used in the concatenation. For all other object types (see table 19-378 below), a string object is created that contains the name (type) of the object. This string object is then concatenated according to the rules in Table 19-427.\nThe data type of Source1 dictates the required type of Source2 and the type of the result object. Source2 is implicitly converted if necessary (and possible) to match the type of Source1.",
"description": "Source2 is concatenated to Source1 and the result data is optionally stored into Result.\nTable 19-427 Concatenate Data Types\nSource1 Data Type\nSource2 Data Type (\u00e8 Converted Type)\nResult Data Type\nInteger\nInteger/String/Buffer \u00e8 Integer\nBuffer\nString\nInteger/String/Buffer/All other types \u00e8 String\nString\nBuffer\nInteger/String/Buffer/All other types \u00e8 Buffer\nBuffer\nAll other types \u00e8String\nInteger/String/Buffer/All other types \u00e8 String\nString\nFor the Source1/Integer case, a String or Buffer that cannot be implicitly converted to an Integer will generate a fatal error.\nTable 19-428 Concatenate Object Types\nData Object Type\nName\nResolved to Value\n1\nInteger\nInteger value of the object\n2\nString\nString value of the object\n3\nBuffer\nBuffer value of the object\n \n \n \nOther Object Types\nName\nResolved to String\n0\nUninitialized\n\"[Uninitialized Object]\"\n4\nPackage\n\"[Package]\"\n5\nField Unit\n\"[Field]\"\n6\nDevice\n\"[Device]\"\n7\nEvent\n\"[Event]\"\n8\nControl Method\n\"[Control Method]\"\n9\nMutex\n\"[Mutex]\"\n10\nOperation Region\n\"[Operation Region]\"\n11\nPower Resource\n\"[Power Resource]\"\n12\nProcessor\n\"[Processor]\"\n13\nThermal Zone\n\"[Thermal Zone]\"\n14\nBuffer Field\n\"[Buffer Field]\"\n15\nDDB Handle\n\"[DDB Handle]\"\n16\nDebug Object\n\"[Debug Object]\"",
"example": "Device (DEVX) {}\nName (PKGX, Package () {1,2,3,\"Battery1\"})\nMethod (MTHX, 2)\n{\n Concatenate (\"My Object: \", DEVX, Debug) // MyObject: Device\n Printf (\"PKGX %o contains %o elements\\n\", PKGX, SizeOf (PKGX))\n Printf (\"Arg0: %o\\n\", Arg0)\n}"
},
{
"title": "ConcatenateResTemplate (Concatenate Resource Templates)",
"syntax": "ConcatenateResTemplate (Source1, Source2, Result) => Buffer",
"arguments": "Source1 and Source2 are evaluated as Resource Template buffers.",
"description": "The resource descriptors from Source2 are appended to the resource descriptors from Source1. Then a new end tag and checksum are appended and the result is stored in Result, if specified. If either Source1 or Source2 is exactly 1 byte in length, a run-time error occurs. An empty buffer is treated as a resource template with only an end tag.",
"example": ""
},
{
"title": "CondRefOf (Create Object Reference Conditionally)",
"syntax": "CondRefOf (Source, Result) => Boolean",
"arguments": "Attempts to create a reference to the Source object. The Source of this operation can be any object type (for example, data package, device object, and so on), and the result data is optionally stored into Result.",
"description": "On success, the Destination object is set to refer to Source and the execution result of this operation is the value True. On failure, Destination is unchanged and the execution result of this operation is the value False. This can be used to reference items in the namespace that may appear dynamically (for example, from a dynamically loaded definition block).\nCondRefOf is equivalent to RefOf except that if the Source object does not exist, it is fatal for RefOf but not for CondRefOf.",
"example": ""
},
{
"title": "Connection (Declare Field Connection Attributes)",
"syntax": "Connection (ConnectionResourceObj)",
"arguments": "ConnectionResourceObj is a GPIO or Serial Bus Connection Descriptor depending on the Operation Region type, or a named object containing the Descriptor\nSee Section 6.4.3.8.2, \"Connection Resource Descriptors\" and Section \"Field (Declare Field Objects)\" for more information.",
"description": "The Connection macro declares the connection attributes for subsequent fields defined within the Field declaration.",
"example": "OperationRegion(TOP1, GenericSerialBus, 0x00, 0x100)// GenericSerialBus device at command value offset zero\nName (I2C, ResourceTemplate(){\n I2CSerialBusV2(0x5a,,100000,, \"\\_SB.I2C\",,,,,RawDataBuffer(){1,6}) })\nField(TOP1, BufferAcc, NoLock, Preserve)\n{\n Connection(I2C) // Specify connection resource information\n AccessAs(BufferAcc, AttribWord) // Use the GenericSerialBus\n // Read/Write Word protocol FLD0, 8, // Virtual register at command value 0.\n FLD1, 8, // Virtual register at command value 1.\n \nField(TOP1, BufferAcc, NoLock, Preserve)\n{\n Connection(I2CSerialBusV2(0x5b,,100000,, \"\\_SB.I2C\",,,,,RawDataBuffer(){3,9})) AccessAs(BufferAcc, AttribBytes (16))\n FLD2, 8 // Virtual register at command value 0.\n}\n // Create the GenericSerialBus data buffer\nName(BUFF, Buffer(34){}) // Create GenericSerialBus data buffer as BUFF\nCreateByteField(BUFF, 0x00, STAT) // STAT = Status (Byte)\nCreateWordField(BUFF, 0x02, DATA) // DATA = Data (Word)"
},
{
"title": "Continue (Continue Innermost Enclosing While)",
"syntax": "Continue",
"arguments": "",
"description": "Continue causes execution to continue at the start of the innermost enclosing While scope, in the currently executing Control Method, at the point where the condition is evaluated. If there is no enclosing While within the current Method, a fatal error is generated.",
"example": ""
},
{
"title": "CopyObject (Copy and Store Object)",
"syntax": "CopyObject (Source, Destination) => DataRefObject",
"arguments": "Converts the contents of the Source to a DataRefObject using the conversion rules in 18.2.5 and then copies the results without conversion to the object referred to by Destination.",
"description": "If Destination is already an initialized object of type DataRefObject, the original contents of Destination are discarded and replaced with Source. Otherwise, a fatal error is generated.\nNote: (Compatibility Note) The CopyObject operator was first introduced new in ACPI 2.0.",
"example": ""
},
{
"title": "CreateBitField (Create 1-Bit Buffer Field)",
"syntax": "CreateBitField (SourceBuffer, BitIndex, BitFieldName)",
"arguments": "SourceBuffer is evaluated as a buffer. BitIndex is evaluated as an integer. BitFieldName is a NameString.",
"description": "A new buffer field object named BitFieldName is created for the bit of SourceBuffer at the bit index of BitIndex. The bit-defined field within SourceBuffer must exist.BitFieldName is created for the bit of SourceBuffer at the bit index of BitIndex. The bit-defined field within SourceBuffer must exist.",
"example": ""
},
{
"title": "CreateByteField (Create 8-Bit Buffer Field)",
"syntax": "CreateByteField (SourceBuffer, ByteIndex, ByteFieldName)",
"arguments": "SourceBuffer is evaluated as a buffer. ByteIndex is evaluated as an integer. ByteFieldName is a NameString.",
"description": "A new buffer field object named ByteFieldName is created for the byte of SourceBuffer at the byte index of ByteIndex. The byte-defined field within SourceBuffer must exist.",
"example": ""
},
{
"title": "CreateDWordField (Create 32-Bit Buffer Field)",
"syntax": "CreateDWordField (SourceBuffer, ByteIndex, DWordFieldName)",
"arguments": "SourceBuffer is evaluated as a buffer. ByteIndex is evaluated as an integer. DWordFieldName is a NameString.",
"description": "A new buffer field object named DWordFieldName is created for the DWord of SourceBuffer at the byte index of ByteIndex. The DWord-defined field within SourceBuffer must exist.",
"example": ""
},
{
"title": "CreateField (Create Arbitrary Length Buffer Field)",
"syntax": "CreateField (SourceBuffer, BitIndex, NumBits, FieldName)",
"arguments": "SourceBuffer is evaluated as a buffer. BitIndex and NumBits are evaluated as integers. FieldName is a NameString.",
"description": "A new buffer field object named FieldName is created for the bits of SourceBuffer at BitIndex for NumBits. The entire bit range of the defined field within SourceBuffer must exist. If NumBits evaluates to zero, a fatal exception is generated.",
"example": ""
},
{
"title": "CreateQWordField (Create 64-Bit Buffer Field)",
"syntax": "CreateQWordField (SourceBuffer, ByteIndex, QWordFieldName)",
"arguments": "SourceBuffer is evaluated as a buffer. ByteIndex is evaluated as an integer. QWordFieldName is a NameString.",
"description": "A new buffer field object named QWordFieldName is created for the QWord of SourceBuffer at the byte index of ByteIndex. The QWord-defined field within SourceBuffer must exist.",
"example": ""
},
{
"title": "CreateWordField (Create 16-Bit Buffer Field)",
"syntax": "CreateWordField (SourceBuffer, ByteIndex, WordFieldName)",
"arguments": "SourceBuffer is evaluated as a buffer. ByteIndex is evaluated as an integer. WordFieldName is a NameString.",
"description": "A new bufferfield object named WordFieldName is created for the word of SourceBuffer at the byte index of ByteIndex. The word-defined field within SourceBuffer must exist.",
"example": ""
},
{
"title": "DataTableRegion (Create Data Table Operation Region)",
"syntax": "DataTableRegion (RegionName, SignatureString, OemIDString, OemTableIDString)",
"arguments": "Creates a new region named RegionName. SignatureString, OemIDString and OemTableIDString are evaluated as strings.",
"description": "A Data Table Region is a special Operation Region whose RegionSpace is SystemMemory. Any table referenced by a Data Table Region must be in memory marked by AddressRangeReserved or AddressRangeNVS.\nThe memory referred to by the Data Table Region is the memory that is occupied by the table referenced in XSDT that is identified by SignatureString, OemIDString and OemTableIDString. Any Field object can reference RegionName\nThe base address of a Data Table region is the address of the first byte of the header of the table identified by SignatureString, OemIDString and OemTableIDString. The length of the region is the length of the table.",
"example": ""
},
{
"title": "Debug (Debugger Output)",
"syntax": "Debug",
"arguments": "",
"description": "The debug data object is a virtual data object. Writes to this object provide debugging information. On at least debug versions of the interpreter, any writes into this object are appropriately displayed on the system\u2019s native kernel debugger. All writes to the debug object are otherwise benign. If the system is in use without a kernel debugger, then writes to the debug object are ignored. The following table relates the ASL term types that can be written to the Debug object to the format of the information on the kernel debugger display.\nTable 19-429 Debug Object Display Formats\nASL Term Type\nDisplay Format\nNumeric data object\nAll digits displayed in hexadecimal format.\nString data object\nString is displayed.\nObject reference\nInformation about the object is displayed (for example, object type and object name), but the object is not evaluated.\nThe Debug object is a write-only object; attempting to read from the debug object is not supported.",
"example": ""
},
{
"title": "Decrement (Integer Decrement)",
"syntax": "Decrement (Minuend) => Integer\nMinuend-- => Integer",
"arguments": "Minuend is evaluated as an Integer.",
"description": "This operation decrements the Minuend by one and the result is stored back to Minuend. Equivalent to Subtract (Minuend, 1, Minuend). Underflow conditions are ignored and the result is Ones.",
"example": ""
},
{
"title": "Default (Default Execution Path in Switch)",
"syntax": "Default {TermList}",
"arguments": "TermList is a sequence of executable ASL expressions.",
"description": "Within the body of a Switch (page 1040) statement, the statements specified by TermList will be executed if no Case (page 948) statement value matches the Switch statement value. If Default is omitted and no Case match is found, none of the statements in the Switch body are executed. There can be at most one Default statement in the immediate scope of the parent Switch statement. The Default statement can appear anywhere in the body of the Switch statement.",
"example": ""
},
{
"title": "DefinitionBlock (Declare Definition Block)",
"syntax": "DefinitionBlock (AMLFileName, TableSignature, ComplianceRevision, OEMID, TableID, OEMRevision) {TermList}",
"arguments": "AMLFileName is a string that specifies the desired name of the translated output AML file. If the\nAMLFileName is a NULL (zero length) string, the ASL compiler will automatically create the filename (typically generated from the input filename/pathname).TableSignature is a string that contains the 4character ACPI signature. ComplianceRevision is an 8-bit value. OEMID is a 6-character string, TableId is an 8-character string, and OEMRevision is a 32-bit value. TermList is a sequence of executable ASL expressions.\nIf multiple DefinitionBlocks are defined in the same ASL file, the first DefinitionBlock defines the output AMLFileName as per the rule above.",
"description": "The DefinitionBlock term specifies the unit of data and/or AML code that the OS will load as part of the Differentiated Definition Block or as part of an additional Definition Block.\nThis unit of data and/or AML code describes either the base system or some large extension (such as a docking station). The entire DefinitionBlock will be loaded and compiled by the OS as a single unit.\nSystem software loads a definition block by referencing the objects in the TermList package in order. The object list is encoded as TermList, so that rather than describing a static object list, it is possible to describe a dynamic object list according to the system settings. See \"Section 5.4.2, Definition Block Loading.\"\nNote: For compatibility with ACPI versions before ACPI 2.0, the bit width of Integer objects is dependent on the ComplianceRevision of the DSDT. If the ComplianceRevision is less than 2, all integers are restricted to 32 bits. Otherwise, full 64-bit integers are used. The version of the DSDT sets the global integer width for all integers, including integers in SSDTs.",
"example": ""
},
{
"title": "DerefOf (Dereference an Object Reference)",
"syntax": "DerefOf (Source) => Object",
"arguments": "Returns the object referred by the Source object reference.",
"description": "If the Source evaluates to an object reference, the actual contents of the object referred to are returned. If the Source evaluates to a string, the string is evaluated as an ASL name (relative to the current scope) and the contents of that object are returned. If the object specified by Source does not exist then a fatal error is generated. If the object specified is a reference generated by the Index() operator and refers to an uninitialized package element, then a fatal error is generated.\nNote: (Compatibility Note) The use of a String with DerefOf was first introduced in ACPI 2.0.",
"example": ""
},
{
"title": "Device (Declare Device Package)",
"syntax": "Device (DeviceName) {TermList}",
"arguments": "Creates a Device object of name DeviceName, which represents a processor, a bus or a device, or any other similar hardware. Device opens a name scope.",
"description": "A Device Package is one of the basic ways the Differentiated Definition Block describes the hardware devices in the system to the operating software. Each Device Package is defined somewhere in the hierarchical namespace corresponding to that device\u2019s location in the system. Within the namespace of the device are other names that provide information and control of the device, along with any subdevices that in turn describe sub-devices, and so on.\nFor any device, the platform runtime firmware provides only information that is added to the device in a non-hardware standard manner. This type of value-added function is expressible in the ACPI Definition Block such that operating software can use the function.\nThe platform runtime firmware supplies Device Objects only for devices that are obtaining some systemadded function outside the device\u2019s normal capabilities and for any Device Object required to fill in the tree for such a device. For example, if the system includes a PCI device (integrated or otherwise) with no additional functions such as power management, the platform runtime firmware would not report such a device; however, if the system included an integrated ISA device below the integrated PCI device (device is an IS bridge), then the system would include a Device Package for the ISA device with the minimum feature being added being the ISA device\u2019s ID and configuration information and the parent PCI device, because it is required to get the ISA Device Package placement in the namespace correct.\nThe device object list is encoded as TermList, so that rather than describing a static device object list, it is possible to describe a dynamic device object list according to the system settings. See \"Section 5.4.2, Definition Block Loading.\"",
"example": "The following block of ASL sample code shows a nested use of Device objects to describe an IDE controller connected to the root PCI bus.\n Device (IDE0) { // primary controller\n Name (_ADR, 0) // put PCI Address (device/function) here\n // define region for IDE mode register\n OperationRegion (PCIC, PCI_Config, 0x50, 0x10)\n Field (PCIC, AnyAcc, NoLock, Preserve) {\n \u2026\n }\n Device (PRIM) { // Primary adapter\n Name (_ADR, 0) // Primary adapter = 0\n \u2026\n Method (_STM, 2) {\n \u2026\n }\n Method (_GTM) {\n \u2026\n }\n Device (MSTR) { // master channel\n Name (_ADR, 0)\n Name (_PR0, Package () {0, PIDE})\n Name (_GTF) {\n \u2026\n }\n }\n Device (SLAV) {\n Name (_ADR, 1)\n Name (_PR0, Package () {0, PIDE})\n Name (_GTF) {\n \u2026\n }\n }\n }\n }"
},
{
"title": "Divide (Integer Divide)",
"syntax": "Divide (Dividend, Divisor, Remainder, Result) => Integer\nResult = Dividend / Divisor => Integer\nResult /= Divisor => Integer",
"arguments": "Dividend and Divisor are evaluated as Integers.",
"description": "Dividend is divided by Divisor, then the resulting remainder is optionally stored into Remainder and the resulting quotient is optionally stored into Result. Divide-by-zero exceptions are fatal.\nThe function return value is the Result (quotient).",
"example": ""
},
{
"title": "DMA (DMA Resource Descriptor Macro)",
"syntax": "DMA (DmaType, IsBusMaster, DmaTransferSize, DescriptorName) {DmaChannelList} => Buffer Arguments\nDmaType specifies the type of DMA cycle: ISA compatible (Compatibility), EISA Type A (TypeA), EISA Type B (TypeB) or EISA Type F (TypeF). The 2-bit field DescriptorName._TYP is automatically created to refer to this portion of the resource descriptor, where \u20180\u2019 is Compatibility, \u20181\u2019 is TypeA, \u20182\u2019 is TypeB and \u20183\u2019 is TypeF.\nIsBusMaster specifies whether this device can generate DMA bus master cycles (BusMaster) or not (NotBusMaster). If nothing is specified, then BusMaster is assumed. The 1-bit field DescriptorName._BM is automatically created to refer to this portion of the resource descriptor, where \u20180\u2019 is NotBusMaster and \u20181\u2019 is BusMaster.\nDmaTransferSize specifies the size of DMA cycles the device is capable of generating: 8-bit (Transfer8), 16-bit (Transfer16) or both 8 and 16-bit (Transfer8_16). The 2-bit field DescriptorName._SIZ is automatically created to refer to this portion of the resource descriptor, where \u20180\u2019 is Transfer8, \u20181\u2019 is Transfer8_16 and \u20182\u2019 is Transfer16.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\nDmaChannelList is a comma-delimited list of integers in the range 0 through 7 that specify the DMA channels used by the device. There may be no duplicates in the list.",
"arguments": "",
"description": "The DMA macro evaluates to a buffer which contains a DMA resource descriptor. The format of the DMA resource descriptor can be found in \u201cDMA Descriptor\u201d (page 420). The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"example": ""
},
{
"title": "DWordIO (DWord IO Resource Descriptor Macro)",
"syntax": "DWordIO (ResourceUsage, IsMinFixed, IsMaxFixed, Decode, ISARanges, AddressGranularity,\nAddressMinimum, AddressMaximum, AddressTranslation, RangeLength, ResourceSourceIndex, ResourceSource, DescriptorName, TranslationType, TranslationDensity)",
"arguments": "ResourceUsage specifies whether the I/O range is consumed by this device (ResourceConsumer) or passed on to child devices (ResourceProducer). If nothing is specified, then ResourceConsumer is assumed.\nIsMinFixed specifies whether the minimum address of this I/O range is fixed (MinFixed) or can be changed (MinNotFixed). If nothing is specified, then MinNotFixed is assumed. The 1-bit field\nDescriptorName._MIF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MinFixed and \u20180\u2019 is MinNotFixed.\nIsMaxFixed specifies whether the maximum address of this I/O range is fixed (MaxFixed) or can be changed (MaxNotFixed). If nothing is specified, then MaxNotFixed is assumed. The 1-bit field DescriptorName._MAF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MaxFixed and \u20180\u2019 is MaxNotFixed.\nDecode specifies whether or not the device decodes the I/O range using positive (PosDecode) or subtractive (SubDecode) decode. If nothing is specified, then PosDecode is assumed. The 1-bit field DescriptorName._DEC is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is SubDecode and \u20180\u2019 is PosDecode.\nISARanges specifies whether the I/O ranges specifies are limited to valid ISA I/O ranges (ISAOnly), valid non-ISA I/O ranges (NonISAOnly) or encompass the whole range without limitation (EntireRange). The 2bit field DescriptorName._RNG is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is NonISAOnly, \u20182\u2019 is ISAOnly and \u20180\u2019 is EntireRange.\nAddressGranularity evaluates to a 32-bit integer that specifies the power-of-two boundary (- 1) on which the I/O range must be aligned. The 32-bit field DescriptorName._GRA is automatically created to refer to this portion of the resource descriptor.\nAddressMinimum evaluates to a 32-bit integer that specifies the lowest possible base address of the I/O range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 32-bit field DescriptorName._MIN is automatically created to refer to this portion of the resource descriptor.\nAddressMaximum evaluates to a 32-bit integer that specifies the highest possible base address of the I/O range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 32-bit field DescriptorName._MAX is automatically created to refer to this portion of the resource descriptor.\nAddressTranslation evaluates to a 32-bit integer that specifies the offset to be added to a secondary bus I/O address which results in the corresponding primary bus I/O address. For all non-bridge devices or bridges which do not perform translation, this must be \u20180\u2019. The 32-bit field DescriptorName._TRA is automatically created to refer to this portion of the resource descriptor.\nRangeLength evaluates to a 32-bit integer that specifies the total number of bytes decoded in the I/O range. The 32-bit field DescriptorName._LEN is automatically created to refer to this portion of the resource descriptor.\nResourceSourceIndex is an optional argument which evaluates to an 8-bit integer that specifies the resource descriptor within the object specified by ResourceSource. If this argument is specified, the ResourceSource argument must also be specified.\nResourceSource is an optional argument which evaluates to a string containing the path of a device which produces the pool of resources from which this I/O range is allocated. If this argument is specified, but the ResourceSourceIndex argument is not specified, a value of zero is assumed.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\nTranslationType is an optional argument that specifies whether the resource type on the secondary side of the bus is different (TypeTranslation) from that on the primary side of the bus or the same\n(TypeStatic). If TypeTranslation is specified, then the primary side of the bus is Memory. If TypeStatic is specified, then the primary side of the bus is I/O. If nothing is specified, then TypeStatic is assumed. The 1-bit field DescriptorName._TTP is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is TypeTranslation and \u20180\u2019 is TypeStatic. See _TTP (page 443) for more information\nTranslationDensity is an optional argument that specifies whether or not the translation from the primary to secondary bus is sparse (SparseTranslation) or dense (DenseTranslation). It is only used when TranslationType is TypeTranslation. If nothing is specified, then DenseTranslation is assumed. The 1-bit field DescriptorName._TRS is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is SparseTranslation and \u20180\u2019 is DenseTranslation. See _TRS (page 444) for more information.",
"description": "The DWordIO macro evaluates to a buffer which contains a 32-bit I/O range resource descriptor. The format of the 32-bit I/O range resource descriptor can be found in \u201cDWord Address Space Descriptor \u201d (page 435). The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"example": ""
},
{
"title": "DWordMemory (DWord Memory Resource Descriptor Macro)",
"syntax": "DWordMemory (ResourceUsage, Decode, IsMinFixed, IsMaxFixed, Cacheable, ReadAndWrite,\nAddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, RangeLength,\nResourceSourceIndex, ResourceSource, DescriptorName, MemoryRangeType, TranslationType)",
"arguments": "ResourceUsage specifies whether the Memory range is consumed by this device (ResourceConsumer) or passed on to child devices (ResourceProducer). If nothing is specified, then ResourceConsumer is assumed.\nDecode specifies whether or not the device decodes the Memory range using positive (PosDecode) or subtractive (SubDecode) decode. If nothing is specified, then PosDecode is assumed. The 1-bit field DescriptorName._DEC is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is SubDecode and \u20180\u2019 is PosDecode.\nIsMinFixed specifies whether the minimum address of this Memory range is fixed (MinFixed) or can be changed (MinNotFixed). If nothing is specified, then MinNotFixed is assumed. The 1-bit field\nDescriptorName._MIF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MinFixed and \u20180\u2019 is MinNotFixed.\nIsMaxFixed specifies whether the maximum address of this Memory range is fixed (MaxFixed) or can be changed (MaxNotFixed). If nothing is specified, then MaxNotFixed is assumed. The 1-bit field\nDescriptorName._MAF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MaxFixed and \u20180\u2019 is MaxNotFixed.\nCacheable specifies whether or not the memory region is cacheable (Cacheable), cacheable and writecombining (WriteCombining), cacheable and prefetchable (Prefetchable) or uncacheable\n(NonCacheable). If nothing is specified, then NonCacheable is assumed. The 2-bit field\nDescriptorName._MEM is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is Cacheable, \u20182\u2019 is WriteCombining, \u20183\u2019 is Prefetchable and \u20180\u2019 is NonCacheable.\nReadAndWrite specifies whether or not the memory region is read-only (ReadOnly) or read/write\n(ReadWrite). If nothing is specified, then ReadWrite is assumed. The 1-bit field DescriptorName._RW is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is ReadWrite and \u20180\u2019 is ReadOnly.\nAddressGranularity evaluates to a 32-bit integer that specifies the power-of-two boundary (- 1) on which the Memory range must be aligned. The 32-bit field DescriptorName._GRA is automatically created to refer to this portion of the resource descriptor.\nAddressMinimum evaluates to a 32-bit integer that specifies the lowest possible base address of the\nMemory range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 32-bit field DescriptorName._MIN is automatically created to refer to this portion of the resource descriptor.\nAddressMaximum evaluates to a 32-bit integer that specifies the highest possible base address of the\nMemory range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 32-bit field DescriptorName._MAX is automatically created to refer to this portion of the resource descriptor.\nAddressTranslation evaluates to a 32-bit integer that specifies the offset to be added to a secondary bus I/O address which results in the corresponding primary bus I/O address. For all non-bridge devices or bridges which do not perform translation, this must be \u20180\u2019. The 32-bit field DescriptorName._TRA is automatically created to refer to this portion of the resource descriptor.\nRangeLength evaluates to a 32-bit integer that specifies the total number of bytes decoded in the Memory range. The 32-bit field DescriptorName._LEN is automatically created to refer to this portion of the resource descriptor.\nResourceSourceIndex is an optional argument which evaluates to an 8-bit integer that specifies the resource descriptor within the object specified by ResourceSource. If this argument is specified, the ResourceSource argument must also be specified.\nResourceSource is an optional argument which evaluates to a string containing the path of a device which produces the pool of resources from which this Memory range is allocated. If this argument is specified, but the ResourceSourceIndex argument is not specified, a zero value is assumed.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\nMemoryRangeType is an optional argument that specifies the memory usage. The memory can be marked as normal (AddressRangeMemory), used as ACPI NVS space (AddressRangeNVS), used as ACPI reclaimable space (AddressRangeACPI) or as system reserved (AddressRangeReserved). If nothing is specified, then AddressRangeMemory is assumed. The 2-bit field DescriptorName._MTP is automatically created in order to refer to this portion of the resource descriptor, where \u20180\u2019 is AddressRangeMemory, \u20181\u2019 is AddressRangeReserved, \u20182\u2019 is AddressRangeACPI and \u20183\u2019 is AddressRangeNVS.\nTranslationType is an optional argument that specifies whether the resource type on the secondary side of the bus is different (TypeTranslation) from that on the primary side of the bus or the same (TypeStatic). If TypeTranslation is specified, then the primary side of the bus is I/O. If TypeStatic is specified, then the primary side of the bus is Memory. If nothing is specified, then TypeStatic is assumed. The 1-bit field DescriptorName._TTP is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is TypeTranslation and \u20180\u2019 is TypeStatic. See _TTP (page 443) for more information.",
"description": "The DWordMemory macro evaluates to a buffer which contains a 32-bit memory resource descriptor. The format of the 32-bit memory resource descriptor can be found in \u201cDWord Address Space Descriptor \u201d (page 435). The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"example": ""
},
{
"title": "DWordSpace (DWord Space Resource Descriptor Macro)",
"syntax": "DWordSpace (ResourceType, ResourceUsage, Decode, IsMinFixed, IsMaxFixed, TypeSpecificFlags,\nAddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, RangeLength, ResourceSourceIndex, ResourceSource, DescriptorName)",
"arguments": "ResourceType evaluates to an 8-bit integer that specifies the type of this resource. Acceptable values are 0xC0 through 0xFF.\nResourceUsage specifies whether the Memory range is consumed by this device (ResourceConsumer) or passed on to child devices (ResourceProducer). If nothing is specified, then ResourceConsumer is assumed.\nDecode specifies whether or not the device decodes the Memory range using positive (PosDecode) or subtractive (SubDecode) decode. If nothing is specified, then PosDecode is assumed. The 1-bit field DescriptorName._DEC is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is SubDecode and \u20180\u2019 is PosDecode.\nIsMinFixed specifies whether the minimum address of this Memory range is fixed (MinFixed) or can be changed (MinNotFixed). If nothing is specified, then MinNotFixed is assumed. The 1-bit field\nDescriptorName._MIF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MinFixed and \u20180\u2019 is MinNotFixed.\nIsMaxFixed specifies whether the maximum address of this Memory range is fixed (MaxFixed) or can be changed (MaxNotFixed). If nothing is specified, then MaxNotFixed is assumed. The 1-bit field\nDescriptorName._MAF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MaxFixed and \u20180\u2019 is MaxNotFixed.\nTypeSpecificFlags evaluates to an 8-bit integer. The flags are specific to the ResourceType.\nAddressGranularity evaluates to a 32-bit integer that specifies the power-of-two boundary (- 1) on which the Memory range must be aligned. The 32-bit field DescriptorName._GRA is automatically created to refer to this portion of the resource descriptor.\nAddressMinimum evaluates to a 32-bit integer that specifies the lowest possible base address of the\nMemory range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 32-bit field DescriptorName._MIN is automatically created to refer to this portion of the resource descriptor.\nAddressMaximum evaluates to a 32-bit integer that specifies the highest possible base address of the\nMemory range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 32-bit field DescriptorName._MAX is automatically created to refer to this portion of the resource descriptor.\nAddressTranslation evaluates to a 32-bit integer that specifies the offset to be added to a secondary bus I/O address which results in the corresponding primary bus I/O address. For all non-bridge devices or bridges which do not perform translation, this must be \u20180\u2019. The 32-bit field DescriptorName._TRA is automatically created to refer to this portion of the resource descriptor.\nRangeLength evaluates to a 32-bit integer that specifies the total number of bytes decoded in the Memory range. The 32-bit field DescriptorName._LEN is automatically created to refer to this portion of the resource descriptor.\nResourceSourceIndex is an optional argument which evaluates to an 8-bit integer that specifies the resource descriptor within the object specified by ResourceSource. If this argument is specified, the ResourceSource argument must also be specified.\nResourceSource is an optional argument which evaluates to a string containing the path of a device which produces the pool of resources from which this Memory range is allocated. If this argument is specified, but the ResourceSourceIndex argument is not specified, a zero value is assumed.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.",
"description": "The DWordSpace macro evaluates to a buffer which contains a 32-bit Address Space resource descriptor. The format of the 32-bit Address Space resource descriptor can be found in \u201cDWord Address Space Descriptor \u201d (page 435). The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"example": ""
},
{
"title": "EISAID (EISA ID String To Integer Conversion Macro)",
"syntax": "EISAID (EisaIdString) => DWordConst",
"arguments": "The EisaIdString must be a String object of the form \u201cUUUNNNN\u201d, where \u201cU\u201d is an uppercase letter and \u201cN\u201d is a hexadecimal digit. No asterisks or other characters are allowed in the string.",
"description": "Converts EisaIdString, a 7-character text string argument, into its corresponding 4-byte numeric EISA ID encoding. It can be used when declaring IDs for devices that have EISA IDs.",
"example": " EISAID (\u201cPNP0C09\u201d) // This is a valid invocation of the macro."
},
{
"title": "Else (Alternate Execution)",
"syntax": "Else {TermList}",
"arguments": "TermList is a sequence of executable ASL statements.",
"description": "If Predicate evaluates to 0 in an If statement, then control is transferred to the Else portion, which can consist of zero or more ElseIf statements followed by zero or one Else statements. If the Predicate of any ElseIf statement evaluates to non-zero, the statements in its term list are executed and then control is transferred past the end of the final Else term. If no Predicate evaluates to non-zero, then the statements in the Else term list are executed.",
"example": "The following example checks Local0 to be zero or non-zero. On non-zero, CNT is incremented; otherwise, CNT is decremented.\nIf (LGreater (Local0, 5)\n{\n Increment (CNT)\n} Else If (Local0) {\n Add (CNT, 5, CNT)\n}\nElse\n{\n Decrement (CNT)\n}"
},
{
"title": "ElseIf (Alternate/Conditional Execution)",
"syntax": "ElseIf (Predicate) {TermList}",
"arguments": "Predicate is evaluated as an Integer.",
"description": "If the Predicate of any ElseIf statement evaluates to non-zero, the statements in its term list are executed and then control is transferred past the end of the final Else. If no Predicate evaluates to non-zero, then the statements in the Else term list are executed.\nNote: (Compatibility Note) The ElseIf operator was first introduced in ACPI 2.0, but is backward compatible with the ACPI 1.0 specification. An ACPI 2.0 and later ASL compiler must synthesize ElseIf from the If. and Else opcodes available in 1.0. For example:\nIf (predicate1)\n{\n \u2026statements1\u2026\n}\nElseIf (predicate2)\n{\n \u2026statements2\u2026\n}\nElse\n{\n \u2026statements3\u2026\n}\nis translated to the following:\nIf (predicate1)\n{\n \u2026statements1\u2026\n}\nElse\n{\n If (predicate2)\n {\n \u2026statements2\u2026\n }\n Else\n {\n \u2026statements3\u2026\n } }",
"example": ""
},
{
"title": "EndDependentFn (End Dependent Function Resource Descriptor Macro)",
"syntax": "EndDependentFn () => Buffer",
"arguments": "",
"description": "The EndDependentFn macro generates an end-of-dependent-function resource descriptor buffer inside of an ResourceTemplate (page 1033). It must be matched with a StartDependentFn (page 1038) or StartDependentFnNoPri (page 1038) macro.",
"example": ""
},
{
"title": "Event (Declare Event Synchronization Object)",
"syntax": "Event (EventName)",
"arguments": "Creates an event synchronization object named EventName.",
"description": "For more information about the uses of an event synchronization object, see the ASL definitions for the Wait, Signal, and Reset function operators.",
"example": ""
},
{
"title": "ExtendedIO (Extended IO Resource Descriptor Macro)",
"syntax": "ExtendedIO (ResourceUsage, IsMinFixed, IsMaxFixed, Decode, ISARanges, AddressGranularity,\nAddressMinimum, AddressMaximum, AddressTranslation, RangeLength, TypeSpecificAttributes, DescriptorName, TranslationType, TranslationDensity)",
"arguments": "ResourceUsage specifies whether the Memory range is consumed by this device (ResourceConsumer) or passed on to child devices (ResourceProducer). If nothing is specified, then ResourceConsumer is assumed.\nIsMinFixed specifies whether the minimum address of this I/O range is fixed (MinFixed) or can be changed (MinNotFixed). If nothing is specified, then MinNotFixed is assumed. The 1-bit field\nDescriptorName._MIF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MinFixed and \u20180\u2019 is MinNotFixed.\nIsMaxFixed specifies whether the maximum address of this I/O range is fixed (MaxFixed) or can be changed (MaxNotFixed). If nothing is specified, then MaxNotFixed is assumed. The 1-bit field\nDescriptorName._MAF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MaxFixed and \u20180\u2019 is MaxNotFixed.\nDecode specifies whether or not the device decodes the I/O range using positive (PosDecode) or subtractive (SubDecode) decode. If nothing is specified, then PosDecode is assumed. The 1-bit field DescriptorName._DEC is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is SubDecode and \u20180\u2019 is PosDecode.\nISARanges specifies whether the I/O ranges specifies are limited to valid ISA I/O ranges (ISAOnly), valid non-ISA I/O ranges (NonISAOnly) or encompass the whole range without limitation (EntireRange). The 2bit field DescriptorName._RNG is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is NonISAOnly, \u20182\u2019 is ISAOnly and \u20180\u2019 is EntireRange.\nAddressGranularity evaluates to a 64-bit integer that specifies the power-of-two boundary (- 1) on which the I/O range must be aligned. The 64-bit field DescriptorName._GRA is automatically created to refer to this portion of the resource descriptor.\nAddressMinimum evaluates to a 64-bit integer that specifies the lowest possible base address of the I/O range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 64-bit field DescriptorName._MIN is automatically created to refer to this portion of the resource descriptor.\nAddressMaximum evaluates to a 64-bit integer that specifies the highest possible base address of the I/O range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 64-bit field DescriptorName._MAX is automatically created to refer to this portion of the resource descriptor.\nAddressTranslation evaluates to a 64-bit integer that specifies the offset to be added to a secondary bus I/O address which results in the corresponding primary bus I/O address. For all non-bridge devices or bridges which do not perform translation, this must be \u20180\u2019. The 64-bit field DescriptorName._TRA is automatically created to refer to this portion of the resource descriptor.\nRangeLength evaluates to a 64-bit integer that specifies the total number of bytes decoded in the I/O range. The 64-bit field DescriptorName._LEN is automatically created to refer to this portion of the resource descriptor.\nTypeSpecificAttributes is an optional argument that specifies attributes specific to this resource type. See Section 6.4.3.5.4.1,\u201dType Specific Attributes\u201d.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operatorsDescription\nThe ExtendedIO macro evaluates to a buffer which contains a 64-bit I/O resource descriptor, which describes a range of I/O addresses. The format of the 64-bit I/O resource descriptor can be found in \u201cExtended Address Space Descriptor\u201d (page 425). The macro is designed to be used inside of a ResourceTemplate (page 1033).\nTranslationType is an optional argument that specifies whether the resource type on the secondary side of the bus is different (TypeTranslation) from that on the primary side of the bus or the same\n(TypeStatic). If TypeTranslation is specified, then the primary side of the bus is Memory. If TypeStatic is specified, then the primary side of the bus is I/O. If nothing is specified, then TypeStatic is assumed. The 1-bit field DescriptorName. _TTP is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is TypeTranslation and \u20180\u2019 is TypeStatic. See _TTP (page 443) for more information\nTranslationDensity is an optional argument that specifies whether or not the translation from the primary to secondary bus is sparse (SparseTranslation) or dense (DenseTranslation). It is only used when TranslationType is TypeTranslation. If nothing is specified, then DenseTranslation is assumed. The 1-bit field DescriptorName._TRS is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is SparseTranslation and \u20180\u2019 is DenseTranslation. See _TRS (page 444) for more information.",
"description": "",
"example": ""
},
{
"title": "ExtendedMemory (Extended Memory Resource Descriptor Macro)",
"syntax": "ExtendedMemory (ResourceUsage, Decode, IsMinFixed, IsMaxFixed, Cacheable, ReadAndWrite,\nAddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, RangeLength, TypeSpecificAttributes, DescriptorName, MemoryRangeType, TranslationType)",
"arguments": "ResourceUsage specifies whether the Memory range is consumed by this device (ResourceConsumer) or passed on to child devices (ResourceProducer). If nothing is specified, then ResourceConsumer is assumed.\nDecode specifies whether or not the device decodes the Memory range using positive (PosDecode) or subtractive (SubDecode) decode. If nothing is specified, then PosDecode is assumed. The 1-bit field DescriptorName._DEC is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is SubDecode and \u20180\u2019 is PosDecode.\nIsMinFixed specifies whether the minimum address of this Memory range is fixed (MinFixed) or can be changed (MinNotFixed). If nothing is specified, then MinNotFixed is assumed. The 1-bit field DescriptorName. _MIF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MinFixed and \u20180\u2019 is MinNotFixed.\nIsMaxFixed specifies whether the maximum address of this Memory range is fixed (MaxFixed) or can be changed (MaxNotFixed). If nothing is specified, then MaxNotFixed is assumed. The 1-bit field\nDescriptorName. _MAF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MaxFixed and \u20180\u2019 is MaxNotFixed.\nCacheable specifies whether or not the memory region is cacheable (Cacheable), cacheable and writecombining (WriteCombining), cacheable and prefetchable (Prefetchable) or uncacheable\n(NonCacheable). If nothing is specified, then NonCacheable is assumed. The 2-bit field\nDescriptorName._MEM is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is Cacheable, \u20182\u2019 is WriteCombining, \u20183\u2019 is Prefetchable and \u20180\u2019 is NonCacheable.\nReadAndWrite specifies whether or not the memory region is read-only (ReadOnly) or read/write (ReadWrite). If nothing is specified, then ReadWrite is assumed. The 1-bit field DescriptorName._RW is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is ReadWrite and \u20180\u2019 is ReadOnly.\nAddressGranularity evaluates to a 64-bit integer that specifies the power-of-two boundary (- 1) on which the Memory range must be aligned. The 64-bit field DescriptorName._GRA is automatically created to refer to this portion of the resource descriptor.\nAddressMinimum evaluates to a 64-bit integer that specifies the lowest possible base address of the\nMemory range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 64-bit field DescriptorName ._MIN is automatically created to refer to this portion of the resource descriptor.\nAddressMaximum evaluates to a 64-bit integer that specifies the highest possible base address of the\nMemory range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 64-bit field DescriptorName ._MAX is automatically created to refer to this portion of the resource descriptor.\nAddressTranslation evaluates to a 64-bit integer that specifies the offset to be added to a secondary bus I/O address which results in the corresponding primary bus I/O address. For all non-bridge devices or bridges which do not perform translation, this must be \u20180\u2019. The 64-bit field DescriptorName. _TRA is automatically created to refer to this portion of the resource descriptor.\nRangeLength evaluates to a 64-bit integer that specifies the total number of bytes decoded in the Memory range. The 64-bit field DescriptorName. _LEN is automatically created to refer to this portion of the resource descriptor.\nTypeSpecificAttributes is an optional argument that specifies attributes specific to this resource type. See Section 6.4.3.5.4.1,\u201dType Specific Attributes\u201d.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\nMemoryRangeType is an optional argument that specifies the memory usage. The memory can be marked as normal (AddressRangeMemory), used as ACPI NVS space (AddressRangeNVS), used as ACPI reclaimable space (AddressRangeACPI) or as system reserved (AddressRangeReserved). If nothing is specified, then AddressRangeMemory is assumed. The 2-bit field DescriptorName. _MTP is automatically created in order to refer to this portion of the resource descriptor, where \u20180\u2019 is AddressRangeMemory, \u20181\u2019 is AddressRangeReserved, \u20182\u2019 is AddressRangeACPI and \u20183\u2019 is AddressRangeNVS.\nTranslationType is an optional argument that specifies whether the resource type on the secondary side of the bus is different (TypeTranslation) from that on the primary side of the bus or the same (TypeStatic). If TypeTranslation is specified, then the primary side of the bus is I/O. If TypeStatic is specified, then the primary side of the bus is Memory. If nothing is specified, then TypeStatic is assumed. The 1-bit field DescriptorName. _TTP is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is TypeTranslation and \u20180\u2019 is TypeStatic. See _TTP (page 443) for more information.",
"description": "The ExtendedMemory macro evaluates to a buffer which contains a 64-bit memory resource descriptor, which describes a range of memory addresses. The format of the 64-bit memory resource descriptor can be found in \u201cExtended Address Space Descriptor\u201d (page 439). The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"example": ""
},
{
"title": "ExtendedSpace (Extended Address Space Resource Descriptor Macro)",
"syntax": "ExtendedSpace (ResourceType, ResourceUsage, Decode, IsMinFixed, IsMaxFixed, TypeSpecificFlags,\nAddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, RangeLength, TypeSpecificAttributes, DescriptorName)",
"arguments": "ResourceType evaluates to an 8-bit integer that specifies the type of this resource. Acceptable values are 0xC0 through 0xFF.\nResourceUsage specifies whether the Memory range is consumed by this device (ResourceConsumer) or passed on to child devices (ResourceProducer). If nothing is specified, then ResourceConsumer is assumed.\nDecode specifies whether or not the device decodes the Memory range using positive (PosDecode) or subtractive (SubDecode) decode. If nothing is specified, then PosDecode is assumed. The 1-bit field DescriptorName. _DEC is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is SubDecode and \u20180\u2019 is PosDecode.\nIsMinFixed specifies whether the minimum address of this Memory range is fixed (MinFixed) or can be changed (MinNotFixed). If nothing is specified, then MinNotFixed is assumed. The 1-bit field\nDescriptorName. _MIF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MinFixed and \u20180\u2019 is MinNotFixed.\nIsMaxFixed specifies whether the maximum address of this Memory range is fixed (MaxFixed) or can be changed (MaxNotFixed). If nothing is specified, then MaxNotFixed is assumed. The 1-bit field\nDescriptorName. _MAF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MaxFixed and \u20180\u2019 is MaxNotFixed.\nTypeSpecificFlags evaluates to an 8-bit integer. The flags are specific to the ResourceType.\nAddressGranularity evaluates to a 64-bit integer that specifies the power-of-two boundary (- 1) on which the Memory range must be aligned. The 64-bit field DescriptorName. _GRA is automatically created to refer to this portion of the resource descriptor.\nAddressMinimum evaluates to a 64-bit integer that specifies the lowest possible base address of the\nMemory range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 64-bit field DescriptorName._MIN is automatically created to refer to this portion of the resource descriptor.\nAddressMaximum evaluates to a 64-bit integer that specifies the highest possible base address of the\nMemory range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 64-bit field DescriptorName._MAX is automatically created to refer to this portion of the resource descriptor.\nAddressTranslation evaluates to a 64-bit integer that specifies the offset to be added to a secondary bus I/O address which results in the corresponding primary bus I/O address. For all non-bridge devices or bridges which do not perform translation, this must be \u20180\u2019. The 64-bit field DescriptorName._TRA is automatically created to refer to this portion of the resource descriptor.\nRangeLength evaluates to a 64-bit integer that specifies the total number of bytes decoded in the Memory range. The 64-bit field DescriptorName. _LEN is automatically created to refer to this portion of the resource descriptor.\nTypeSpecificAttributes is an optional argument that specifies attributes specific to this resource type. See Section 6.4.3.5.4.1,\u201dType Specific Attributes\u201d.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.",
"description": "The ExtendedSpace macro evaluates to a buffer which contains a 64-bit Address Space resource descriptor, which describes a range of addresses. The format of the 64-bit AddressSpace descriptor can be found in \u201cExtended Address Space Descriptor\u201d (page 439). The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"example": ""
},
{
"title": "External (Declare External Objects)",
"syntax": "External (ObjectName, ObjectType, ReturnType, ParameterTypes)",
"arguments": "ObjectName is a NameString.\nObjectType is an optional ObjectTypeKeyword (e.g. IntObj, PkgObj, etc.). If not specified, \u201cUnknownObj\u201d type is assumed.\nReturnType is optional. If the specified ObjectType is MethodObj, then this specifies the type or types of object returned by the method. If the method does not return an object, then nothing is specified or UnknownObj is specified. To specify a single return type, simply use the ObjectTypeKeyword. To specify multiple possible return types, enclose the comma-separated ObjectTypeKeywords with braces. For example: {IntObj, BuffObj}.\nParameterTypes is optional. If the specified ObjectType is MethodObj, this specifies both the number and type of the method parameters. It is a comma-separated, variable-length list of the expected object type or types for each of the method parameters, enclosed in braces. For each parameter, the parameter type consists of either an ObjectTypeKeyword or a comma-separated sub-list of ObjectTypeKeywords enclosed in braces. There can be no more than seven parameters in total.Description\nThe External directive informs the ASL compiler that the object is declared external to this table so that no errors will be generated for an undeclared object. The ASL compiler will create the external object at the specified place in the namespace (if a full path of the object is specified), or the object will be created at the current scope of the External term.\nFor external control methods, the ASL compiler can emit an External AML opcode that contains the name of the method and the number of required arguments. This information may be used by AML disassemblers to properly disassemble the AML to the correct ASL code.\nExternal is especially useful for use in secondary SSDTs, when the required scopes and objects are declared in the main DSDT.",
"description": "",
"example": "This example shows the use of External in conjunction with Scope within an SSDT:\nDefinitionBlock (\"ssdt.aml\", \"SSDT\", 2, \"X\", \"Y\", 0x00000001)\n{\n External (\\_SB.PCI0, DeviceObj)\n Scope (\\_SB.PCI0)\n { }\n}"
},
{
"title": "Fatal (Fatal Error Check)",
"syntax": "Fatal (Type, Code, Arg)",
"arguments": "This operation is used to inform the OS that there has been an OEM-defined fatal error.",
"description": "In response, the OS must log the fatal event and perform a controlled OS shutdown in a timely fashion.",
"example": ""
},
{
"title": "Field (Declare Field Objects)",
"syntax": "Field (RegionName, AccessType, LockRule, UpdateRule) {FieldUnitList}",
"arguments": "RegionName is evaluated as a Namestring that refers to the host operation region.\nAccessType is optional and defines the default access width of the field definition and is any one of the following: AnyAcc, ByteAcc, WordAcc, DWordAcc, or QWordAcc. In general, accesses within the parent object are performed naturally aligned. If desired, AccessType set to a value other than AnyAcc can be used to force minimum access width. Notice that the parent object must be able to accommodate the AccessType width. For example, an access type of WordAcc cannot read the last byte of an odd-length operation region. The exceptions to natural alignment are the access types used for a non-linear SMBus device. These will be discussed in detail below. Not all access types are meaningful for every type of operational region. If not specified, the default is AnyAcc.\nLockRule is optional and indicates whether the Global Lock is to be used when accessing this field and is one of the following: Lock or NoLock. If LockRule is set to Lock, accesses to modify the component data objects will acquire and release the Global Lock. If both types of locking occur, the Global Lock is acquired after the parent object Mutex. On Hardware-reduced ACPI platforms, Lock is not supported. If not specified, the default is NoLock.\nUpdateRule is optional and specifieas how the unmodified bits of a field are treated, and can be any one of the following: Preserve, WriteAsOnes, or WriteAsZeros. For example, if a field defines a component data object of 4 bits in the middle of a WordAcc region, when those 4 bits are modified the UpdateRule specifies how the other 12 bits are treated. If not specified, the default is Preserve.\nFieldUnitList is a variable-length list of individual field unit definitions, separated by commas. Each entry in the field unit list is one of the following:\nTable 19-430 Field Unit list entires\nFieldUnitName, BitLength\nOffset (ByteOffset)\nAccessAs (AccessType, AccessAttribute)\nConnection (ConnectionResourceObj)\nFieldUnitName is the ACPI name for the field unit (1 to 4 characters), and BitLength is the length of the field unit in bits. Offset is used to specify the byte offset of the next defined field unit. This can be used instead of defining the bit lengths that need to be skipped. AccessAs is used to define the access type and attributes for the remaining field units within the list. Connection is used to identify the connection resource of the field access. This is necessary for GenericSerialBus and GeneralPurposeIO operation region address spaces only.",
"description": "Declares a series of named data objects whose data values are fields within a larger object. The fields are parts of the object named by RegionName, but their names appear in the same scope as the Field term.\nFor example, the field operator allows a larger operation region that represents a hardware register to be broken down into individual bit fields that can then be accessed by the bit field names. Extracting and combining the component field from its parent is done automatically when the field is accessed.\nWhen reading from a FieldUnit, returned values are normalized (shifted and masked to the proper length.) The data type of an individual FieldUnit can be either a Buffer or an Integer, depending on the bit length of the FieldUnit. If the FieldUnit is smaller than or equal to the size of an Integer (in bits), it will be treated as an Integer. If the FieldUnit is larger than the size of an Integer, it will be treated as a Buffer. The size of an Integer is indicated by the DSDT header\u2019s Revision field. A revision less than 2 indicates that the size of an Integer is 32 bits. A value greater than or equal to 2 signifies that the size of an Integer is 64 bits. For more information about data types and FieldUnit type conversion rules, see Section 19.3.5.7, \u201cData Type Conversion Rules\u201d.\nAccessing the contents of a field data object provides access to the corresponding field within the parent object. If the parent object supports Mutex synchronization, accesses to modify the component data objects will acquire and release ownership of the parent object around the modification.\nThe following table relates region types declared with an OperationRegion term to the different access types supported for each region.\nTable 19-431 OperationRegion Address Spaces and Access Types\nAddress Space\nPermitted Access Type(s)\nSystemMemory\nByteAcc, WordAcc, DWordAcc, QWordAcc, or AnyAcc\nAll access allowed\nSystemIO\nByteAcc, WordAcc, DWordAcc, QWordAcc, or AnyAcc\nAll access allowed\nPCI_Config\nByteAcc, WordAcc, DWordAcc, QWordAcc, or AnyAcc\nAll access allowed\nEmbeddedControl\nByteAcc\nByte access only\nSMBus\nBufferAcc\nReads and writes to this operation region involve the use of a region specific data buffer.\n(See below.)\nSystemCMOS\nByteAcc\nByte access only\nPciBarTarget\nByteAcc, WordAcc, DWordAcc, QWordAcc, or AnyAcc\nAll access allowed\nIPMI\nBufferAcc\nReads and writes to this operation region involve the use of a region specific data buffer.\n(See below.)\nGeneralPurposeIO\nByteAcc\nByte access only\nGenericSerialBus\nBufferAcc\nReads and writes to this operation region involve the use of a region-specific data buffer.\n(See below.)\nPCC\nByteAcc\nReads and writes to this operation region are performed in units of bytes.\nThe named FieldUnit data objects are provided in the FieldList as a series of names and bit widths. Bits assigned no name (or NULL) are skipped. The ASL compiler supports the Offset (ByteOffset) macro within a FieldList to skip to the bit position of the supplied byte offset, and the AccessAs macro to change access within the field list.\nGenericSerialBus, SMBus and IPMI regions are inherently non-linear, where each offset within the respective address space represents a variable sized (0 to 32 bytes) field. Given this uniqueness, these operation regions include restrictions on their field definitions and require the use of a region-specific data buffer when initiating transactions. For more information on the SMBus data buffer format, see Section 13, \u201cACPI System Management Bus Interface Specification,\u201d. For more information on the IPMI data buffer format, see Section 5.5.2.4.4, \u201cDeclaring IPMI Operation Regions\". For more information on the Generic Serial Bus data buffer format, see Section 5.5.2.4.6 \"Declaring Generic Serial Bus Operation Regions.\"\nFor restrictions on the use of Fields with GeneralPurposeIO OpRegions, see Section 5.5.2.4.5, \"Declaring General PurposeIO Operation Regions\".",
"example": "OperationRegion (MIOC, PCI_Config, Zero, 0xFF)\nField (MIOC, AnyAcc, NoLock, Preserve)\n{\n Offset (0x58), \uf020\n HXGB, 32, \uf020\n HXGT, 32, \uf020\n GAPE, 8, \uf020\n MR0A, 4, \uf020\n MR0B, 4\n}"
},
{
"title": "FindSetLeftBit (Find First Set Left Bit)",
"syntax": "FindSetLeftBit (Source, Result) => Integer",
"arguments": "Source is evaluated as an Integer.",
"description": "The one-based bit location of the first MSb (most significant set bit) is optionally stored into Result. The result of 0 means no bit was set, 1 means the left-most bit set is the first bit, 2 means the left-most bit set is the second bit, and so on.",
"example": ""
},
{
"title": "FindSetRightBit (Find First Set Right Bit)",
"syntax": "FindSetRightBit (Source, Result) => Integer",
"arguments": "Source is evaluated as an Integer.",
"description": "The one-based bit location of the most LSb (least significant set bit) is optionally stored in Result. The result of 0 means no bit was set, 32 means the first bit set is the thirty-second bit, 31 means the first bit set is the thirty-first bit, and so on.",
"example": ""
},
{
"title": "FixedDMA (DMA Resource Descriptor Macro)",
"syntax": "FixedDMA (DmaRequestLine, Channel, DmaTransferWidth, DescriptorName) => Buffer",
"arguments": "DmaRequestLine is a system-relative number uniquely identifying the request line statically assigned to the device.. The bit field name _DMA is automatically created to refer to this portion of the resource descriptor.\nChannel is a controller-relative number uniquely identifying the channel statically assigned to this DMARequestLine. Channels can be shared by reusing Channel numbers across descriptors. The bit field name _TYP is automatically created to refer to this portion of the resource descriptor.\nDmaTransferWidth is an optional argument specifying the width of data transfer for which the device is configured. Valid values are Width8Bit, Width16Bit, Width32Bit,Width64Bit, Width 128Bit or\nWidth256Bit. If not specified, Width32Bit is assumed. The bit field name _SIZ is automatically created to refer to this portion of the resource descriptor.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.",
"description": "The FixedDMA macro evaluates to a buffer that contains a Fixed DMA Descriptor (Section 6.4.3).",
"example": ""
},
{
"title": "FixedIO (Fixed IO Resource Descriptor Macro)",
"syntax": "FixedIO (AddressBase, RangeLength, DescriptorName) => Buffer",
"arguments": "AddressBase evaluates to a 16-bit integer. It describes the starting address of the fixed I/O range. The field DescriptorName. _BAS is automatically created to refer to this portion of the resource descriptor.\nRangeLength evaluates to an 8-bit integer. It describes the length of the fixed I/O range. The field DescriptorName. _LEN is automatically created to refer to this portion of the resource descriptor.\nDescriptorName evaluates to a name string which refers to the entire resource descriptor.",
"description": "The FixedIO macro evaluates to a buffer which contains a fixed I/O resource descriptor. The format of the fixed I/O resource descriptor can be found in \u201cFixed Location I/O Port Descriptor \u201d (page 423). The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"example": ""
},
{
"title": "For (Conditional Loop)",
"syntax": "For (Initialize, Predicate, Update) {TermList}",
"arguments": "Initialize. This optional expression is evaluated once before the loop is entered. If not specified, no initialization takes place.\nPredicate. The list of terms within the TermList are executed until the predicate evaluates to zero (FALSE). If this argument is not specified, the For macro is equivalent to While(1).\nUpdate. This optional expression is evaluated once per execution of the loop, after all other terms within the TermList have been executed.",
"description": "For is a macro that creates a loop by converting the input arguments to the equivalent ASL While loop.\nNote: Creation of a named object more than once in a given scope is not allowed. As such, unconditionally creating named objects within a For loop must be avoided. A fatal error will be generated on the second iteration of the loop, during the attempt to create the same named object a second time.",
"example": "The following example shows the use of the For macro to create a loop, followed by the equivalent While loop that is actually emitted by the ASL compiler:\n for (local0 = 0, local0 < 8, local0++)\n {\n }\n Local0 = 0\n While (Local0 < 8)\n {\n Local0++\n }"
},
{
"title": "Fprintf (Create and Store formatted string)",
"syntax": "Fprintf (Destination, FormatString, FormatArgs) => String",
"arguments": "Fprintf is a macro that converts the evaluated FormatString into a series of string Concatenate operations, storing the result in Destination.\nFormatString is a string literal which may contain one or more uses of the format specifier, %o, to indicate locations in the string where an object may be inserted. %o is the only format specifier supported since the resulting object is a string and type conversion is handled automatically by Concatenate.\nFormatArgs is a comma separated list of Named Objects, Locals, or Args that can be evaluated to a string. Each argument is added to the FormatString using the Concatenate operation at the location specified by %o in order of appearance.",
"description": "Fprintf is a macro that converts the evaluated FormatString into a series of string Concatenate operations, storing the result in Destination",
"example": "The following ASL example uses Fprintf to write a formatted string of Arg0 and Arg1 to the Named Object STR1.\n Fprintf (STR1, \"%o: %o Successful\", Arg1, Arg0)\nThis Fprintf macro expression evaluates to the following ASL operation.\n Store (Concatenate (Concatenate (Concatenate (Concatenate\n (\"\", Arg1), \": \"), Arg0), \" Successful\"), STR1)"
},
{
"title": "FromBCD (Convert BCD To Integer)",
"syntax": "FromBCD (BCDValue, Result) => Integer",
"arguments": "BCDValue is evaluated as an Integer in Binary Coded Decimal format.",
"description": "The FromBCD operation converts BCDValue to a numeric format, and optionally stores the numeric value into Result.",
"example": ""
},
{
"title": "Function (Declare Control Method)",
"syntax": "Function (FunctionName, ReturnType, ParameterTypes) {TermList}",
"arguments": "ReturnType is optional and specifies the type(s) of the object(s) returned by the method. If the method does not return an object, then nothing is specified or UnknownObj is specified. To specify a single return type, simply use the ObjectTypeKeyword (e.g. IntObj, PkgObj, etc.). To specify multiple possible return types, enclose the comma-separated ObjectTypeKeywords with braces. For example: {IntObj, BuffObj}.\nParameterTypes is optional and specifies both the number and type of the method parameters. It is a comma-separated, variable-length list of the expected object type or types for each of the method parameters, enclosed in braces. For each parameter, the parameter type consists of either an\nObjectTypeKeyword or a comma-separated sub-list of ObjectTypeKeywords enclosed in braces. There can be no more than seven parameters in total.",
"description": "Function declares a named package containing a series of terms that collectively represent a control method. A control method is a procedure that can be invoked to perform computation. Function opens a name scope.\nSystem software executes a control method by executing the terms in the package in order. For more information on method execution, see Section 5.5.2, \u201cControl Method Execution.\u201d\nThe current namespace location used during name creation is adjusted to be the current location on the namespace tree. Any names created within this scope are \u201cbelow\u201d the name of this package. The current namespace location is assigned to the method package, and all namespace references that occur during control method execution for this package are relative to that location.\nFunctions are equivalent to a Method that specifies NotSerialized. As such, a function should not create any named objects, since a second thread that might re-enter the function will cause a fatal error if an attempt is made to create the same named object twice.\nNote: (Compatibility Note) New for ACPI 3.0",
"example": "The following block of ASL sample code shows the use of Function for defining a control method:\nFunction (EXAM, IntObj, {StrObj, {IntObj, StrObj}})\n{\n Name (Temp,\u201d\u201d)\n Store (Arg0, Temp) // could have used Arg1\n Return (SizeOf (Concatenate (Arg1, Temp)))\n}\nThis declaration is equivalent to:\nMethod (EXAM, 2, NotSerialized, 0, IntObj, {StrObj, {IntObj, StrObj}})\n{\n\u2026\n}"
},
{
"title": "GpioInt (GPIO Interrupt Connection Resource Descriptor Macro)",
"syntax": "",
"arguments": "EdgeLevel can be either Edge or Level. The bit field name _MOD is automatically created to refer to this portion of the resource descriptor.\nActiveLevel can be one of ActiveHigh, ActiveLow or ActiveBoth. ActiveBoth can be specified only if EdgeLevel is Edge. The bit field name _POL is automatically created to refer to this portion of the resource descriptor.\nShared is an optional argument and can be one of Shared, Exclusive, SharedAndWake or\nExclusiveAndWake. If not specified, Exclusive is assumed. The \"Wake\" designation indicates that the interrupt is capable of waking the system from a low-power idle state or a system sleep state. The bit field name _SHR is automatically created to refer to this portion of the resource descriptor.\nPinConfig can be one of PullDefault, PullUp, PullDown, PullNone or a vendor-supplied value in the range 128-255. The bit field name _PPI is automatically created to refer to this portion of the resource descriptor.\nDebounceTimeout is an optional argument specifying the debounce wait time, in hundredths of milliseconds. The bit field name _DBT is automatically created to refer to this portion of the resource descriptor.\nResourceSource is a string which uniquely identifies the GPIO controller referred to by this descriptor. ResourceSource can be a fully-qualified name, a relative name or a name segment that utilizes the namespace search rules.\nResourceSourceIndex is an optional argument and is assumed to be 0 for this revision.\nResourceUsage is an optional argument and is assumed to be ResourceConsumer for this revision.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\nVendorData is an optional argument that specifies a RawDataBuffer containing vendor-defined byte data to be decoded by the OS driver. The bit field name _VEN is automatically created to refer to this portion of the resource descriptor.\nPinList is a list of (zero-based) pin numbers on the ResourceSource that are described by this descriptor. For interrupt pin descriptors, only one pin is allowed. The bit field name _PIN is automatically created to refer to this portion of the resource descriptor.",
"description": "The GpioInt macro evaluates to a buffer that contains a GPIO Interrupt Connection resource descriptor.\nThe format of the GPIO Interrupt Connection resource descriptor can be found in \"GPIO Connection Descriptor\" (Section 6.4.3.8.1). The macro is designed to be used inside of a Resource Template (Section 19.3.3).",
"example": ""
},
{
"title": "GpioIo (GPIO Connection IO Resource Descriptor Macro)",
"syntax": "",
"arguments": "Shared is an optional argument and can be either Shared or Exclusive. If not specified, Exclusive is assumed. The bit field name _SHR is automatically created to refer to this portion of the resource descriptor.\nPinConfig can be one of PullDefault, PullUp, PullDown, PullNone or a vendor-supplied value in the range 128-255. The bit field name _PPI is automatically created to refer to this portion of the resource descriptor.\nDebounceTimeout is an optional argument specifying the hardware debounce wait time, in hundredths of milliseconds. The bit field name _DBT is automatically created to refer to this portion of the resource descriptor.\nDriveStrength is an optional argument specifying the output drive capability of the pin, in hundredths of milliamperes. The bit field name _DRS is automatically created to refer to this portion of the resource descriptor.\nIORestriction is an optional argument and can be IoRestrictionInputOnly, IoRestrictionOutputOnly, IoRestrictionNone, or IORestrictionNoneAndPreserve. IORestrictions limit the mode in which the pin can be accessed (Input or Output). They also ensure that the pin configuration is preserved during periods when the driver is unloaded or the resource has been disconnected by the driver. If not specified, IoRestrictionNone is assumed. The bit field name _IOR is automatically created to refer to this portion of the resource descriptor.\nResourceSource is a string which uniquely identifies the GPIO controller referred to by this descriptor. ResourceSource can be a fully-qualified name, a relative name or a name segment that utilizes the namespace search rules.\nResourceSourceIndex is an optional argument and is always 0 for this revision.\nResourceUsage is an optional argument and is always ResourceConsumer for this revision.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\nVendorData is an optional argument that specifies a RawDataBuffer containing vendor-defined byte data to be decoded by the OS driver. The bit field name _VEN is automatically created to refer to this portion of the resource descriptor.\nPinList is a list of pin numbers on the ResourceSource that are described by this descriptor. The bit field name _PIN is automatically created to refer to this portion of the resource descriptor.",
"description": "The GpioIo macro evaluates to a buffer that contains a GPIO IO Connection resource descriptor. The format of the GPIO IO Connection resource descriptor can be found in \"GPIO Connection Descriptor\" (Section 6.4.3.8.1). The macro is designed to be used inside of a Resource Template (Section 19.3.3).",
"example": ""
},
{
"title": "I2CSerialBusV2 (I2C Serial Bus Connection Resource Descriptor (Version 2) Macro)",
"syntax": "I2CSerialBusV2 (SlaveAddress, SlaveMode, ConnectionSpeed, AddressingMode, ResourceSource, ResourceSourceIndex, ResourceUsage, DescriptorName, Shared, VendorData)",
"arguments": "SlaveAddress is the I2C bus address for this connection. The bit field name _ADR is automatically created to refer to this portion of the resource descriptor.\nSlaveMode is an optional argument and can be either ControllerInitiated or DeviceInitiated.\nControllerInitiated is the default. The bit field name _SLV is automatically created to refer to this portion of the resource descriptor.\nConnectionSpeed is the maximum connection speed supported by this connection, in hertz. The bit field name _SPE is automatically created to refer to this portion of the resource descriptor.\nAddressingMode is an optional argument and can be either AddressingMode7Bit or\nAddressingMode10Bit. AddressingMode7Bit is the default. The bit field name _MOD is automatically created to refer to this portion of the resource descriptor.\nResourceSource is a string which uniquely identifies the I2C bus controller referred to by this descriptor. ResourceSource can be a fully-qualified name, a relative name or a name segment that utilizes the namespace search rules.\nResourceSourceIndex is an optional argument and is assumed to be 0 for this revision.\nResourceUsage is an optional argument and is assumed to be ResourceConsumer for this revision.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\nShared is an optional argument and can be either Shared or Exclusive. If not specified, Exclusive is assumed. The bit field name _SHR is automatically created to refer to this portion of the resource descriptor.\nVendorData is an optional argument that specifies an object to be decoded by the OS driver. It is a RawDataBuffer. The bit field name _VEN is automatically created to refer to this portion of the resource descriptor.",
"description": "The I2CSerialBusV2 macro evaluates to a buffer that contains an I2C Serial Bus resource descriptor (Version 2). The macro is designed to be used inside of a ResourceTemplate (see Section 19.3.3).",
"example": ""
},
{
"title": "If (Conditional Execution)",
"syntax": "If (Predicate) {TermList}",
"arguments": "Predicate is evaluated as an Integer.",
"description": "If the Predicate is non-zero, the term list of the If term is executed.",
"example": "The following examples all check for bit 3 in Local0 being set, and clear it if set.\n// example 1\nIf (And (Local0, 4))\n{\n XOr (Local0, 4, Local0)\n}\n// example 2\nStore (4, Local2)\nIf (And (Local0, Local2))\n{\n XOr (Local0, Local2, Local0) }"
},
{
"title": "Include (Include Additional ASL File)",
"syntax": "Include (FilePathName)",
"arguments": "FilePathname is a StringData data type that contains the full OS file system path.",
"description": "Include another file that contains ASL terms to be inserted in the current file of ASL terms. The file must contain elements that are grammatically correct in the current scope.",
"example": " \n Include (\"dataobj.asl\")"
},
{
"title": "Increment (Integer Increment)",
"syntax": "Increment (Addend) => Integer\nDestination = Source [Index] => ObjectReference\nAddend++ => Integer",
"arguments": "Addend is evaluated as an Integer.",
"description": "Add one to the Addend and place the result back in Addend. Equivalent to Add (Addend, 1, Addend). Overflow conditions are ignored and the result of an overflow is zero.",
"example": ""
},
{
"title": "Index (Indexed Reference To Member Object)",
"syntax": "Index (Source, Index, Destination) => ObjectReference\nDestination = Source [Index] => ObjectReference",
"arguments": "Source is evaluated to a buffer, string, or package data type. Index is evaluated to an integer. The reference to the nth object (where n = Index) within Source is optionally stored as a reference into Destination.",
"description": "When Source evaluates to a Buffer, Index returns a reference to a Buffer Field containing the nth byte in the buffer. When Source evaluates to a String, Index returns a reference to a Buffer Field containing the nth character in the string. When Source evaluates to a Package, Index returns a reference to the nth object in the package.",
"example": ""
},
{
"title": "IndexField (Declare Index/Data Fields)",
"syntax": "IndexField (IndexName, DataName, AccessType, LockRule, UpdateRule) {FieldUnitList}",
"arguments": "IndexName is evaluated as a Namestring and refers to a Field Unit object.\nDataName is evaluated as a Namestring and refers to a Field Unit object.\nAccessType, LockRule, UpdateRule, and FieldList are the same format as the Field term.",
"description": "Creates a series of named data objects whose data values are fields within a larger object accessed by an index/data-style reference to IndexName and DataName.\nThis encoding is used to define named data objects whose data values are fields within an index/data register pair. This provides a simple way to declare register variables that occur behind a typical index and data register pair.\nAccessing the contents of an indexed field data object will automatically occur through the DataName object by using an IndexName object aligned on an AccessType boundary, with synchronization occurring on the operation region that contains the index data variable, and on the Global Lock if specified by LockRule.\nThe value written to the IndexName register is defined to be a byte offset that is aligned on an AccessType boundary. For example, if AccessType is DWordAcc, valid index values are 0, 4, 8, etc. This value is always a byte offset and is independent of the width or access type of the DataName register.",
"example": "The following is a block of ASL sample code using IndexField:\nCreates an index/data register in system I/O space made up of 8-bit registers.\n \u2022 Creates a FET0 field within the indexed range.\nMethod (EX1) {\n // Define a 256-byte operational region in SystemIO space // and name it GIO0\n OperationRegion (GIO0, 1, 0x125, 0x100)\n // Create a field named Preserve structured as a sequence // of index and data bytes\n Field (GIO0, ByteAcc, NoLock, WriteAsZeros) {\n IDX0, 8,\n DAT0, 8,\n .\n .\n .\n }\n // Create an IndexField within IDX0 & DAT0 which has\n // FETs in the first two bits of indexed offset 0,\n // and another 2 FETs in the high bit on indexed\n // 2F and the low bit of indexed offset 30\n IndexField (IDX0, DAT0, ByteAcc, NoLock, Preserve) {\n FET0, 1, FET1, 1,\n Offset (0x2f), // skip to byte offset 2f\n , 7, // skip another 7 bits\n FET3, 1,\n FET4, 1\n }\n // Clear FET3 (index 2F, bit 7)\n Store (Zero, FET3)\n} // End EX1"
},
{
"title": "Interrupt (Interrupt Resource Descriptor Macro)",
"syntax": "Interrupt (ResourceUsage, EdgeLevel, ActiveLevel, Shared, ResourceSourceIndex, ResourceSource, DescriptorName) {InterruptList} => Buffer",
"arguments": "ResourceUsage describes whether the device consumes the specified interrupt (ResourceConsumer) or produces it for use by a child device (ResourceProducer). If nothing is specified, then ResourceConsumer is assumed.\nEdgeLevel describes whether the interrupt is edge triggered (Edge) or level triggered (Level). The field DescriptorName. _HE is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is Edge and \u20180\u2019 is Level.\nActiveLevel describes whether the interrupt is active-high (ActiveHigh) or active-low (ActiveLow). The field DescriptorName. _LL is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is ActiveHigh and \u20180\u2019 is ActiveLow.\nShared describes whether the interrupt can be shared with other devices (Shared) or not (Exclusive), and whether it is capable of waking the system from a low-power idle or system sleep state (SharedAndWake or ExclusiveAndWake). The field DescriptorName. _SHR is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is Shared and \u20180\u2019 is Exclusive. If nothing is specified, then Exclusive is assumed.\nResourceSourceIndex evaluates to an integer between 0x00 and 0xFF and describes the resource source index. If it is not specified, then it is not generated. If this argument is specified, the ResourceSource argument must also be specified.\nResourceSource evaluates to a string which uniquely identifies the resource source. If it is not specified, it is not generated. If this argument is specified, but the ResourceSourceIndex argument is not specified, a zero value is assumed.\nDescriptorName evaluates to a name string which refers to the entire resource descriptor.\nInterruptList is a comma-delimited list on integers, at least one value is required. Each integer represents a 32-bit interrupt number. At least one interrupt must be defined, and there may be no duplicates in the list. The field \u201cDescriptorName. _INT\u201d is automatically created to refer to this portion of the resource descriptor.",
"description": "The Interrupt macro evaluates to a buffer that contains an interrupt resource descriptor. The format of the interrupt resource descriptor can be found in Section 6.4.3.6, Extended Interrupt Descriptor. The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"example": ""
},
{
"title": "IO (IO Resource Descriptor Macro)",
"syntax": "IO (Decode, AddressMin, AddressMax, AddressAlignment, RangeLength, DescriptorName) => Buffer\nArgument\nDecode describes whether the I/O range uses 10-bit decode (Decode10) or 16-bit decode (Decode16). The field DescriptorName. _DEC is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is Decode16 and \u20180\u2019 is Decode10.\nAddressMin evaluates to a 16-bit integer that specifies the minimum acceptable starting address for the I/O range. It must be an even multiple of AddressAlignment. The field DescriptorName._MIN is automatically created to refer to this portion of the resource descriptor.\nAddressMax evaluates to a 16-bit integer that specifies the maximum acceptable starting address for the I/O range. It must be an even multiple of AddressAlignment. The field DescriptorName._MAX is automatically created to refer to this portion of the resource descriptor.\nAddressAlignment evaluates to an 8-bit integer that specifies the alignment granularity for the I/O address assigned. The field DescriptorName. _ALN is automatically created to refer to this portion of the resource descriptor.\nRangeLength evaluates to an 8-bit integer that specifies the number of bytes in the I/O range. The field DescriptorName. _LEN is automatically created to refer to this portion of the resource descriptor.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.",
"arguments": "",
"description": "The IO macro evaluates to a buffer which contains an IO resource descriptor. The format of the IO descriptor can be found in \u201cI/O Port Descriptor\u201d (page 419). The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"example": ""
},
{
"title": "IRQ (Interrupt Resource Descriptor Macro)",
"syntax": "IRQ (EdgeLevel, ActiveLevel, Shared, DescriptorName) {InterruptList} => Buffer",
"arguments": "EdgeLevel describes whether the interrupt is edge triggered (Edge) or level triggered (Level). The field DescriptorName. _HE is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is Edge and ActiveHigh and \u20180\u2019 is Level and ActiveLow.\nActiveLevel describes whether the interrupt is active-high (ActiveHigh) or active-low (ActiveLow). The field DescriptorName. _LL is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is Edge and ActiveHigh and \u20180\u2019 is Level and ActiveLow.\nShared describes whether the interrupt can be shared with other devices (Shared) or not (Exclusive), and whether it is capable of waking the system from a low-power idle or system sleep state (SharedAndWake or ExclusiveAndWake). The field DescriptorName. _SHR is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is Shared and \u20180\u2019 is Exclusive. If nothing is specified, then Exclusive is assumed.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\nInterruptList is a comma-delimited list of integers in the range 0 through 15, at least one value is required. There may be no duplicates in the list.",
"description": "The IRQ macro evaluates to a buffer that contains an IRQ resource descriptor. The format of the IRQ descriptor can be found in \u201cIRQ Descriptor\u201d ((page 419). The macro produces the three-byte form of the descriptor. The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"example": ""
},
{
"title": "IRQNoFlags (Interrupt Resource Descriptor Macro)",
"syntax": "IRQNoFlags (DescriptorName) {InterruptList} => Buffer",
"arguments": "DescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer.\nInterruptList is a comma-delimited list of integers in the range 0 through 15, at least one value is required. There may be no duplicates in the list Description\nThe IRQNoFlags macro evaluates to a buffer which contains an active-high, edge-triggered IRQ resource descriptor. The format of the IRQ descriptor can be found in IRQ Descriptor (page 419). The macro produces the two-byte form of the descriptor. The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"description": "",
"example": ""
},
{
"title": "LAnd (Logical And)",
"syntax": "LAnd (Source1, Source2) => Boolean\nSource1 && Source2 => Boolean",
"arguments": "Source1 and Source2 are evaluated as integers.",
"description": "If both values are non-zero, True is returned: otherwise, False is returned.",
"example": ""
},
{
"title": "LEqual (Logical Equal)",
"syntax": "LEqual (Source1, Source2) => Boolean\nSource1 == Source2 => Boolean",
"arguments": "Source1 and Source2 must each evaluate to an integer, a string, or a buffer. The data type of Source1 dictates the required type of Source2. Source2 is implicitly converted if necessary to match the type of Source1.",
"description": "If the values are equal, True is returned; otherwise, False is returned. For integers, a numeric compare is performed. For strings and buffers, True is returned only if both lengths are the same and the result of a byte-wise compare indicates exact equality.",
"example": ""
},
{
"title": "LGreater (Logical Greater)",
"syntax": "LGreater (Source1, Source2) => Boolean\nSource1 > Source2 => Boolean",
"arguments": "Source1 and Source2 must each evaluate to an integer, a string, or a buffer. The data type of Source1 dictates the required type of Source2. Source2 is implicitly converted if necessary to match the type of Source1.",
"description": "If Source1 is greater than Source2, True is returned; otherwise, False is returned. For integers, a numeric comparison is performed. For strings and buffers, a lexicographic comparison is performed. True is returned if a byte-wise (unsigned) compare discovers at least one byte in Source1 that is numerically greater than the corresponding byte in Source2. False is returned if at least one byte in Source1 is numerically less than the corresponding byte in Source2. In the case of byte-wise equality, True is returned if the length of Source1 is greater than Source2, False is returned if the length of Source1 is less than or equal to Source2.",
"example": ""
},
{
"title": "LGreaterEqual (Logical Greater Than Or Equal)",
"syntax": "LGreaterEqual (Source1, Source2) => Boolean\nSource1 >= Source2 => Boolean",
"arguments": "Source1 and Source2 must each evaluate to an integer, a string, or a buffer. The data type of Source1 dictates the required type of Source2. Source2 is implicitly converted if necessary to match the type of Source1.",
"description": "If Source1 is greater than or equal to Source2, True is returned; otherwise, False is returned. Equivalent to LNot(LLess()). See the description of the LLess operator.",
"example": ""
},
{
"title": "LLess (Logical Less)",
"syntax": "LLess (Source1, Source2) => Boolean\nSource1 < Source2 => Boolean",
"arguments": "Source1 and Source2 must each evaluate to an integer, a string, or a buffer. The data type of Source1 dictates the required type of Source2. Source2 is implicitly converted if necessary to match the type of Source1.",
"description": "If Source1 is less than Source2, True is returned; otherwise, False is returned. For integers, a numeric comparison is performed. For strings and buffers, a lexicographic comparison is performed. True is returned if a byte-wise (unsigned) compare discovers at least one byte in Source1 that is numerically less than the corresponding byte in Source2. False is returned if at least one byte in Source1 is numerically greater than the corresponding byte in Source2. In the case of byte-wise equality, True is returned if the length of Source1 is less than Source2, False is returned if the length of Source1 is greater than or equal to Source2.",
"example": ""
},
{
"title": "LLessEqual (Logical Less Than Or Equal)",
"syntax": "LLessEqual (Source1, Source2) => Boolean\nSource1 <= Source2 => Boolean",
"arguments": "Source1 and Source2 must each evaluate to an integer, a string, or a buffer. The data type of Source1 dictates the required type of Source2. Source2 is implicitly converted if necessary to match the type of Source1.",
"description": "If Source1 is less than or equal to Source2, True is returned; otherwise False is returned. Equivalent to LNot(LGreater()). See the description of the LGreater operator.",
"example": ""
},
{
"title": "LNot (Logical Not)",
"syntax": "LNot (Source) => Boolean\n!Source => Boolean",
"arguments": "Source is evaluated as an integer.",
"description": "If the value is zero True is returned; otherwise, False is returned.",
"example": ""
},
{
"title": "LNotEqual (Logical Not Equal) )",
"syntax": "LNotEqual (Source1, Source2) => Boolean\nSource1 != Source2 => Boolean",
"arguments": "Source1 and Source2 must each evaluate to an integer, a string, or a buffer. The data type of Source1 dictates the required type of Source2. Source2 is implicitly converted if necessary to match the type of Source1.",
"description": "If Source1 is not equal to Source2, True is returned; otherwise False is returned. Equivalent to LNot(LEqual()).See the description of the LEqual operator.",
"example": ""
},
{
"title": "Load (Load Definition Block)",
"syntax": "Load (Object, DDBHandle)",
"arguments": "The Object parameter can refer to one of the following object types:\n1. An operation region field\n2. An operation region directly\n3. An ASL Buffer object\nIf the object is an operation region, the operation region must be in SystemMemory space. The Definition Block should contain an ACPI DESCRIPTION_HEADER of type SSDT.\nThe Definition Block must be totally contained within the supplied operation region, operation region field, or Buffer object. OSPM reads this table into memory, the checksum is verified, and then it is loaded into the ACPI namespace.",
"description": "Performs a run-time load of a Definition Block. Any table loaded via an operation region must be in memory marked as AddressRangeReserved or AddressRangeNVS. The OS can also check the OEM Table ID and Revision ID against a database for a newer revision Definition Block of the same OEM Table ID and load it instead.\nThe default namespace location to load the Definition Block is relative to the root of the namespace. The new Definition Block can override this by specifying absolute names or by adjusting the namespace location using the Scope operator.\nLoading a Definition Block is a synchronous operation. Upon completion of the operation, the Definition Block has been loaded. The control methods defined in the Definition Block are not executed during load time.",
"example": ""
},
{
"title": "LoadTable (Load Definition Block From XSDT)",
"syntax": "LoadTable (SignatureString, OEMIDString, OEMTableIDString, RootPathString, ParameterPathString, ParameterData) => DDBHandle",
"arguments": "The XSDT is searched for a table where the Signature field matches SignatureString, the OEM ID field matches OEMIDString, and the OEM Table ID matches OEMTableIDString. All comparisons are case sensitive. If the SignatureString is greater than four characters, the OEMIDString is greater than six characters, or the OEMTableID is greater than eight characters, a run-time error is generated. The OS can also check the OEM Table ID and Revision ID against a database for a newer revision Definition Block of the same OEM Table ID and load it instead.\nThe RootPathString specifies the root of the Definition Block. It is evaluated using normal scoping rules, assuming that the scope of the LoadTable instruction is the current scope. The new Definition Block can override this by specifying absolute names or by adjusting the namespace location using the Scope operator. If RootPathString is not specified, \u201c\\\u201d is assumed\nIf ParameterPathString and ParameterData are specified, the data object specified by ParameterData is stored into the object specified by ParameterPathString after the table has been added into the namespace. If the first character of ParameterPathString is a backslash (\u2018\\\u2019) or caret (\u2018^\u2019) character, then the path of the object is ParameterPathString. Otherwise, it is RootPathString.ParameterPathString. If the specified object does not exist, a run-time error is generated.\nThe handle of the loaded table is returned. If no table matches the specified signature, then 0 is returned.",
"description": "Performs a run-time load of a Definition Block from the XSDT. Any table referenced by LoadTable must be in memory marked by AddressRangeReserved or AddressRangeNVS.\nNote: OSPM loads the DSDT and all SSDTs during initialization. As such, Definition Blocks to be conditionally loaded via LoadTable must contain signatures other than \u201cSSDT\u201d.\nLoading a Definition Block is a synchronous operation. Upon completion of the operation, the Definition Block has been loaded. The control methods defined in the Definition Block are not executed during load time.",
"example": " Store (LoadTable (\u201cOEM1\u201d, \u201dMYOEM\u201d, \u201dTABLE1\u201d, \u201d\\\\_SB.PCI0\u201d,\u201dMYD\u201d,\n Package () {0,\u201d\\\\_SB.PCI0\u201d}), Local0)\nThis operation would search through the RSDT or XSDT for a table with the signature \u201cOEM1,\u201d the OEM ID of \u201cMYOEM,\u201d and the table ID of \u201cTABLE1.\u201d If not found, it would store Zero in Local0. Otherwise, it will store a package containing 0 and \u201c\\\\_SB.PCI0\u201d into the variable at \\_SB.PCI0.MYD."
},
{
"title": "Localx (Method Local Data Objects)",
"syntax": "Local0 | Local1 | Local2 | Local3 | Local4 | Local5 | Local6 | Local7",
"arguments": "",
"description": "Up to 8 local objects can be referenced in a control method. On entry to a control method, these objects are uninitialized and cannot be used until some value or reference is stored into the object. Once initialized, these objects are preserved in the scope of execution for that control method.",
"example": ""
},
{
"title": "LOr (Logical Or)",
"syntax": "LOr (Source1, Source2) => Boolean\nSource1 || Source2 => Boolean",
"arguments": "Source1 and Source2 are evaluated as integers.",
"description": "If either value is non-zero, True is returned; otherwise, False is returned.",
"example": ""
},
{
"title": "Match (Find Object Match)",
"syntax": "Match (SearchPackage, Op1, MatchObject1, Op2, MatchObject2, StartIndex) => Ones | Integer",
"arguments": "SearchPackage is evaluated to a package object and is treated as a one-dimension array. Each package element must evaluate to either an integer, a string, or a buffer. Uninitialized package elements and elements that do not evaluate to integers, strings, or buffers are ignored. Op1 and Op2 are match operators. MatchObject1 and MatchObject2 are the objects to be matched and must each evaluate to either an integer, a string, or a buffer. StartIndex is the starting index within the SearchPackage.",
"description": "A comparison is performed for each element of the package, starting with the index value indicated by StartIndex (0 is the first element). If the element of SearchPackage being compared against is called P[i], then the comparison is:\nIf (P[i] Op1 MatchObject1) and (P[i] Op2 MatchObject2) then Match => i is returned.\nIf the comparison succeeds, the index of the element that succeeded is returned; otherwise, the constant object Ones is returned. The data type of the MatchObject dictates the required type of the package element. If necessary, the package element is implicitly converted to match the type of the MatchObject. If the implicit conversion fails for any reason, the package element is ignored (no match.)\nOp1 and Op2 have the values and meanings listed in the following table.\nTable 19-432 Match Term Operator Meanings\nOperator\nEncoding\nMacro\nTRUE A don\u2019t care, always returns TRUE\n0\nMTR\nEQ Returns TRUE if P[i] == MatchObject\n1\nMEQ\nLE Returns TRUE if P[i] <= MatchObject\n2\nMLE\nLT Returns TRUE if P[i] < MatchObject\n3\nMLT\nGE Returns TRUE if P[i] >= MatchObject\n4\nMGE\nGT Returns TRUE if P[i] > MatchObject\n5\nMGT",
"example": "Following are some example uses of Match:\nName (P1,\n Package () {1981, 1983, 1985, 1987, 1989, 1990, 1991, 1993, 1995, 1997, 1999,\n2001}\n)\n// match 1993 == P1[i]\nMatch (P1, MEQ, 1993, MTR, 0, 0) // -> 7, since P1[7] == 1993\n// match 1984 == P1[i]\nMatch (P1, MEQ, 1984, MTR, 0, 0) // -> ONES (not found)\n// match P1[i] > 1984 and P1[i] <= 2000\nMatch (P1, MGT, 1984, MLE, 2000, 0) // -> 2, since P1[2]>1984 and P1[2]<=2000\n// match P1[i] > 1984 and P1[i] <= 2000, starting with 3rd element\nMatch (P1, MGT, 1984, MLE, 2000, 3) // -> 3, first match at or past Start"
},
{
"title": "Memory24 (Memory Resource Descriptor Macro)",
"syntax": "Memory24 (ReadAndWrite, AddressMinimum, AddressMaximum, AddressAlignment, RangeLength, DescriptorName)",
"arguments": "ReadAndWrite specifies whether or not the memory region is read-only (ReadOnly) or read/write (ReadWrite). If nothing is specified, then ReadWrite is assumed. The 1-bit field DescriptorName._RW is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is ReadWrite and \u20180\u2019 is ReadOnly.\nAddressMinimum evaluates to a 16-bit integer that specifies bits [8:23] of the lowest possible base address of the memory range. All other bits are assumed to be zero. The value must be an even multiple of AddressAlignment. The 16-bit field DescriptorName._MIN is automatically created to refer to this portion of the resource descriptor.\nAddressMaximum evaluates to a 16-bit integer that specifies bits [8:23] of the highest possible base address of the memory range. All other bits are assumed to be zero. The value must be an even multiple of AddressAlignment. The 16-bit field DescriptorName._MAX is automatically created to refer to this portion of the resource descriptor.\nAddressAlignment evaluates to a 16-bit integer that specifies bits [0:15] of the required alignment for the memory range. All other bits are assumed to be zero. The address selected must be an even multiple of this value. The 16-bit field DescriptorName. _ALN is automatically created to refer to this portion of the resource descriptor.\nRangeLength evaluates to a 16-bit integer that specifies the total number of bytes decoded in the memory range. The 16-bit field DescriptorName. _LEN is automatically created to refer to this portion of the resource descriptor. The range length provides the length of the memory range in 256 byte blocks.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.",
"description": "The Memory24 macro evaluates to a buffer which contains an 24-bit memory descriptor. The format of the 24-bit memory descriptor can be found in \u201c24-Bit Memory Range Descriptor \u201d (page 426). The macro is designed to be used inside of a ResourceTemplate (page 1033).\nNote: The use of Memory24 is deprecated and should not be used in new designs.",
"example": ""
},
{
"title": "Memory32 (Memory Resource Descriptor Macro)",
"syntax": "Memory32 (ReadAndWrite, AddressMinimum, AddressMaximum, AddressAlignment, RangeLength, DescriptorName)",
"arguments": "ReadAndWrite specifies whether or not the memory region is read-only (ReadOnly) or read/write (ReadWrite). If nothing is specified, then ReadWrite is assumed. The 1-bit field DescriptorName._RW is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is ReadWrite and \u20180\u2019 is ReadOnly.\nAddressMinimum evaluates to a 32-bit integer that specifies the lowest possible base address of the memory range. The value must be an even multiple of AddressAlignment. The 32-bit field DescriptorName._MIN is automatically created to refer to this portion of the resource descriptor.\nAddressMaximum evaluates to a 32-bit integer that specifies the highest possible base address of the memory range. The value must be an even multiple of AddressAlignment. The 32-bit field\nDescriptorName._MAX is automatically created to refer to this portion of the resource descriptor.\nAddressAlignment evaluates to a 32-bit integer that specifies the required alignment for the memory range. The address selected must be an even multiple of this value. The 32-bit field DescriptorName. _ALN is automatically created to refer to this portion of the resource descriptor.\nRangeLength evaluates to a 32-bit integer that specifies the total number of bytes decoded in the memory range. The 32-bit field DescriptorName. _LEN is automatically created to refer to this portion of the resource descriptor. The range length provides the length of the memory range in 1 byte blocks.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.",
"description": "The Memory32 macro evaluates to a buffer which contains a 32-bit memory descriptor, which describes a memory range with a minimum, a maximum and an alignment. The format of the 32-bit memory descriptor can be found in \u201c32-Bit Memory Range Descriptor \u201d (page 427). The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"example": ""
},
{
"title": "Memory32Fixed (Memory Resource Descriptor Macro)",
"syntax": "Memory32Fixed (ReadAndWrite, AddressBase, RangeLength, DescriptorName)",
"arguments": "ReadAndWrite specifies whether or not the memory region is read-only (ReadOnly) or read/write (ReadWrite). If nothing is specified, then ReadWrite is assumed. The 1-bit field DescriptorName._RW is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is ReadWrite and \u20180\u2019 is ReadOnly.\nAddressBase evaluates to a 32-bit integer that specifies the base address of the memory range. The 32bit field DescriptorName. _BAS is automatically created to refer to this portion of the resource descriptor.\nRangeLength evaluates to a 32-bit integer that specifies the total number of bytes decoded in the memory range. The 32-bit field DescriptorName. _LEN is automatically created to refer to this portion of the resource descriptor.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.",
"description": "The Memory32Fixed macro evaluates to a buffer which contains a 32-bit memory descriptor, which describes a fixed range of memory addresses. The format of the fixed 32-bit memory descriptor can be found in 32-Bit Fixed Memory Range Descriptor (page 429). The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"example": ""
},
{
"title": "Method (Declare Control Method)",
"syntax": "Method (MethodName, NumArgs, SerializeRule, SyncLevel, ReturnType, ParameterTypes) {TermList}",
"arguments": "MethodName is evaluated as a Namestring data type.\nNumArgs is optional and is the required number of arguments to be passed to the method, evaluated as an Integer data type. If not specified, the default value is zero arguments. Up to 7 arguments may be passed to a method. These arguments may be referenced from within the method as Arg0 through Arg6.\nSerializeRule is optional and is a flag that defines whether the method is serialized or not and is one of the following: Serialized or NotSerialized. A method that is serialized cannot be reentered by additional threads. If not specified, the default is NotSerialized.\nSyncLevel is optional and specifies the synchronization level for the method (0 15). If not specified, the default sync level is zero.\nReturnType is optional and specifies the type(s) of the object(s) returned by the method. If the method does not return an object, then nothing is specified or UnknownObj is specified. To specify a single return type, simply use the ObjectTypeKeyword (e.g. IntObj, PkgObj, etc.). To specify multiple possible return types, enclose the comma-separated ObjectTypeKeywords with braces. For example: {IntObj, BuffObj}.\nParameterTypes is optional and specifies the type of the method parameters. It is a comma-separated, variable-length list of the expected object type or types for each of the method parameters, enclosed in braces. For each parameter, the parameter type consists of either an ObjectTypeKeyword or a commaseparated sub-list of ObjectTypeKeywords enclosed in braces. If ParameterTypes is specified, the number of parameters must match NumArgs.\nTermList is a variable-length list of executable ASL statements representing the body of the control method.",
"description": "Creates a new control method of name MethodName. This is a named package containing a series of object references that collectively represent a control method, which is a procedure that can be invoked to perform computation. Method opens a name scope.\nSystem software executes a control method by referencing the objects in the package in order. For more information on method execution, see Section 5.5.2, \u201cControl Method Execution.\u201d\nThe current namespace location used during name creation is adjusted to be the current location on the namespace tree. Any names created within this scope are \u201cbelow\u201d the name of this package. The current namespace location is assigned to the method package, and all namespace references that occur during control method execution for this package are relative to that location.\nIf a method is declared as Serialized, an implicit mutex associated with the method object is acquired at the specified SyncLevel. If no SyncLevel is specified, SyncLevel 0 is assumed. The serialize rule can be used to prevent reentering of a method. This is especially useful if the method creates namespace objects.\nWithout the serialize rule, the reentering of a method will fail when it attempts to create the same namespace object.\nThere are eight local variables automatically available for each method, referenced as Local0 through Local7. These locals may be used to store any type of ASL object.\nAlso notice that all namespace objects created by a method have temporary lifetime. When method execution exits, the created objects will be destroyed.",
"example": "The following block of ASL sample code shows a use of Method for defining a control method that turns on a power resource.\nMethod (_ON) {\n Store (One, GIO.IDEP) // assert power Sleep (10) // wait 10ms\n Store (One, GIO.IDER) // de-assert reset#\n Stall (10) // wait 10us\n Store (Zero, GIO.IDEI) // de-assert isolation }\nThis method is an implementation of _SRS (Set Resources). It shows the use of a method argument and two method locals.\nMethod (_SRS, 1, NotSerialized)\n{\n CreateWordField (Arg0, One, IRQW)\n Store (\\_SB.PCI0.PID1.IENA, Local1)\n Or (IRQW, Local1, Local1)\n Store (Local1, \\_SB.PCI0.PID1.IENA)\n FindSetRightBit (IRQW, Local0)\n If (Local0)\n {\n Decrement (Local0)\n Store (Local0, \\_SB.PCI0.PID1.IN01)\n }\n}"
},
{
"title": "Mid (Extract Portion of Buffer or String)",
"syntax": "Mid (Source, Index, Length, Result) => Buffer or String",
"arguments": "Source is evaluated as either a Buffer or String. Index and Length are evaluated as Integers.",
"description": "If Source is a buffer, then Length bytes, starting with the Indexth byte (zero-based) are optionally copied into Result. If Index is greater than or equal to the length of the buffer, then the result is an empty buffer. Otherwise, if Index + Length is greater than or equal to the length of the buffer, then only bytes up to and including the last byte are included in the result.\nIf Source is a string, then Length characters, starting with the Indexth character (zero-based) are optionally copied into Result. If Index is greater than or equal to the length of the buffer, then the result is an empty string. Otherwise, if Index + Length is greater than or equal to the length of the string, then only bytes up to an including the last character are included in the result.",
"example": ""
},
{
"title": "Mod (Integer Modulo)",
"syntax": "Mod (Dividend, Divisor, Result) => Integer\nResult = Dividend % Divisor => Integer\nResult %= Divisor => Integer",
"arguments": "Dividend and Divisor are evaluated as Integers.",
"description": "The Dividend is divided by Divisor, and then the resulting remainder is optionally stored into Result. If Divisor evaluates to zero, a fatal exception is generated.",
"example": ""
},
{
"title": "Multiply (Integer Multiply)",
"syntax": "Multiply (Multiplicand, Multiplier, Result) => Integer\nResult = Multiplicand * Multiplier => Integer\nResult *= Multiplier => Integer",
"arguments": "Multiplicand and Multiplier are evaluated as Integers.",
"description": "The Multiplicand is multiplied by Multiplier and the result is optionally stored into Result. Overflow conditions are ignored and results are undefined.",
"example": ""
},
{
"title": "Mutex (Declare Synchronization/Mutex Object)",
"syntax": "Mutex (MutexName, SyncLevel)",
"arguments": "The MutexName is evaluated as a Namestring data type.\nThe SyncLevel is optional and specifies the logical nesting level of the Mutex synchronization object. The current sync level is maintained internally for a thread, and represents the greatest SyncLevel among mutex objects that are currently acquired by the thread. The SyncLevel of a thread, before acquiring any mutexes, is zero. The SyncLevel of the Global Lock (\\_GL) is zero. If not specified, the default sync level value is zero.",
"description": "Creates a data mutex synchronization object named MutexName, with a synchronization level from 0 to 15 as specified by the Integer SyncLevel.\nA mutex synchronization object provides a control method with a mechanism for waiting for certain events. To prevent deadlocks, wherever more than one synchronization object must be owned, the synchronization objects must always be released in the order opposite the order in which they were acquired.\nThe SyncLevel parameter declares the logical nesting level of the synchronization object. The current sync level is maintained internally for a thread, and represents the greatest SyncLevel among mutex objects that are currently acquired by the thread. The SyncLevel of a thread before acquiring any mutexes is zero. The SyncLevel of the Global Lock (\\_GL) is zero.\nAll Acquire terms must refer to a synchronization object with a SyncLevel that is equal or greater than the current level, and all Release terms must refer to a synchronization object with a SyncLevel that is equal to the current level.\nMutex synchronization provides the means for mutually exclusive ownership. Ownership is acquired using an Acquire term and is released using a Release term. Ownership of a Mutex must be relinquished before completion of any invocation. For example, the top-level control method cannot exit while still holding ownership of a Mutex. Acquiring ownership of a Mutex can be nested (can be acquired multiple times by the same thread).",
"example": ""
},
{
"title": "Name (Declare Named Object)",
"syntax": "Name (ObjectName, Object)",
"arguments": "Creates a new object named ObjectName. Attaches Object to ObjectName in the Global ACPI namespace.",
"description": "Creates ObjectName in the namespace, which references the Object.",
"example": "The following example creates the name PTTX in the root of the namespace that references a package.\nName (\\PTTX, // Port to Port Translate Table\n Package () {Package () {0x43, 0x59}, Package) {0x90, 0xFF}} )\nThe following example creates the name CNT in the root of the namespace that references an integer data object with the value 5.\nName (\\CNT, 5)"
},
{
"title": "NAnd (Integer Bitwise Nand)",
"syntax": "NAnd (Source1, Source2, Result) => Integer",
"arguments": "Source1 and Source2 are evaluated as Integers.",
"description": "A bitwise NAND is performed and the result is optionally stored in Result.",
"example": ""
},
{
"title": "NoOp Code (No Operation)",
"syntax": "NoOp",
"arguments": "",
"description": "This operation has no effect.",
"example": ""
},
{
"title": "NOr (Integer Bitwise Nor)",
"syntax": "NOr (Source1, Source2, Result) => Integer",
"arguments": "Source1 and Source2 are evaluated as Integers.",
"description": "A bitwise NOR is performed and the result is optionally stored in Result.",
"example": ""
},
{
"title": "Not (Integer Bitwise Not)",
"syntax": "Not (Source, Result) => Integer\nResult = ~Source => Integer",
"arguments": "Source is evaluated as an integer data type.\nA bitwise NOT is performed and the result is optionally stored in Result.",
"description": "",
"example": ""
},
{
"title": "Notify (Notify Object of Event)",
"syntax": "Notify (Object, NotificationValue)",
"arguments": "Notifies the OS that the NotificationValue for the Object has occurred. Object must be a reference to a device, processor, or thermal zone object.",
"description": "Object type determines the notification values. For example, the notification values for a thermal zone object are different from the notification values used for a device object. Undefined notification values are treated as reserved and are ignored by the OS.\nFor lists of defined Notification values, see Section 5.6.6, \u201cDevice Object Notifications.\u201d",
"example": ""
},
{
"title": "Offset (Change Current Field Unit Offset)",
"syntax": "Offset (ByteOffset)",
"arguments": "ByteOffset is the new offset (in bytes) for the next FieldUnit within a FieldList.",
"description": "The Offset operator is used within a FieldList to specify the byteOffset of the next defined field within its parent operation region. This can be used instead of defining the bit lengths that need to be skipped. All offsets are defined starting from zero, based at the starting address of the parent region.",
"example": ""
},
{
"title": "ObjectType (Get Object Type)",
"syntax": "ObjectType (Object) => Integer",
"arguments": "Object is any valid object.",
"description": "The execution result of this operation is an integer that has the numeric value of the object type for Object.\nThe object type codes are listed in Table 18-20. Notice that if this operation is performed on an object reference such as one produced by the Alias, Index, or RefOf statements, the object type of the base object is returned. For typeless objects such as predefined scope names (in other words, \\_SB, \\_GPE, etc.), the type value 0 (Uninitialized) is returned.\nTable 19-433 TValues Returned By the ObjectType Operator\nValue\nObject\n0\nUninitialized\n1\nInteger\n2\nString\n3\nBuffer\n4\nPackage\n5\nField Unit\n6\nDevice\n7\nEvent\n8\nMethod\n9\nMutex\n10\nOperation Region\n11\nPower Resource\n12\nProcessor\n13\nThermal Zone\n14\nBuffer Field\n15\nDDB Handle\n16\nDebug Object\n>16\nReserved",
"example": ""
},
{
"title": "One (Constant One Integer)",
"syntax": "One=> Integer",
"arguments": "",
"description": "The One operator returns an Integer with the value 1. Writes to this object are not allowed. The use of this operator can reduce AML code size, since it is represented by a one-byte AML opcode.",
"example": ""
},
{
"title": "Ones (Constant Ones Integer)",
"syntax": "Ones=> Integer\nThe Ones operator returns an Integer with all bits set to 1. Writes to this object are not allowed. The use of this operator can reduce AML code size, since it is represented by a one-byte AML opcode.\nNote: The actual value of the integer returned by the Ones operator depends on the integer width of the\nDSDT. If the revision of the DSDT is 1 or less, the integer width is 32 bits and Ones returns 0xFFFFFFFF. If the revision of the DSDT is 2 or greater, the integer width is 64 bits and Ones returns 0xFFFFFFFFFFFFFFFF. This difference must be considered when performing comparisons against the Ones Integer.",
"arguments": "",
"description": "",
"example": ""
},
{
"title": "OperationRegion (Declare Operation Region)",
"syntax": "OperationRegion (RegionName, RegionSpace, Offset, Length)",
"arguments": "Declares an operation region named RegionName. Offset is the offset within the selected RegionSpace at which the region starts (byte-granular), and Length is the length of the region in bytes.",
"description": "An Operation Region is a type of data object where read or write operations to the data object are performed in some hardware space. For example, the Definition Block can define an Operation Region within a bus, or system I/O space. Any reads or writes to the named object will result in accesses to the I/ O space.\nOperation regions are regions in some space that contain hardware registers for exclusive use by ACPI control methods. In general, no hardware register (at least byte-granular) within the operation region accessed by an ACPI control method can be shared with any accesses from any other source, with the exception of using the Global Lock to share a region with the firmware. The entire Operation Region can be allocated for exclusive use to the ACPI subsystem in the host OS.\nOperation Regions that are defined within the scope of a method are the exception to this rule. These Operation Regions are known as \u201cDynamic\u201d since the OS has no idea that they exist or what registers they use until the control method is executed. Using a Dynamic SystemIO or SystemMemory Operation Region is not recommended since the OS cannot guarantee exclusive access. All other types of Operation Regions may be Dynamic.\nOperation Regions define the overall base address and length of a hardware region, but they cannot be accessed directly by AML code. A Field object containing one or more FieldUnits is used to overlay the Operation Region in order to access individual areas of the Region. An individual FieldUnit within an Operation Region may be as small as one bit, or as large as the length of the entire Region. FieldUnit values are normalized (shifted and masked to the proper length.) The data type of a FieldUnit can be either a Buffer or an Integer, depending on the bit length of the FieldUnit. If the FieldUnit is smaller than or equal to the size of an Integer (in bits), it will be treated as an Integer. If the FieldUnit is larger than the size of an Integer, it will be treated as a Buffer. The size of an Integer is indicated by the DSDT header\u2019s Revision field. A revision less than 2 indicates that the size of an Integer is 32 bits. A value greater than or equal to 2 signifies that the size of an Integer is 64 bits. For more information about data types and FieldUnit type conversion rules, see Section 19.3.5.7, \u201cData Type Conversion Rules\u201d.\nAn Operation Region object implicitly supports Mutex synchronization. Updates to the object, or a Field data object for the region, will automatically synchronize on the Operation Region object; however, a control method may also explicitly synchronize to a region to prevent other accesses to the region (from other control methods). Notice that according to the control method execution model, control method execution is non-preemptive. Because of this, explicit synchronization to an Operation Region needs to be done only in cases where a control method blocks or yields execution and where the type of register usage requires such synchronization.\nThe predefined Operation Region types specified in ACPI are shown in the Table 5-160 on page 275.",
"example": "The following example ASL code shows the use of OperationRegion combined with Field to describe IDE 0 and 1 controlled through general I/O space, using one FET.\nOperationRegion (GIO, SystemIO, 0x125, 0x1)\nField (GIO, ByteAcc, NoLock, Preserve) {\n IDEI, 1, // IDEISO_EN - isolation buffer\n IDEP, 1, // IDE_PWR_EN - power\n IDER, 1 // IDERST#_EN - reset# }"
},
{
"title": "Or (Integer Bitwise Or)",
"syntax": "Or (Source1, Source2, Result) => Integer\nResult = Source1 | Source2 => Integer\nResult |= Source1 => Integer",
"arguments": "Source1 and Source2 are evaluated as Integers.",
"description": "A bitwise OR is performed and the result is optionally stored in Result.",
"example": ""
},
{
"title": "Package (Declare Package Object)",
"syntax": "Package (NumElements) {PackageList} => Package",
"arguments": "NumElements is evaluated as an Integer. PackageList is an initializer list of objects.\nDeclares an unnamed aggregation of named data items, constants, and/or references to non-data namespace objects. The size of the package is NumElements. The PackageList contains the data items, constants, and/or object references used to initialize the package.\nIf NumElements is absent, it is automatically set by the ASL compiler to match the number of elements in the PackageList. If NumElements is present and greater than the number of elements in the PackageList, the default entry of type Uninitialized (see ObjectType) is used to initialize the package elements beyond those initialized from the PackageList.\nThere are three types of package elements allowed in the PackageList: ConstantData Objects(Integers, Strings, Buffers, and Packages), named references that resolve to Data Objects (Integers, Strings, Buffers, and Packages), and named references to objects other than Data Objects.\nThese constant terms are resolved at ASL compile time:\n\u2022 Integer Constant\n\u2022 String Constant\n\u2022 Buffer Constant\n\u2022 Package Constant\nThese Named References to Data Objects are resolved to actual data by the AML Interpreter at runtime:\n\u2022 Integer reference\n\u2022 String reference\n\u2022 Buffer reference\n\u2022 Buffer Field reference\n\u2022 Field Unit reference\n\u2022 Package reference\nThese Named References to non-Data Objects cannot be resolved to values. They are instead returned in the package as references:\n\u2022 Device reference\n\u2022 Event reference\n\u2022 Method reference\n\u2022 Mutex reference\n\u2022 Operation Region reference\n\u2022 Power Resource reference\n\u2022 Processor reference\n\u2022 Thermal Zone reference\nNote: For Package elements of type Package (defining a subpackage), individual elements of the subpackage are resolved according to the rules above, both compile-time and runtime.\nEvaluating an uninitialized element will yield a runtime error, but elements can be assigned values at runtime to define them (via the Index operator). It is a compile time error for NumElements to be less than the number of elements defined in the PackageList.\nThe ASL compiler can emit two different AML opcodes for a Package declaration, either PackageOp or VarPackageOp. For small, fixed-length packages, the PackageOp is used and this opcode is compatible with ACPI 1.0. A VarPackageOp will be emitted if any of the following conditions are true:\n\u2022 The NumElements argument is a TermArg that can only be resolved at runtime.\n\u2022 At compile time, NumElements resolves to a constant that is larger than 255.\n\u2022 The PackageList contains more than 255 initializer elements.",
"description": "",
"example": "Name (INT1, 0x1234)\nProcessor (CPU0, 0, 0x1010, 6) {}\nPowerResource (PWR1, 0, 0) {}\nName (PKG1, Package () {\n 0x3400, // Integer Constant, resolved at compile time\n \"Processor\" // String Constant, resolved at compile time\n \\INT1 // Integer Reference, resolved to value at\n // runtime\n \\CPU0 // Object Reference, returned as a reference\n // object\n Package () { // Package Constant. Elements are resolved at\n // both compile time and runtime\n 0x4321, // Integer Constant, resolved at compile time\n \\INT1, // Integer Reference, resolved to value at\n // runtime\n \\PWR1\n })\nThe runtime values of the parent package and subpackages are:\nPackage [Contains 0x05 Elements]\n(00) Integer 0x0000000000003400\n(01) String [0x09] \"Processor\"\n(02) Integer 0x0000000000001234\n(03) Reference [Named Object] [CPU0] Processor\n(04) Package [Contains 0x03 Elements]\n(00) Integer 0x0000000000004321\n(01) Integer 0x0000000000001234\n(02) Reference [Named Object] [PWR1] Power}"
},
{
"title": "PinConfig (Pin Configuration)",
"syntax": "Macro:\nPinConfig (Shared/Exclusive, PinConfigType, PinConfigValue, ResourceSource,\nResourceSourceIndex, ResourceUsage, DescriptorName, VendorData) {Pin List}",
"arguments": "\u2022 Shared is an optional argument and can be either Shared or Exclusive. If not specified, Exclusive is assumed. The bit field name _SHR is automatically created to refer to this portion of the resource descriptor.\n\u2022 PinConfigType can be one of the configuration types described below in Table 19-434. The bit field _TYP is automatically created to refer to this portion of the resource descriptor.\n\u2022 PinConfigValue is one of the configurations values described below in Table 19-434. The bit field _VAL is automatically created to refer to this portion of the resource descriptor.\n\u2022 ResourceSource is a string which uniquely identifies the pin controller referred to by this descriptor. ResourceSource can be a fully-qualified name, a relative name or a name segment that utilizes the namespace search rules.\n\u2022 ResourceSourceIndex is an optional argument and is assumed to be 0 for this revision.\n\u2022 ResourceUsage is an optional argument and is assumed to be ResourceConsumer for this revision.\n\u2022 DescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\n\u2022 VendorData is an optional argument that specifies a RawDataBuffer containing vendor-defined byte data to be decoded by the OS driver. The bit field name _VEN is automatically created to refer to this portion of the resource descriptor.\n\u2022 PinList is a list of pin numbers on the ResourceSource that are described by this descriptor. The bit field name _PIN is automatically created to refer to this portion of the resource descriptor.\nTable 19-434 Pin Configuration Types and Values\nPin Configuration Type\nPin Configuration Value",
"description": "0x00 = Default\nN/A\nDefault configuration. No configuration is applied.\n0x01 = Bias Pull-Up\nPull up resistance, in\nOhms.\nThis means the pin is pulled up with a certain number of Ohms to an implicitly supplied VDD rail.\n0x02 = Bias Pull-down\nPull down resistance, in Ohms.\nThis means the pin is pulled down with a certain number of Ohms, toward the GND rail.\n0x03 = Bias Default\nN/A\nIf the silicon has a default biasing mode, reset the pin to this mode.\n0x04 = Bias Disable\nN/A\nAny software-selectable bias settings on the pin will be disabled.\n0x05 = Bias High Impedance\nN/A\nThis means that the pin is configured into a high impedance mode and essentially shut off from the outside world. It will not influence the signal state if a rail is connected to the pin, hence a good default mode.\n0x06 = Bias Bus Hold\nN/A\nThis will make the pin in a weak latch state where it weakly drives the last value on a tristate bus.\n0x07 = Drive Open Drain\nN/A\nThis will configure the pin into open drain (open collector) state.\nPin Configuration Type\nPin Configuration Value\n0x08 = Drive Open Source\nN/A\nThis will configure the pin into open source (open emitter) state.\n0x09 = Drive Push Pull\nN/A\nThis will configure the pin into explicit push-pull state. This is useful if the power-on default state is e.g. open drain or high impedance state.\n0x0A = Drive Strength\nDrive strength in milliamperes\nThis will set the output driver of the pin to supply a certain number of milliamperes, usually by activating several driver stages.\n0x0B = Slew Rate\nCustom format\nThis controls the slew rate of the pin, affecting speed but also sharpness of edges and thus noisiness on the board. The hardware-specific argument tells what slew rate to configure\n0x0C = Input Debounce\nDebounce time in microseconds.\nThis will enable debouncing (for e.g. key inputs) of the pin signal.\n0x0D = Input Schmitt Trigger\nEnabled = 1, Disabled = 0\nThis will enable Schmitt trigger support for the line.\n0x0E 0x7F = Reserved\nReserved\nReserved\n0x80 0xFF = Vendor defined values\nCustom base\nFrom this point, vendor and Hardware-specific configurations are listed.\nThe PinConfig macro evaluates to a buffer that contains a Pin Configuration resource descriptor. The format of the Pin Configuration resource descriptor can be found in \u201cPin Configuration Descriptor\u201d on page 462. The macro is designed to be used inside of an ASL Resource Template (Section 19.3.3).\nNote: There is some overlap between the properties set by GpioIo/GpioInt/ PinFunction and PinConfig descriptors. For example, both are setting properties such as pull-ups. If the same property is specified by multiple descriptors for the same pins, the order in which these properties are applied is undetermined. To avoid any conflicts, GpioInt/GpioIo/PinFunction should provide a default value for these properties when PinConfig is used. If PinConfig is used to set pin bias, PullDefault should be used for GpioIo/GpioInt/ PinFunction. If PinConfig is used to set debounce timeout, 0 should be used for GpioIo/GpioInt. If PinConfig is used to set drive strength, 0 should be used for GpioIo.",
"example": "//\n// Description: GPIO\n//\nDevice (GPI0)\n{\n Name (_HID, \"PNPFFFE\")\n Name (_UID, 0x0)\n Method (_STA)\n {\n Return(0xf)\n }\n Method (_CRS, 0x0, NotSerialized)\n {\n Name (RBUF, ResourceTemplate()\n {\n Memory32Fixed(ReadWrite, 0x4FE00000, 0x20)\n Interrupt(ResourceConsumer, Level, ActiveHigh,\nShared) {0x54}\n })\n Return(RBUF)\n}\n}\n//\n// Description: I2C controller 1\n//\nDevice (I2C1)\n{\n Name (_HID, \"PNPFFFF\")\n Name (_UID, 0x0)\n Method (_STA)\n {\n Return(0xf)\n }\n Method (_CRS, 0x0, NotSerialized)\n {\n Name (RBUF, ResourceTemplate()\n {\n Memory32Fixed(ReadWrite, 0x4F800000, 0x20)\n Interrupt(ResourceConsumer, Level, ActiveHigh,\nShared) {0x55}\n PinFunction(Exclusive, PullDefault, 0x5,\n\"\\\\_SB.GPI0\", 0, ResourceConsumer, ) {2, 3}\n // Configure 10k Pull up for I2C SDA/SCL pins\n PinConfig(Exclusive, 0x01, 10000, \"\\\\_SB.GPI0\", 0, ResourceConsumer, ) {2, 3}\n })\n Return(RBUF)\n } }\n//\n// Description: Physical display panel //\nDevice (SDIO)\n{\n Name (_HID, \"PNPFFFD\")\n Name (_UID, 0x0)\n Method (_STA)\n {\n Return(0xf)\n }\n Method (_CRS, 0x0, NotSerialized)\n {\n Name (RBUF, ResourceTemplate()\n {\n Memory32Fixed(ReadWrite, 0x4F900000, 0x20)\n Interrupt(ResourceConsumer, Level, ActiveHigh,\nShared) {0x57}\n GpioIo(Shared, PullDefault, 0, 0, IoRestrictionNone,\n\"\\\\_SB.GPI0\",) {2, 3}\n // Configure 20k Pull down\n PinConfig(Exclusive, 0x02, 20000, \"\\\\_SB.GPI0\", 0,\nResourceConsumer, ) {2, 3}\n // Enable Schmitt-trigger\n PinConfig(Exclusive, 0x0D, 1, \"\\\\_SB.GPI0\", 0,\nResourceConsumer, ) {2, 3}\n // Set slew rate to custom value 3\n PinConfig(Exclusive, 0x0B, 3, \"\\\\_SB.GPI0\", 0, ResourceConsumer, ) {2, 3}\n })\n Return(RBUF)\n}\n}"
},
{
"title": "PinFunction (Pin Function)",
"syntax": "Macro:\nPinFunction(Shared/Exclusive, PinPullConfiguration, FunctionNumber, ResourceSource,\nResourceSourceIndex, ResourceUsage, DescriptorName, VendorData) {Pin List}",
"arguments": "\u2022 Shared is an optional argument and can be one of Shared, Exclusive. If not specified, Exclusive is assumed. The bit field name _SHR is automatically created to refer to this portion of the resource descriptor.\n\u2022 PinPullConfiguration can be one of PullDefault, PullUp, PullDown, PullNone or a vendorsupplied value in the range 128-255.\n\u2022 FunctionNumber is a provider-specific integer that designates which function is being described.\n\u2022 ResourceSource is a string which uniquely identifies the GPIO controller referred to by this descriptor. ResourceSource can be a fully-qualified name, a relative name or a name segment that utilizes the namespace search rules.\n\u2022 ResourceSourceIndex is an optional argument and is assumed to be 0 for this revision.\n\u2022 ResourceUsage is an optional argument and is assumed to be ResourceConsumer for this revision.\n\u2022 DescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\n\u2022 VendorData is an optional argument that specifies a RawDataBuffer containing vendor-defined byte data to be decoded by the OS driver. The bit field name _VEN is automatically created to refer to this portion of the resource descriptor.\n\u2022 PinList is a non-empty list of (zero-based) pin numbers on the ResourceSource that are described by this descriptor. The bit field name _PIN is automatically created to refer to this portion of the resource descriptor.",
"description": "The PinFunction macro evaluates to a buffer that contains a Pin Function resource descriptor, as described in this section. The macro is designed to be used inside of a Resource Template (Section 19.3.3).\nNote: PinFunction macro allows for maximum flexibility to define the desired function of each pin individually. It is the responsibility of the firmware writer to take into account any platform-level restrictions where pin function must be applied at a coarser granularity. Thus, if the platform design requires the functions for a set of pins to be configured as group, the firmware writer must ensure this is done in the corresponding PinFunction description by specifying all relevant pins in a single PinFunction. In the multi-pin scenario, the OSPM must honor the PinFunction requirements for all of the specified pins on an \u201call-or-nothing\u201d basis.\nNote: The Pin Function descriptor is intended for scenarios where non-GPIO functions are desired. For GPIO-based functionalities, the firmware should always specify the appropriate GpioIo or Gpioint descriptor.",
"example": "//\n// Description: GPIO //\nDevice (GPI0)\n{\n Name (_HID, \"PNPFFFE\")\n Name (_UID, 0x0)\n Method (_STA)\n {\n Return(0xf)\n }\n Method (_CRS, 0x0, NotSerialized)\n {\n Name (RBUF, ResourceTemplate()\n {\n Memory32Fixed(ReadWrite, 0x4FE00000, 0x20)\n Interrupt(ResourceConsumer, Level, ActiveHigh,\nShared) {0x54}\n })\n Return(RBUF)\n}\n//\n// Description: I2C controller 1 //\nDevice (I2C1)\n{\n Name (_HID, \"PNPFFFF\")\n Name (_UID, 0x0)\n Method (_STA)\n {\n Return(0xf)\n }\n Method (_CRS, 0x0, NotSerialized)\n {\n Name (RBUF, ResourceTemplate()\n {\n Memory32Fixed(ReadWrite, 0x4F800000, 0x20)\n Interrupt(ResourceConsumer, Level, ActiveHigh,\nShared) {0x55}\n PinFunction(Exclusive, PullUp, 0x5, \"\\\\_SB.GPI0\", 0,\nResourceConsumer, ) {2, 3}\n })\n Return(RBUF)\n }\n}\n//\n// Description: I2C controller 2\n//\nDevice (I2C2)\n{\n Name (_HID, \"PNPFFFF\")\n Name (_UID, 0x1)\n Method (_STA)\n {\n Return(0xf)\n }\n Method (_CRS, 0x0, NotSerialized)\n {\n Name (RBUF, ResourceTemplate()\n {\n Memory32Fixed(ReadWrite, 0x4F900000, 0x20)\n Interrupt(ResourceConsumer, Level, ActiveHigh,\nShared) {0x56}\n PinFunction(Exclusive, PullUp, 0x0, 0x4,\n\"\\\\_SB.GPI0\", 0, ResourceConsumer, ) {2, 3}\n })\n Return(RBUF)\n}\n}\n//\n// Description: Physical display panel //\nDevice (DISP)\n{\n Name (_HID, \"PNPFFFD\")\n Name (_UID, 0x0)\n Method (_STA)\n {\n Return(0xf)\n }\n Method (_CRS, 0x0, NotSerialized)\n {\n Name (RBUF, ResourceTemplate()\n {\n Memory32Fixed(ReadWrite, 0x4F900000, 0x20)\n Interrupt(ResourceConsumer, Level, ActiveHigh, Shared) {0x57}\n GpioIo(Shared, PullDefault, 0, 0, IoRestrictionNone,\n\"\\\\_SB.GPI0\",) {2, 3}\n })\n Return(RBUF)\n}\n}"
},
{
"title": "PinGroup (Pin Group)",
"syntax": "Macro:\nPinGroup (ResourceLabel, ResourceUsage, DescriptorName, VendorData) { Pin List } Arguments\n\u2022 ResourceUsage is an optional argument and is assumed to be ResourceProducer for this revision.\n\u2022 ResourceLabel is an arbitrary, non-empty string that uniquely identifies this particular PinGroup resource from others within a resource template buffer. This label is used by resource consumers to refer to this resource.\n\u2022 DescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\n\u2022 VendorData is an optional argument that specifies a RawDataBuffer containing vendor-defined byte data to be decoded by the OS driver. The bit field name _VEN is automatically created to refer to this portion of the resource descriptor.\n\u2022 PinList is a non-empty list of (zero-based) pin numbers on the ResourceSource that are described by this descriptor. The bit field name _PIN is automatically created to refer to this portion of the resource descriptor.",
"arguments": "",
"description": "The PinGroup macro evaluates to a buffer that contains a Pin Group resource descriptor. The format of the Pin Group resource descriptor can be found in \"Pin Group Descriptor\" (Section 6.4.3.11). The macro is designed to be used inside of a Resource Template (Section 19.3.3).\nPinGroup resource descriptors must be declared within the scope of the pin controller device to which the pins belong.",
"example": ""
},
{
"title": "PinGroupConfig (Pin Group Configuration)",
"syntax": "Macro:\nPinGroupConfig (Shared/Exclusive, PinConfigType, PinConfigValue, ResourceSource, ResourceSourceIndex, ResourceSourceLabel, ResourceUsage, DesriptorName, VendorData) Arguments:\n\u2022 Shared is an optional argument and can be either Shared or Exclusive. If not specified, Exclusive is assumed. The bit field name _SHR is automatically created to refer to this portion of the resource descriptor.\n\u2022 PinConfigType can be one of the configuration types described below in Table 19-435. The bit field name _TYP is automatically created to refer to this portion of the resource descriptor.\n\u2022 PinConfigValue is one of the configurations values described below in Table 19-435. The bit field name _VAL is automatically created to refer to this portion of the resource descriptor. \u2022 ResourceSource is a string that uniquely identifies the GPIO controller which includes the PinGroup resource referenced by this descriptor. ResourceSource can be a fully-qualified name, a relative name or a name segment that utilizes the namespace search rules.\n\u2022 ResourceSourceLabel is a non-empty string argument that matches ResourceLabel of the PinGroup resource in the current resource template buffer of the GPIO controller referenced in ResourceSource.\n\u2022 DescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\n\u2022 ResourceSourceIndex is an optional argument and is assumed to be 0 for this revision.\n\u2022 ResourceUsage is an optional argument and is assumed to be ResourceConsumer for this revision.\n\u2022 VendorData is an optional argument that specifies a RawDataBuffer containing vendor-defined byte data to be decoded by the OS driver. The bit field name _VEN is automatically created to refer to this portion of the resource descriptor.\nTable 19-435 Pin Group Configuration Types and Values\nPin Configuration Type\nPin Configuration Value",
"arguments": "",
"description": "0x00 = Default\nN/A\nDefault configuration. No configuration is applied).\n0x01 = Bias Pull-Up\nPull up resistance, in\nOhms.\nThis means the pin is pulled up with a certain number of Ohms to an implicitly supplied VDD rail.\n0x02 = Bias Pull-down\nPull down resistance, in Ohms.\nThis means the pin is pulled down with a certain number of Ohms, toward the GND rail.\n0x03 = Bias Default\nN/A\nIf the silicon has a default biasing mode, reset the pin to this mode.\n0x04 = Bias Disable\nN/A\nAny software-selectable bias settings on the pin will be disabled.\n0x05 = Bias High Impedance\nN/A\nThis means that the pin is configured into a high impedance mode and essentially shut off from the outside world. It will not influence the signal state if a rail is connected to the pin, hence a good default mode.\nPin Configuration Type\nPin Configuration Value\n0x06 = Bias Bus Hold\nN/A\nThis will make the pin in a weak latch state where it weakly drives the last value on a tristate bus.\n0x07 = Drive Open Drain\nN/A\nThis will configure the pin into open drain (open collector) state.\n0x08 = Drive Open Source\nN/A\nThis will configure the pin into open source (open emitter) state.\n0x09 = Drive Push Pull\nN/A\nThis will configure the pin into explicit pushpull state. This is useful if the power-on default state is e.g. open drain or high impedance state.\n0x0A = Drive Strength\nDrive strength in milliamperes\nThis will set the output driver of the pin to supply a certain number of milliamperes, usually by activating several driver stages.\n0x0B = Slew Rate\nCustom format\nThis controls the slew rate of the pin, affecting speed but also sharpness of edges and thus noisiness on the board. The hardware-specific argument tells what slew rate to configure\n0x0C = Input Debounce\nDebounce time in microseconds.\nThis will enable debouncing (for e.g. key inputs) of the pin signal.\n0x0D = Input Schmitt Trigger\nEnabled = 1, Disabled = 0\nThis will enable Schmitt trigger support for the line.\n0x0E 0x7F = Reserved\nReserved\nReserved\n0x80 0xFF = Vendor defined values\nCustom base\nFrom this point, vendor and Hardwarespecific configurations are listed.\nThe PinGroupConfig macro evaluates to a buffer that contains a Pin Group Configuration resource descriptor. The format of the Pin Group Configuration resource descriptor can be found in \"Pin Group Configuration Descriptor\" (Section 6.4.3.13). The macro is designed to be used inside of a Resource Template (Section 19.3.3).",
"example": "//\n// Description: GPIO\n//\nDevice (GPI0)\n{\n Name (_HID, \"PNPFFFE\")\n Name (_UID, 0x0)\n Method (_STA)\n {\n Return(0xf)\n }\n Method (_CRS, 0x0, NotSerialized)\n {\n Name (RBUF, ResourceTemplate()\n {\n Memory32Fixed(ReadWrite, 0x4FE00000, 0x20)\n Interrupt(ResourceConsumer, Level, ActiveHigh,\nShared) {0x54}\n PinGroup(\u201cgroup1\u201d, ResourceProducer) {2, 3}\n })\n Return(RBUF)\n}\n//\n// Description: I2C controller 1 //\nDevice (I2C1)\n{\n Name (_HID, \"PNPFFFF\")\n Name (_UID, 0x0)\n Method (_STA)\n {\n Return(0xf)\n }\n Method (_CRS, 0x0, NotSerialized)\n {\n Name (RBUF, ResourceTemplate()\n {\n Memory32Fixed(ReadWrite, 0x4F800000, 0x20)\n Interrupt(ResourceConsumer, Level, ActiveHigh,\nShared) {0x55}\n // Set function I2C1 for SDA/SCL pins \n PinGroupFunction(Exclusive, 0x5, \"\\\\_SB.GPI0, 0,\n\u201cgroup1\u201d, ResourceConsumer, )\n // Configure 10k Pull up for SDA/SCL pins\n PinGroupConfig(Exclusive, 0x01, 10000, \"\\\\_SB.GPI0 \", \n0, \u201cgroup1\u201d, ResourceConsumer, )\n })\n Return(RBUF)\n }\n}\n//\n// Description: I2C controller 2 //\nDevice (I2C2)\n{\n Name (_HID, \"PNPFFFF\")\n Name (_UID, 0x1)\n Method (_STA)\n {\n Return(0xf)\n }\n Method (_CRS, 0x0, NotSerialized)\n {\n Name (RBUF, ResourceTemplate()\n {\n Memory32Fixed(ReadWrite, 0x4F900000, 0x20)\n Interrupt(ResourceConsumer, Level, ActiveHigh,\nShared) {0x56}\n // Set function I2C2 for SDA/SCL pins \n PinGroupFunction(Exclusive, 0x4, \"\\\\_SB.GPI0 \", 0,\n\u201cgroup1\u201d, ResourceConsumer, )\n // Configure 10k Pull up for SDA/SCL pins\n PinGroupConfig(Exclusive, 0x01, 10000, \"\\\\_SB.GPI0 \",\n0, \u201cgroup1\u201d, ResourceConsumer,)\n })\n Return(RBUF)\n}\n}\n//\n// Description: Physical display panel //\nDevice (DISP)\n{\n Name (_HID, \"PNPFFFD\")\n Name (_UID, 0x0)\n Method (_STA)\n {\n Return(0xf)\n }\n Method (_CRS, 0x0, NotSerialized)\n {\n Name (RBUF, ResourceTemplate()\n {\n Memory32Fixed(ReadWrite, 0x4F900000, 0x20) Interrupt(ResourceConsumer, Level, ActiveHigh,\nShared) {0x57}\n // Set function GPIO for pin group group1\n PinGroupFunction(Exclusive, 0x1, \"\\\\_SB.GPI0 \", 0,\n\u201cgroup1\u201d, ResourceConsumer, )\n // Configure 20k Pull down\n PinGroupConfig (Exclusive, 0x02, 20000, \"\\\\_SB.GPI0\n\", 0, \u201cgroup1\u201d, ResourceConsumer, )\n //Enable Schmitt-trigger\n PinGroupConfig (Exclusive, 0x0D, 1, \"\\\\_SB.GPI0 \", 0,\n\u201cgroup1\u201d, ResourceConsumer, )\n //Set slew rate to custom value 3\n PinGroupConfig (Exclusive, 0x0B, 3, \"\\\\_SB.GPI0 \", 0,\n\u201cgroup1\u201d, ResourceConsumer, )\n })\n Return(RBUF)}\n}\n}"
},
{
"title": "PinGroupFunction (Pin Group Function)",
"syntax": "Macro:\nPinGroupFunction (Shared/Exclusive, FunctionNumber, ResourceSource, ResourceSourceIndex, ResourceSourceLabel, ResourceUsage, DescriptorName, VendorData) Arguments\n\u2022 Shared is an optional argument and can be one of Shared, Exclusive. If not specified, Exclusive is assumed. The bit field name _SHR is automatically created to refer to this portion of the resource descriptor.\n\u2022 FunctionNumber is a provider-specific integer which designates which function is being described. The bit field name _FUN is automatically created to refere to this portion of the resource descriptor.\n\u2022 ResourceSource is a string that uniquely identifies the GPIO controller which includes the PinGroup resource referenced by this descriptor. ResourceSource can be a fully-qualified name, a relative name or a name segment that utilizes the namespace search rules.\n\u2022 ResourceSourceLabel is a non-empty string argument that matches ResourceLabel of a PinGroup resource in the current resource template buffer of the GPIO controller referenced in ResourceSource.\n\u2022 DescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\n\u2022 ResourceSourceIndex is an optional argument and is assumed to be 0 for this revision.\n\u2022 ResourceUsage is an optional argument and is assumed to be ResourceConsumer for this revision.\n\u2022 VendorData is an optional argument that specifies a RawDataBuffer containing vendor-defined byte data to be decoded by the OS driver. The bit field name _VEN is automatically created to refer to this portion of the resource descriptor.",
"arguments": "",
"description": "The PinGroupFunction macro evaluates to a buffer that contains a Pin Function resource descriptor. The format of the Pin Function resource descriptor can be found in \u201cPin Function Descriptor\u201d on page 460. The macro is designed to be used inside of an ASL Resource Template (Section 19.3.3).",
"example": ""
},
{
"title": "PowerResource (Declare Power Resource)",
"syntax": "PowerResource (ResourceName, SystemLevel, ResourceOrder) {TermList}",
"arguments": "Declares a power resource named ResourceName. PowerResource opens a name scope.",
"description": "For a definition of the PowerResource term, see Section 7.2, \u201cDeclaring a Power Resource Object.\u201d\nThe power management object list is encoded as TermList, so that rather than describing a static power management object list, it is possible to describe a dynamic power management object list according to the system settings. See \"Section 5.4.2, Definition Block Loading.\"",
"example": ""
},
{
"title": "Printf (Create and Store formatted string)",
"syntax": "Printf (FormatString, FormatArgs) => String",
"arguments": "Printf is a macro that converts the evaluated FormatString into a series of string Concatenate operations, storing the result in the Debug object.\nFormatString is a string literal which may contain one or more uses of the format specifier, %o, to indicate locations in the string where an object may be inserted. %o is the only format specifier supported since the resulting object is a string and type conversion is handled automatically by Concatenate.\nFormatArgs is a comma separated list of Named Objects, Locals, or Args that can be evaluated to a string. Each argument is added to the FormatString using the Concatenate operation at the location specified by %o in order of appearance.",
"description": "The Printf macro converts a format string into a series of cascading string Concatenate operations, and stores the result in the Debug object",
"example": "The following ASL example uses Printf to write a formatted string with the values of Arg0, Arg1, Arg2, and Arg3 to the Debug Object.\n Printf (\"%o: Unexpected value for %o, %o at line %o\", Arg0, Arg1, Arg2, Arg3)\nThis Printf macro expression evaluates to the following ASL operation.\n Store (Concatenate (Concatenate (Concatenate (Concatenate\n (Concatenate (Concatenate (Concatenate (\"\", Arg0),\n \": Unexpected value for \"), Arg1), \", \"), Arg2),\n \" at line \"), Arg3), Debug)"
},
{
"title": "Processor (Declare Processor)",
"syntax": "Processor (ProcessorName, ProcessorID, PBlockAddress, PblockLength) {TermList}",
"arguments": "Declares a named processor object named ProcessorName. Processor opens a name scope. Each processor is required to have a unique ProcessorID value that is unique from any other ProcessorID value.\nFor each processor in the system, the ACPI system firmware declares one processor object in the namespace anywhere within the \\_SB scope. For compatibility with operating systems implementing ACPI 1.0, the processor object may also be declared under the \\_PR scope. An ACPI-compatible namespace may define Processor objects in either the \\_SB or \\_PR scope but not both.\nPBlockAddress provides the system I/O address for the processors register block. Each processor can supply a different such address. PBlockLength is the length of the processor register block, in bytes and is either 0 (for no P_BLK) or 6. With one exception, all processors are required to have the same\nPBlockLength. The exception is that the boot processor can have a non-zero PBlockLength when all other processors have a zero PBlockLength. It is valid for every processor to have a PBlockLength of 0.",
"description": "The following block of ASL sample code shows a use of the Processor term.\n \n Processor (\n \\_PR.CPU0, // Namespace name\n 1,\n 0x120, // PBlk system IO address\n 6 // PBlkLen\n ) {ObjectList}\nThe TermList is an optional list that may contain an arbitrary number of ASL Objects. Processor-specific objects that may be included in the TermList include _PTC, _CST, _PCT, _PSS, _PPC, _PSD, _TSD, _CSD, _PDC, _TPC, _TSS, and _OSC. These processor-specific objects can only be specified when the processor object is declared within the \\_SB scope. For a full definition of these objects, see Section 8, \u201cProcessor Configuration and Control.\u201d\nThe optional processor object list is encoded as TermList, so that rather than describing a static processor object list, it is possible to describe a dynamic processor object list according to the system settings. See \"Section 5.4.2, Definition Block Loading.\"",
"example": ""
},
{
"title": "QWordIO (QWord IO Resource Descriptor Macro)",
"syntax": "QWordIO (ResourceUsage, IsMinFixed, IsMaxFixed, Decode, ISARanges, AddressGranularity,\nAddressMinimum, AddressMaximum, AddressTranslation, RangeLength, ResourceSourceIndex, ResourceSource, DescriptorName, TranslationType, TranslationDensity)",
"arguments": "ResourceUsage specifies whether the I/O range is consumed by this device (ResourceConsumer) or passed on to child devices (ResourceProducer). If nothing is specified, then ResourceConsumer is assumed.\nIsMinFixed specifies whether the minimum address of this I/O range is fixed (MinFixed) or can be changed (MinNotFixed). If nothing is specified, then MinNotFixed is assumed. The 1-bit field\nDescriptorName. _MIF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MinFixed and \u20180\u2019 is MinNotFixed.\nIsMaxFixed specifies whether the maximum address of this I/O range is fixed (MaxFixed) or can be changed (MaxNotFixed). If nothing is specified, then MaxNotFixed is assumed. The 1-bit field\nDescriptorName. _MAF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MaxFixed and \u20180\u2019 is MaxNotFixed.\nDecode specifies whether or not the device decodes the I/O range using positive (PosDecode) or subtractive (SubDecode) decode. If nothing is specified, then PosDecode is assumed. The 1-bit field DescriptorName. _DEC is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is SubDecode and \u20180\u2019 is PosDecode.\nISARanges specifies whether the I/O ranges specifies are limited to valid ISA I/O ranges (ISAOnly), valid non-ISA I/O ranges (NonISAOnly) or encompass the whole range without limitation (EntireRange). The 2bit field DescriptorName._RNG is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is NonISAOnly, \u20182\u2019 is ISAOnly and \u20180\u2019 is EntireRange.\nAddressGranularity evaluates to a 64-bit integer that specifies the power-of-two boundary (- 1) on which the I/O range must be aligned. The 64-bit field DescriptorName. _GRA is automatically created to refer to this portion of the resource descriptor.\nAddressMinimum evaluates to a 64-bit integer that specifies the lowest possible base address of the I/O range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 64-bit field DescriptorName._MIN is automatically created to refer to this portion of the resource descriptor.\nAddressMaximum evaluates to a 64-bit integer that specifies the highest possible base address of the I/O range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 64-bit field DescriptorName._MAX is automatically created to refer to this portion of the resource descriptor.\nAddressTranslation evaluates to a 64-bit integer that specifies the offset to be added to a secondary bus I/O address which results in the corresponding primary bus I/O address. For all non-bridge devices or bridges which do not perform translation, this must be \u20180\u2019. The 64-bit field DescriptorName._TRA is automatically created to refer to this portion of the resource descriptor.\nRangeLength evaluates to a 64-bit integer that specifies the total number of bytes decoded in the I/O range. The 64-bit field DescriptorName. _LEN is automatically created to refer to this portion of the resource descriptor.\nResourceSourceIndex is an optional argument which evaluates to an 8-bit integer that specifies the resource descriptor within the object specified by ResourceSource. If this argument is specified, the ResourceSource argument must also be specified.\nResourceSource is an optional argument which evaluates to a string containing the path of a device which produces the pool of resources from which this I/O range is allocated. If this argument is specified, but the ResourceSourceIndex argument is not specified, a zero value is assumed.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\nTranslationType is an optional argument that specifies whether the resource type on the secondary side of the bus is different (TypeTranslation) from that on the primary side of the bus or the same\n(TypeStatic). If TypeTranslation is specified, then the primary side of the bus is Memory. If TypeStatic is specified, then the primary side of the bus is I/O. If nothing is specified, then TypeStatic is assumed. The 1-bit field DescriptorName. _TTP is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is TypeTranslation and \u20180\u2019 is TypeStatic. See _TTP (page 443) for more information\nTranslationDensity is an optional argument that specifies whether or not the translation from the primary to secondary bus is sparse (SparseTranslation) or dense (DenseTranslation). It is only used when TranslationType is TypeTranslation. If nothing is specified, then DenseTranslation is assumed. The 1-bit field DescriptorName. _TRS is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is SparseTranslation and \u20180\u2019 is DenseTranslation. See _TRS (page 444) for more information.",
"description": "The QWordIO macro evaluates to a buffer which contains a 64-bit I/O resource descriptor, which describes a range of I/O addresses. The format of the 64-bit I/O resource descriptor can be found in QWord Address Space Descriptor (page 431). The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"example": ""
},
{
"title": "QWordMemory (QWord Memory Resource Descriptor Macro)",
"syntax": "QWordMemory (ResourceUsage, Decode, IsMinFixed, IsMaxFixed, Cacheable, ReadAndWrite, AddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, RangeLength,\nResourceSourceIndex, ResourceSource, DescriptorName, MemoryRangeType, TranslationType)",
"arguments": "ResourceUsage specifies whether the Memory range is consumed by this device (ResourceConsumer) or passed on to child devices (ResourceProducer). If nothing is specified, then ResourceConsumer is assumed.\nDecode specifies whether or not the device decodes the Memory range using positive (PosDecode) or subtractive (SubDecode) decode. If nothing is specified, then PosDecode is assumed. The 1-bit field DescriptorName. _DEC is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is SubDecode and \u20180\u2019 is PosDecode.\nIsMinFixed specifies whether the minimum address of this Memory range is fixed (MinFixed) or can be changed (MinNotFixed). If nothing is specified, then MinNotFixed is assumed. The 1-bit field\nDescriptorName. _MIF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MinFixed and \u20180\u2019 is MinNotFixed.\nIsMaxFixed specifies whether the maximum address of this Memory range is fixed (MaxFixed) or can be changed (MaxNotFixed). If nothing is specified, then MaxNotFixed is assumed. The 1-bit field\nDescriptorName. _MAF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MaxFixed and \u20180\u2019 is MaxNotFixed.\nCacheable specifies whether or not the memory region is cacheable (Cacheable), cacheable and writecombining (WriteCombining), cacheable and prefetchable (Prefetchable) or uncacheable\n(NonCacheable). If nothing is specified, then NonCacheable is assumed. The 2-bit field DescriptorName.\n_MEM is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is Cacheable, \u20182\u2019 is WriteCombining, \u20183\u2019 is Prefetchable and \u20180\u2019 is NonCacheable.\nReadAndWrite specifies whether or not the memory region is read-only (ReadOnly) or read/write (ReadWrite). If nothing is specified, then ReadWrite is assumed. The 1-bit field DescriptorName._RW is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is ReadWrite and \u20180\u2019 is ReadOnly.\nAddressGranularity evaluates to a 64-bit integer that specifies the power-of-two boundary (- 1) on which the Memory range must be aligned. The 64-bit field DescriptorName. _GRA is automatically created to refer to this portion of the resource descriptor.\nAddressMinimum evaluates to a 64-bit integer that specifies the lowest possible base address of the\nMemory range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 64-bit field DescriptorName._MIN is automatically created to refer to this portion of the resource descriptor.\nAddressMaximum evaluates to a 64-bit integer that specifies the highest possible base address of the\nMemory range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 64-bit field DescriptorName._MAX is automatically created to refer to this portion of the resource descriptor.\nAddressTranslation evaluates to a 64-bit integer that specifies the offset to be added to a secondary bus I/O address which results in the corresponding primary bus I/O address. For all non-bridge devices or bridges which do not perform translation, this must be \u20180\u2019. The 64-bit field DescriptorName._TRA is automatically created to refer to this portion of the resource descriptor.\nRangeLength evaluates to a 64-bit integer that specifies the total number of bytes decoded in the Memory range. The 64-bit field DescriptorName. _LEN is automatically created to refer to this portion of the resource descriptor.\nResourceSourceIndex is an optional argument which evaluates to an 8-bit integer that specifies the resource descriptor within the object specified by ResourceSource. If this argument is specified, the ResourceSource argument must also be specified.\nResourceSource is an optional argument which evaluates to a string containing the path of a device which produces the pool of resources from which this Memory range is allocated. If this argument is specified, but the ResourceSourceIndex argument is not specified, a zero value is assumed.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\nMemoryRangeType is an optional argument that specifies the memory usage. The memory can be marked as normal (AddressRangeMemory), used as ACPI NVS space (AddressRangeNVS), used as ACPI reclaimable space (AddressRangeACPI) or as system reserved (AddressRangeReserved). If nothing is specified, then AddressRangeMemory is assumed. The 2-bit field DescriptorName. _MTP is automatically created in order to refer to this portion of the resource descriptor, where \u20180\u2019 is AddressRangeMemory, \u20181\u2019 is AddressRangeReserved, \u20182\u2019 is AddressRangeACPI and \u20183\u2019 is AddressRangeNVS.\nTranslationType is an optional argument that specifies whether the resource type on the secondary side of the bus is different (TypeTranslation) from that on the primary side of the bus or the same (TypeStatic). If TypeTranslation is specified, then the primary side of the bus is I/O. If TypeStatic is specified, then the primary side of the bus is Memory. If nothing is specified, then TypeStatic is assumed. The 1-bit field DescriptorName. _TTP is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is TypeTranslation and \u20180\u2019 is TypeStatic. See _TTP (page 443) for more information.",
"description": "The QWordMemory macro evaluates to a buffer which contains a 64-bit memory resource descriptor, which describes a range of memory addresses. The format of the 64-bit memory resource descriptor can be found in \u201cQWord Address Space Descriptor \u201d (page 431). The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"example": ""
},
{
"title": "QWordSpace (QWord Space Resource Descriptor Macro)",
"syntax": "QWordSpace (ResourceType, ResourceUsage, Decode, IsMinFixed, IsMaxFixed, TypeSpecificFlags,\nAddressGranularity, AddressMinimum, AddressMaximum, AddressTranslation, RangeLength,\nResourceSourceIndex, ResourceSource, DescriptorName)",
"arguments": "ResourceType evaluates to an 8-bit integer that specifies the type of this resource. Acceptable values are 0xC0 through 0xFF.\nResourceUsage specifies whether the Memory range is consumed by this device (ResourceConsumer) or passed on to child devices (ResourceProducer). If nothing is specified, then ResourceConsumer is assumed.\nDecode specifies whether or not the device decodes the Memory range using positive (PosDecode) or subtractive (SubDecode) decode. If nothing is specified, then PosDecode is assumed. The 1-bit field DescriptorName. _DEC is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is SubDecode and \u20180\u2019 is PosDecode.\nIsMinFixed specifies whether the minimum address of this Memory range is fixed (MinFixed) or can be changed (MinNotFixed). If nothing is specified, then MinNotFixed is assumed. The 1-bit field\nDescriptorName. _MIF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MinFixed and \u20180\u2019 is MinNotFixed.\nIsMaxFixed specifies whether the maximum address of this Memory range is fixed (MaxFixed) or can be changed (MaxNotFixed). If nothing is specified, then MaxNotFixed is assumed. The 1-bit field\nDescriptorName. _MAF is automatically created to refer to this portion of the resource descriptor, where \u20181\u2019 is MaxFixed and \u20180\u2019 is MaxNotFixed.\nTypeSpecificFlags evaluates to an 8-bit integer. The flags are specific to the ResourceType.\nAddressGranularity evaluates to a 64-bit integer that specifies the power-of-two boundary (- 1) on which the Memory range must be aligned. The 64-bit field DescriptorName. _GRA is automatically created to refer to this portion of the resource descriptor.\nAddressMinimum evaluates to a 64-bit integer that specifies the lowest possible base address of the\nMemory range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 64-bit field DescriptorName._MIN is automatically created to refer to this portion of the resource descriptor.\nAddressMaximum evaluates to a 64-bit integer that specifies the highest possible base address of the\nMemory range. The value must have \u20180\u2019 in all bits where the corresponding bit in AddressGranularity is \u20181\u2019. For bridge devices which translate addresses, this is the address on the secondary bus. The 64-bit field DescriptorName._MAX is automatically created to refer to this portion of the resource descriptor.\nAddressTranslation evaluates to a 64-bit integer that specifies the offset to be added to a secondary bus I/O address which results in the corresponding primary bus I/O address. For all non-bridge devices or bridges which do not perform translation, this must be \u20180\u2019. The 64-bit field DescriptorName._TRA is automatically created to refer to this portion of the resource descriptor.\nRangeLength evaluates to a 64-bit integer that specifies the total number of bytes decoded in the Memory range. The 64-bit field DescriptorName. _LEN is automatically created to refer to this portion of the resource descriptor.\nResourceSourceIndex is an optional argument which evaluates to an 8-bit integer that specifies the resource descriptor within the object specified by ResourceSource. If this argument is specified, the ResourceSource argument must also be specified.\nResourceSource is an optional argument which evaluates to a string containing the path of a device which produces the pool of resources from which this Memory range is allocated. If this argument is specified, but the ResourceSourceIndex argument is not specified, a zero value is assumed.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.",
"description": "The QWordSpace macro evaluates to a buffer which contains a 64-bit Address Space resource descriptor, which describes a range of addresses. The format of the 64-bit AddressSpace descriptor can be found in \u201cQWord Address Space Descriptor \u201d (page 431). The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"example": ""
},
{
"title": "RawDataBuffer",
"syntax": "RawDataBuffer (RDBufferSize) {ByteList} => RawDataBuffer",
"arguments": "Declares a RawDataBuffer of size RDBufferSize and optional initial value of ByteList.",
"description": "The optional RDBufferSize parameter specifies the size of the buffer and must be a word constant. The initial value is specified in Initializer ByteList. If RDBufferSize is not specified, it defaults to the size of initializer. If the count is too small to hold the value specified by initializer, the initializer size is used.\nNote that a RawDataBuffer is not encoded as a Buffer (Opcode, Package length bytes, etc), but rather contains only the raw bytes specified.",
"example": ""
},
{
"title": "RefOf (Create Object Reference)",
"syntax": "RefOf (Object) => ObjectReference",
"arguments": "Object can be any object type (for example, a package, a device object, and so on).",
"description": "Returns an object reference to Object. If the Object does not exist, the result of a RefOf operation is fatal. Use the CondRefOf term in cases where the Object might not exist.\nThe primary purpose of RefOf() is to allow an object to be passed to a method as an argument to the method without the object being evaluated at the time the method was loaded.",
"example": ""
},
{
"title": "Register (Generic Register Resource Descriptor Macro)",
"syntax": "Register (AddressSpaceKeyword, RegisterBitWidth, RegisterBitOffset, RegisterAddress, AccessSize, DescriptorName)",
"arguments": "AddressSpaceKeyword specifies the address space where the register exists. The register can be one of the following:\n\u2022 I/O space (SystemIO)\n\u2022 System Memory (SystemMemory)\n\u2022 PCI configuration space (PCI_Config)\n\u2022 Embedded controller space (EmbeddedControl)\n\u2022 SMBus (SMBus)\n\u2022 CMOS (SystemCMOS)\n\u2022 PCI Bar target (PciBarTarget)\n\u2022 IPMI (IPMI)\n\u2022 General purpose I/O (GeneralPurposeIO) \u2022 Generic serial bus (GenericSerialBus)\n\u2022 Platform Communications Channel (PCC)\n\u2022 Fixed-feature hardware (FFixedHW)\nThe 8-bit field DescriptorName. _ASI is automatically created in order to refer to this portion of the resource descriptor. See the Address Space ID definition in Table 6-238 for more information, including a list of valid values and their meanings.\nRegisterBitWidth evaluates to an 8-bit integer that specifies the number of bits in the register. The 8-bit field DescriptorName. _RBW is automatically created in order to refer to this portion of the resource descriptor. See the _RBW definition in Table 6-238 for more information.\nRegisterBitOffset evaluates to an 8-bit integer that specifies the offset in bits from the start of the register indicated by RegisterAddress. The 8-bit field DescriptorName. _RBO is automatically created in order to refer to this portion of the resource descriptor. See the _RBO definition in Table 6-238 for more information.\nRegisterAddress evaluates to a 64-bit integer that specifies the register address. The 64-bit field DescriptorName. _ADR is automatically created in order to refer to this portion of the resource descriptor. See the _ADR definition in Table 6-238 for more information.\nAccessSize evaluates to an 8-bit integer that specifies the size of data values used when accessing the address space as follows:\n0 - Undefined (legacy)\n1 - Byte access\n2 - Word access\n3 - DWord access\n4 - QWord access\nThe 8-bit field DescriptorName. _ASZ is automatically created in order to refer to this portion of the resource descriptor. See the _ASZ definition in Table 6-238 for more information. For backwards compatibility, the AccesSize parameter is optional when invoking the Register macro. If the AccessSize parameter is not supplied then the AccessSize field will be set to zero. In this case, OSPM will assume the access size.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.",
"description": "The Register macro evaluates to a buffer that contains a generic register resource descriptor. The format of the generic register resource descriptor can be found in Table 6-238. The macro is designed to be used inside of the ResourceTemplate (Section 19.6.117).",
"example": ""
},
{
"title": "Release (Release a Mutex Synchronization Object)",
"syntax": "Release (SyncObject)",
"arguments": "SynchObject must be a mutex synchronization object.",
"description": "If the mutex object is owned by the current invocation, ownership for the Mutex is released once. It is fatal to release ownership on a Mutex unless it is currently owned. A Mutex must be totally released before an invocation completes.",
"example": ""
},
{
"title": "Reset (Reset an Event Synchronization Object)",
"syntax": "Reset (SyncObject)",
"arguments": "SynchObject must be an Event synchronization object.",
"description": "This operator is used to reset an event synchronization object to a non-signaled state. See also the Wait and Signal function operator definitions.",
"example": ""
},
{
"title": "ResourceTemplate (Resource To Buffer Conversion Macro)",
"syntax": "ResourceTemplate () {ResourceMacroList} => Buffer",
"arguments": "",
"description": "For a full definition of the ResourceTemplateTerm macro, see Section 19.3.3, \u201cASL Resource Templates\u201d.",
"example": ""
},
{
"title": "Return (Return from Method Execution)",
"syntax": "Return\nReturn ()\nReturn (Arg)",
"arguments": "Arg is optional and can be any valid object or reference.",
"description": "Returns control to the invoking control method, optionally returning a copy of the object named in Arg. If no Arg object is specified, a Return(Zero) is generated by the ASL compiler.\nNote: In the absence of an explicit Return () statement, the return value to the caller is undefined.",
"example": ""
},
{
"title": "Revision (Constant Revision Integer)",
"syntax": "Revision => Integer",
"arguments": "",
"description": "The Revision operator returns an Integer containing the current revision of the AML interpreter. Writes to this object are not allowed.",
"example": ""
},
{
"title": "Scope (Open Named Scope)",
"syntax": "Scope (Location) {ObjectList}",
"arguments": "Opens and assigns a base namespace scope to a collection of objects. All object names defined within the scope are created relative to Location. Note that Location does not have to be below the surrounding scope, but can refer to any location within the namespace. The Scope term itself does not create objects, but only locates objects within the namespace; the actual objects are created by other ASL terms.",
"description": "The object referred to by Location must already exist in the namespace and be one of the following object types that has a namespace scope associated with it:\n\u2022 A predefined scope such as: \\ (root), \\_SB, \\GPE, \\_PR, \\_TZ, etc.\n\u2022 Device\n\u2022 Processor\n\u2022 Thermal Zone\n\u2022 Power Resource\nThe Scope term alters the current namespace location to the existing Location. This causes the defined objects within TermList to be created relative to this new location in the namespace.\nThe object list is encoded as TermList, so that rather than describing a static object list, it is possible to describe a dynamic object list according to the system settings. See \"Section 5.4.2, Definition Block Loading.\"\nNote: When creating secondary SSDTs, it is often required to use the Scope operator to change the namespace location in order create objects within some part of the namespace that has been defined by the main DSDT. Use the External operator to declare the scope location so that the ASL compiler will not issue an error for an undefined Location.",
"example": "The following example ASL code uses the Scope operator and creates several objects:\nScope (\\PCI0)\n{\n Name (X, 3)\n Scope (\\)\n {\n Method (RQ) {Return (0)}\n }\n Name (^Y, 4) }\nThe created objects are placed in the ACPI namespace as shown:\n\\PCI0.X\n\\RQ \\Y\nThis example shows the use of External in conjunction with Scope within an SSDT:\nDefinitionBlock (\"ssdt.aml\", \"SSDT\", 2, \"X\", \"Y\", 0x00000001)\n{\n External (\\_SB.PCI0, DeviceObj)\n Scope (\\_SB.PCI0)\n { }\n}"
},
{
"title": "ShiftLeft (Integer Shift Left)",
"syntax": "ShiftLeft (Source, ShiftCount, Result) => Integer\nResult = Source << ShiftCount => Integer\nResult <<= ShiftCount => Integer",
"arguments": "Source and ShiftCount are evaluated as Integers.",
"description": "Source is shifted left with the least significant bit zeroed ShiftCount times. The result is optionally stored into Result.",
"example": ""
},
{
"title": "ShiftRight (Integer Shift Right)",
"syntax": "ShiftRight (Source, ShiftCount, Result) => Integer\nResult = Source >> ShiftCount => Integer\nResult >>= ShiftCount => Integer",
"arguments": "Source and ShiftCount are evaluated as Integers.",
"description": "Source is shifted right with the most significant bit zeroed ShiftCount times. The result is optionally stored into Result.",
"example": ""
},
{
"title": "Signal (Signal a Synchronization Event)",
"syntax": "Signal (SyncObject)",
"arguments": "SynchObject must be an Event synchronization object.",
"description": "The Event object is signaled once, allowing one invocation to acquire the event.",
"example": ""
},
{
"title": "SizeOf (Get Data Object Size)",
"syntax": "SizeOf (ObjectName) => Integer",
"arguments": "ObjectName must be a buffer, string or package object.",
"description": "Returns the size of a buffer, string, or package data object.\nFor a buffer, it returns the size in bytes of the data. For a string, it returns the size in bytes of the string, not counting the trailing NULL. For a package, it returns the number of elements. For an object reference, the size of the referenced object is returned. Other data types cause a fatal run-time error.",
"example": ""
},
{
"title": "Sleep (Milliseconds Sleep)",
"syntax": "Sleep (MilliSeconds)",
"arguments": "The Sleep term is used to implement long-term timing requirements. Execution is delayed for at least the required number of milliseconds.",
"description": "The implementation of Sleep is to round the request up to the closest sleep time supported by the OS and relinquish the processor.",
"example": ""
},
{
"title": "SPISerialBusV2 (SPI Serial Bus Connection Resource Descriptor (Version 2) Macro)",
"syntax": "SPISerialBusV2 (DeviceSelection, DeviceSelectionPolarity, WireMode, DataBitLength, SlaveMode,\nConnectionSpeed, ClockPolarity, ClockPhase, ResourceSource, ResourceSourceIndex, ResourceUsage, DescriptorName, Shared, VendorData)",
"arguments": "DeviceSelection is the device selection value. This value may refer to a chip-select line, GPIO line or other line selection mechanism. _ADR is automatically created to refer to this portion of the resource descriptor.\nDeviceSelectionPolarity is an optional argument and can be either PolarityHigh or PolarityLow to indicate that the device is active. PolarityLow is the default. The bit field _DPL is automatically created to refer to this portion of the resource descriptor.\nWireMode is an optional argument and can be either ThreeWireMode or FourWireMode. FourWireMode is the default. The bit field name _MOD is automatically created to refer to this portion of the resource descriptor.\nDataBitLength is the size, in bits, of the smallest transfer unit for this connection. _LEN is automatically created to refer to this portion of the resource descriptor.\nSlaveMode is an optional argument and can be either ControllerInitiated or DeviceInitiated.\nControllerInitiated is the default. The bit field name _SLV is automatically created to refer to this portion of the resource descriptor.\nConnectionSpeed is the maximum connection speed supported by this connection, in hertz. The bit field name _SPE is automatically created to refer to this portion of the resource descriptor.\nClockPolarity can be either ClockPolarityLow or ClockPolarityHigh. _POL is automatically created to refer to this portion of the resource descriptor.\nClockPhase can be either ClockPhaseFirst or ClockPhaseSecond. _PHA is automatically created to refer to this portion of the resource descriptor.\nResourceSource is a string which uniquely identifies the SPI bus controller referred to by this descriptor. ResourceSource can be a fully-qualified name, a relative name or a name segment that utilizes the namespace search rules.\nResourceSourceIndex is an optional argument and is assumed to be 0 for this revision.\nResourceUsage is an optional argument and is assumed to be ResourceConsumer for this revision.DescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\nShared is an optional argument and can be either Shared or Exclusive. If not specified, Exclusive is assumed. The bit field name _SHR is automatically created to refer to this portion of the resource descriptor.\nVendorData is an optional argument that specifies an object to be decoded by the OS driver. It is a RawDataBuffer. The bit field name _VEN is automatically created to refer to this portion of the resource descriptor.",
"description": "The SPISerialBusV2 macro evaluates to a buffer that contains a SPI Serial Bus resource descriptor (Version 2). The macro is designed to be used inside of a ResourceTemplate (see Section 19.3.3).",
"example": ""
},
{
"title": "Stall (Stall for a Short Time)",
"syntax": "Stall (MicroSeconds)",
"arguments": "The Stall term is used to implement short-term timing requirements. Execution is delayed for at least the required number of microseconds.",
"description": "The implementation of Stall is OS-specific, but must not relinquish control of the processor. Because of this, delays longer than 100 microseconds must use Sleep instead of Stall.",
"example": ""
},
{
"title": "StartDependentFn (Start Dependent Function Resource Descriptor",
"syntax": "StartDependentFn (CompatibilityPriority, PerformancePriority) {ResourceList}",
"arguments": "CompatibilityPriority indicates the relative compatibility of the configuration specified by ResourceList relative to the PC/AT. 0 = Good, 1 = Acceptable, 2 = Sub-optimal.\nPerformancePriority indicates the relative performance of the configuration specified by ResourceList relative to the other configurations. 0 = Good, 1 = Acceptable, 2 = Sub-optimal.\nResourceList is a list of resources descriptors which must be selected together for this configuration.",
"description": "The StartDependentFn macro evaluates to a buffer which contains a start dependent function resource descriptor, which describes a group of resources which must be selected together. Each subsequent StartDependentFn or StartDependentFnNoPri resource descriptor introduces a new choice of resources for configuring the device, with the last choice terminated with an EndDependentFn resource descriptor. The format of the start dependent function resource descriptor can be found in \u201cStart Dependent Functions Descriptor\u201d (page 420). This macro generates the two-byte form of the resource descriptor. The macro is designed to be used inside of a ResourceTemplate (page 1033).",
"example": ""
},
{
"title": "StartDependentFnNoPri (Start Dependent Function Resource Descriptor Macro)",
"syntax": "StartDependentFnNoPri () {ResourceList}",
"arguments": "",
"description": "The StartDependentFnNoPri macro evaluates to a buffer which contains a start dependent function resource descriptor, which describes a group of resources which must be selected together. Each subsequent StartDependentFn or StartDependentFnNoPri resource descriptor introduces a new choice of resources for configuring the device, with the last choice terminated with an EndDependentFn resource descriptor. The format of the start dependent function resource descriptor can be found in \u201cStart Dependent Functions Descriptor\u201d (page 421). This macro generates the one-byte form of the resource descriptor. The macro is designed to be used inside of a ResourceTemplate (page 1033).\nThis is similar to StartDependentFn (page 1038) with both CompatibilityPriority and PerformancePriority set to 1, but is one byte shorter.",
"example": ""
},
{
"title": "Store (Store an Object)",
"syntax": "Store (Source, Destination) => DataRefObject\nDestination = Source => DataRefObject",
"arguments": "This operation evaluates Source, converts it to the data type of Destination, and writes the result into\nDestination. For information on automatic data-type conversion, see Section 19.3.5, \u201cASL Data Types.\u201d",
"description": "Stores to OperationRegion Field data types may relinquish the processor depending on the address space.\nAll stores (of any type) to the constant Zero, constant One, or constant Ones object are not allowed. Stores to read-only objects are fatal. The execution result of the operation depends on the type of Destination. For any type other than an operation region field, the execution result is the same as the data written to Destination. For operation region fields with an AccessType of ByteAcc, WordAcc,\nDWordAcc, QWordAcc or AnyAcc, the execution result is the same as the data written to Destination as in the normal case, but when the AccessType is BufferAcc, the operation region handler may modify the data when it is written to the Destination so that the execution result contains modified data.",
"example": "The following example creates the name CNT that references an integer data object with the value 5 and then stores CNT to Local0. After the Store operation, Local0 is an integer object with the value 5.\nName (CNT, 5)\nStore (CNT, Local0)"
},
{
"title": "Subtract (Integer Subtract)",
"syntax": "Subtract (Minuend, Subtrahend, Result) => Integer\nResult = Minuend - Subtrahend => Integer\nResult -= Subtrahend => Integer",
"arguments": "Minuend and Subtrahend are evaluated as Integers.",
"description": "Subtrahend is subtracted from Minuend, and the result is optionally stored into Result. Underflow conditions are ignored and the result simply loses the most significant bits.",
"example": ""
},
{
"title": "Switch (Select Code To Execute Based On Expression)",
"syntax": "Switch (Expression) {CaseTermList}",
"arguments": "Expression is an ASL expression that evaluates to an Integer, String or Buffer.",
"description": "The Switch, Case and Default statements help simplify the creation of conditional and branching code. The Switch statement transfers control to a statement within the enclosed body of executable ASL code\nIf the Case Value is an Integer, Buffer or String, then control passes to the statement that matches the value of Switch (Expression). If the Case value is a Package, then control passes if any member of the package matches the Switch (Value) The Switch CaseTermList can include any number of Case instances, but no two Case Values (or members of a Value, if Value is a Package) within the same Switch statement can have the same value.\nExecution of the statement body begins at the selected TermList and proceeds until the TermList end of body or until a Break or Continue statement transfers control out of the body.\nThe Default statement is executed if no Case Value matches the value of Switch (expression). If the Default statement is omitted, and no Case match is found, none of the statements in the Switch body are executed. There can be at most one Default statement. The Default statement can appear anywhere in the body of the Switch statement.\nA Case or Default term can only appear inside a Switch statement. Switch statements can be nested. (Compatibility Note) The Switch, Case, and Default terms were first introduced in ACPI 2.0. However, their implementation is backward compatible with ACPI 1.0 AML interpreters.",
"example": "Use of the Switch statement usually looks something like this:\nSwitch (expression)\n{\n Case (value) {\n Statements executed if Lequal (expression, value)\n }\n Case (Package () {value, value, value}) {\n Statements executed if Lequal (expression, any value in package)\n }\n Default {\n Statements executed if expression does not equal any case constant-expression\n}\n}\nNote: (Compiler Note) The following example demonstrates how the Switch statement should be translated into ACPI 1.0-compatible AML:\nSwitch (Add (ABCD( ),1)\n{\n Case (1) {\n \u2026statements1\u2026\n }\n Case (Package () {4,5,6}) {\n \u2026statements2\u2026\n }\n Default {\n \u2026statements3\u2026\n }\n}\nis translated as:\nName (_T_I, 0) // Create Integer temporary variable for result While (One)\n{\n Store (Add (ABCD (), 1), _T_I)\n If (LEqual (_T_I, 1)) {\n \u2026statements1\u2026\n }\n Else {\n If (LNotEqual (Match (Package () {4, 5, 6}, MEQ, _T_I, MTR, 0, 0), Ones)) {\n \u2026statements2\u2026\n }\n Else {\n \u2026statements3\u2026\n }\n Break }\nThe While (One) is emitted to enable the use of Break and Continue within the Switch statement. Temporary names emitted by the ASL compiler should appear at the top level of the method, since the Switch statement could appear within a loop and thus attempt to create the name more than once.\nNote: If the ASL compiler is unable to determine the type of the expression, then it will generate a warning and assume a type of Integer. The warning will indicate that the code should use one of the type conversion operators (Such as ToInteger, ToBuffer, ToDecimalString or ToHexString). Caution: Some of these operators are defined starting with ACPI 2.0 and as such may not be supported by ACPI 1.0b compatible interpreters.\nFor example:\nSwitch (ABCD ()) // Cannot determine the type because methods can return anything.\n{\n \u2026case statements\u2026\n}\nwill generate a warning and the following code:\nName (_T_I, 0)\nStore (ABCD (), _T_I)\nTo remove the warning, the code should be:\nSwitch (ToInteger (ABCD ()))\n{\n \u2026case statements\u2026\n}"
},
{
"title": "ThermalZone (Declare Thermal Zone)",
"syntax": "ThermalZone (ThermalZoneName) {TermList}",
"arguments": "Declares a Thermal Zone object named ThermalZoneName. ThermalZone opens a name scope.\nEach use of a ThermalZone term declares one thermal zone in the system. Each thermal zone in a system is required to have a unique ThermalZoneName.",
"description": "A thermal zone may be declared in the namespace anywhere within the \\_SB scope. For compatibility with operating systems implementing ACPI 1.0, a thermal zone may also be declared under the \\_TZ scope. An ACPI-compatible namespace may define Thermal Zone objects in either the \\_SB or \\_TZ scope but not both.\nFor example ASL code that uses a ThermalZone statement, see Section 11, \u201cThermal Management.\u201d\nThe thermal object list is encoded as TermList, so that rather than describing a static thermal object list, it is possible to describe a dynamic thermal object list according to the system settings. See \"Section 5.4.2, Definition Block Loading.\"",
"example": ""
},
{
"title": "Timer (Get 64-Bit Timer Value)",
"syntax": "Timer => Integer",
"arguments": "",
"description": "The timer opcode returns a monotonically increasing value that can be used by ACPI methods to measure time passing, this enables speed optimization by allowing AML code to mark the passage of time independent of OS ACPI interpreter implementation.\nThe Sleep opcode can only indicate waiting for longer than the time specified.\nThe value resulting from this opcode is 64 bits. It is monotonically increasing, but it is not guaranteed that every result will be unique, i.e. two subsequent instructions may return the same value. The only guarantee is that each subsequent evaluation will be greater-than or equal to the previous ones.\nThe period of this timer is 100 nanoseconds. While the underlying hardware may not support this granularity, the interpreter will do the conversion from the actual timer hardware frequency into 100 nanosecond units.\nUsers of this opcode should realize that a value returned only represents the time at which the opcode itself executed. There is no guarantee that the next opcode in the instruction stream will execute in any particular time bound.\nThe OSPM can implement this using the ACPI Timer and keep track of overrun. Other implementations are possible. This provides abstraction away from chipset differences\nNote: (Compatibility Note) New for ACPI 3.0",
"example": ""
},
{
"title": "ToBCD (Convert Integer to BCD)",
"syntax": "ToBCD (Value, Result) => Integer",
"arguments": "Value is evaluated as an integer",
"description": "The ToBCD operator is used to convert Value from a numeric (Integer) format to a BCD format and optionally store the numeric value into Result.",
"example": ""
},
{
"title": "ToBuffer (Convert Data to Buffer)",
"syntax": "ToBuffer (Data, Result) => Buffer",
"arguments": "Data must be an Integer, String, or Buffer data type.",
"description": "Data is converted to buffer type and the result is optionally stored into Result. If Data is an integer, it is converted into n bytes of buffer (where n is 4 if the definition block has defined integers as 32 bits or 8 if the definition block has defined integers as 64 bits as indicated by the Definition Block table header\u2019s Revision field), taking the least significant byte of integer as the first byte of buffer. If Data is a buffer, no conversion is performed. If Data is a string, each ASCII string character is copied to one buffer byte, including the string null terminator. A null (zero-length) string will be converted to a zero-length buffer.",
"example": ""
},
{
"title": "ToDecimalString (Convert Data to Decimal String)",
"syntax": "ToDecimalString (Data, Result) => String",
"arguments": "Data must be an Integer, String, or Buffer data type.",
"description": "Data is converted to a decimal string, and the result is optionally stored into Result. If Data is already a string, no action is performed. If Data is a buffer, it is converted to a string of decimal values separated by commas. (Each byte of the buffer is converted to a single decimal value.) A zero-length buffer will be converted to a null (zero-length) string.",
"example": ""
},
{
"title": "ToHexString (Convert Data to Hexadecimal String)",
"syntax": "ToHexString (Data, Result) => String",
"arguments": "Data must be an Integer, String, or Buffer data type.",
"description": "Data is converted to a hexadecimal string, and the result is optionally stored into Result. If Data is already a string, no action is performed. If Data is a buffer, it is converted to a string of hexadecimal values separated by commas. A zero-length buffer will be converted to a null (zero-length) string.",
"example": ""
},
{
"title": "ToInteger (Convert Data to Integer)",
"syntax": "ToInteger (Data, Result) => Integer",
"arguments": "Data must be an Integer, String, or Buffer data type.",
"description": "Data is converted to integer type and the result is optionally stored into Result. If Data is a string, it must be either a decimal or hexadecimal numeric string (in other words, prefixed by \u201c0x\u201d) and the value must not exceed the maximum of an integer value. If the value is exceeding the maximum, the result of the conversion is unpredictable. A null (zero-length) string is illegal. If Data is a Buffer, the first 8 bytes of the buffer are converted to an integer, taking the first byte as the least significant byte of the integer. A zerolength buffer is illegal. If Data is an integer, no action is performed.",
"example": ""
},
{
"title": "ToPLD (Creates a _PLD Buffer Object)",
"syntax": "ToPLD (PLDKeywordList) => _PLD Buffer Object",
"arguments": "PLDKeywordList is a list of PLDKeyword types that describe elements of a Physical Layer Description (_PLD) buffer that can be assigned values. The table below shows the available PLDKeyword types and their assignable types. Refer to the _PLD section for a description of the _PLD method object.\nTable 19-436 PLD Keywords and Assignment Types\nPLDKeyword\nAssignment Type\nPLD_Revision\nInteger\nPLD_IgnoreColor\nInteger\nPLD_Red\nInteger\nPLD_Green\nInteger\nPLD_Blue\nInteger\nPLD_Width\nInteger\nPLD_Height\nInteger\nPLD_UserVisible\nInteger\nPLD_Dock\nInteger\nPLD_Lid\nInteger\nPLD_Panel\nInteger or String\nPLD_VerticalPosition\nInteger or String\nPLD_HorizontalPosition\nInteger or String\nPLD_Shape\nInteger or String\nPLD_GroupOrientation\nInteger\nPLD_GroupToken\nInteger\nPLD_GroupPosition\nInteger\nPLD_Bay\nInteger\nPLD_Ejectable\nInteger\nPLD_EjectRequired\nInteger\nPLD_CabinetNumber\nInteger\nPLD_CardCageNumber\nInteger\nPLD_Reference\nInteger\nPLD_Rotation\nInteger\nPLDKeyword\nAssignment Type\nPLD_Order\nInteger\nPLD_VeriticalOffset\nInteger\nPLD_HorizontalOffset\nInteger\nA subset of PLDKeyword types can be assigned string values for improved readability. Those types and their assignable values are shown in the table below.\nTable 19-437 PLD Keywords and assignable String Values\nPLDKeyword\nAssignable String Values\nPLD_Panel\n\u201cTOP\u201d, \u201cBOTTOM\u201d,\u201dLEFT\u201d, \u201cRIGHT\u201d,\u201dFRONT\u201d,\u201dBACK\u201d,\u201dUNKNOWN\u201d\nPLD_VerticalPosition\n\u201cUPPER\u201d,\u201dCENTER\u201d,\u201dLOWER\u201d\nPLD_HorizontalPosition\n\u201cLEFT\u201d,\u201dCENTER\u201d,\u201dRIGHT\u201d\nPLD_Shape\n\u201cROUND\u201d,\u201dOVAL\u201d,\u201dSQUARE\u201d,\n\u201cVERTICALRECTANGLE\u201d,\n\u201cHORIZONTALRECTANGLE\u201d,\n\u201cVERTICALTRAPEZOID\u201d,\n\u201cHORIZONTALTRAPEZOID\u201d,\n\u201cUNKNOWN\u201d",
"description": "The ToPLD macro converts a list of PLDKeyword types into a _PLD buffer object.",
"example": "The following ASL shows an example using ToPLDto construct a _PLD buffer/package object.\nName (_PLD, Package (0x01) // _PLD: Physical Location of Device\n {\n ToPLD (\n PLD_Revision = 0x2,\n PLD_IgnoreColor = 0x1,\n PLD_Red = 0x37,\n PLD_Green = 0x44,\n PLD_Blue = 0xFF, PLD_Width = 0x4,\n PLD_Height = 0x19,\n PLD_UserVisible = 0x1,\n PLD_Dock = 0x0,\n PLD_Lid = 0x1,\n PLD_Panel = \"TOP\",\n PLD_VerticalPosition = \"CENTER\",\n PLD_HorizontalPosition = \"RIGHT\",\n PLD_Shape = \"VERTICALRECTANGLE\",\n PLD_GroupOrientation = 0x1,\n PLD_GroupToken = 0xA,\n PLD_GroupPosition = 0x21,\n PLD_Bay = 0x1,\n PLD_Ejectable = 0x0,\n PLD_EjectRequired = 0x1,\n PLD_CabinetNumber = 0x1E,\n PLD_CardCageNumber = 0x17,\n PLD_Reference = 0x0,\n PLD_Rotation = 0x7,\n PLD_Order = 0x3,\n PLD_VerticalOffset = 0x141,\n PLD_HorizontalOffset = 0x2C) })"
},
{
"title": "ToString (Convert Buffer To String)",
"syntax": "ToString (Source, Length, Result) => String",
"arguments": "Source is evaluated as a buffer. Length is evaluated as an integer data type.",
"description": "Starting with the first byte, the contents of the buffer are copied into the string until the number of characters specified by Length is reached or a null (0) character is found. If Length is not specified or is Ones, then the contents of the buffer are copied until a null (0) character is found. If the source buffer has a length of zero, a zero length (null terminator only) string will be created. The result is copied into the Result.",
"example": ""
},
{
"title": "ToUUID (Convert String to UUID Macro)",
"syntax": "ToUUID (AsciiString) => Buffer",
"arguments": "AsciiString is evaluated as a String data type.",
"description": "This macro will convert an ASCII string to a 128-bit buffer. The string must have the following format:\naabbccdd-eeff-gghh-iijj-kkllmmnnoopp\nwhere aa pp are one byte hexadecimal numbers, made up of hexadecimal digits. The resulting buffer has the following format:\nTable 19-438 UUID Buffer Format\nString\nOffset In Buffer\naa\n3\nbb\n2\ncc\n1\ndd\n0\nee\n5\nff\n4\ngg\n7\nhh\n6\nii\n8\njj\n9\nkk\n10\nll\n11\nmm\n12\nnn\n13\noo\n14\npp\n15\nNote: (Compatibility Note) New for ACPI 3.0",
"example": ""
},
{
"title": "UARTSerialBusV2 (UART Serial Bus Connection Resource Descriptor (Version 2) Macro)",
"syntax": "UARTSerialBusV2 (InitialBaudRate, BitsPerByte, StopBits, LinesInUse, IsBigEndian, Parity, FlowControl,\nReceiveBufferSize, TransmitBufferSize, ResourceSource, ResourceSourceIndex, ResourceUsage, DescriptorName, Shared, VendorData)",
"arguments": "InitialBaudRate evaluates to a 32-bit integer that specifies the default or initial connection speed in bytes per second that the device supports. The bit field _SPE is automatically created to refer to this portion of the resource descriptor.\nBitsPerByte is an optional argument that specifies whether five bits (DataBitsFive), six bits (DataBitsSix), seven bits (DataBitsSeven), eight bits (DataBitsEight) or nine bits (DataBitsNine) contain data during transfer of a single packet or character. DataBitsEight is the default. The bit field DescriptorName._LEN is automatically created to refer to this portion of the resource descriptor.\nStopBits is an optional argument that specifies whether there are two bits (StopBitsTwo), one and a half bits (StopBitsOnePlusHalf), one bit (StopBitsOne) or no bits (StopBitsZero) used to signal the end of a packet or character. StopBitsOne is the default. The bit field _STB is automatically created to refer to this portion of the resource descriptor.\nLinesInUse evaluates to an integer representing 8 1-bit flags representing the presence (\u20181\u2019) or absence (\u20180\u2019) of a particular line. The bit field _LIN is automatically created to refer to this portion of the resource descriptor.\nBit Mask\nUART Line\nBit 7 (0x80)\nRequest To Send (RTS)\nBit 6 (0x40)\nClear To Send (CTS)\nBit 5 (0x20)\nData Terminal Ready (DTR)\nBit 4 (0x10)\nData Set Ready (DSR)\nBit 3 (0x08)\nRing Indicator (RI)\nBit 2 (0x04)\nData Carrier Detect (DTD)\nBit 1 (0x02)\nReserved. Must be 0.\nBit 0 (0x01)\nReserved. Must be 0.\nIsBigEndian is an optional argument that specifies whether the device is expecting big endian (BigEndian) or little endian (LittleEndian) data formats. LittleEndian is the default. The bit field _END is automatically created to refer to this portion of the resource descriptor.\nParity is an optional argument that specifies whether the type of parity bits included after the data in a packet are to be interpreted as space parity (ParityTypeSpace), mark parity (ParityTypeMark), odd parity (ParityTypeOdd), even parity (ParityTypeEven) or no parity (ParityTypeNone). ParityTypeNone is the default. The bit field PAR is automatically created to refer to this portion of the resource descriptor.\nFlowControl is an optional argument that specifies whether there is hardware-based flow control\n(FlowControlHardware), software-based flow control (FlowControlXON) or no flow control\n(FlowControlNone) used when communicating with the device. FlowControlNone is the default. The bit field_FLC is automatically created to refer to this portion of the resource descriptor.\nReceiveBufferSize evaluates to a 16-bit integer that specifies the upper limit in bytes of the receive buffer that can be optimally utilized while communicating with this device. The bit field_RXL is automatically created to refer to this portion of the resource descriptor.\nTransmitBufferSize evaluates to a 16-bit integer that specifies the upper limit in bytes of the transmit buffer that can be optimally utilized while communicating with this device. The bit field _TXL is automatically created to refer to this portion of the resource descriptor.\nResourceSource is a string which uniquely identifies the UART bus controller referred to by this descriptor. ResourceSource can be a fully-qualified name, a relative name or a name segment that utilizes the namespace search rules.\nResourceSourceIndex is an optional argument and is assumed to be 0 for this revision.\nResourceUsage is an optional argument and is assumed to be ResourceConsumer for this revision.\nDescriptorName is an optional argument that specifies a name for an integer constant that will be created in the current scope that contains the offset of this resource descriptor within the current resource template buffer. The predefined descriptor field names may be appended to this name to access individual fields within the descriptor via the Buffer Field operators.\nShared is an optional argument and can be either Shared or Exclusive. If not specified, Exclusive is assumed. The bit field name _SHR is automatically created to refer to this portion of the resource descriptor.\nVendorData is an optional argument that specifies an object to be decoded by the OS driver. It is a RawDataBuffer. The bit field name _VEN is automatically created to refer to this portion of the resource descriptor.",
"description": "The UARTSerialBusV2 macro evaluates to a buffer that contains a UART Serial Bus resource descriptor (Version 2). The macro is designed to be used inside of a ResourceTemplate (seeSection 19.3.3 ).",