1 NoEcho(' 2 /****************************************************************************** 3 * 4 * Module Name: aslresources.y - Bison/Yacc production rules for resources 5 * 6 *****************************************************************************/ 7 8 /* 9 * Copyright (C) 2000 - 2016, Intel Corp. 10 * All rights reserved. 11 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions 14 * are met: 15 * 1. Redistributions of source code must retain the above copyright 16 * notice, this list of conditions, and the following disclaimer, 17 * without modification. 18 * 2. Redistributions in binary form must reproduce at minimum a disclaimer 19 * substantially similar to the "NO WARRANTY" disclaimer below 20 * ("Disclaimer") and any redistribution must be conditioned upon 21 * including a substantially similar Disclaimer requirement for further 22 * binary redistribution. 23 * 3. Neither the names of the above-listed copyright holders nor the names 24 * of any contributors may be used to endorse or promote products derived 25 * from this software without specific prior written permission. 26 * 27 * Alternatively, this software may be distributed under the terms of the 28 * GNU General Public License ("GPL") version 2 as published by the Free 29 * Software Foundation. 30 * 31 * NO WARRANTY 32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 35 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 36 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 40 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 41 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 42 * POSSIBILITY OF SUCH DAMAGES. 43 */ 44 45 ') 46 47 /******************************************************************************* 48 * 49 * ASL Parameter Keyword Terms 50 * 51 ******************************************************************************/ 52 53 AccessAttribKeyword 54 : PARSEOP_ACCESSATTRIB_BLOCK {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_BLOCK);} 55 | PARSEOP_ACCESSATTRIB_BLOCK_CALL {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_BLOCK_CALL);} 56 | PARSEOP_ACCESSATTRIB_BYTE {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_BYTE);} 57 | PARSEOP_ACCESSATTRIB_QUICK {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_QUICK );} 58 | PARSEOP_ACCESSATTRIB_SND_RCV {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_SND_RCV);} 59 | PARSEOP_ACCESSATTRIB_WORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_WORD);} 60 | PARSEOP_ACCESSATTRIB_WORD_CALL {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_WORD_CALL);} 61 | PARSEOP_ACCESSATTRIB_MULTIBYTE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_MULTIBYTE);} 62 ByteConst 63 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 64 | PARSEOP_ACCESSATTRIB_RAW_BYTES '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_BYTES);} 65 ByteConst 66 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 67 | PARSEOP_ACCESSATTRIB_RAW_PROCESS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_PROCESS);} 68 ByteConst 69 ')' {$$ = TrLinkChildren ($<n>3,1,$4);} 70 ; 71 72 AccessTypeKeyword 73 : PARSEOP_ACCESSTYPE_ANY {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_ANY);} 74 | PARSEOP_ACCESSTYPE_BYTE {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_BYTE);} 75 | PARSEOP_ACCESSTYPE_WORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_WORD);} 76 | PARSEOP_ACCESSTYPE_DWORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_DWORD);} 77 | PARSEOP_ACCESSTYPE_QWORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_QWORD);} 78 | PARSEOP_ACCESSTYPE_BUF {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_BUF);} 79 ; 80 81 AddressingModeKeyword 82 : PARSEOP_ADDRESSINGMODE_7BIT {$$ = TrCreateLeafNode (PARSEOP_ADDRESSINGMODE_7BIT);} 83 | PARSEOP_ADDRESSINGMODE_10BIT {$$ = TrCreateLeafNode (PARSEOP_ADDRESSINGMODE_10BIT);} 84 ; 85 86 AddressKeyword 87 : PARSEOP_ADDRESSTYPE_MEMORY {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_MEMORY);} 88 | PARSEOP_ADDRESSTYPE_RESERVED {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_RESERVED);} 89 | PARSEOP_ADDRESSTYPE_NVS {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_NVS);} 90 | PARSEOP_ADDRESSTYPE_ACPI {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_ACPI);} 91 ; 92 93 AddressSpaceKeyword 94 : ByteConst {$$ = UtCheckIntegerRange ($1, 0x0A, 0xFF);} 95 | RegionSpaceKeyword {} 96 ; 97 98 BitsPerByteKeyword 99 : PARSEOP_BITSPERBYTE_FIVE {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_FIVE);} 100 | PARSEOP_BITSPERBYTE_SIX {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_SIX);} 101 | PARSEOP_BITSPERBYTE_SEVEN {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_SEVEN);} 102 | PARSEOP_BITSPERBYTE_EIGHT {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_EIGHT);} 103 | PARSEOP_BITSPERBYTE_NINE {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_NINE);} 104 ; 105 106 ClockPhaseKeyword 107 : PARSEOP_CLOCKPHASE_FIRST {$$ = TrCreateLeafNode (PARSEOP_CLOCKPHASE_FIRST);} 108 | PARSEOP_CLOCKPHASE_SECOND {$$ = TrCreateLeafNode (PARSEOP_CLOCKPHASE_SECOND);} 109 ; 110 111 ClockPolarityKeyword 112 : PARSEOP_CLOCKPOLARITY_LOW {$$ = TrCreateLeafNode (PARSEOP_CLOCKPOLARITY_LOW);} 113 | PARSEOP_CLOCKPOLARITY_HIGH {$$ = TrCreateLeafNode (PARSEOP_CLOCKPOLARITY_HIGH);} 114 ; 115 116 DecodeKeyword 117 : PARSEOP_DECODETYPE_POS {$$ = TrCreateLeafNode (PARSEOP_DECODETYPE_POS);} 118 | PARSEOP_DECODETYPE_SUB {$$ = TrCreateLeafNode (PARSEOP_DECODETYPE_SUB);} 119 ; 120 121 DevicePolarityKeyword 122 : PARSEOP_DEVICEPOLARITY_LOW {$$ = TrCreateLeafNode (PARSEOP_DEVICEPOLARITY_LOW);} 123 | PARSEOP_DEVICEPOLARITY_HIGH {$$ = TrCreateLeafNode (PARSEOP_DEVICEPOLARITY_HIGH);} 124 ; 125 126 DMATypeKeyword 127 : PARSEOP_DMATYPE_A {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_A);} 128 | PARSEOP_DMATYPE_COMPATIBILITY {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_COMPATIBILITY);} 129 | PARSEOP_DMATYPE_B {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_B);} 130 | PARSEOP_DMATYPE_F {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_F);} 131 ; 132 133 EndianKeyword 134 : PARSEOP_ENDIAN_LITTLE {$$ = TrCreateLeafNode (PARSEOP_ENDIAN_LITTLE);} 135 | PARSEOP_ENDIAN_BIG {$$ = TrCreateLeafNode (PARSEOP_ENDIAN_BIG);} 136 ; 137 138 FlowControlKeyword 139 : PARSEOP_FLOWCONTROL_HW {$$ = TrCreateLeafNode (PARSEOP_FLOWCONTROL_HW);} 140 | PARSEOP_FLOWCONTROL_NONE {$$ = TrCreateLeafNode (PARSEOP_FLOWCONTROL_NONE);} 141 | PARSEOP_FLOWCONTROL_SW {$$ = TrCreateLeafNode (PARSEOP_FLOWCONTROL_SW);} 142 ; 143 144 InterruptLevel 145 : PARSEOP_INTLEVEL_ACTIVEBOTH {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVEBOTH);} 146 | PARSEOP_INTLEVEL_ACTIVEHIGH {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVEHIGH);} 147 | PARSEOP_INTLEVEL_ACTIVELOW {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVELOW);} 148 ; 149 150 InterruptTypeKeyword 151 : PARSEOP_INTTYPE_EDGE {$$ = TrCreateLeafNode (PARSEOP_INTTYPE_EDGE);} 152 | PARSEOP_INTTYPE_LEVEL {$$ = TrCreateLeafNode (PARSEOP_INTTYPE_LEVEL);} 153 ; 154 155 IODecodeKeyword 156 : PARSEOP_IODECODETYPE_16 {$$ = TrCreateLeafNode (PARSEOP_IODECODETYPE_16);} 157 | PARSEOP_IODECODETYPE_10 {$$ = TrCreateLeafNode (PARSEOP_IODECODETYPE_10);} 158 ; 159 160 IoRestrictionKeyword 161 : PARSEOP_IORESTRICT_IN {$$ = TrCreateLeafNode (PARSEOP_IORESTRICT_IN);} 162 | PARSEOP_IORESTRICT_OUT {$$ = TrCreateLeafNode (PARSEOP_IORESTRICT_OUT);} 163 | PARSEOP_IORESTRICT_NONE {$$ = TrCreateLeafNode (PARSEOP_IORESTRICT_NONE);} 164 | PARSEOP_IORESTRICT_PRESERVE {$$ = TrCreateLeafNode (PARSEOP_IORESTRICT_PRESERVE);} 165 ; 166 167 LockRuleKeyword 168 : PARSEOP_LOCKRULE_LOCK {$$ = TrCreateLeafNode (PARSEOP_LOCKRULE_LOCK);} 169 | PARSEOP_LOCKRULE_NOLOCK {$$ = TrCreateLeafNode (PARSEOP_LOCKRULE_NOLOCK);} 170 ; 171 172 MatchOpKeyword 173 : PARSEOP_MATCHTYPE_MTR {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MTR);} 174 | PARSEOP_MATCHTYPE_MEQ {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MEQ);} 175 | PARSEOP_MATCHTYPE_MLE {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MLE);} 176 | PARSEOP_MATCHTYPE_MLT {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MLT);} 177 | PARSEOP_MATCHTYPE_MGE {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MGE);} 178 | PARSEOP_MATCHTYPE_MGT {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MGT);} 179 ; 180 181 MaxKeyword 182 : PARSEOP_MAXTYPE_FIXED {$$ = TrCreateLeafNode (PARSEOP_MAXTYPE_FIXED);} 183 | PARSEOP_MAXTYPE_NOTFIXED {$$ = TrCreateLeafNode (PARSEOP_MAXTYPE_NOTFIXED);} 184 ; 185 186 MemTypeKeyword 187 : PARSEOP_MEMTYPE_CACHEABLE {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_CACHEABLE);} 188 | PARSEOP_MEMTYPE_WRITECOMBINING {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_WRITECOMBINING);} 189 | PARSEOP_MEMTYPE_PREFETCHABLE {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_PREFETCHABLE);} 190 | PARSEOP_MEMTYPE_NONCACHEABLE {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_NONCACHEABLE);} 191 ; 192 193 MinKeyword 194 : PARSEOP_MINTYPE_FIXED {$$ = TrCreateLeafNode (PARSEOP_MINTYPE_FIXED);} 195 | PARSEOP_MINTYPE_NOTFIXED {$$ = TrCreateLeafNode (PARSEOP_MINTYPE_NOTFIXED);} 196 ; 197 198 ObjectTypeKeyword 199 : PARSEOP_OBJECTTYPE_UNK {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_UNK);} 200 | PARSEOP_OBJECTTYPE_INT {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_INT);} 201 | PARSEOP_OBJECTTYPE_STR {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_STR);} 202 | PARSEOP_OBJECTTYPE_BUF {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_BUF);} 203 | PARSEOP_OBJECTTYPE_PKG {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_PKG);} 204 | PARSEOP_OBJECTTYPE_FLD {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_FLD);} 205 | PARSEOP_OBJECTTYPE_DEV {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_DEV);} 206 | PARSEOP_OBJECTTYPE_EVT {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_EVT);} 207 | PARSEOP_OBJECTTYPE_MTH {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_MTH);} 208 | PARSEOP_OBJECTTYPE_MTX {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_MTX);} 209 | PARSEOP_OBJECTTYPE_OPR {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_OPR);} 210 | PARSEOP_OBJECTTYPE_POW {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_POW);} 211 | PARSEOP_OBJECTTYPE_PRO {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_PRO);} 212 | PARSEOP_OBJECTTYPE_THZ {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_THZ);} 213 | PARSEOP_OBJECTTYPE_BFF {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_BFF);} 214 | PARSEOP_OBJECTTYPE_DDB {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_DDB);} 215 ; 216 217 ParityTypeKeyword 218 : PARSEOP_PARITYTYPE_SPACE {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_SPACE);} 219 | PARSEOP_PARITYTYPE_MARK {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_MARK);} 220 | PARSEOP_PARITYTYPE_ODD {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_ODD);} 221 | PARSEOP_PARITYTYPE_EVEN {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_EVEN);} 222 | PARSEOP_PARITYTYPE_NONE {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_NONE);} 223 ; 224 225 PinConfigByte 226 : PinConfigKeyword {$$ = $1;} 227 | ByteConstExpr {$$ = UtCheckIntegerRange ($1, 0x80, 0xFF);} 228 ; 229 230 PinConfigKeyword 231 : PARSEOP_PIN_NOPULL {$$ = TrCreateLeafNode (PARSEOP_PIN_NOPULL);} 232 | PARSEOP_PIN_PULLDOWN {$$ = TrCreateLeafNode (PARSEOP_PIN_PULLDOWN);} 233 | PARSEOP_PIN_PULLUP {$$ = TrCreateLeafNode (PARSEOP_PIN_PULLUP);} 234 | PARSEOP_PIN_PULLDEFAULT {$$ = TrCreateLeafNode (PARSEOP_PIN_PULLDEFAULT);} 235 ; 236 237 PldKeyword 238 : PARSEOP_PLD_REVISION {$$ = TrCreateLeafNode (PARSEOP_PLD_REVISION);} 239 | PARSEOP_PLD_IGNORECOLOR {$$ = TrCreateLeafNode (PARSEOP_PLD_IGNORECOLOR);} 240 | PARSEOP_PLD_RED {$$ = TrCreateLeafNode (PARSEOP_PLD_RED);} 241 | PARSEOP_PLD_GREEN {$$ = TrCreateLeafNode (PARSEOP_PLD_GREEN);} 242 | PARSEOP_PLD_BLUE {$$ = TrCreateLeafNode (PARSEOP_PLD_BLUE);} 243 | PARSEOP_PLD_WIDTH {$$ = TrCreateLeafNode (PARSEOP_PLD_WIDTH);} 244 | PARSEOP_PLD_HEIGHT {$$ = TrCreateLeafNode (PARSEOP_PLD_HEIGHT);} 245 | PARSEOP_PLD_USERVISIBLE {$$ = TrCreateLeafNode (PARSEOP_PLD_USERVISIBLE);} 246 | PARSEOP_PLD_DOCK {$$ = TrCreateLeafNode (PARSEOP_PLD_DOCK);} 247 | PARSEOP_PLD_LID {$$ = TrCreateLeafNode (PARSEOP_PLD_LID);} 248 | PARSEOP_PLD_PANEL {$$ = TrCreateLeafNode (PARSEOP_PLD_PANEL);} 249 | PARSEOP_PLD_VERTICALPOSITION {$$ = TrCreateLeafNode (PARSEOP_PLD_VERTICALPOSITION);} 250 | PARSEOP_PLD_HORIZONTALPOSITION {$$ = TrCreateLeafNode (PARSEOP_PLD_HORIZONTALPOSITION);} 251 | PARSEOP_PLD_SHAPE {$$ = TrCreateLeafNode (PARSEOP_PLD_SHAPE);} 252 | PARSEOP_PLD_GROUPORIENTATION {$$ = TrCreateLeafNode (PARSEOP_PLD_GROUPORIENTATION);} 253 | PARSEOP_PLD_GROUPTOKEN {$$ = TrCreateLeafNode (PARSEOP_PLD_GROUPTOKEN);} 254 | PARSEOP_PLD_GROUPPOSITION {$$ = TrCreateLeafNode (PARSEOP_PLD_GROUPPOSITION);} 255 | PARSEOP_PLD_BAY {$$ = TrCreateLeafNode (PARSEOP_PLD_BAY);} 256 | PARSEOP_PLD_EJECTABLE {$$ = TrCreateLeafNode (PARSEOP_PLD_EJECTABLE);} 257 | PARSEOP_PLD_EJECTREQUIRED {$$ = TrCreateLeafNode (PARSEOP_PLD_EJECTREQUIRED);} 258 | PARSEOP_PLD_CABINETNUMBER {$$ = TrCreateLeafNode (PARSEOP_PLD_CABINETNUMBER);} 259 | PARSEOP_PLD_CARDCAGENUMBER {$$ = TrCreateLeafNode (PARSEOP_PLD_CARDCAGENUMBER);} 260 | PARSEOP_PLD_REFERENCE {$$ = TrCreateLeafNode (PARSEOP_PLD_REFERENCE);} 261 | PARSEOP_PLD_ROTATION {$$ = TrCreateLeafNode (PARSEOP_PLD_ROTATION);} 262 | PARSEOP_PLD_ORDER {$$ = TrCreateLeafNode (PARSEOP_PLD_ORDER);} 263 | PARSEOP_PLD_RESERVED {$$ = TrCreateLeafNode (PARSEOP_PLD_RESERVED);} 264 | PARSEOP_PLD_VERTICALOFFSET {$$ = TrCreateLeafNode (PARSEOP_PLD_VERTICALOFFSET);} 265 | PARSEOP_PLD_HORIZONTALOFFSET {$$ = TrCreateLeafNode (PARSEOP_PLD_HORIZONTALOFFSET);} 266 ; 267 268 RangeTypeKeyword 269 : PARSEOP_RANGETYPE_ISAONLY {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_ISAONLY);} 270 | PARSEOP_RANGETYPE_NONISAONLY {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_NONISAONLY);} 271 | PARSEOP_RANGETYPE_ENTIRE {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_ENTIRE);} 272 ; 273 274 RegionSpaceKeyword 275 : PARSEOP_REGIONSPACE_IO {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_IO);} 276 | PARSEOP_REGIONSPACE_MEM {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_MEM);} 277 | PARSEOP_REGIONSPACE_PCI {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCI);} 278 | PARSEOP_REGIONSPACE_EC {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_EC);} 279 | PARSEOP_REGIONSPACE_SMBUS {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_SMBUS);} 280 | PARSEOP_REGIONSPACE_CMOS {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_CMOS);} 281 | PARSEOP_REGIONSPACE_PCIBAR {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCIBAR);} 282 | PARSEOP_REGIONSPACE_IPMI {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_IPMI);} 283 | PARSEOP_REGIONSPACE_GPIO {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_GPIO);} 284 | PARSEOP_REGIONSPACE_GSBUS {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_GSBUS);} 285 | PARSEOP_REGIONSPACE_PCC {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCC);} 286 | PARSEOP_REGIONSPACE_FFIXEDHW {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_FFIXEDHW);} 287 ; 288 289 ResourceTypeKeyword 290 : PARSEOP_RESOURCETYPE_CONSUMER {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);} 291 | PARSEOP_RESOURCETYPE_PRODUCER {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_PRODUCER);} 292 ; 293 294 SerializeRuleKeyword 295 : PARSEOP_SERIALIZERULE_SERIAL {$$ = TrCreateLeafNode (PARSEOP_SERIALIZERULE_SERIAL);} 296 | PARSEOP_SERIALIZERULE_NOTSERIAL {$$ = TrCreateLeafNode (PARSEOP_SERIALIZERULE_NOTSERIAL);} 297 ; 298 299 ShareTypeKeyword 300 : PARSEOP_SHARETYPE_SHARED {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_SHARED);} 301 | PARSEOP_SHARETYPE_EXCLUSIVE {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_EXCLUSIVE);} 302 | PARSEOP_SHARETYPE_SHAREDWAKE {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_SHAREDWAKE);} 303 | PARSEOP_SHARETYPE_EXCLUSIVEWAKE {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_EXCLUSIVEWAKE);} 304 ; 305 306 SlaveModeKeyword 307 : PARSEOP_SLAVEMODE_CONTROLLERINIT {$$ = TrCreateLeafNode (PARSEOP_SLAVEMODE_CONTROLLERINIT);} 308 | PARSEOP_SLAVEMODE_DEVICEINIT {$$ = TrCreateLeafNode (PARSEOP_SLAVEMODE_DEVICEINIT);} 309 ; 310 311 StopBitsKeyword 312 : PARSEOP_STOPBITS_TWO {$$ = TrCreateLeafNode (PARSEOP_STOPBITS_TWO);} 313 | PARSEOP_STOPBITS_ONEPLUSHALF {$$ = TrCreateLeafNode (PARSEOP_STOPBITS_ONEPLUSHALF);} 314 | PARSEOP_STOPBITS_ONE {$$ = TrCreateLeafNode (PARSEOP_STOPBITS_ONE);} 315 | PARSEOP_STOPBITS_ZERO {$$ = TrCreateLeafNode (PARSEOP_STOPBITS_ZERO);} 316 ; 317 318 TranslationKeyword 319 : PARSEOP_TRANSLATIONTYPE_SPARSE {$$ = TrCreateLeafNode (PARSEOP_TRANSLATIONTYPE_SPARSE);} 320 | PARSEOP_TRANSLATIONTYPE_DENSE {$$ = TrCreateLeafNode (PARSEOP_TRANSLATIONTYPE_DENSE);} 321 ; 322 323 TypeKeyword 324 : PARSEOP_TYPE_TRANSLATION {$$ = TrCreateLeafNode (PARSEOP_TYPE_TRANSLATION);} 325 | PARSEOP_TYPE_STATIC {$$ = TrCreateLeafNode (PARSEOP_TYPE_STATIC);} 326 ; 327 328 UpdateRuleKeyword 329 : PARSEOP_UPDATERULE_PRESERVE {$$ = TrCreateLeafNode (PARSEOP_UPDATERULE_PRESERVE);} 330 | PARSEOP_UPDATERULE_ONES {$$ = TrCreateLeafNode (PARSEOP_UPDATERULE_ONES);} 331 | PARSEOP_UPDATERULE_ZEROS {$$ = TrCreateLeafNode (PARSEOP_UPDATERULE_ZEROS);} 332 ; 333 334 WireModeKeyword 335 : PARSEOP_WIREMODE_FOUR {$$ = TrCreateLeafNode (PARSEOP_WIREMODE_FOUR);} 336 | PARSEOP_WIREMODE_THREE {$$ = TrCreateLeafNode (PARSEOP_WIREMODE_THREE);} 337 ; 338 339 XferSizeKeyword 340 : PARSEOP_XFERSIZE_8 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_8, 0);} 341 | PARSEOP_XFERSIZE_16 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_16, 1);} 342 | PARSEOP_XFERSIZE_32 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_32, 2);} 343 | PARSEOP_XFERSIZE_64 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_64, 3);} 344 | PARSEOP_XFERSIZE_128 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_128, 4);} 345 | PARSEOP_XFERSIZE_256 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_256, 5);} 346 ; 347 348 XferTypeKeyword 349 : PARSEOP_XFERTYPE_8 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_8);} 350 | PARSEOP_XFERTYPE_8_16 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_8_16);} 351 | PARSEOP_XFERTYPE_16 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_16);} 352 ; 353 354 355 /******************************************************************************* 356 * 357 * ASL Resource Template Terms 358 * 359 ******************************************************************************/ 360 361 /* 362 * Note: Create two default nodes to allow conversion to a Buffer AML opcode 363 * Also, insert the EndTag at the end of the template. 364 */ 365 ResourceTemplateTerm 366 : PARSEOP_RESOURCETEMPLATE '(' ')' 367 '{' 368 ResourceMacroList '}' {$$ = TrCreateNode (PARSEOP_RESOURCETEMPLATE,4, 369 TrCreateLeafNode (PARSEOP_DEFAULT_ARG), 370 TrCreateLeafNode (PARSEOP_DEFAULT_ARG), 371 $5, 372 TrCreateLeafNode (PARSEOP_ENDTAG));} 373 ; 374 375 ResourceMacroList 376 : {$$ = NULL;} 377 | ResourceMacroList 378 ResourceMacroTerm {$$ = TrLinkPeerNode ($1,$2);} 379 ; 380 381 ResourceMacroTerm 382 : DMATerm {} 383 | DWordIOTerm {} 384 | DWordMemoryTerm {} 385 | DWordSpaceTerm {} 386 | EndDependentFnTerm {} 387 | ExtendedIOTerm {} 388 | ExtendedMemoryTerm {} 389 | ExtendedSpaceTerm {} 390 | FixedDmaTerm {} 391 | FixedIOTerm {} 392 | GpioIntTerm {} 393 | GpioIoTerm {} 394 | I2cSerialBusTerm {} 395 | I2cSerialBusTermV2 {} 396 | InterruptTerm {} 397 | IOTerm {} 398 | IRQNoFlagsTerm {} 399 | IRQTerm {} 400 | Memory24Term {} 401 | Memory32FixedTerm {} 402 | Memory32Term {} 403 | QWordIOTerm {} 404 | QWordMemoryTerm {} 405 | QWordSpaceTerm {} 406 | RegisterTerm {} 407 | SpiSerialBusTerm {} 408 | SpiSerialBusTermV2 {} 409 | StartDependentFnNoPriTerm {} 410 | StartDependentFnTerm {} 411 | UartSerialBusTerm {} 412 | UartSerialBusTermV2 {} 413 | VendorLongTerm {} 414 | VendorShortTerm {} 415 | WordBusNumberTerm {} 416 | WordIOTerm {} 417 | WordSpaceTerm {} 418 ; 419 420 DMATerm 421 : PARSEOP_DMA '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DMA);} 422 DMATypeKeyword 423 OptionalBusMasterKeyword 424 ',' XferTypeKeyword 425 OptionalNameString_Last 426 ')' '{' 427 ByteList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$5,$7,$8,$11);} 428 | PARSEOP_DMA '(' 429 error ')' {$$ = AslDoError(); yyclearin;} 430 ; 431 432 DWordIOTerm 433 : PARSEOP_DWORDIO '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DWORDIO);} 434 OptionalResourceType_First 435 OptionalMinType 436 OptionalMaxType 437 OptionalDecodeType 438 OptionalRangeType 439 ',' DWordConstExpr 440 ',' DWordConstExpr 441 ',' DWordConstExpr 442 ',' DWordConstExpr 443 ',' DWordConstExpr 444 OptionalByteConstExpr 445 OptionalStringData 446 OptionalNameString 447 OptionalType 448 OptionalTranslationType_Last 449 ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);} 450 | PARSEOP_DWORDIO '(' 451 error ')' {$$ = AslDoError(); yyclearin;} 452 ; 453 454 DWordMemoryTerm 455 : PARSEOP_DWORDMEMORY '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DWORDMEMORY);} 456 OptionalResourceType_First 457 OptionalDecodeType 458 OptionalMinType 459 OptionalMaxType 460 OptionalMemType 461 ',' OptionalReadWriteKeyword 462 ',' DWordConstExpr 463 ',' DWordConstExpr 464 ',' DWordConstExpr 465 ',' DWordConstExpr 466 ',' DWordConstExpr 467 OptionalByteConstExpr 468 OptionalStringData 469 OptionalNameString 470 OptionalAddressRange 471 OptionalType_Last 472 ')' {$$ = TrLinkChildren ($<n>3,16,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);} 473 | PARSEOP_DWORDMEMORY '(' 474 error ')' {$$ = AslDoError(); yyclearin;} 475 ; 476 477 DWordSpaceTerm 478 : PARSEOP_DWORDSPACE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DWORDSPACE);} 479 ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);} 480 OptionalResourceType 481 OptionalDecodeType 482 OptionalMinType 483 OptionalMaxType 484 ',' ByteConstExpr 485 ',' DWordConstExpr 486 ',' DWordConstExpr 487 ',' DWordConstExpr 488 ',' DWordConstExpr 489 ',' DWordConstExpr 490 OptionalByteConstExpr 491 OptionalStringData 492 OptionalNameString_Last 493 ')' {$$ = TrLinkChildren ($<n>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);} 494 | PARSEOP_DWORDSPACE '(' 495 error ')' {$$ = AslDoError(); yyclearin;} 496 ; 497 498 EndDependentFnTerm 499 : PARSEOP_ENDDEPENDENTFN '(' 500 ')' {$$ = TrCreateLeafNode (PARSEOP_ENDDEPENDENTFN);} 501 | PARSEOP_ENDDEPENDENTFN '(' 502 error ')' {$$ = AslDoError(); yyclearin;} 503 ; 504 505 ExtendedIOTerm 506 : PARSEOP_EXTENDEDIO '(' {$<n>$ = TrCreateLeafNode (PARSEOP_EXTENDEDIO);} 507 OptionalResourceType_First 508 OptionalMinType 509 OptionalMaxType 510 OptionalDecodeType 511 OptionalRangeType 512 ',' QWordConstExpr 513 ',' QWordConstExpr 514 ',' QWordConstExpr 515 ',' QWordConstExpr 516 ',' QWordConstExpr 517 OptionalQWordConstExpr 518 OptionalNameString 519 OptionalType 520 OptionalTranslationType_Last 521 ')' {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22);} 522 | PARSEOP_EXTENDEDIO '(' 523 error ')' {$$ = AslDoError(); yyclearin;} 524 ; 525 526 ExtendedMemoryTerm 527 : PARSEOP_EXTENDEDMEMORY '(' {$<n>$ = TrCreateLeafNode (PARSEOP_EXTENDEDMEMORY);} 528 OptionalResourceType_First 529 OptionalDecodeType 530 OptionalMinType 531 OptionalMaxType 532 OptionalMemType 533 ',' OptionalReadWriteKeyword 534 ',' QWordConstExpr 535 ',' QWordConstExpr 536 ',' QWordConstExpr 537 ',' QWordConstExpr 538 ',' QWordConstExpr 539 OptionalQWordConstExpr 540 OptionalNameString 541 OptionalAddressRange 542 OptionalType_Last 543 ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24);} 544 | PARSEOP_EXTENDEDMEMORY '(' 545 error ')' {$$ = AslDoError(); yyclearin;} 546 ; 547 548 ExtendedSpaceTerm 549 : PARSEOP_EXTENDEDSPACE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_EXTENDEDSPACE);} 550 ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);} 551 OptionalResourceType 552 OptionalDecodeType 553 OptionalMinType 554 OptionalMaxType 555 ',' ByteConstExpr 556 ',' QWordConstExpr 557 ',' QWordConstExpr 558 ',' QWordConstExpr 559 ',' QWordConstExpr 560 ',' QWordConstExpr 561 OptionalQWordConstExpr 562 OptionalNameString_Last 563 ')' {$$ = TrLinkChildren ($<n>3,13,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23);} 564 | PARSEOP_EXTENDEDSPACE '(' 565 error ')' {$$ = AslDoError(); yyclearin;} 566 ; 567 568 FixedDmaTerm 569 : PARSEOP_FIXEDDMA '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FIXEDDMA);} 570 WordConstExpr /* 04: DMA RequestLines */ 571 ',' WordConstExpr /* 06: DMA Channels */ 572 OptionalXferSize /* 07: DMA TransferSize */ 573 OptionalNameString /* 08: DescriptorName */ 574 ')' {$$ = TrLinkChildren ($<n>3,4,$4,$6,$7,$8);} 575 | PARSEOP_FIXEDDMA '(' 576 error ')' {$$ = AslDoError(); yyclearin;} 577 ; 578 579 FixedIOTerm 580 : PARSEOP_FIXEDIO '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FIXEDIO);} 581 WordConstExpr 582 ',' ByteConstExpr 583 OptionalNameString_Last 584 ')' {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);} 585 | PARSEOP_FIXEDIO '(' 586 error ')' {$$ = AslDoError(); yyclearin;} 587 ; 588 589 GpioIntTerm 590 : PARSEOP_GPIO_INT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_GPIO_INT);} 591 InterruptTypeKeyword /* 04: InterruptType */ 592 ',' InterruptLevel /* 06: InterruptLevel */ 593 OptionalShareType /* 07: SharedType */ 594 ',' PinConfigByte /* 09: PinConfig */ 595 OptionalWordConstExpr /* 10: DebounceTimeout */ 596 ',' StringData /* 12: ResourceSource */ 597 OptionalByteConstExpr /* 13: ResourceSourceIndex */ 598 OptionalResourceType /* 14: ResourceType */ 599 OptionalNameString /* 15: DescriptorName */ 600 OptionalBuffer_Last /* 16: VendorData */ 601 ')' '{' 602 DWordConstExpr '}' {$$ = TrLinkChildren ($<n>3,11,$4,$6,$7,$9,$10,$12,$13,$14,$15,$16,$19);} 603 | PARSEOP_GPIO_INT '(' 604 error ')' {$$ = AslDoError(); yyclearin;} 605 ; 606 607 GpioIoTerm 608 : PARSEOP_GPIO_IO '(' {$<n>$ = TrCreateLeafNode (PARSEOP_GPIO_IO);} 609 OptionalShareType_First /* 04: SharedType */ 610 ',' PinConfigByte /* 06: PinConfig */ 611 OptionalWordConstExpr /* 07: DebounceTimeout */ 612 OptionalWordConstExpr /* 08: DriveStrength */ 613 OptionalIoRestriction /* 09: IoRestriction */ 614 ',' StringData /* 11: ResourceSource */ 615 OptionalByteConstExpr /* 12: ResourceSourceIndex */ 616 OptionalResourceType /* 13: ResourceType */ 617 OptionalNameString /* 14: DescriptorName */ 618 OptionalBuffer_Last /* 15: VendorData */ 619 ')' '{' 620 DWordList '}' {$$ = TrLinkChildren ($<n>3,11,$4,$6,$7,$8,$9,$11,$12,$13,$14,$15,$18);} 621 | PARSEOP_GPIO_IO '(' 622 error ')' {$$ = AslDoError(); yyclearin;} 623 ; 624 625 I2cSerialBusTerm 626 : PARSEOP_I2C_SERIALBUS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_I2C_SERIALBUS);} 627 WordConstExpr /* 04: SlaveAddress */ 628 OptionalSlaveMode /* 05: SlaveMode */ 629 ',' DWordConstExpr /* 07: ConnectionSpeed */ 630 OptionalAddressingMode /* 08: AddressingMode */ 631 ',' StringData /* 10: ResourceSource */ 632 OptionalByteConstExpr /* 11: ResourceSourceIndex */ 633 OptionalResourceType /* 12: ResourceType */ 634 OptionalNameString /* 13: DescriptorName */ 635 OptionalBuffer_Last /* 14: VendorData */ 636 ')' {$$ = TrLinkChildren ($<n>3,10,$4,$5,$7,$8,$10,$11,$12,$13, 637 TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$14);} 638 | PARSEOP_I2C_SERIALBUS '(' 639 error ')' {$$ = AslDoError(); yyclearin;} 640 ; 641 642 I2cSerialBusTermV2 643 : PARSEOP_I2C_SERIALBUS_V2 '(' {$<n>$ = TrCreateLeafNode (PARSEOP_I2C_SERIALBUS_V2);} 644 WordConstExpr /* 04: SlaveAddress */ 645 OptionalSlaveMode /* 05: SlaveMode */ 646 ',' DWordConstExpr /* 07: ConnectionSpeed */ 647 OptionalAddressingMode /* 08: AddressingMode */ 648 ',' StringData /* 10: ResourceSource */ 649 OptionalByteConstExpr /* 11: ResourceSourceIndex */ 650 OptionalResourceType /* 12: ResourceType */ 651 OptionalNameString /* 13: DescriptorName */ 652 OptionalShareType /* 14: Share */ 653 OptionalBuffer_Last /* 15: VendorData */ 654 ')' {$$ = TrLinkChildren ($<n>3,10,$4,$5,$7,$8,$10,$11,$12,$13, 655 $14,$15);} 656 | PARSEOP_I2C_SERIALBUS_V2 '(' 657 error ')' {$$ = AslDoError(); yyclearin;} 658 ; 659 660 InterruptTerm 661 : PARSEOP_INTERRUPT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INTERRUPT);} 662 OptionalResourceType_First 663 ',' InterruptTypeKeyword 664 ',' InterruptLevel 665 OptionalShareType 666 OptionalByteConstExpr 667 OptionalStringData 668 OptionalNameString_Last 669 ')' '{' 670 DWordList '}' {$$ = TrLinkChildren ($<n>3,8,$4,$6,$8,$9,$10,$11,$12,$15);} 671 | PARSEOP_INTERRUPT '(' 672 error ')' {$$ = AslDoError(); yyclearin;} 673 ; 674 675 IOTerm 676 : PARSEOP_IO '(' {$<n>$ = TrCreateLeafNode (PARSEOP_IO);} 677 IODecodeKeyword 678 ',' WordConstExpr 679 ',' WordConstExpr 680 ',' ByteConstExpr 681 ',' ByteConstExpr 682 OptionalNameString_Last 683 ')' {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);} 684 | PARSEOP_IO '(' 685 error ')' {$$ = AslDoError(); yyclearin;} 686 ; 687 688 IRQNoFlagsTerm 689 : PARSEOP_IRQNOFLAGS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_IRQNOFLAGS);} 690 OptionalNameString_First 691 ')' '{' 692 ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);} 693 | PARSEOP_IRQNOFLAGS '(' 694 error ')' {$$ = AslDoError(); yyclearin;} 695 ; 696 697 IRQTerm 698 : PARSEOP_IRQ '(' {$<n>$ = TrCreateLeafNode (PARSEOP_IRQ);} 699 InterruptTypeKeyword 700 ',' InterruptLevel 701 OptionalShareType 702 OptionalNameString_Last 703 ')' '{' 704 ByteList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$6,$7,$8,$11);} 705 | PARSEOP_IRQ '(' 706 error ')' {$$ = AslDoError(); yyclearin;} 707 ; 708 709 Memory24Term 710 : PARSEOP_MEMORY24 '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MEMORY24);} 711 OptionalReadWriteKeyword 712 ',' WordConstExpr 713 ',' WordConstExpr 714 ',' WordConstExpr 715 ',' WordConstExpr 716 OptionalNameString_Last 717 ')' {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);} 718 | PARSEOP_MEMORY24 '(' 719 error ')' {$$ = AslDoError(); yyclearin;} 720 ; 721 722 Memory32FixedTerm 723 : PARSEOP_MEMORY32FIXED '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MEMORY32FIXED);} 724 OptionalReadWriteKeyword 725 ',' DWordConstExpr 726 ',' DWordConstExpr 727 OptionalNameString_Last 728 ')' {$$ = TrLinkChildren ($<n>3,4,$4,$6,$8,$9);} 729 | PARSEOP_MEMORY32FIXED '(' 730 error ')' {$$ = AslDoError(); yyclearin;} 731 ; 732 733 Memory32Term 734 : PARSEOP_MEMORY32 '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MEMORY32);} 735 OptionalReadWriteKeyword 736 ',' DWordConstExpr 737 ',' DWordConstExpr 738 ',' DWordConstExpr 739 ',' DWordConstExpr 740 OptionalNameString_Last 741 ')' {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);} 742 | PARSEOP_MEMORY32 '(' 743 error ')' {$$ = AslDoError(); yyclearin;} 744 ; 745 746 QWordIOTerm 747 : PARSEOP_QWORDIO '(' {$<n>$ = TrCreateLeafNode (PARSEOP_QWORDIO);} 748 OptionalResourceType_First 749 OptionalMinType 750 OptionalMaxType 751 OptionalDecodeType 752 OptionalRangeType 753 ',' QWordConstExpr 754 ',' QWordConstExpr 755 ',' QWordConstExpr 756 ',' QWordConstExpr 757 ',' QWordConstExpr 758 OptionalByteConstExpr 759 OptionalStringData 760 OptionalNameString 761 OptionalType 762 OptionalTranslationType_Last 763 ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);} 764 | PARSEOP_QWORDIO '(' 765 error ')' {$$ = AslDoError(); yyclearin;} 766 ; 767 768 QWordMemoryTerm 769 : PARSEOP_QWORDMEMORY '(' {$<n>$ = TrCreateLeafNode (PARSEOP_QWORDMEMORY);} 770 OptionalResourceType_First 771 OptionalDecodeType 772 OptionalMinType 773 OptionalMaxType 774 OptionalMemType 775 ',' OptionalReadWriteKeyword 776 ',' QWordConstExpr 777 ',' QWordConstExpr 778 ',' QWordConstExpr 779 ',' QWordConstExpr 780 ',' QWordConstExpr 781 OptionalByteConstExpr 782 OptionalStringData 783 OptionalNameString 784 OptionalAddressRange 785 OptionalType_Last 786 ')' {$$ = TrLinkChildren ($<n>3,16,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);} 787 | PARSEOP_QWORDMEMORY '(' 788 error ')' {$$ = AslDoError(); yyclearin;} 789 ; 790 791 QWordSpaceTerm 792 : PARSEOP_QWORDSPACE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_QWORDSPACE);} 793 ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);} 794 OptionalResourceType 795 OptionalDecodeType 796 OptionalMinType 797 OptionalMaxType 798 ',' ByteConstExpr 799 ',' QWordConstExpr 800 ',' QWordConstExpr 801 ',' QWordConstExpr 802 ',' QWordConstExpr 803 ',' QWordConstExpr 804 OptionalByteConstExpr 805 OptionalStringData 806 OptionalNameString_Last 807 ')' {$$ = TrLinkChildren ($<n>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);} 808 | PARSEOP_QWORDSPACE '(' 809 error ')' {$$ = AslDoError(); yyclearin;} 810 ; 811 812 RegisterTerm 813 : PARSEOP_REGISTER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_REGISTER);} 814 AddressSpaceKeyword 815 ',' ByteConstExpr 816 ',' ByteConstExpr 817 ',' QWordConstExpr 818 OptionalAccessSize 819 OptionalNameString_Last 820 ')' {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$11,$12);} 821 | PARSEOP_REGISTER '(' 822 error ')' {$$ = AslDoError(); yyclearin;} 823 ; 824 825 SpiSerialBusTerm 826 : PARSEOP_SPI_SERIALBUS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SPI_SERIALBUS);} 827 WordConstExpr /* 04: DeviceSelection */ 828 OptionalDevicePolarity /* 05: DevicePolarity */ 829 OptionalWireMode /* 06: WireMode */ 830 ',' ByteConstExpr /* 08: DataBitLength */ 831 OptionalSlaveMode /* 09: SlaveMode */ 832 ',' DWordConstExpr /* 11: ConnectionSpeed */ 833 ',' ClockPolarityKeyword /* 13: ClockPolarity */ 834 ',' ClockPhaseKeyword /* 15: ClockPhase */ 835 ',' StringData /* 17: ResourceSource */ 836 OptionalByteConstExpr /* 18: ResourceSourceIndex */ 837 OptionalResourceType /* 19: ResourceType */ 838 OptionalNameString /* 20: DescriptorName */ 839 OptionalBuffer_Last /* 21: VendorData */ 840 ')' {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20, 841 TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$21);} 842 | PARSEOP_SPI_SERIALBUS '(' 843 error ')' {$$ = AslDoError(); yyclearin;} 844 ; 845 846 SpiSerialBusTermV2 847 : PARSEOP_SPI_SERIALBUS_V2 '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SPI_SERIALBUS_V2);} 848 WordConstExpr /* 04: DeviceSelection */ 849 OptionalDevicePolarity /* 05: DevicePolarity */ 850 OptionalWireMode /* 06: WireMode */ 851 ',' ByteConstExpr /* 08: DataBitLength */ 852 OptionalSlaveMode /* 09: SlaveMode */ 853 ',' DWordConstExpr /* 11: ConnectionSpeed */ 854 ',' ClockPolarityKeyword /* 13: ClockPolarity */ 855 ',' ClockPhaseKeyword /* 15: ClockPhase */ 856 ',' StringData /* 17: ResourceSource */ 857 OptionalByteConstExpr /* 18: ResourceSourceIndex */ 858 OptionalResourceType /* 19: ResourceType */ 859 OptionalNameString /* 20: DescriptorName */ 860 OptionalShareType /* 21: Share */ 861 OptionalBuffer_Last /* 22: VendorData */ 862 ')' {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20, 863 $21,$22);} 864 | PARSEOP_SPI_SERIALBUS_V2 '(' 865 error ')' {$$ = AslDoError(); yyclearin;} 866 ; 867 868 StartDependentFnNoPriTerm 869 : PARSEOP_STARTDEPENDENTFN_NOPRI '(' {$<n>$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN_NOPRI);} 870 ')' '{' 871 ResourceMacroList '}' {$$ = TrLinkChildren ($<n>3,1,$6);} 872 | PARSEOP_STARTDEPENDENTFN_NOPRI '(' 873 error ')' {$$ = AslDoError(); yyclearin;} 874 ; 875 876 StartDependentFnTerm 877 : PARSEOP_STARTDEPENDENTFN '(' {$<n>$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN);} 878 ByteConstExpr 879 ',' ByteConstExpr 880 ')' '{' 881 ResourceMacroList '}' {$$ = TrLinkChildren ($<n>3,3,$4,$6,$9);} 882 | PARSEOP_STARTDEPENDENTFN '(' 883 error ')' {$$ = AslDoError(); yyclearin;} 884 ; 885 886 UartSerialBusTerm 887 : PARSEOP_UART_SERIALBUS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_UART_SERIALBUS);} 888 DWordConstExpr /* 04: ConnectionSpeed */ 889 OptionalBitsPerByte /* 05: BitsPerByte */ 890 OptionalStopBits /* 06: StopBits */ 891 ',' ByteConstExpr /* 08: LinesInUse */ 892 OptionalEndian /* 09: Endianess */ 893 OptionalParityType /* 10: Parity */ 894 OptionalFlowControl /* 11: FlowControl */ 895 ',' WordConstExpr /* 13: Rx BufferSize */ 896 ',' WordConstExpr /* 15: Tx BufferSize */ 897 ',' StringData /* 17: ResourceSource */ 898 OptionalByteConstExpr /* 18: ResourceSourceIndex */ 899 OptionalResourceType /* 19: ResourceType */ 900 OptionalNameString /* 20: DescriptorName */ 901 OptionalBuffer_Last /* 21: VendorData */ 902 ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20, 903 TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$21);} 904 | PARSEOP_UART_SERIALBUS '(' 905 error ')' {$$ = AslDoError(); yyclearin;} 906 ; 907 908 UartSerialBusTermV2 909 : PARSEOP_UART_SERIALBUS_V2 '(' {$<n>$ = TrCreateLeafNode (PARSEOP_UART_SERIALBUS_V2);} 910 DWordConstExpr /* 04: ConnectionSpeed */ 911 OptionalBitsPerByte /* 05: BitsPerByte */ 912 OptionalStopBits /* 06: StopBits */ 913 ',' ByteConstExpr /* 08: LinesInUse */ 914 OptionalEndian /* 09: Endianess */ 915 OptionalParityType /* 10: Parity */ 916 OptionalFlowControl /* 11: FlowControl */ 917 ',' WordConstExpr /* 13: Rx BufferSize */ 918 ',' WordConstExpr /* 15: Tx BufferSize */ 919 ',' StringData /* 17: ResourceSource */ 920 OptionalByteConstExpr /* 18: ResourceSourceIndex */ 921 OptionalResourceType /* 19: ResourceType */ 922 OptionalNameString /* 20: DescriptorName */ 923 OptionalShareType /* 21: Share */ 924 OptionalBuffer_Last /* 22: VendorData */ 925 ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20, 926 $21,$22);} 927 | PARSEOP_UART_SERIALBUS_V2 '(' 928 error ')' {$$ = AslDoError(); yyclearin;} 929 ; 930 931 VendorLongTerm 932 : PARSEOP_VENDORLONG '(' {$<n>$ = TrCreateLeafNode (PARSEOP_VENDORLONG);} 933 OptionalNameString_First 934 ')' '{' 935 ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);} 936 | PARSEOP_VENDORLONG '(' 937 error ')' {$$ = AslDoError(); yyclearin;} 938 ; 939 940 VendorShortTerm 941 : PARSEOP_VENDORSHORT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_VENDORSHORT);} 942 OptionalNameString_First 943 ')' '{' 944 ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);} 945 | PARSEOP_VENDORSHORT '(' 946 error ')' {$$ = AslDoError(); yyclearin;} 947 ; 948 949 WordBusNumberTerm 950 : PARSEOP_WORDBUSNUMBER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WORDBUSNUMBER);} 951 OptionalResourceType_First 952 OptionalMinType 953 OptionalMaxType 954 OptionalDecodeType 955 ',' WordConstExpr 956 ',' WordConstExpr 957 ',' WordConstExpr 958 ',' WordConstExpr 959 ',' WordConstExpr 960 OptionalByteConstExpr 961 OptionalStringData 962 OptionalNameString_Last 963 ')' {$$ = TrLinkChildren ($<n>3,12,$4,$5,$6,$7,$9,$11,$13,$15,$17,$18,$19,$20);} 964 | PARSEOP_WORDBUSNUMBER '(' 965 error ')' {$$ = AslDoError(); yyclearin;} 966 ; 967 968 WordIOTerm 969 : PARSEOP_WORDIO '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WORDIO);} 970 OptionalResourceType_First 971 OptionalMinType 972 OptionalMaxType 973 OptionalDecodeType 974 OptionalRangeType 975 ',' WordConstExpr 976 ',' WordConstExpr 977 ',' WordConstExpr 978 ',' WordConstExpr 979 ',' WordConstExpr 980 OptionalByteConstExpr 981 OptionalStringData 982 OptionalNameString 983 OptionalType 984 OptionalTranslationType_Last 985 ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);} 986 | PARSEOP_WORDIO '(' 987 error ')' {$$ = AslDoError(); yyclearin;} 988 ; 989 990 WordSpaceTerm 991 : PARSEOP_WORDSPACE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WORDSPACE);} 992 ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);} 993 OptionalResourceType 994 OptionalDecodeType 995 OptionalMinType 996 OptionalMaxType 997 ',' ByteConstExpr 998 ',' WordConstExpr 999 ',' WordConstExpr 1000 ',' WordConstExpr 1001 ',' WordConstExpr 1002 ',' WordConstExpr 1003 OptionalByteConstExpr 1004 OptionalStringData 1005 OptionalNameString_Last 1006 ')' {$$ = TrLinkChildren ($<n>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);} 1007 | PARSEOP_WORDSPACE '(' 1008 error ')' {$$ = AslDoError(); yyclearin;} 1009 ; 1010 1011 1012 /******* Object References ***********************************************/ 1013 1014 /* Allow IO, DMA, IRQ Resource macro names to also be used as identifiers */ 1015 1016 NameString 1017 : NameSeg {} 1018 | PARSEOP_NAMESTRING {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) AslCompilerlval.s);} 1019 | PARSEOP_IO {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IO");} 1020 | PARSEOP_DMA {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "DMA");} 1021 | PARSEOP_IRQ {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IRQ");} 1022 ; 1023 1024 NameSeg 1025 : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESEG, (ACPI_NATIVE_INT) AslCompilerlval.s);} 1026 ; 1027 1028 1029 /******************************************************************************* 1030 * 1031 * ASL Helper Terms 1032 * 1033 ******************************************************************************/ 1034 1035 OptionalBusMasterKeyword 1036 : ',' {$$ = TrCreateLeafNode (PARSEOP_BUSMASTERTYPE_MASTER);} 1037 | ',' PARSEOP_BUSMASTERTYPE_MASTER {$$ = TrCreateLeafNode (PARSEOP_BUSMASTERTYPE_MASTER);} 1038 | ',' PARSEOP_BUSMASTERTYPE_NOTMASTER {$$ = TrCreateLeafNode (PARSEOP_BUSMASTERTYPE_NOTMASTER);} 1039 ; 1040 1041 OptionalAccessAttribTerm 1042 : {$$ = NULL;} 1043 | ',' {$$ = NULL;} 1044 | ',' ByteConstExpr {$$ = $2;} 1045 | ',' AccessAttribKeyword {$$ = $2;} 1046 ; 1047 1048 OptionalAccessSize 1049 : {$$ = TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0);} 1050 | ',' {$$ = TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0);} 1051 | ',' ByteConstExpr {$$ = $2;} 1052 ; 1053 1054 OptionalAddressingMode 1055 : ',' {$$ = NULL;} 1056 | ',' AddressingModeKeyword {$$ = $2;} 1057 ; 1058 1059 OptionalAddressRange 1060 : {$$ = NULL;} 1061 | ',' {$$ = NULL;} 1062 | ',' AddressKeyword {$$ = $2;} 1063 ; 1064 1065 OptionalBitsPerByte 1066 : ',' {$$ = NULL;} 1067 | ',' BitsPerByteKeyword {$$ = $2;} 1068 ; 1069 1070 OptionalBuffer_Last 1071 : {$$ = NULL;} 1072 | ',' {$$ = NULL;} 1073 | ',' RawDataBufferTerm {$$ = $2;} 1074 ; 1075 1076 OptionalByteConstExpr 1077 : {$$ = NULL;} 1078 | ',' {$$ = NULL;} 1079 | ',' ByteConstExpr {$$ = $2;} 1080 ; 1081 1082 OptionalDecodeType 1083 : ',' {$$ = NULL;} 1084 | ',' DecodeKeyword {$$ = $2;} 1085 ; 1086 1087 OptionalDevicePolarity 1088 : ',' {$$ = NULL;} 1089 | ',' DevicePolarityKeyword {$$ = $2;} 1090 ; 1091 1092 OptionalDWordConstExpr 1093 : {$$ = NULL;} 1094 | ',' {$$ = NULL;} 1095 | ',' DWordConstExpr {$$ = $2;} 1096 ; 1097 1098 OptionalEndian 1099 : ',' {$$ = NULL;} 1100 | ',' EndianKeyword {$$ = $2;} 1101 ; 1102 1103 OptionalFlowControl 1104 : ',' {$$ = NULL;} 1105 | ',' FlowControlKeyword {$$ = $2;} 1106 ; 1107 1108 OptionalIoRestriction 1109 : ',' {$$ = NULL;} 1110 | ',' IoRestrictionKeyword {$$ = $2;} 1111 ; 1112 1113 OptionalListString 1114 : {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */ 1115 | ',' {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */ 1116 | ',' TermArg {$$ = $2;} 1117 ; 1118 1119 OptionalMaxType 1120 : ',' {$$ = NULL;} 1121 | ',' MaxKeyword {$$ = $2;} 1122 ; 1123 1124 OptionalMemType 1125 : ',' {$$ = NULL;} 1126 | ',' MemTypeKeyword {$$ = $2;} 1127 ; 1128 1129 OptionalMinType 1130 : ',' {$$ = NULL;} 1131 | ',' MinKeyword {$$ = $2;} 1132 ; 1133 1134 OptionalNameString 1135 : {$$ = NULL;} 1136 | ',' {$$ = NULL;} 1137 | ',' NameString {$$ = $2;} 1138 ; 1139 1140 OptionalNameString_Last 1141 : {$$ = NULL;} 1142 | ',' {$$ = NULL;} 1143 | ',' NameString {$$ = $2;} 1144 ; 1145 1146 OptionalNameString_First 1147 : {$$ = TrCreateLeafNode (PARSEOP_ZERO);} 1148 | NameString {$$ = $1;} 1149 ; 1150 1151 OptionalObjectTypeKeyword 1152 : {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_UNK);} 1153 | ',' ObjectTypeKeyword {$$ = $2;} 1154 ; 1155 1156 OptionalParityType 1157 : ',' {$$ = NULL;} 1158 | ',' ParityTypeKeyword {$$ = $2;} 1159 ; 1160 1161 OptionalQWordConstExpr 1162 : {$$ = NULL;} 1163 | ',' {$$ = NULL;} 1164 | ',' QWordConstExpr {$$ = $2;} 1165 ; 1166 1167 OptionalRangeType 1168 : ',' {$$ = NULL;} 1169 | ',' RangeTypeKeyword {$$ = $2;} 1170 ; 1171 1172 OptionalReadWriteKeyword 1173 : {$$ = TrCreateLeafNode (PARSEOP_READWRITETYPE_BOTH);} 1174 | PARSEOP_READWRITETYPE_BOTH {$$ = TrCreateLeafNode (PARSEOP_READWRITETYPE_BOTH);} 1175 | PARSEOP_READWRITETYPE_READONLY {$$ = TrCreateLeafNode (PARSEOP_READWRITETYPE_READONLY);} 1176 ; 1177 1178 OptionalResourceType_First 1179 : {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);} 1180 | ResourceTypeKeyword {$$ = $1;} 1181 ; 1182 1183 OptionalResourceType 1184 : {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);} 1185 | ',' {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);} 1186 | ',' ResourceTypeKeyword {$$ = $2;} 1187 ; 1188 1189 OptionalSlaveMode 1190 : ',' {$$ = NULL;} 1191 | ',' SlaveModeKeyword {$$ = $2;} 1192 ; 1193 1194 OptionalShareType 1195 : {$$ = NULL;} 1196 | ',' {$$ = NULL;} 1197 | ',' ShareTypeKeyword {$$ = $2;} 1198 ; 1199 1200 OptionalShareType_First 1201 : {$$ = NULL;} 1202 | ShareTypeKeyword {$$ = $1;} 1203 ; 1204 1205 OptionalStopBits 1206 : ',' {$$ = NULL;} 1207 | ',' StopBitsKeyword {$$ = $2;} 1208 ; 1209 1210 OptionalStringData 1211 : {$$ = NULL;} 1212 | ',' {$$ = NULL;} 1213 | ',' StringData {$$ = $2;} 1214 ; 1215 1216 OptionalTranslationType_Last 1217 : {$$ = NULL;} 1218 | ',' {$$ = NULL;} 1219 | ',' TranslationKeyword {$$ = $2;} 1220 ; 1221 1222 OptionalType 1223 : {$$ = NULL;} 1224 | ',' {$$ = NULL;} 1225 | ',' TypeKeyword {$$ = $2;} 1226 ; 1227 1228 OptionalType_Last 1229 : {$$ = NULL;} 1230 | ',' {$$ = NULL;} 1231 | ',' TypeKeyword {$$ = $2;} 1232 ; 1233 1234 OptionalWireMode 1235 : ',' {$$ = NULL;} 1236 | ',' WireModeKeyword {$$ = $2;} 1237 ; 1238 1239 OptionalWordConstExpr 1240 : ',' {$$ = NULL;} 1241 | ',' WordConstExpr {$$ = $2;} 1242 ; 1243 1244 OptionalXferSize 1245 : {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_32, 2);} 1246 | ',' {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_32, 2);} 1247 | ',' XferSizeKeyword {$$ = $2;} 1248 ; 1249