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