aslresources.y revision 1.1.1.10 1 NoEcho('
2 /******************************************************************************
3 *
4 * Module Name: aslresources.y - Bison/Yacc production rules for resources
5 * - Keep this file synched with the
6 * CvParseOpBlockType function in cvcompiler.c
7 *
8 *****************************************************************************/
9
10 /*
11 * Copyright (C) 2000 - 2021, Intel Corp.
12 * All rights reserved.
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions, and the following disclaimer,
19 * without modification.
20 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
21 * substantially similar to the "NO WARRANTY" disclaimer below
22 * ("Disclaimer") and any redistribution must be conditioned upon
23 * including a substantially similar Disclaimer requirement for further
24 * binary redistribution.
25 * 3. Neither the names of the above-listed copyright holders nor the names
26 * of any contributors may be used to endorse or promote products derived
27 * from this software without specific prior written permission.
28 *
29 * Alternatively, this software may be distributed under the terms of the
30 * GNU General Public License ("GPL") version 2 as published by the Free
31 * Software Foundation.
32 *
33 * NO WARRANTY
34 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
35 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
36 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
37 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
38 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
39 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
40 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
41 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
42 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
43 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
44 * POSSIBILITY OF SUCH DAMAGES.
45 */
46
47 ')
48
49
50 /*******************************************************************************
51 *
52 * ASL Resource Template Terms
53 *
54 ******************************************************************************/
55
56 /*
57 * Note: Create two default nodes to allow conversion to a Buffer AML opcode
58 * Also, insert the EndTag at the end of the template.
59 */
60 ResourceTemplateTerm
61 : PARSEOP_RESOURCETEMPLATE {COMMENT_CAPTURE_OFF;}
62 OptionalParentheses
63 '{'
64 ResourceMacroList '}' {$$ = TrCreateOp (PARSEOP_RESOURCETEMPLATE,4,
65 TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
66 TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
67 $5,
68 TrCreateLeafOp (PARSEOP_ENDTAG));
69 COMMENT_CAPTURE_ON;}
70 ;
71
72 OptionalParentheses
73 : {$$ = NULL;}
74 | PARSEOP_OPEN_PAREN
75 PARSEOP_CLOSE_PAREN {$$ = NULL;}
76 ;
77
78 ResourceMacroList
79 : {$$ = NULL;}
80 | ResourceMacroList
81 ResourceMacroTerm {$$ = TrLinkPeerOp ($1,$2);}
82 ;
83
84 ResourceMacroTerm
85 : Csi2SerialBusTerm {}
86 | DMATerm {}
87 | DWordIOTerm {}
88 | DWordMemoryTerm {}
89 | DWordSpaceTerm {}
90 | EndDependentFnTerm {}
91 | ExtendedIOTerm {}
92 | ExtendedMemoryTerm {}
93 | ExtendedSpaceTerm {}
94 | FixedDmaTerm {}
95 | FixedIOTerm {}
96 | GpioIntTerm {}
97 | GpioIoTerm {}
98 | I2cSerialBusTerm {}
99 | I2cSerialBusTermV2 {}
100 | InterruptTerm {}
101 | IOTerm {}
102 | IRQNoFlagsTerm {}
103 | IRQTerm {}
104 | Memory24Term {}
105 | Memory32FixedTerm {}
106 | Memory32Term {}
107 | PinConfigTerm {}
108 | PinFunctionTerm {}
109 | PinGroupTerm {}
110 | PinGroupConfigTerm {}
111 | PinGroupFunctionTerm {}
112 | QWordIOTerm {}
113 | QWordMemoryTerm {}
114 | QWordSpaceTerm {}
115 | RegisterTerm {}
116 | SpiSerialBusTerm {}
117 | SpiSerialBusTermV2 {}
118 | StartDependentFnNoPriTerm {}
119 | StartDependentFnTerm {}
120 | UartSerialBusTerm {}
121 | UartSerialBusTermV2 {}
122 | VendorLongTerm {}
123 | VendorShortTerm {}
124 | WordBusNumberTerm {}
125 | WordIOTerm {}
126 | WordSpaceTerm {}
127 ;
128
129 Csi2SerialBusTerm
130 : PARSEOP_CSI2_SERIALBUS
131 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CSI2_SERIALBUS);}
132 OptionalSlaveMode_First {UtCheckIntegerRange ($4, 0x00, 0x01);} /* 04: SlaveMode */
133 ',' ByteConstExpr {UtCheckIntegerRange ($7, 0x00, 0x03);} /* 07: PhyType */
134 OptionalByteConstExpr {UtCheckIntegerRange ($9, 0x00, 0xFC);} /* 09: LocalPortInstance */
135 ',' StringData /* 12: ResourceSource */
136 ',' ByteConstExpr /* 14: ResourceSourceIndex */
137 OptionalResourceType /* 15; ResourceType (ResourceUsage) */
138 OptionalNameString /* 16: DescriptorName */
139 OptionalBuffer_Last /* 17: VendorData */
140 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,8,
141 $4,$7,$9,$12,$14,$15,$16,$17);}
142 | PARSEOP_CSI2_SERIALBUS
143 PARSEOP_OPEN_PAREN
144 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
145
146 DMATerm
147 : PARSEOP_DMA
148 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DMA);}
149 DMATypeKeyword
150 OptionalBusMasterKeyword
151 ',' XferTypeKeyword
152 OptionalNameString_Last
153 PARSEOP_CLOSE_PAREN '{'
154 ByteList '}' {$$ = TrLinkOpChildren ($<n>3,5,$4,$5,$7,$8,$11);}
155 | PARSEOP_DMA
156 PARSEOP_OPEN_PAREN
157 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
158 ;
159
160 DWordIOTerm
161 : PARSEOP_DWORDIO
162 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DWORDIO);}
163 OptionalResourceType_First
164 OptionalMinType
165 OptionalMaxType
166 OptionalDecodeType
167 OptionalRangeType
168 ',' DWordConstExpr
169 ',' DWordConstExpr
170 ',' DWordConstExpr
171 ',' DWordConstExpr
172 ',' DWordConstExpr
173 OptionalByteConstExpr
174 OptionalStringData
175 OptionalNameString
176 OptionalType
177 OptionalTranslationType_Last
178 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
179 $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
180 | PARSEOP_DWORDIO
181 PARSEOP_OPEN_PAREN
182 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
183 ;
184
185 DWordMemoryTerm
186 : PARSEOP_DWORDMEMORY
187 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DWORDMEMORY);}
188 OptionalResourceType_First
189 OptionalDecodeType
190 OptionalMinType
191 OptionalMaxType
192 OptionalMemType
193 ',' OptionalReadWriteKeyword
194 ',' DWordConstExpr
195 ',' DWordConstExpr
196 ',' DWordConstExpr
197 ',' DWordConstExpr
198 ',' DWordConstExpr
199 OptionalByteConstExpr
200 OptionalStringData
201 OptionalNameString
202 OptionalAddressRange
203 OptionalType_Last
204 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,16,
205 $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
206 | PARSEOP_DWORDMEMORY
207 PARSEOP_OPEN_PAREN
208 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
209 ;
210
211 DWordSpaceTerm
212 : PARSEOP_DWORDSPACE
213 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DWORDSPACE);}
214 ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
215 OptionalResourceType
216 OptionalDecodeType
217 OptionalMinType
218 OptionalMaxType
219 ',' ByteConstExpr
220 ',' DWordConstExpr
221 ',' DWordConstExpr
222 ',' DWordConstExpr
223 ',' DWordConstExpr
224 ',' DWordConstExpr
225 OptionalByteConstExpr
226 OptionalStringData
227 OptionalNameString_Last
228 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
229 $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
230 | PARSEOP_DWORDSPACE
231 PARSEOP_OPEN_PAREN
232 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
233 ;
234
235 EndDependentFnTerm
236 : PARSEOP_ENDDEPENDENTFN
237 PARSEOP_OPEN_PAREN
238 PARSEOP_CLOSE_PAREN {$$ = TrCreateLeafOp (PARSEOP_ENDDEPENDENTFN);}
239 | PARSEOP_ENDDEPENDENTFN
240 PARSEOP_OPEN_PAREN
241 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
242 ;
243
244 ExtendedIOTerm
245 : PARSEOP_EXTENDEDIO
246 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_EXTENDEDIO);}
247 OptionalResourceType_First
248 OptionalMinType
249 OptionalMaxType
250 OptionalDecodeType
251 OptionalRangeType
252 ',' QWordConstExpr
253 ',' QWordConstExpr
254 ',' QWordConstExpr
255 ',' QWordConstExpr
256 ',' QWordConstExpr
257 OptionalQWordConstExpr
258 OptionalNameString
259 OptionalType
260 OptionalTranslationType_Last
261 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
262 $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22);}
263 | PARSEOP_EXTENDEDIO
264 PARSEOP_OPEN_PAREN
265 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
266 ;
267
268 ExtendedMemoryTerm
269 : PARSEOP_EXTENDEDMEMORY
270 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_EXTENDEDMEMORY);}
271 OptionalResourceType_First
272 OptionalDecodeType
273 OptionalMinType
274 OptionalMaxType
275 OptionalMemType
276 ',' OptionalReadWriteKeyword
277 ',' QWordConstExpr
278 ',' QWordConstExpr
279 ',' QWordConstExpr
280 ',' QWordConstExpr
281 ',' QWordConstExpr
282 OptionalQWordConstExpr
283 OptionalNameString
284 OptionalAddressRange
285 OptionalType_Last
286 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
287 $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24);}
288 | PARSEOP_EXTENDEDMEMORY
289 PARSEOP_OPEN_PAREN
290 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
291 ;
292
293 ExtendedSpaceTerm
294 : PARSEOP_EXTENDEDSPACE PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_EXTENDEDSPACE);}
295 ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
296 OptionalResourceType
297 OptionalDecodeType
298 OptionalMinType
299 OptionalMaxType
300 ',' ByteConstExpr
301 ',' QWordConstExpr
302 ',' QWordConstExpr
303 ',' QWordConstExpr
304 ',' QWordConstExpr
305 ',' QWordConstExpr
306 OptionalQWordConstExpr
307 OptionalNameString_Last
308 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,13,
309 $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23);}
310 | PARSEOP_EXTENDEDSPACE
311 PARSEOP_OPEN_PAREN
312 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
313 ;
314
315 FixedDmaTerm
316 : PARSEOP_FIXEDDMA
317 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FIXEDDMA);}
318 WordConstExpr /* 04: DMA RequestLines */
319 ',' WordConstExpr /* 06: DMA Channels */
320 OptionalXferSize /* 07: DMA TransferSize */
321 OptionalNameString /* 08: DescriptorName */
322 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$6,$7,$8);}
323 | PARSEOP_FIXEDDMA
324 PARSEOP_OPEN_PAREN
325 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
326 ;
327
328 FixedIOTerm
329 : PARSEOP_FIXEDIO
330 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FIXEDIO);}
331 WordConstExpr
332 ',' ByteConstExpr
333 OptionalNameString_Last
334 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$7);}
335 | PARSEOP_FIXEDIO
336 PARSEOP_OPEN_PAREN
337 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
338 ;
339
340 GpioIntTerm
341 : PARSEOP_GPIO_INT
342 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_GPIO_INT);}
343 InterruptTypeKeyword /* 04: InterruptType */
344 ',' InterruptLevel /* 06: InterruptLevel */
345 OptionalShareType /* 07: SharedType */
346 ',' PinConfigByte /* 09: PinConfig */
347 OptionalWordConstExpr /* 10: DebounceTimeout */
348 ',' StringData /* 12: ResourceSource */
349 OptionalByteConstExpr /* 13: ResourceSourceIndex */
350 OptionalResourceType /* 14: ResourceType */
351 OptionalNameString /* 15: DescriptorName */
352 OptionalBuffer_Last /* 16: VendorData */
353 PARSEOP_CLOSE_PAREN '{'
354 DWordConstExpr '}' {$$ = TrLinkOpChildren ($<n>3,11,
355 $4,$6,$7,$9,$10,$12,$13,$14,$15,$16,$19);}
356 | PARSEOP_GPIO_INT
357 PARSEOP_OPEN_PAREN
358 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
359 ;
360
361 GpioIoTerm
362 : PARSEOP_GPIO_IO
363 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_GPIO_IO);}
364 OptionalShareType_First /* 04: SharedType */
365 ',' PinConfigByte /* 06: PinConfig */
366 OptionalWordConstExpr /* 07: DebounceTimeout */
367 OptionalWordConstExpr /* 08: DriveStrength */
368 OptionalIoRestriction /* 09: IoRestriction */
369 ',' StringData /* 11: ResourceSource */
370 OptionalByteConstExpr /* 12: ResourceSourceIndex */
371 OptionalResourceType /* 13: ResourceType */
372 OptionalNameString /* 14: DescriptorName */
373 OptionalBuffer_Last /* 15: VendorData */
374 PARSEOP_CLOSE_PAREN '{'
375 DWordList '}' {$$ = TrLinkOpChildren ($<n>3,11,
376 $4,$6,$7,$8,$9,$11,$12,$13,$14,$15,$18);}
377 | PARSEOP_GPIO_IO
378 PARSEOP_OPEN_PAREN
379 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
380 ;
381
382 I2cSerialBusTerm
383 : PARSEOP_I2C_SERIALBUS
384 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_I2C_SERIALBUS);}
385 WordConstExpr /* 04: SlaveAddress */
386 OptionalSlaveMode /* 05: SlaveMode */
387 ',' DWordConstExpr /* 07: ConnectionSpeed */
388 OptionalAddressingMode /* 08: AddressingMode */
389 ',' StringData /* 10: ResourceSource */
390 OptionalByteConstExpr /* 11: ResourceSourceIndex */
391 OptionalResourceType /* 12: ResourceType */
392 OptionalNameString /* 13: DescriptorName */
393 OptionalBuffer_Last /* 14: VendorData */
394 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,10,
395 $4,$5,$7,$8,$10,$11,$12,$13,
396 TrCreateLeafOp (PARSEOP_DEFAULT_ARG),$14);}
397 | PARSEOP_I2C_SERIALBUS
398 PARSEOP_OPEN_PAREN
399 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
400 ;
401
402 I2cSerialBusTermV2
403 : PARSEOP_I2C_SERIALBUS_V2
404 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_I2C_SERIALBUS_V2);}
405 WordConstExpr /* 04: SlaveAddress */
406 OptionalSlaveMode /* 05: SlaveMode */
407 ',' DWordConstExpr /* 07: ConnectionSpeed */
408 OptionalAddressingMode /* 08: AddressingMode */
409 ',' StringData /* 10: ResourceSource */
410 OptionalByteConstExpr /* 11: ResourceSourceIndex */
411 OptionalResourceType /* 12: ResourceType */
412 OptionalNameString /* 13: DescriptorName */
413 OptionalShareType /* 14: Share */
414 OptionalBuffer_Last /* 15: VendorData */
415 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,10,
416 $4,$5,$7,$8,$10,$11,$12,$13,$14,$15);}
417 | PARSEOP_I2C_SERIALBUS_V2
418 PARSEOP_OPEN_PAREN
419 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
420 ;
421
422 InterruptTerm
423 : PARSEOP_INTERRUPT
424 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_INTERRUPT);}
425 OptionalResourceType_First
426 ',' InterruptTypeKeyword
427 ',' InterruptLevel
428 OptionalShareType
429 OptionalByteConstExpr
430 OptionalStringData
431 OptionalNameString_Last
432 PARSEOP_CLOSE_PAREN '{'
433 DWordList '}' {$$ = TrLinkOpChildren ($<n>3,8,
434 $4,$6,$8,$9,$10,$11,$12,$15);}
435 | PARSEOP_INTERRUPT
436 PARSEOP_OPEN_PAREN
437 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
438 ;
439
440 IOTerm
441 : PARSEOP_IO
442 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_IO);}
443 IODecodeKeyword
444 ',' WordConstExpr
445 ',' WordConstExpr
446 ',' ByteConstExpr
447 ',' ByteConstExpr
448 OptionalNameString_Last
449 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
450 | PARSEOP_IO
451 PARSEOP_OPEN_PAREN
452 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
453 ;
454
455 IRQNoFlagsTerm
456 : PARSEOP_IRQNOFLAGS
457 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_IRQNOFLAGS);}
458 OptionalNameString_First
459 PARSEOP_CLOSE_PAREN '{'
460 ByteList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
461 | PARSEOP_IRQNOFLAGS
462 PARSEOP_OPEN_PAREN
463 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
464 ;
465
466 IRQTerm
467 : PARSEOP_IRQ
468 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_IRQ);}
469 InterruptTypeKeyword
470 ',' InterruptLevel
471 OptionalShareType
472 OptionalNameString_Last
473 PARSEOP_CLOSE_PAREN '{'
474 ByteList '}' {$$ = TrLinkOpChildren ($<n>3,5,$4,$6,$7,$8,$11);}
475 | PARSEOP_IRQ
476 PARSEOP_OPEN_PAREN
477 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
478 ;
479
480 Memory24Term
481 : PARSEOP_MEMORY24
482 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MEMORY24);}
483 OptionalReadWriteKeyword
484 ',' WordConstExpr
485 ',' WordConstExpr
486 ',' WordConstExpr
487 ',' WordConstExpr
488 OptionalNameString_Last
489 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
490 | PARSEOP_MEMORY24
491 PARSEOP_OPEN_PAREN
492 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
493 ;
494
495 Memory32FixedTerm
496 : PARSEOP_MEMORY32FIXED
497 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MEMORY32FIXED);}
498 OptionalReadWriteKeyword
499 ',' DWordConstExpr
500 ',' DWordConstExpr
501 OptionalNameString_Last
502 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$6,$8,$9);}
503 | PARSEOP_MEMORY32FIXED
504 PARSEOP_OPEN_PAREN
505 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
506 ;
507
508 Memory32Term
509 : PARSEOP_MEMORY32
510 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MEMORY32);}
511 OptionalReadWriteKeyword
512 ',' DWordConstExpr
513 ',' DWordConstExpr
514 ',' DWordConstExpr
515 ',' DWordConstExpr
516 OptionalNameString_Last
517 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
518 | PARSEOP_MEMORY32
519 PARSEOP_OPEN_PAREN
520 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
521 ;
522
523 PinConfigTerm
524 : PARSEOP_PINCONFIG
525 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINCONFIG);}
526 OptionalShareType_First /* 04: SharedType */
527 ',' ByteConstExpr /* 06: PinConfigType */
528 ',' DWordConstExpr /* 08: PinConfigValue */
529 ',' StringData /* 10: ResourceSource */
530 OptionalByteConstExpr /* 11: ResourceSourceIndex */
531 OptionalResourceType /* 12: ResourceType */
532 OptionalNameString /* 13: DescriptorName */
533 OptionalBuffer_Last /* 14: VendorData */
534 PARSEOP_CLOSE_PAREN '{'
535 DWordList '}' {$$ = TrLinkOpChildren ($<n>3,9,
536 $4,$6,$8,$10,$11,$12,$13,$14,$17);}
537 | PARSEOP_PINCONFIG
538 PARSEOP_OPEN_PAREN
539 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
540 ;
541
542 PinFunctionTerm
543 : PARSEOP_PINFUNCTION
544 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINFUNCTION);}
545 OptionalShareType_First /* 04: SharedType */
546 ',' PinConfigByte /* 06: PinConfig */
547 ',' WordConstExpr /* 08: FunctionNumber */
548 ',' StringData /* 10: ResourceSource */
549 OptionalByteConstExpr /* 11: ResourceSourceIndex */
550 OptionalResourceType /* 12: ResourceType */
551 OptionalNameString /* 13: DescriptorName */
552 OptionalBuffer_Last /* 14: VendorData */
553 PARSEOP_CLOSE_PAREN '{'
554 DWordList '}' {$$ = TrLinkOpChildren ($<n>3,9,
555 $4,$6,$8,$10,$11,$12,$13,$14,$17);}
556 | PARSEOP_PINFUNCTION
557 PARSEOP_OPEN_PAREN
558 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
559 ;
560
561 PinGroupTerm
562 : PARSEOP_PINGROUP
563 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINGROUP);}
564 StringData /* 04: ResourceLabel */
565 OptionalProducerResourceType /* 05: ResourceType */
566 OptionalNameString /* 06: DescriptorName */
567 OptionalBuffer_Last /* 07: VendorData */
568 PARSEOP_CLOSE_PAREN '{'
569 DWordList '}' {$$ = TrLinkOpChildren ($<n>3,5,$4,$5,$6,$7,$10);}
570 | PARSEOP_PINGROUP
571 PARSEOP_OPEN_PAREN
572 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
573 ;
574
575 PinGroupConfigTerm
576 : PARSEOP_PINGROUPCONFIG
577 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINGROUPCONFIG);}
578 OptionalShareType_First /* 04: SharedType */
579 ',' ByteConstExpr /* 06: PinConfigType */
580 ',' DWordConstExpr /* 08: PinConfigValue */
581 ',' StringData /* 10: ResourceSource */
582 OptionalByteConstExpr /* 11: ResourceSourceIndex */
583 ',' StringData /* 13: ResourceSourceLabel */
584 OptionalResourceType /* 14: ResourceType */
585 OptionalNameString /* 15: DescriptorName */
586 OptionalBuffer_Last /* 16: VendorData */
587 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,9,
588 $4,$6,$8,$10,$11,$13,$14,$15,$16);}
589 | PARSEOP_PINGROUPCONFIG
590 PARSEOP_OPEN_PAREN
591 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
592 ;
593
594 PinGroupFunctionTerm
595 : PARSEOP_PINGROUPFUNCTION
596 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINGROUPFUNCTION);}
597 OptionalShareType_First /* 04: SharedType */
598 ',' WordConstExpr /* 06: FunctionNumber */
599 ',' StringData /* 08: ResourceSource */
600 OptionalByteConstExpr /* 09: ResourceSourceIndex */
601 ',' StringData /* 11: ResourceSourceLabel */
602 OptionalResourceType /* 12: ResourceType */
603 OptionalNameString /* 13: DescriptorName */
604 OptionalBuffer_Last /* 14: VendorData */
605 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,8,
606 $4,$6,$8,$9,$11,$12,$13,$14);}
607 | PARSEOP_PINGROUPFUNCTION
608 PARSEOP_OPEN_PAREN
609 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
610 ;
611
612 QWordIOTerm
613 : PARSEOP_QWORDIO
614 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_QWORDIO);}
615 OptionalResourceType_First
616 OptionalMinType
617 OptionalMaxType
618 OptionalDecodeType
619 OptionalRangeType
620 ',' QWordConstExpr
621 ',' QWordConstExpr
622 ',' QWordConstExpr
623 ',' QWordConstExpr
624 ',' QWordConstExpr
625 OptionalByteConstExpr
626 OptionalStringData
627 OptionalNameString
628 OptionalType
629 OptionalTranslationType_Last
630 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
631 $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
632 | PARSEOP_QWORDIO
633 PARSEOP_OPEN_PAREN
634 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
635 ;
636
637 QWordMemoryTerm
638 : PARSEOP_QWORDMEMORY
639 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_QWORDMEMORY);}
640 OptionalResourceType_First
641 OptionalDecodeType
642 OptionalMinType
643 OptionalMaxType
644 OptionalMemType
645 ',' OptionalReadWriteKeyword
646 ',' QWordConstExpr
647 ',' QWordConstExpr
648 ',' QWordConstExpr
649 ',' QWordConstExpr
650 ',' QWordConstExpr
651 OptionalByteConstExpr
652 OptionalStringData
653 OptionalNameString
654 OptionalAddressRange
655 OptionalType_Last
656 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,16,
657 $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
658 | PARSEOP_QWORDMEMORY
659 PARSEOP_OPEN_PAREN
660 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
661 ;
662
663 QWordSpaceTerm
664 : PARSEOP_QWORDSPACE
665 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_QWORDSPACE);}
666 ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
667 OptionalResourceType
668 OptionalDecodeType
669 OptionalMinType
670 OptionalMaxType
671 ',' ByteConstExpr
672 ',' QWordConstExpr
673 ',' QWordConstExpr
674 ',' QWordConstExpr
675 ',' QWordConstExpr
676 ',' QWordConstExpr
677 OptionalByteConstExpr
678 OptionalStringData
679 OptionalNameString_Last
680 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
681 $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
682 | PARSEOP_QWORDSPACE
683 PARSEOP_OPEN_PAREN
684 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
685 ;
686
687 RegisterTerm
688 : PARSEOP_REGISTER
689 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_REGISTER);}
690 AddressSpaceKeyword
691 ',' ByteConstExpr
692 ',' ByteConstExpr
693 ',' QWordConstExpr
694 OptionalAccessSize
695 OptionalNameString_Last
696 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$11,$12);}
697 | PARSEOP_REGISTER
698 PARSEOP_OPEN_PAREN
699 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
700 ;
701
702 SpiSerialBusTerm
703 : PARSEOP_SPI_SERIALBUS
704 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SPI_SERIALBUS);}
705 WordConstExpr /* 04: DeviceSelection */
706 OptionalDevicePolarity /* 05: DevicePolarity */
707 OptionalWireMode /* 06: WireMode */
708 ',' ByteConstExpr /* 08: DataBitLength */
709 OptionalSlaveMode /* 09: SlaveMode */
710 ',' DWordConstExpr /* 11: ConnectionSpeed */
711 ',' ClockPolarityKeyword /* 13: ClockPolarity */
712 ',' ClockPhaseKeyword /* 15: ClockPhase */
713 ',' StringData /* 17: ResourceSource */
714 OptionalByteConstExpr /* 18: ResourceSourceIndex */
715 OptionalResourceType /* 19: ResourceType */
716 OptionalNameString /* 20: DescriptorName */
717 OptionalBuffer_Last /* 21: VendorData */
718 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
719 $4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
720 TrCreateLeafOp (PARSEOP_DEFAULT_ARG),$21);}
721 | PARSEOP_SPI_SERIALBUS
722 PARSEOP_OPEN_PAREN
723 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
724 ;
725
726 SpiSerialBusTermV2
727 : PARSEOP_SPI_SERIALBUS_V2
728 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SPI_SERIALBUS_V2);}
729 WordConstExpr /* 04: DeviceSelection */
730 OptionalDevicePolarity /* 05: DevicePolarity */
731 OptionalWireMode /* 06: WireMode */
732 ',' ByteConstExpr /* 08: DataBitLength */
733 OptionalSlaveMode /* 09: SlaveMode */
734 ',' DWordConstExpr /* 11: ConnectionSpeed */
735 ',' ClockPolarityKeyword /* 13: ClockPolarity */
736 ',' ClockPhaseKeyword /* 15: ClockPhase */
737 ',' StringData /* 17: ResourceSource */
738 OptionalByteConstExpr /* 18: ResourceSourceIndex */
739 OptionalResourceType /* 19: ResourceType */
740 OptionalNameString /* 20: DescriptorName */
741 OptionalShareType /* 21: Share */
742 OptionalBuffer_Last /* 22: VendorData */
743 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
744 $4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,$21,$22);}
745 | PARSEOP_SPI_SERIALBUS_V2
746 PARSEOP_OPEN_PAREN
747 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
748 ;
749
750 StartDependentFnNoPriTerm
751 : PARSEOP_STARTDEPENDENTFN_NOPRI
752 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_STARTDEPENDENTFN_NOPRI);}
753 PARSEOP_CLOSE_PAREN '{'
754 ResourceMacroList '}' {$$ = TrLinkOpChildren ($<n>3,1,$6);}
755 | PARSEOP_STARTDEPENDENTFN_NOPRI
756 PARSEOP_OPEN_PAREN
757 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
758 ;
759
760 StartDependentFnTerm
761 : PARSEOP_STARTDEPENDENTFN
762 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_STARTDEPENDENTFN);}
763 ByteConstExpr
764 ',' ByteConstExpr
765 PARSEOP_CLOSE_PAREN '{'
766 ResourceMacroList '}' {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$9);}
767 | PARSEOP_STARTDEPENDENTFN
768 PARSEOP_OPEN_PAREN
769 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
770 ;
771
772 UartSerialBusTerm
773 : PARSEOP_UART_SERIALBUS
774 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_UART_SERIALBUS);}
775 DWordConstExpr /* 04: ConnectionSpeed */
776 OptionalBitsPerByte /* 05: BitsPerByte */
777 OptionalStopBits /* 06: StopBits */
778 ',' ByteConstExpr /* 08: LinesInUse */
779 OptionalEndian /* 09: Endianness */
780 OptionalParityType /* 10: Parity */
781 OptionalFlowControl /* 11: FlowControl */
782 ',' WordConstExpr /* 13: Rx BufferSize */
783 ',' WordConstExpr /* 15: Tx BufferSize */
784 ',' StringData /* 17: ResourceSource */
785 OptionalByteConstExpr /* 18: ResourceSourceIndex */
786 OptionalResourceType /* 19: ResourceType */
787 OptionalNameString /* 20: DescriptorName */
788 OptionalBuffer_Last /* 21: VendorData */
789 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
790 $4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
791 TrCreateLeafOp (PARSEOP_DEFAULT_ARG),$21);}
792 | PARSEOP_UART_SERIALBUS
793 PARSEOP_OPEN_PAREN
794 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
795 ;
796
797 UartSerialBusTermV2
798 : PARSEOP_UART_SERIALBUS_V2
799 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_UART_SERIALBUS_V2);}
800 DWordConstExpr /* 04: ConnectionSpeed */
801 OptionalBitsPerByte /* 05: BitsPerByte */
802 OptionalStopBits /* 06: StopBits */
803 ',' ByteConstExpr /* 08: LinesInUse */
804 OptionalEndian /* 09: Endianness */
805 OptionalParityType /* 10: Parity */
806 OptionalFlowControl /* 11: FlowControl */
807 ',' WordConstExpr /* 13: Rx BufferSize */
808 ',' WordConstExpr /* 15: Tx BufferSize */
809 ',' StringData /* 17: ResourceSource */
810 OptionalByteConstExpr /* 18: ResourceSourceIndex */
811 OptionalResourceType /* 19: ResourceType */
812 OptionalNameString /* 20: DescriptorName */
813 OptionalShareType /* 21: Share */
814 OptionalBuffer_Last /* 22: VendorData */
815 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
816 $4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,$21,$22);}
817 | PARSEOP_UART_SERIALBUS_V2
818 PARSEOP_OPEN_PAREN
819 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
820 ;
821
822 VendorLongTerm
823 : PARSEOP_VENDORLONG
824 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_VENDORLONG);}
825 OptionalNameString_First
826 PARSEOP_CLOSE_PAREN '{'
827 ByteList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
828 | PARSEOP_VENDORLONG
829 PARSEOP_OPEN_PAREN
830 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
831 ;
832
833 VendorShortTerm
834 : PARSEOP_VENDORSHORT
835 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_VENDORSHORT);}
836 OptionalNameString_First
837 PARSEOP_CLOSE_PAREN '{'
838 ByteList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
839 | PARSEOP_VENDORSHORT
840 PARSEOP_OPEN_PAREN
841 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
842 ;
843
844 WordBusNumberTerm
845 : PARSEOP_WORDBUSNUMBER
846 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WORDBUSNUMBER);}
847 OptionalResourceType_First
848 OptionalMinType
849 OptionalMaxType
850 OptionalDecodeType
851 ',' WordConstExpr
852 ',' WordConstExpr
853 ',' WordConstExpr
854 ',' WordConstExpr
855 ',' WordConstExpr
856 OptionalByteConstExpr
857 OptionalStringData
858 OptionalNameString_Last
859 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,12,
860 $4,$5,$6,$7,$9,$11,$13,$15,$17,$18,$19,$20);}
861 | PARSEOP_WORDBUSNUMBER
862 PARSEOP_OPEN_PAREN
863 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
864 ;
865
866 WordIOTerm
867 : PARSEOP_WORDIO
868 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WORDIO);}
869 OptionalResourceType_First
870 OptionalMinType
871 OptionalMaxType
872 OptionalDecodeType
873 OptionalRangeType
874 ',' WordConstExpr
875 ',' WordConstExpr
876 ',' WordConstExpr
877 ',' WordConstExpr
878 ',' WordConstExpr
879 OptionalByteConstExpr
880 OptionalStringData
881 OptionalNameString
882 OptionalType
883 OptionalTranslationType_Last
884 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
885 $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
886 | PARSEOP_WORDIO
887 PARSEOP_OPEN_PAREN
888 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
889 ;
890
891 WordSpaceTerm
892 : PARSEOP_WORDSPACE
893 PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WORDSPACE);}
894 ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
895 OptionalResourceType
896 OptionalDecodeType
897 OptionalMinType
898 OptionalMaxType
899 ',' ByteConstExpr
900 ',' WordConstExpr
901 ',' WordConstExpr
902 ',' WordConstExpr
903 ',' WordConstExpr
904 ',' WordConstExpr
905 OptionalByteConstExpr
906 OptionalStringData
907 OptionalNameString_Last
908 PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
909 $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
910 | PARSEOP_WORDSPACE
911 PARSEOP_OPEN_PAREN
912 error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
913 ;
914