1 /* 2 * Some or all of this work - Copyright (c) 2006 - 2021, Intel Corp. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without modification, 6 * are permitted provided that the following conditions are met: 7 * 8 * Redistributions of source code must retain the above copyright notice, 9 * this list of conditions and the following disclaimer. 10 * Redistributions in binary form must reproduce the above copyright notice, 11 * this list of conditions and the following disclaimer in the documentation 12 * and/or other materials provided with the distribution. 13 * Neither the name of Intel Corporation nor the names of its contributors 14 * may be used to endorse or promote products derived from this software 15 * without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 26 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 /* 29 * References 30 * 31 * Verify exceptions for different operators dealing with references 32 */ 33 /* 34 SEE: FILE BUG: hangs without printing error 35 SEE: FILE BUG: CondRefOf doesn't cause an exception but only under some conditions 36 */ 37 Name (Z081, 0x51) 38 /* Run operator and expect ANY exception(s) */ 39 40 Method (M1A7, 7, Serialized) 41 { 42 FLG3 = 0x01 43 FLG4 = 0x01 44 /* flag, run test till the first error */ 45 46 If (C086) 47 { 48 /* Get current indicator of errors */ 49 50 If (GET2 ()) 51 { 52 Return (Zero) 53 } 54 } 55 56 CH03 (__METHOD__, Z081, __LINE__, 0x00, Arg6) 57 /* 58 // FILE BUG: hangs without printing error 59 Store(CH03(ts, z081, 0x200, __LINE__, arg6), Local0) 60 if (Local0) { 61 Concatenate("Operation: 0x", arg6, Local0) 62 Store(Local0, Debug) 63 } 64 */ 65 Switch (ToInteger (Arg6)) 66 { 67 Case (0x07) 68 { 69 Local7 = Acquire (Arg0, 0x0064) 70 } 71 Default 72 { 73 M480 (Arg0, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) 74 } 75 76 } 77 78 CH04 (C080, 0x00, 0xFF, Z081, __LINE__, Arg6, Arg6) 79 /* 80 // FILE BUG: hangs without printing error 81 Store(CH04(c080, 0, 0xff, z081, __LINE__, arg6, arg6), Local0) 82 if (Local0) { 83 Concatenate("Operation: 0x", arg6, Local0) 84 Store(Local0, Debug) 85 } 86 */ 87 FLG3 = 0x00 88 FLG4 = 0x00 89 } 90 91 /* 92 * Switch 93 * 94 * This sub-test causes break of exc_ref due to the bug 248 95 * (lose path after exception or hang). 96 * So, it is blocked, and in order to show 'Test is blocked' 97 * it is run also additionally separately. 98 */ 99 Method (M167, 1, Serialized) 100 { 101 CH03 ("m167", Z081, __LINE__, 0x00, 0x38) 102 Switch (ToInteger (Arg0)) 103 { 104 Case (0x00) 105 { 106 Local7 = 0x00 107 } 108 Default 109 { 110 Local7 = 0x01 111 } 112 113 } 114 115 CH04 (C080, 0x00, 0xFF, Z081, __LINE__, 0x38, 0x38) 116 } 117 118 /* Check reaction on OPERAND-REFERENCE (exceptions are expected in most cases) */ 119 /* arg0 - reference to the value of arbitrary type */ 120 /* arg1 - absolute index of file initiating the checking */ 121 /* arg2 - index of checking (inside the file) */ 122 Method (M1A8, 3, Serialized) 123 { 124 /* Return */ 125 126 Method (M000, 1, NotSerialized) 127 { 128 Return (Arg0) 129 } 130 131 /* If */ 132 133 Method (M001, 1, NotSerialized) 134 { 135 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x36) 136 If (Arg0) 137 { 138 Local7 = 0x00 139 } 140 141 CH04 (C080, 0x00, 0xFF, Z081, __LINE__, 0x36, 0x36) 142 } 143 144 /* ElseIf */ 145 146 Method (M002, 1, NotSerialized) 147 { 148 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x37) 149 If (0x00) 150 { 151 Local7 = 0x00 152 } 153 ElseIf (Arg0) 154 { 155 Local7 = 0x01 156 } 157 158 CH04 (C080, 0x00, 0xFF, Z081, __LINE__, 0x37, 0x37) 159 } 160 161 /* While */ 162 163 Method (M004, 1, NotSerialized) 164 { 165 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x3A) 166 While (Arg0) 167 { 168 Local7 = 0x00 169 Break 170 } 171 172 CH04 (C080, 0x00, 0xFF, Z081, __LINE__, 0x3A, 0x3A) 173 } 174 175 /* Set parameters of current checking */ 176 177 If (Arg1) 178 { 179 SET0 (Arg1, 0x00, Arg2) 180 } 181 182 /* flag, run test till the first error */ 183 184 If (C086) 185 { 186 /* Get current indicator of errors */ 187 188 If (GET2 ()) 189 { 190 Return (Zero) 191 } 192 } 193 194 /* Split into groups for debugging: some of them */ 195 /* were crashing the system. */ 196 Name (RN00, 0x01) /* CondRefOf */ 197 Name (RN01, 0x00) /* DerefOf */ 198 If (Y506) 199 { 200 /* Crash */ 201 202 RN01 = 0x01 203 } 204 205 Name (RN02, 0x01) /* ObjectType */ 206 Name (RN03, 0x01) /* RefOf */ 207 Name (RN04, 0x01) /* SizeOf */ 208 Name (RN05, 0x01) /* CopyObject */ 209 Name (RN06, 0x01) /* Return */ 210 Name (RN07, 0x01) /* If,ElseIf,Switch,While */ 211 Name (RN08, 0x01) /* All other operators */ 212 Name (B000, Buffer (0x0A){}) 213 Name (S000, "qwertyuiopasdfghjklz") 214 Name (P000, Package (0x09) 215 { 216 0x01, 217 0x02, 218 0x03, 219 0x04, 220 0x05, 221 0x06, 222 0x07, 223 0x08, 224 0x09 225 }) 226 FLG4 = 0x01 227 If (RN00) 228 { 229 /* CondRefOf */ 230 231 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 232 M480 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05) 233 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 234 } 235 236 If (RN01) 237 { 238 /* DerefOf */ 239 240 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 241 M480 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08) 242 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 243 } 244 245 If (RN02) 246 { 247 /* ObjectType */ 248 249 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 250 M480 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20) 251 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 252 } 253 254 If (RN03) 255 { 256 /* RefOf */ 257 258 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 259 M480 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22) 260 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 261 } 262 263 If (RN04) 264 { 265 /* SizeOf */ 266 267 Local0 = 0x00 268 Local1 = ObjectType (Arg0) 269 Switch (ToInteger (Local1)) 270 { 271 Case (0x01) 272 { 273 /* Integer */ 274 275 Local0 = 0x01 276 } 277 Case (0x02) 278 { 279 /* String */ 280 281 Local0 = 0x01 282 } 283 Case (0x03) 284 { 285 /* Buffer */ 286 287 Local0 = 0x01 288 } 289 Case (0x04) 290 { 291 /* Package */ 292 293 Local0 = 0x01 294 } 295 296 } 297 298 If (Y505) 299 { 300 /* Buffer Field and Field Unit types should allow SizeOf() */ 301 302 Switch (ToInteger (Local1)) 303 { 304 Case (0x05) 305 { 306 /* Field Unit */ 307 308 Local0 = 0x01 309 } 310 Case (0x0E) 311 { 312 /* Buffer Field */ 313 314 Local0 = 0x01 315 } 316 317 } 318 } 319 320 If (Local0) 321 { 322 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 323 M480 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29) 324 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 325 } 326 Else 327 { 328 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29) 329 } 330 } 331 332 /* if(rn04) */ 333 334 If (RN05) 335 { 336 /* CopyObject */ 337 338 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 339 CopyObject (Arg0, Local7) 340 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 341 } 342 343 If (RN06) 344 { 345 /* Return */ 346 347 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 348 M000 (Arg0) 349 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 350 } 351 352 If (RN07) 353 { 354 /* If */ 355 356 M001 (Arg0) 357 /* ElseIf */ 358 359 M002 (Arg0) 360 /* Switch */ 361 362 If (Y248) 363 { 364 M167 (Arg0) 365 } 366 Else 367 { 368 Debug = "WARNING: test m1a8:m1a8 blocked due to the bug 248!" 369 } 370 371 /* While */ 372 373 M004 (Arg0) 374 } 375 376 /* if(rn07) */ 377 378 If (RN08) 379 { 380 /* Acquire */ 381 382 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00) 383 /* Add */ 384 385 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01) 386 M1A7 (0x00, Arg0, 0x00, 0x00, 0x00, 0x00, 0x01) 387 /* And */ 388 389 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02) 390 M1A7 (0x00, Arg0, 0x00, 0x00, 0x00, 0x00, 0x02) 391 /* Concatenate */ 392 393 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03) 394 M1A7 (0x00, Arg0, 0x00, 0x00, 0x00, 0x00, 0x03) 395 /* ConcatenateResTemplate */ 396 397 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04) 398 M1A7 (0x00, Arg0, 0x00, 0x00, 0x00, 0x00, 0x04) 399 /* Decrement */ 400 401 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07) 402 /* Divide */ 403 404 M1A7 (Arg0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x09) 405 M1A7 (0x01, Arg0, 0x00, 0x00, 0x00, 0x00, 0x09) 406 /* Fatal */ 407 /* FindSetLeftBit */ 408 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B) 409 /* FindSetRightBit */ 410 411 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C) 412 /* FromBCD */ 413 414 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D) 415 /* Increment */ 416 417 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E) 418 /* Index */ 419 420 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F) 421 M1A7 (B000, Arg0, 0x00, 0x00, 0x00, 0x00, 0x0F) 422 /* LAnd */ 423 424 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10) 425 M1A7 (0x00, Arg0, 0x00, 0x00, 0x00, 0x00, 0x10) 426 /* LEqual */ 427 428 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11) 429 M1A7 (0x00, Arg0, 0x00, 0x00, 0x00, 0x00, 0x11) 430 /* LGreater */ 431 432 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12) 433 M1A7 (0x00, Arg0, 0x00, 0x00, 0x00, 0x00, 0x12) 434 /* LGreaterEqual */ 435 436 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13) 437 M1A7 (0x00, Arg0, 0x00, 0x00, 0x00, 0x00, 0x13) 438 /* LLess */ 439 440 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14) 441 M1A7 (0x00, Arg0, 0x00, 0x00, 0x00, 0x00, 0x14) 442 /* LLessEqual */ 443 444 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15) 445 M1A7 (0x00, Arg0, 0x00, 0x00, 0x00, 0x00, 0x15) 446 /* LNot */ 447 448 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16) 449 /* LNotEqual */ 450 451 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17) 452 M1A7 (0x00, Arg0, 0x00, 0x00, 0x00, 0x00, 0x17) 453 /* LOr */ 454 455 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18) 456 M1A7 (0x00, Arg0, 0x00, 0x00, 0x00, 0x00, 0x18) 457 /* Match */ 458 459 M1A7 (Arg0, 0x00, 0x01, 0x01, 0x01, 0x00, 0x19) 460 M1A7 (P000, 0x00, Arg0, 0x01, 0x01, 0x00, 0x19) 461 M1A7 (P000, 0x00, 0x01, Arg0, 0x01, 0x00, 0x19) 462 M1A7 (P000, 0x00, 0x01, 0x01, Arg0, 0x00, 0x19) 463 /* Mid */ 464 465 M1A7 (Arg0, 0x00, 0x05, 0x00, 0x00, 0x00, 0x1A) 466 M1A7 (S000, Arg0, 0x05, 0x00, 0x00, 0x00, 0x1A) 467 M1A7 (S000, 0x00, Arg0, 0x00, 0x00, 0x00, 0x1A) 468 /* Mod */ 469 470 M1A7 (Arg0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x1B) 471 M1A7 (0x01, Arg0, 0x00, 0x00, 0x00, 0x00, 0x1B) 472 /* Multiply */ 473 474 M1A7 (Arg0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x1C) 475 M1A7 (0x01, Arg0, 0x00, 0x00, 0x00, 0x00, 0x1C) 476 /* NAnd */ 477 478 M1A7 (Arg0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x1D) 479 M1A7 (0x01, Arg0, 0x00, 0x00, 0x00, 0x00, 0x1D) 480 /* NOr */ 481 482 M1A7 (Arg0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x1E) 483 M1A7 (0x01, Arg0, 0x00, 0x00, 0x00, 0x00, 0x1E) 484 /* Not */ 485 486 M1A7 (Arg0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x1F) 487 /* Or */ 488 489 M1A7 (Arg0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x21) 490 M1A7 (0x01, Arg0, 0x00, 0x00, 0x00, 0x00, 0x21) 491 /* Release */ 492 493 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23) 494 /* Reset */ 495 496 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24) 497 /* ShiftLeft */ 498 499 M1A7 (Arg0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x26) 500 M1A7 (0x01, Arg0, 0x00, 0x00, 0x00, 0x00, 0x26) 501 /* ShiftRight */ 502 503 M1A7 (Arg0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x27) 504 M1A7 (0x01, Arg0, 0x00, 0x00, 0x00, 0x00, 0x27) 505 /* Signal */ 506 507 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28) 508 /* Sleep */ 509 510 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A) 511 /* Stall */ 512 513 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B) 514 /* Store */ 515 516 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 517 Local7 = Arg0 518 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 519 /* Subtract */ 520 521 M1A7 (Arg0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x2D) 522 M1A7 (0x01, Arg0, 0x00, 0x00, 0x00, 0x00, 0x2D) 523 /* ToBCD */ 524 525 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2E) 526 /* ToBuffer */ 527 528 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2F) 529 /* ToDecimalString */ 530 531 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30) 532 /* ToHexString */ 533 534 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31) 535 /* ToInteger */ 536 537 M1A7 (Arg0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32) 538 /* ToString */ 539 540 M1A7 (Arg0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x33) 541 M1A7 (B000, Arg0, 0x00, 0x00, 0x00, 0x00, 0x33) 542 /* Wait */ 543 544 M1A7 (Arg0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x34) 545 M1A7 (B000, Arg0, 0x00, 0x00, 0x00, 0x00, 0x34) 546 /* XOr */ 547 548 M1A7 (Arg0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x35) 549 M1A7 (B000, Arg0, 0x00, 0x00, 0x00, 0x00, 0x35) 550 } /* if(rn08) */ 551 552 FLG4 = 0x00 553 RST0 () 554 Return (Zero) 555 } 556 557 /* Simple test, only some particular ways of obtaining references */ 558 559 Method (M1A9, 0, Serialized) 560 { 561 /* FILE BUG: CondRefOf doesn't cause an exception but only under some conditions, */ 562 /* namely for rn00 == 2. */ 563 Name (RN00, 0x02) /* Simplest modes, for debugging */ 564 Name (RN01, 0x01) /* Crash */ 565 If ((RN00 == 0x00)) 566 { 567 /* Simplest mode, ONE-TWO operations of those below */ 568 569 Local0 = RefOf (I900) 570 M1A8 (Local0, Z081, 0x0F) 571 Local1 = CondRefOf (I900, Local0) 572 If (M1A4 (Local1, 0x22)) 573 { 574 M1A8 (Local0, Z081, 0x23) 575 } 576 } 577 ElseIf ((RN00 == 0x01)) 578 { 579 /* Simplest mode, SOME of operations below */ 580 581 Store (S900 [0x00], Local0) 582 M1A8 (Local0, Z081, 0x00) 583 Store (B900 [0x03], Local0) 584 M1A8 (Local0, Z081, 0x01) 585 Store (P901 [0x00], Local0) 586 M1A8 (Local0, Z081, 0x02) 587 Store (P91E [0x00], Local0) 588 M1A8 (Local0, Z081, 0x04) 589 Local0 = Local1 = P901 [0x00] 590 M1A8 (Local1, Z081, 0x0A) 591 Local0 = Local1 = P91E [0x00] 592 M1A8 (Local1, Z081, 0x0E) 593 Local0 = RefOf (I900) 594 M1A8 (Local0, Z081, 0x0F) 595 Local0 = RefOf (F900) 596 M1A8 (Local0, Z081, 0x12) 597 Local0 = RefOf (BN90) 598 M1A8 (Local0, Z081, 0x13) 599 Local0 = RefOf (IF90) 600 M1A8 (Local0, Z081, 0x14) 601 Local0 = RefOf (BF90) 602 M1A8 (Local0, Z081, 0x15) 603 Local1 = CondRefOf (I900, Local0) 604 If (M1A4 (Local1, 0x22)) 605 { 606 M1A8 (Local0, Z081, 0x23) 607 } 608 } 609 Else 610 { 611 /* Index */ 612 613 Store (S900 [0x00], Local0) 614 M1A8 (Local0, Z081, 0x00) 615 Store (B900 [0x03], Local0) 616 M1A8 (Local0, Z081, 0x01) 617 Store (P901 [0x00], Local0) 618 M1A8 (Local0, Z081, 0x02) 619 If (RN01) 620 { 621 Store (P916 [0x00], Local0) 622 M1A8 (Local0, Z081, 0x03) 623 } 624 625 Store (P91E [0x00], Local0) 626 M1A8 (Local0, Z081, 0x04) 627 Local0 = Local1 = S900 [0x00] 628 M1A8 (Local0, Z081, 0x05) 629 M1A8 (Local1, Z081, 0x06) 630 Local0 = Local1 = B900 [0x03] 631 M1A8 (Local0, Z081, 0x07) 632 M1A8 (Local1, Z081, 0x08) 633 Local0 = Local1 = P901 [0x00] 634 M1A8 (Local0, Z081, 0x09) 635 M1A8 (Local1, Z081, 0x0A) 636 If (RN01) 637 { 638 Local0 = Local1 = P916 [0x00] 639 M1A8 (Local0, Z081, 0x0B) 640 M1A8 (Local1, Z081, 0x0C) 641 } 642 643 Local0 = Local1 = P91E [0x00] 644 M1A8 (Local0, Z081, 0x0D) 645 M1A8 (Local1, Z081, 0x0E) 646 /* RefOf */ 647 648 Local0 = RefOf (I900) 649 M1A8 (Local0, Z081, 0x0F) 650 Local0 = RefOf (S900) 651 M1A8 (Local0, Z081, 0x10) 652 Local0 = RefOf (B900) 653 M1A8 (Local0, Z081, 0x11) 654 Local0 = RefOf (F900) 655 M1A8 (Local0, Z081, 0x12) 656 Local0 = RefOf (BN90) 657 M1A8 (Local0, Z081, 0x13) 658 Local0 = RefOf (IF90) 659 M1A8 (Local0, Z081, 0x14) 660 Local0 = RefOf (BF90) 661 M1A8 (Local0, Z081, 0x15) 662 Local0 = RefOf (E900) 663 M1A8 (Local0, Z081, 0x16) 664 Local0 = RefOf (MX90) 665 M1A8 (Local0, Z081, 0x17) 666 Local0 = RefOf (D900) 667 M1A8 (Local0, Z081, 0x18) 668 Local0 = RefOf (TZ90) 669 M1A8 (Local0, Z081, 0x19) 670 Local0 = RefOf (PR90) 671 M1A8 (Local0, Z081, 0x1A) 672 Local0 = RefOf (R900) 673 M1A8 (Local0, Z081, 0x1B) 674 Local0 = RefOf (PW90) 675 M1A8 (Local0, Z081, 0x1C) 676 Local0 = RefOf (P900) 677 M1A8 (Local0, Z081, 0x1D) 678 Local0 = RefOf (P901) 679 M1A8 (Local0, Z081, 0x1E) 680 Local0 = RefOf (P916) 681 M1A8 (Local0, Z081, 0x1F) 682 Local0 = RefOf (P91D) 683 M1A8 (Local0, Z081, 0x20) 684 Local0 = RefOf (P91E) 685 M1A8 (Local0, Z081, 0x21) 686 /* CondRefOf */ 687 688 Local1 = CondRefOf (I900, Local0) 689 If (M1A4 (Local1, 0x22)) 690 { 691 M1A8 (Local0, Z081, 0x23) 692 } 693 694 Local1 = CondRefOf (S900, Local0) 695 If (M1A4 (Local1, 0x24)) 696 { 697 M1A8 (Local0, Z081, 0x25) 698 } 699 700 Local1 = CondRefOf (B900, Local0) 701 If (M1A4 (Local1, 0x26)) 702 { 703 M1A8 (Local0, Z081, 0x27) 704 } 705 706 Local1 = CondRefOf (F900, Local0) 707 If (M1A4 (Local1, 0x28)) 708 { 709 M1A8 (Local0, Z081, 0x29) 710 } 711 712 Local1 = CondRefOf (BN90, Local0) 713 If (M1A4 (Local1, 0x2A)) 714 { 715 M1A8 (Local0, Z081, 0x2B) 716 } 717 718 Local1 = CondRefOf (IF90, Local0) 719 If (M1A4 (Local1, 0x2C)) 720 { 721 M1A8 (Local0, Z081, 0x2D) 722 } 723 724 Local1 = CondRefOf (BF90, Local0) 725 If (M1A4 (Local1, 0x2E)) 726 { 727 M1A8 (Local0, Z081, 0x2F) 728 } 729 730 Local1 = CondRefOf (E900, Local0) 731 If (M1A4 (Local1, 0x30)) 732 { 733 M1A8 (Local0, Z081, 0x31) 734 } 735 736 Local1 = CondRefOf (MX90, Local0) 737 If (M1A4 (Local1, 0x32)) 738 { 739 M1A8 (Local0, Z081, 0x33) 740 } 741 742 Local1 = CondRefOf (D900, Local0) 743 If (M1A4 (Local1, 0x34)) 744 { 745 M1A8 (Local0, Z081, 0x35) 746 } 747 748 Local1 = CondRefOf (TZ90, Local0) 749 If (M1A4 (Local1, 0x36)) 750 { 751 M1A8 (Local0, Z081, 0x37) 752 } 753 754 Local1 = CondRefOf (PR90, Local0) 755 If (M1A4 (Local1, 0x38)) 756 { 757 M1A8 (Local0, Z081, 0x39) 758 } 759 760 Local1 = CondRefOf (R900, Local0) 761 If (M1A4 (Local1, 0x3A)) 762 { 763 M1A8 (Local0, Z081, 0x3B) 764 } 765 766 Local1 = CondRefOf (PW90, Local0) 767 If (M1A4 (Local1, 0x3C)) 768 { 769 M1A8 (Local0, Z081, 0x3D) 770 } 771 772 Local1 = CondRefOf (P900, Local0) 773 If (M1A4 (Local1, 0x3E)) 774 { 775 M1A8 (Local0, Z081, 0x3F) 776 } 777 778 Local1 = CondRefOf (P901, Local0) 779 If (M1A4 (Local1, 0x40)) 780 { 781 M1A8 (Local0, Z081, 0x41) 782 } 783 784 Local1 = CondRefOf (P916, Local0) 785 If (M1A4 (Local1, 0x42)) 786 { 787 M1A8 (Local0, Z081, 0x43) 788 } 789 790 Local1 = CondRefOf (P91D, Local0) 791 If (M1A4 (Local1, 0x44)) 792 { 793 M1A8 (Local0, Z081, 0x45) 794 } 795 796 Local1 = CondRefOf (P91E, Local0) 797 If (M1A4 (Local1, 0x46)) 798 { 799 M1A8 (Local0, Z081, 0x47) 800 } 801 } 802 } 803 804 Method (M106, 0, Serialized) 805 { 806 Name (I000, 0xABCD0000) 807 Method (M000, 1, NotSerialized) 808 { 809 CH03 (__METHOD__, Z081, __LINE__, 0x00, 0x00) 810 Debug = DerefOf (RefOf (DerefOf (RefOf (Arg0)))) 811 CH04 (C080, 0x00, 0xFF, Z081, __LINE__, 0x00, 0x00) 812 } 813 814 M000 (I000) 815 } 816 817 /* Run-method */ 818 819 Method (REF5, 0, Serialized) 820 { 821 Name (P91E, Package (0x01) 822 { 823 0xABCD0000 824 }) 825 Debug = "TEST: REF5, References, check exceptions" 826 C080 = "REF5" /* name of test */ 827 C081 = Z081 /* absolute index of file initiating the checking */ /* \Z081 */ 828 C082 = 0x01 /* flag of test of exceptions */ 829 C083 = 0x00 /* run verification of references (write/read) */ 830 C084 = 0x00 /* run verification of references (reading) */ 831 C085 = 0x00 /* create the chain of references to LocalX, then dereference them */ 832 C086 = 0x00 /* flag, run test till the first error */ 833 C087 = 0x01 /* apply DeRefOf to ArgX-ObjectReference */ 834 C089 = 0x01 /* flag of Reference, object otherwise */ 835 If (0x00) 836 { 837 /* This mode of test run takes much time, moreover, */ 838 /* due to the bug 95 of ACPICA it fails to complete. */ 839 /* So, if run it then do it with the flag c086 set up */ 840 /* - run test till the first error. */ 841 C086 = 0x01 /* flag, run test till the first error */ 842 /* For local data (methods of ref1.asl) */ 843 /* Reset current indicator of errors */ 844 RST2 () 845 C081 = Z077 /* absolute index of file initiating the checking */ /* \Z077 */ 846 SRMT ("m168") 847 M168 () 848 SRMT ("m169") 849 M169 () 850 SRMT ("m16a") 851 M16A (0x00) 852 SRMT ("m16b") 853 M16B () 854 SRMT ("m16c") 855 M16C (0x00) 856 SRMT ("m16d") 857 M16D () 858 SRMT ("m16e") 859 M16E () 860 /* For global data (methods of ref4.asl) */ 861 862 C081 = Z080 /* absolute index of file initiating the checking */ /* \Z080 */ 863 SRMT ("m190") 864 M190 () 865 SRMT ("m191") 866 M191 (0x00) 867 SRMT ("m192") 868 M192 () 869 SRMT ("m193") 870 M193 (0x00) 871 SRMT ("m194") 872 M194 () 873 } 874 Else 875 { 876 /* Run simple test only for some particular ways of */ 877 /* obtaining references. */ 878 C086 = 0x00 /* don't break testing on error appearance */ 879 SRMT ("m1a9") 880 M1A9 () 881 } 882 883 /* Particular tests */ 884 885 SRMT ("m106") 886 M106 () 887 SRMT ("m167") 888 If (Y248) 889 { 890 /* This code here only to not forget to run m1a8:m167 */ 891 892 Local0 = Local1 = P91E [0x00] 893 M167 (Local0) 894 } 895 Else 896 { 897 BLCK () 898 } 899 } 900