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 * Load ASL operator functionality 30 */ 31 /* 32 * This sub-test is intended to comprehensively verify 33 * the Load ASL operator functionality. 34 * 35 * Performs a run-time load of a Definition Block. 36 * 37 * 17.5.67 Load (Load Definition Block) 38 * Syntax 39 * Load (Object, DDBHandle) 40 * 41 * On testing the following issues should be covered: 42 * 43 * - loading SSDT from a SystemMemory OpRegion, 44 * 45 * - loading SSDT from a Region Field in a OpRegion of any type, 46 * 47 * - "namespace location to load the Definition Block is relative 48 * to the current namespace" scope, 49 * 50 * - loading a number of different SSDTs, 51 * 52 * - global and dynamic declarations of OpRegions and the appropriate 53 * _REG Methods invocation for the loaded SSDT, 54 * 55 * - global and dynamic declarations of OpRegions and Region Fields, 56 * containing the loaded SSDT, 57 * 58 * - an Object of any type can be used as the DDBHandle argument, 59 * 60 * - the DDBHandle argument of the Load operator becomes an Object 61 * of the DDBHandle type, 62 * 63 * - the DDBHandle Object returned from the Load operator can be used 64 * to unload the SSDT, 65 * 66 * - exceptional conditions caused by inappropriate data: 67 * = the Object argument does not refer to an operation region field 68 * or an operation region, 69 * = an OpRegion passed as the Object argument is not of SystemMemory type, 70 * = the table contained in an OpRegion (Field) is not an SSDT, 71 * = the length of the supplied SSDT is greater than the length of the 72 * respective OpRegion or Region Field, 73 * = the length of the supplied SSDT is less than the length the Header 74 * = the checksum of the supplied SSDT is invalid, 75 * = AE_OWNER_ID_LIMIT exception when too many Tables loaded, 76 * = the specified SSDT is already loaded, 77 * = there already is an previously loaded Object referred by the path 78 * in the Namespace. 79 * 80 * Can not be tested following issues: 81 * - providing of the table referenced by Load to be "in memory marked by 82 * AddressRangeReserved or AddressRangeNVS", 83 * - overriding the supplied SSDT with "a newer revision Definition Block 84 * of the same OEM Table ID" by the OS, 85 * - loading a SSDT to be a synchronous operation ("the control methods 86 * defined in the Definition Block are not executed during load time") 87 */ 88 /* Integer */ 89 External (\AUXD.INT0, UnknownObj) 90 /* String */ 91 92 External (\AUXD.STR0, UnknownObj) 93 /* Buffer */ 94 95 External (\AUXD.BUF0, UnknownObj) 96 /* Package */ 97 98 External (\AUXD.PAC0, UnknownObj) 99 /* Device */ 100 101 External (\AUXD.DEV0, UnknownObj) 102 /* Event */ 103 104 External (\AUXD.EVE0, UnknownObj) 105 /* Method */ 106 107 External (\AUXD.MMM0, UnknownObj) 108 /* Mutex */ 109 110 External (\AUXD.MTX0, UnknownObj) 111 /* Power Resource */ 112 113 External (\AUXD.PWR0, UnknownObj) 114 /* Processor */ 115 116 External (\AUXD.CPU0, UnknownObj) 117 /* Thermal Zone */ 118 119 External (\AUXD.TZN0, UnknownObj) 120 /* Buffer Field */ 121 122 External (\AUXD.BFL0, UnknownObj) 123 /* Field Unit */ 124 125 External (\AUXD.FLU0, UnknownObj) 126 /* OpRegion */ 127 128 External (\AUXD.OPR0, UnknownObj) 129 Name (Z174, 0xAE) 130 Device (DTM0) 131 { 132 /* Originated from ssdt0.asl: iasl -tc ssdt0.asl */ 133 134 Name (BUF0, Buffer (0x34) 135 { 136 /* 0000 */ 0x53, 0x53, 0x44, 0x54, 0x34, 0x00, 0x00, 0x00, // SSDT4... 137 /* 0008 */ 0x02, 0x98, 0x49, 0x6E, 0x74, 0x65, 0x6C, 0x00, // ..Intel. 138 /* 0010 */ 0x4D, 0x61, 0x6E, 0x79, 0x00, 0x00, 0x00, 0x00, // Many.... 139 /* 0018 */ 0x01, 0x00, 0x00, 0x00, 0x49, 0x4E, 0x54, 0x4C, // ....INTL 140 /* 0020 */ 0x15, 0x12, 0x06, 0x20, 0x14, 0x0F, 0x5C, 0x53, // ... ..\S 141 /* 0028 */ 0x53, 0x53, 0x30, 0x00, 0xA4, 0x0D, 0x5C, 0x53, // SS0...\S 142 /* 0030 */ 0x53, 0x53, 0x30, 0x00 // SS0. 143 }) 144 Name (SNML, "0123456789ABCDEF") 145 Name (NNML, 0x10) /* <= sizeof (SNML) */ 146 /* Take into account AE_OWNER_ID_LIMIT */ 147 148 Name (HI0M, 0x0100) /* <= (NNML * NNML) */ 149 Name (HI0P, Package (HI0M){}) 150 Name (HI0N, 0x00) 151 Name (INIF, 0x00) 152 OperationRegion (IST0, SystemMemory, 0x00, 0x34) 153 Field (IST0, ByteAcc, NoLock, Preserve) 154 { 155 RFU0, 416 156 } 157 158 Field (IST0, ByteAcc, NoLock, Preserve) 159 { 160 SIG, 32, 161 LENG, 32, 162 REV, 8, 163 SUM, 8, 164 OID, 48, 165 OTID, 64, 166 OREV, 32, 167 CID, 32, 168 CREV, 32, 169 Offset (0x27), 170 SSNM, 32 171 } 172 173 /* components/utilities/utmisc.c AcpiUtGenerateChecksum() analog */ 174 175 Method (CHSM, 2, Serialized) 176 { 177 Name (LPN0, 0x00) 178 Name (LPC0, 0x00) 179 Local0 = 0x00 /* sum */ 180 LPN0 = Arg1 181 LPC0 = 0x00 182 While (LPN0) 183 { 184 Local1 = DerefOf (Arg0 [LPC0]) 185 Local0 += Local1 186 Local0 %= 0x0100 187 LPN0-- 188 LPC0++ 189 } 190 191 Local0 = (0x00 - Local0) 192 Local0 %= 0x0100 193 Debug = "checksum" 194 Debug = Local0 195 Return (Local0) 196 } 197 198 /* Initializes multiple Tables Load test */ 199 200 Method (INIT, 0, NotSerialized) 201 { 202 Local0 = SizeOf (SNML) 203 If ((NNML > Local0)) 204 { 205 Debug = Concatenate ("INIT: test error, check NNML <= Sizeof(SNML):", ToDecimalString (Local0)) 206 Return (0x01) 207 } 208 209 Local0 *= Local0 210 If ((HI0M > Local0)) 211 { 212 Debug = Concatenate ("INIT: test error, check HI0M <= 0x", Local0) 213 Return (0x01) 214 } 215 216 If (INIF) 217 { 218 Debug = "INIT: OpRegion has been initialized previously" 219 Return (0x01) 220 } 221 222 RFU0 = BUF0 /* \DTM0.BUF0 */ 223 INIF = 0x01 224 Debug = "INIT: OpRegion initialized with SSDT" 225 Return (0x00) 226 } 227 228 /* Prepares and Loads the next Table of multiple Tables Load test */ 229 230 Method (LD, 0, Serialized) 231 { 232 If ((HI0N >= HI0M)) 233 { 234 Debug = "LD: too many tables loaded" 235 Return (0x01) 236 } 237 238 Local2 = (HI0N * 0x30) 239 OperationRegion (IST0, SystemMemory, Local2, 0x34) 240 Field (IST0, ByteAcc, NoLock, Preserve) 241 { 242 RFU0, 416 243 } 244 245 Field (IST0, ByteAcc, NoLock, Preserve) 246 { 247 SIG, 32, 248 LENG, 32, 249 REV, 8, 250 SUM, 8, 251 OID, 48, 252 OTID, 64, 253 OREV, 32, 254 CID, 32, 255 CREV, 32, 256 Offset (0x27), 257 SSNM, 32, 258 Offset (0x2F), 259 SSRT, 32 260 } 261 262 RFU0 = BUF0 /* \DTM0.BUF0 */ 263 /* Modify Revision field of SSDT */ 264 265 Store ((CREV + 0x01), CREV) /* \DTM0.LD__.CREV */ 266 /* Modify SSNM Object Name */ 267 268 Divide (HI0N, NNML, Local0, Local1) 269 Local1 = DerefOf (SNML [Local1]) 270 Local1 <<= 0x10 271 Local0 = DerefOf (SNML [Local0]) 272 Local0 <<= 0x18 273 Local0 += Local1 274 Local0 += 0x5353 275 SSNM = Local0 276 Debug = SSNM /* \DTM0.LD__.SSNM */ 277 /* Modify SSNM Method Return String */ 278 279 SSRT = Local0 280 /* Recalculate and save CheckSum */ 281 282 Local0 = RFU0 /* \DTM0.LD__.RFU0 */ 283 Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.LD__.SUM_ */ 284 Load (RFU0, HI0P [HI0N]) 285 HI0N++ 286 Debug = "LD: SSDT Loaded" 287 Return (0x00) 288 } 289 290 /* UnLoads the last Table of multiple Tables Load test */ 291 292 Method (UNLD, 0, NotSerialized) 293 { 294 If ((HI0N == 0x00)) 295 { 296 Debug = "UNLD: there are no SSDT loaded" 297 Return (0x01) 298 } 299 300 HI0N-- 301 Unload (DerefOf (HI0P [HI0N])) 302 Debug = "UNLD: SSDT UnLoaded" 303 Return (0x00) 304 } 305 306 External (\SSS0, MethodObj) 307 Name (HI0, 0x00) 308 /* Simple Load test auxiliary method */ 309 /* Arg1: DDBH, 0 - Local Named, 1 - Global Named, */ 310 /* 2 - LocalX, 3 - element of Package */ 311 Method (M000, 2, Serialized) 312 { 313 Name (HI0, 0x00) 314 Name (PHI0, Package (0x01){}) 315 Concatenate (Arg0, "-m000", Arg0) 316 RFU0 = BUF0 /* \DTM0.BUF0 */ 317 If (CondRefOf (\SSS0, Local0)) 318 { 319 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 320 Return (Zero) 321 } 322 323 /* Modify Revision field of SSDT */ 324 325 Store ((CREV + 0x01), CREV) /* \DTM0.CREV */ 326 /* Recalculate and save CheckSum */ 327 328 Local0 = RFU0 /* \DTM0.RFU0 */ 329 Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.SUM_ */ 330 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 331 { 332 Return (Zero) 333 } 334 335 /* Load operator execution */ 336 337 Switch (ToInteger (Arg1)) 338 { 339 Case (0x00) 340 { 341 Load (RFU0, HI0) /* \DTM0.M000.HI0_ */ 342 } 343 Case (0x01) 344 { 345 Load (RFU0, \DTM0.HI0) 346 } 347 Case (0x02) 348 { 349 Load (RFU0, Local2) 350 } 351 Case (0x03) 352 { 353 Load (RFU0, PHI0 [0x00]) 354 } 355 Default 356 { 357 Debug = "Unexpected parameter of the test" 358 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 359 Return (Zero) 360 } 361 362 } 363 364 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 365 { 366 Return (Zero) 367 } 368 369 Debug = "Table Loaded" 370 /* Check DDBHandle ObjectType */ 371 372 Switch (ToInteger (Arg1)) 373 { 374 Case (0x00) 375 { 376 Local1 = ObjectType (HI0) 377 } 378 Case (0x01) 379 { 380 Local1 = ObjectType (\DTM0.HI0) 381 } 382 Case (0x02) 383 { 384 Local1 = ObjectType (Local2) 385 } 386 Case (0x03) 387 { 388 Local1 = ObjectType (PHI0 [0x00]) 389 } 390 391 } 392 393 If ((Local1 != C017)) 394 { 395 /* DDB Handle */ 396 397 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local1, C017) 398 } 399 400 /* Check the new Object appears */ 401 402 If (CondRefOf (\SSS0, Local0)){} 403 Else 404 { 405 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x00) 406 } 407 408 Local1 = ObjectType (Local0) 409 If ((Local1 != C010)) 410 { 411 /* Method */ 412 413 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local1, C010) 414 } 415 Else 416 { 417 Local0 = \SSS0 () 418 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x01)) 419 { 420 Return (Zero) 421 } 422 423 If (("\\SSS0" != Local0)) 424 { 425 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, "\\SSS0") 426 } 427 } 428 429 /* UnLoad operator execution */ 430 431 Switch (ToInteger (Arg1)) 432 { 433 Case (0x00) 434 { 435 Unload (HI0) 436 } 437 Case (0x01) 438 { 439 Unload (\DTM0.HI0) 440 } 441 Case (0x02) 442 { 443 Unload (Local2) 444 } 445 Case (0x03) 446 { 447 Unload (DerefOf (PHI0 [0x00])) 448 } 449 450 } 451 452 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 453 { 454 Return (Zero) 455 } 456 457 Debug = "Table Unloaded" 458 If (CondRefOf (\SSS0, Local0)) 459 { 460 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 461 } 462 463 Return (Zero) 464 } 465 466 /* Simple Load test auxiliary method for ArgX, part1 */ 467 /* Arg1 - reference to store the DDBHandle */ 468 Method (M001, 2, NotSerialized) 469 { 470 Concatenate (Arg0, "-m001", Arg0) 471 RFU0 = BUF0 /* \DTM0.BUF0 */ 472 If (CondRefOf (\SSS0, Local0)) 473 { 474 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 475 Return (0x01) 476 } 477 478 /* Modify Revision field of SSDT */ 479 480 Store ((CREV + 0x01), CREV) /* \DTM0.CREV */ 481 /* Recalculate and save CheckSum */ 482 483 Local0 = RFU0 /* \DTM0.RFU0 */ 484 Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.SUM_ */ 485 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 486 { 487 Return (0x01) 488 } 489 490 /* Load operator execution */ 491 492 Load (RFU0, Arg1) 493 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 494 { 495 Return (0x01) 496 } 497 498 Debug = "SSDT Loaded" 499 Return (0x00) 500 } 501 502 /* Simple Load test auxiliary method for ArgX, part2 */ 503 /* Arg1 - DDBHandle */ 504 Method (M002, 2, NotSerialized) 505 { 506 Concatenate (Arg0, "-m002", Arg0) 507 /* Check DDBHandle ObjectType */ 508 509 Local1 = ObjectType (Arg1) 510 If ((Local1 != C017)) 511 { 512 /* DDB Handle */ 513 514 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local1, C017) 515 } 516 517 /* Check the new Object appears */ 518 519 If (CondRefOf (\SSS0, Local0)){} 520 Else 521 { 522 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x00) 523 } 524 525 Local1 = ObjectType (Local0) 526 If ((Local1 != C010)) 527 { 528 /* Method */ 529 530 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local1, C010) 531 } 532 Else 533 { 534 Local0 = \SSS0 () 535 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x01)) 536 { 537 Return (Zero) 538 } 539 540 If (("\\SSS0" != Local0)) 541 { 542 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, "\\SSS0") 543 } 544 } 545 546 Unload (Arg1) 547 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 548 { 549 Return (Zero) 550 } 551 552 Debug = "SSDT Unloaded" 553 If (CondRefOf (\SSS0, Local0)) 554 { 555 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 556 } 557 558 Return (Zero) 559 } 560 561 /* Loading SSDT from a SystemMemory OpRegion, */ 562 /* different targets for DDBHandle. */ 563 /* Check DDBHandle storing into different Object locations: */ 564 /* DDBHandle storing into Named Integer */ 565 Method (TST0, 1, NotSerialized) 566 { 567 Concatenate (Arg0, "-tst0", Arg0) 568 /* Local Named Integer */ 569 570 M000 (Arg0, 0x00) 571 /* Global Named Integer */ 572 573 M000 (Arg0, 0x01) 574 } 575 576 /* DDBHandle storing into LocalX */ 577 578 Method (TST1, 1, NotSerialized) 579 { 580 Concatenate (Arg0, "-tst1", Arg0) 581 /* LocalX */ 582 583 M000 (Arg0, 0x02) 584 } 585 586 /* DDBHandle storing into Package element */ 587 588 Method (TST2, 1, NotSerialized) 589 { 590 Concatenate (Arg0, "-tst2", Arg0) 591 /* Package element */ 592 /* Crash on copying the specific reference Object */ 593 If (Y261) 594 { 595 M000 (Arg0, 0x03) 596 } 597 } 598 599 /* DDBHandle storing into an Object by Reference in Argx */ 600 601 Method (TST3, 1, Serialized) 602 { 603 Name (HI0, 0x00) 604 Concatenate (Arg0, "-tst3", Arg0) 605 /* Named by Reference in ArgX */ 606 607 If (M001 (Arg0, RefOf (HI0))) 608 { 609 Return (Zero) 610 } 611 612 M002 (Arg0, HI0) 613 /* LocalX by Reference in ArgX */ 614 615 If (M001 (Arg0, RefOf (Local2))) 616 { 617 Return (Zero) 618 } 619 620 M002 (Arg0, Local2) 621 /* Package element by Reference in ArgX */ 622 623 If (Y133) 624 { 625 Name (PHI0, Package (0x01) 626 { 627 0x00 628 }) 629 Store (PHI0 [0x00], Local0) 630 If (M001 (Arg0, Local0)) 631 { 632 Return (Zero) 633 } 634 635 M002 (Arg0, DerefOf (Local0)) 636 } 637 638 Return (Zero) 639 } 640 641 /* Combination of the OperationRegion operator arguments */ 642 643 OperationRegion (RGN0, SystemMemory, 0x00, 0x0201) 644 OperationRegion (RGN1, SystemIO, 0x0200, 0x0203) 645 OperationRegion (RGN2, PCI_Config, 0x0400, 0x0205) 646 OperationRegion (RGN3, EmbeddedControl, 0x0600, 0x0207) 647 OperationRegion (RGN4, SMBus, 0x0800, 0x0209) 648 OperationRegion (RGN5, SystemCMOS, 0x0A00, 0x020B) 649 OperationRegion (RGN6, PCIBARTarget, 0x0C00, 0x020D) 650 /* UserDefRegionSpace */ 651 652 OperationRegion (RGN7, 0x80, 0x0D00, 0x0217) 653 OperationRegion (RGN8, 0xCF, 0x0E00, 0x0218) 654 OperationRegion (RGN9, 0xFF, 0x0F00, 0x0219) 655 /* Loading SSDT from a Field of an OpRegion of any type, */ 656 /* different targets for DDBHandle. */ 657 /* Check DDBHandle storing into different Object locations: */ 658 /* Named Integer, LocalX, by Reference in Argx, etc. */ 659 /* m003(CallChain, Index, Region) */ 660 Method (M003, 3, NotSerialized) 661 { 662 Concatenate (Arg0, "-m003", Arg0) 663 /* Auxiliary method: */ 664 /* Arg1 - choice of a target */ 665 /* Arg2 - OpRegion Object of a specified type */ 666 Method (M000, 3, Serialized) 667 { 668 Name (HI0, 0x00) 669 Name (PHI0, Package (0x01){}) 670 OperationRegion (OPRM, 0xFF, 0x00, 0x1000) 671 Concatenate (Arg0, "-m000", Arg0) 672 CopyObject (Arg2, OPRM) /* \DTM0.M003.M000.OPRM */ 673 Field (OPRM, ByteAcc, NoLock, Preserve) 674 { 675 RFU0, 416 676 } 677 678 Field (OPRM, ByteAcc, NoLock, Preserve) 679 { 680 SIG, 32, 681 LENG, 32, 682 REV, 8, 683 SUM, 8, 684 OID, 48, 685 OTID, 64, 686 OREV, 32, 687 CID, 32, 688 CREV, 32, 689 Offset (0x27), 690 SSNM, 32 691 } 692 693 RFU0 = BUF0 /* \DTM0.BUF0 */ 694 If (CondRefOf (\SSS0, Local0)) 695 { 696 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 697 Return (Zero) 698 } 699 700 /* Modify Revision field of SSDT */ 701 702 Store ((CREV + 0x01), CREV) /* \DTM0.M003.M000.CREV */ 703 /* Recalculate and save CheckSum */ 704 705 Local0 = RFU0 /* \DTM0.M003.M000.RFU0 */ 706 Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.M003.M000.SUM_ */ 707 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 708 { 709 Return (Zero) 710 } 711 712 /* Load operator execution */ 713 714 Switch (ToInteger (Arg1)) 715 { 716 Case (0x00) 717 { 718 Load (RFU0, HI0) /* \DTM0.M003.M000.HI0_ */ 719 } 720 Case (0x01) 721 { 722 Load (RFU0, \DTM0.HI0) 723 } 724 Case (0x02) 725 { 726 Load (RFU0, Local2) 727 } 728 Case (0x03) 729 { 730 Load (RFU0, PHI0 [0x00]) 731 } 732 Default 733 { 734 Debug = "Unexpected parameter of the test" 735 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 736 Return (Zero) 737 } 738 739 } 740 741 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 742 { 743 Return (Zero) 744 } 745 746 Debug = "SSDT Loaded" 747 /* Check DDBHandle ObjectType */ 748 749 Switch (ToInteger (Arg1)) 750 { 751 Case (0x00) 752 { 753 Local1 = ObjectType (HI0) 754 } 755 Case (0x01) 756 { 757 Local1 = ObjectType (\DTM0.HI0) 758 } 759 Case (0x02) 760 { 761 Local1 = ObjectType (Local2) 762 } 763 Case (0x03) 764 { 765 Local1 = ObjectType (PHI0 [0x00]) 766 } 767 768 } 769 770 If ((Local1 != C017)) 771 { 772 /* DDB Handle */ 773 774 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local1, C017) 775 } 776 777 /* Check the new Object appears */ 778 779 If (CondRefOf (\SSS0, Local0)){} 780 Else 781 { 782 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x00) 783 } 784 785 Local1 = ObjectType (Local0) 786 If ((Local1 != C010)) 787 { 788 /* Method */ 789 790 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local1, C010) 791 } 792 Else 793 { 794 Local0 = \SSS0 () 795 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x01)) 796 { 797 Return (Zero) 798 } 799 800 If (("\\SSS0" != Local0)) 801 { 802 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, "\\SSS0") 803 } 804 } 805 806 /* UnLoad operator execution */ 807 808 Switch (ToInteger (Arg1)) 809 { 810 Case (0x00) 811 { 812 Unload (HI0) 813 } 814 Case (0x01) 815 { 816 Unload (\DTM0.HI0) 817 } 818 Case (0x02) 819 { 820 Unload (Local2) 821 } 822 Case (0x03) 823 { 824 Unload (DerefOf (PHI0 [0x00])) 825 } 826 827 } 828 829 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 830 { 831 Return (Zero) 832 } 833 834 Debug = "SSDT Unloaded" 835 If (CondRefOf (\SSS0, Local0)) 836 { 837 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 838 } 839 840 Return (Zero) 841 } 842 843 /* Auxiliary method for ArgX, part1 */ 844 /* Arg1 - reference to store the DDBHandle */ 845 /* Arg2 - OpRegion Object of a specified type */ 846 Method (M001, 3, Serialized) 847 { 848 OperationRegion (OPRM, 0xFF, 0x00, 0x1000) 849 Concatenate (Arg0, "-m001", Arg0) 850 CopyObject (Arg2, OPRM) /* \DTM0.M003.M001.OPRM */ 851 Field (OPRM, ByteAcc, NoLock, Preserve) 852 { 853 RFU0, 416 854 } 855 856 Field (OPRM, ByteAcc, NoLock, Preserve) 857 { 858 SIG, 32, 859 LENG, 32, 860 REV, 8, 861 SUM, 8, 862 OID, 48, 863 OTID, 64, 864 OREV, 32, 865 CID, 32, 866 CREV, 32, 867 Offset (0x27), 868 SSNM, 32 869 } 870 871 RFU0 = BUF0 /* \DTM0.BUF0 */ 872 If (CondRefOf (\SSS0, Local0)) 873 { 874 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 875 Return (0x01) 876 } 877 878 /* Modify Revision field of SSDT */ 879 880 Store ((CREV + 0x01), CREV) /* \DTM0.M003.M001.CREV */ 881 /* Recalculate and save CheckSum */ 882 883 Local0 = RFU0 /* \DTM0.M003.M001.RFU0 */ 884 Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.M003.M001.SUM_ */ 885 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 886 { 887 Return (0x01) 888 } 889 890 /* Load operator execution */ 891 892 Load (RFU0, Arg1) 893 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 894 { 895 Return (0x01) 896 } 897 898 Debug = "SSDT Loaded" 899 Return (0x00) 900 } 901 902 /* Arg1 - OpRegion Object of a specified type */ 903 904 Method (M003, 2, Serialized) 905 { 906 Concatenate (Arg0, "-m003", Arg0) 907 /* Local Named Integer */ 908 909 M000 (Arg0, 0x00, Arg1) 910 /* Global Named Integer */ 911 912 M000 (Arg0, 0x01, Arg1) 913 /* LocalX */ 914 915 M000 (Arg0, 0x02, Arg1) 916 /* Package element */ 917 /* Crash on copying the specific reference Object */ 918 If (Y261) 919 { 920 M000 (Arg0, 0x03, Arg1) 921 } 922 923 /* ArgX */ 924 925 If (M001 (Arg0, RefOf (Local2), Arg1)) 926 { 927 Return (Zero) 928 } 929 930 M002 (Arg0, Local2) 931 /* Package element as ArgX */ 932 933 If (Y133) 934 { 935 Name (PHI0, Package (0x01) 936 { 937 0x00 938 }) 939 Store (PHI0 [0x00], Local0) 940 If (M001 (Arg0, Local0, Arg1)) 941 { 942 Return (Zero) 943 } 944 945 M002 (Arg0, DerefOf (Local0)) 946 } 947 948 Return (Zero) 949 } 950 951 /* Region type's Address Space Handler installed flags, */ 952 /* only those types' OpRegion can be tested. */ 953 /* 0xff - UserDefRegionSpace */ 954 955Local2 = Buffer (0x0A) 956 { 957 /* 0000 */ 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, // ........ 958 /* 0008 */ 0x00, 0x00 // .. 959 } 960 Local3 = DerefOf (Local2 [Arg1]) 961 If (Local3) 962 { 963 Concatenate (Arg0, "-0x", Local4) 964 Concatenate (Local4, Mid (ToHexString (Arg1), (0x06 + (F64 * 0x08) 965 ), 0x02), Local4) 966 Debug = Local4 967 M003 (Local4, Arg2) 968 } 969 Else 970 { 971 Debug = "This Region type\'s AddrSpace Handler not installed" 972 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local2, Arg1) 973 } 974 } 975 976 /* SystemMemory Region */ 977 978 Method (TST4, 1, NotSerialized) 979 { 980 Concatenate (Arg0, "-tst4", Arg0) 981 M003 (Arg0, 0x00, RGN0) 982 } 983 984 /* SystemIO Region */ 985 986 Method (TST5, 1, NotSerialized) 987 { 988 Concatenate (Arg0, "-tst5", Arg0) 989 M003 (Arg0, 0x01, RGN1) 990 } 991 992 /* EmbeddedControl Region */ 993 994 Method (TST6, 1, NotSerialized) 995 { 996 Concatenate (Arg0, "-tst6", Arg0) 997 M003 (Arg0, 0x03, RGN3) 998 } 999 1000 /* User defined Region */ 1001 1002 Method (TST7, 1, NotSerialized) 1003 { 1004 Concatenate (Arg0, "-tst7", Arg0) 1005 M003 (Arg0, 0x07, RGN7) 1006 } 1007 1008 /* Note: We load the table objects relative to the root of the namespace. */ 1009 /* This appears to go against the ACPI specification, but we do it for */ 1010 /* compatibility with other ACPI implementations. */ 1011 /* Originated from ssdt1.asl: iasl -tc ssdt1.asl */ 1012 Name (BUF1, Buffer (0x5F) 1013 { 1014 /* 0000 */ 0x53, 0x53, 0x44, 0x54, 0x5F, 0x00, 0x00, 0x00, // SSDT_... 1015 /* 0008 */ 0x02, 0x33, 0x49, 0x6E, 0x74, 0x65, 0x6C, 0x00, // .3Intel. 1016 /* 0010 */ 0x4D, 0x61, 0x6E, 0x79, 0x00, 0x00, 0x00, 0x00, // Many.... 1017 /* 0018 */ 0x01, 0x00, 0x00, 0x00, 0x49, 0x4E, 0x54, 0x4C, // ....INTL 1018 /* 0020 */ 0x15, 0x12, 0x06, 0x20, 0x10, 0x1F, 0x5C, 0x00, // ... ..\. 1019 /* 0028 */ 0x08, 0x4E, 0x41, 0x42, 0x53, 0x0D, 0x61, 0x62, // .NABS.ab 1020 /* 0030 */ 0x73, 0x6F, 0x6C, 0x75, 0x74, 0x65, 0x20, 0x6C, // solute l 1021 /* 0038 */ 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x20, // ocation 1022 /* 0040 */ 0x6F, 0x62, 0x6A, 0x00, 0x08, 0x4E, 0x43, 0x52, // obj..NCR 1023 /* 0048 */ 0x52, 0x0D, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6E, // R.curren 1024 /* 0050 */ 0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, // t locati 1025 /* 0058 */ 0x6F, 0x6E, 0x20, 0x6F, 0x62, 0x6A, 0x00 // on obj. 1026 }) 1027 OperationRegion (IST1, SystemMemory, 0x0100, 0x5F) 1028 Field (IST1, ByteAcc, NoLock, Preserve) 1029 { 1030 RFU1, 760 1031 } 1032 1033 Method (TST8, 1, Serialized) 1034 { 1035 Name (DDBH, 0x00) 1036 Concatenate (Arg0, "-tst8", Arg0) 1037 /* Check absence */ 1038 1039 If (CondRefOf (NABS, Local0)) 1040 { 1041 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "NABS", 0x01) 1042 } 1043 1044 If (CondRefOf (NCRR, Local0)) 1045 { 1046 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "NCRR", 0x01) 1047 } 1048 1049 RFU1 = BUF1 /* \DTM0.BUF1 */ 1050 Load (RFU1, DDBH) /* \DTM0.TST8.DDBH */ 1051 Debug = "SSDT loaded" 1052 /* Check existence */ 1053 1054 If (CondRefOf (NABS, Local0)) 1055 { 1056 If (("absolute location obj" != DerefOf (Local0))) 1057 { 1058 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, DerefOf (Local0), "absolute location obj") 1059 } 1060 } 1061 Else 1062 { 1063 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "NABS", 0x00) 1064 } 1065 1066 If (CondRefOf (NCRR, Local0)) 1067 { 1068 If (("current location obj" != DerefOf (Local0))) 1069 { 1070 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, DerefOf (Local0), "current location obj") 1071 } 1072 } 1073 Else 1074 { 1075 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "NCRR", 0x00) 1076 } 1077 1078 /* Check location */ 1079 1080 If (CondRefOf (\NABS, Local0)){} 1081 Else 1082 { 1083 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "NABS", 0x00) 1084 } 1085 1086 /*Note: We load the table objects relative to the root of the namespace. */ 1087 1088 If (CondRefOf (\NCRR, Local0)){} 1089 Else 1090 { 1091 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\NCRR", 0x01) 1092 } 1093 1094 If (CondRefOf (\DTM0.NCRR, Local0)) 1095 { 1096 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\DTM0.NCRR", 0x01) 1097 } 1098 1099 If (CondRefOf (\DTM0.TST8.NCRR, Local0)) 1100 { 1101 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\DTM0.TST8.NCRR", 0x00) 1102 } 1103 1104 Unload (DDBH) 1105 Debug = "SSDT unloaded" 1106 /* Check absence */ 1107 1108 If (CondRefOf (NABS, Local0)) 1109 { 1110 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "NABS", 0x01) 1111 } 1112 1113 If (CondRefOf (NCRR, Local0)) 1114 { 1115 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "NCRR", 0x01) 1116 } 1117 } 1118 1119 /* Check global and dynamic declarations of OpRegions */ 1120 /* and the appropriate _REG Methods invocation for the */ 1121 /* loaded SSDT */ 1122 /* Originated from ssdt2.asl: iasl -tc ssdt2.asl */ 1123 Name (BUF2, Buffer (0x0117) 1124 { 1125 /* 0000 */ 0x53, 0x53, 0x44, 0x54, 0x17, 0x01, 0x00, 0x00, // SSDT.... 1126 /* 0008 */ 0x02, 0x7B, 0x49, 0x6E, 0x74, 0x65, 0x6C, 0x00, // .{Intel. 1127 /* 0010 */ 0x4D, 0x61, 0x6E, 0x79, 0x00, 0x00, 0x00, 0x00, // Many.... 1128 /* 0018 */ 0x01, 0x00, 0x00, 0x00, 0x49, 0x4E, 0x54, 0x4C, // ....INTL 1129 /* 0020 */ 0x15, 0x12, 0x06, 0x20, 0x5B, 0x82, 0x41, 0x0F, // ... [.A. 1130 /* 0028 */ 0x41, 0x55, 0x58, 0x44, 0x5B, 0x80, 0x4F, 0x50, // AUXD[.OP 1131 /* 0030 */ 0x52, 0x30, 0x80, 0x0C, 0x00, 0x00, 0x00, 0x01, // R0...... 1132 /* 0038 */ 0x0A, 0x04, 0x5B, 0x81, 0x0B, 0x4F, 0x50, 0x52, // ..[..OPR 1133 /* 0040 */ 0x30, 0x03, 0x52, 0x46, 0x30, 0x30, 0x20, 0x08, // 0.RF00 . 1134 /* 0048 */ 0x52, 0x45, 0x47, 0x43, 0x0C, 0xFF, 0xFF, 0xFF, // REGC.... 1135 /* 0050 */ 0xFF, 0x08, 0x52, 0x45, 0x47, 0x50, 0x0A, 0x00, // ..REGP.. 1136 /* 0058 */ 0x08, 0x52, 0x45, 0x47, 0x44, 0x0C, 0xFF, 0xFF, // .REGD... 1137 /* 0060 */ 0xFF, 0xFF, 0x08, 0x52, 0x45, 0x47, 0x52, 0x0A, // ...REGR. 1138 /* 0068 */ 0x00, 0x14, 0x33, 0x5F, 0x52, 0x45, 0x47, 0x02, // ..3_REG. 1139 /* 0070 */ 0x70, 0x0D, 0x5C, 0x41, 0x55, 0x58, 0x44, 0x2E, // p.\AUXD. 1140 /* 0078 */ 0x5F, 0x52, 0x45, 0x47, 0x3A, 0x00, 0x5B, 0x31, // _REG:.[1 1141 /* 0080 */ 0x70, 0x68, 0x5B, 0x31, 0x70, 0x69, 0x5B, 0x31, // ph[1pi[1 1142 /* 0088 */ 0xA0, 0x14, 0x93, 0x68, 0x0A, 0x80, 0x70, 0x52, // ...h..pR 1143 /* 0090 */ 0x45, 0x47, 0x43, 0x52, 0x45, 0x47, 0x50, 0x70, // EGCREGPp 1144 /* 0098 */ 0x69, 0x52, 0x45, 0x47, 0x43, 0x14, 0x49, 0x07, // iREGC.I. 1145 /* 00A0 */ 0x4D, 0x30, 0x30, 0x30, 0x00, 0x14, 0x38, 0x5F, // M000..8_ 1146 /* 00A8 */ 0x52, 0x45, 0x47, 0x02, 0x70, 0x0D, 0x5C, 0x41, // REG.p.\A 1147 /* 00B0 */ 0x55, 0x58, 0x44, 0x2E, 0x4D, 0x30, 0x30, 0x30, // UXD.M000 1148 /* 00B8 */ 0x2E, 0x5F, 0x52, 0x45, 0x47, 0x3A, 0x00, 0x5B, // ._REG:.[ 1149 /* 00C0 */ 0x31, 0x70, 0x68, 0x5B, 0x31, 0x70, 0x69, 0x5B, // 1ph[1pi[ 1150 /* 00C8 */ 0x31, 0xA0, 0x14, 0x93, 0x68, 0x0A, 0x80, 0x70, // 1...h..p 1151 /* 00D0 */ 0x52, 0x45, 0x47, 0x44, 0x52, 0x45, 0x47, 0x52, // REGDREGR 1152 /* 00D8 */ 0x70, 0x69, 0x52, 0x45, 0x47, 0x44, 0x5B, 0x80, // piREGD[. 1153 /* 00E0 */ 0x4F, 0x50, 0x52, 0x31, 0x80, 0x0C, 0x10, 0x00, // OPR1.... 1154 /* 00E8 */ 0x00, 0x01, 0x0A, 0x04, 0x5B, 0x81, 0x0B, 0x4F, // ....[..O 1155 /* 00F0 */ 0x50, 0x52, 0x31, 0x03, 0x52, 0x46, 0x30, 0x31, // PR1.RF01 1156 /* 00F8 */ 0x20, 0x70, 0x0D, 0x5C, 0x41, 0x55, 0x58, 0x44, // p.\AUXD 1157 /* 0100 */ 0x2E, 0x4D, 0x30, 0x30, 0x30, 0x3A, 0x00, 0x5B, // .M000:.[ 1158 /* 0108 */ 0x31, 0x70, 0x52, 0x46, 0x30, 0x31, 0x5B, 0x31, // 1pRF01[1 1159 /* 0110 */ 0x70, 0x52, 0x45, 0x47, 0x52, 0x5B, 0x31 // pREGR[1 1160 }) 1161 OperationRegion (IST2, SystemMemory, 0x0200, 0x0117) 1162 Field (IST2, ByteAcc, NoLock, Preserve) 1163 { 1164 RFU2, 2232 1165 } 1166 1167 External (\AUXD.M000, MethodObj) 1168 Method (TST9, 1, Serialized) 1169 { 1170 Name (DDBH, 0x00) 1171 Concatenate (Arg0, "-tst9", Arg0) 1172 RFU2 = BUF2 /* \DTM0.BUF2 */ 1173 If (CondRefOf (\AUXD, Local0)) 1174 { 1175 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\AUXD", 0x01) 1176 Return (Zero) 1177 } 1178 1179 If (CH03 (Arg0, 0x00, __LINE__, 0x00, 0x00)) 1180 { 1181 Return (Zero) 1182 } 1183 1184 Load (RFU2, DDBH) /* \DTM0.TST9.DDBH */ 1185 If (CH03 (Arg0, 0x00, __LINE__, 0x00, 0x00)) 1186 { 1187 Return (Zero) 1188 } 1189 1190 If (CondRefOf (\AUXD, Local0)){} 1191 Else 1192 { 1193 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\AUXD", 0x00) 1194 Return (Zero) 1195 } 1196 1197 Local1 = ObjectType (Local0) 1198 If ((Local1 != 0x06)) 1199 { 1200 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local1, 0x06) 1201 Return (Zero) 1202 } 1203 1204 If (CondRefOf (\AUXD.REGC, Local0)){} 1205 Else 1206 { 1207 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\AUXD.REGC", 0x00) 1208 Return (Zero) 1209 } 1210 1211 Local1 = DerefOf (Local0) 1212 If ((0x01 != Local1)) 1213 { 1214 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local1, 0x01) 1215 } 1216 1217 If (CondRefOf (\AUXD.REGD, Local0)){} 1218 Else 1219 { 1220 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\AUXD.REGD", 0x00) 1221 Return (Zero) 1222 } 1223 1224 Local1 = DerefOf (Local0) 1225 If ((0xFFFFFFFF != Local1)) 1226 { 1227 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local1, 0xFFFFFFFF) 1228 } 1229 ElseIf (CondRefOf (\AUXD.M000, Local2)) 1230 { 1231 \AUXD.M000 () 1232 Local1 = DerefOf (Local0) 1233 If ((0x01 != Local1)) 1234 { 1235 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local1, 0x01) 1236 } 1237 } 1238 Else 1239 { 1240 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\AUXD.M000", 0x00) 1241 } 1242 1243 Unload (DDBH) 1244 If (CondRefOf (\AUXD, Local0)) 1245 { 1246 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\AUXD", 0x01) 1247 } 1248 1249 Return (Zero) 1250 } 1251 1252 /* Checks that only specified Tables objects present in the NS */ 1253 1254 Method (LDCH, 1, NotSerialized) 1255 { 1256 Method (MAUX, 0, NotSerialized) 1257 { 1258 Return ("MAUX") 1259 } 1260 1261 Concatenate (Arg0, "-LDCH", Arg0) 1262 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1263 { 1264 Return (0x01) 1265 } 1266 1267 /* Specify to check up to 3 successive \SSxx names */ 1268 1269 Local0 = 0x01 1270 If (HI0N) 1271 { 1272 Local1 = (HI0N - 0x01) 1273 If (Local1) 1274 { 1275 Local1-- 1276 } 1277 } 1278 Else 1279 { 1280 Local1 = 0x00 1281 } 1282 1283 If (((Local1 + 0x01) < HI0M)) 1284 { 1285 Local0++ 1286 If (((Local1 + 0x02) < HI0M)) 1287 { 1288 Local0++ 1289 } 1290 } 1291 1292 While (Local0) 1293 { 1294 Divide (Local1, NNML, Local3, Local4) 1295 Local5 = "\\SSS0" 1296 Local5 [0x03] = DerefOf (SNML [Local4]) 1297 Local5 [0x04] = DerefOf (SNML [Local3]) 1298 Debug = Local5 1299 /* Access the next \SSxx Object */ 1300 1301 CopyObject (DerefOf (Local5), MAUX) /* \DTM0.LDCH.MAUX */ 1302 If ((Local1 < HI0N)) 1303 { 1304 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1305 { 1306 Return (0x02) 1307 } 1308 1309 Local2 = MAUX () 1310 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1311 { 1312 Return (0x03) 1313 } 1314 1315 If ((Local5 != Local2)) 1316 { 1317 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local2, Local5) 1318 } 1319 } 1320 ElseIf (CH04 (Arg0, 0x00, 0xFF, Z174, __LINE__, 0x00, 0x00)) 1321 { 1322 /* AE_NOT_FOUND */ 1323 1324 Return (0x04) 1325 } 1326 1327 Local1++ 1328 Local0-- 1329 } 1330 1331 Return (0x00) 1332 } 1333 1334 /* Loading a number of different SSDTs */ 1335 /* Arg1: the number of SSDT to load */ 1336 Method (TSTA, 2, NotSerialized) 1337 { 1338 Concatenate (Arg0, "-tsta", Arg0) 1339 If (INIT ()) 1340 { 1341 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "INIT", 0x01) 1342 Return (0x01) 1343 } 1344 1345 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1346 { 1347 Return (0x01) 1348 } 1349 1350 Local0 = Arg1 1351 While (Local0) 1352 { 1353 If (LD ()) 1354 { 1355 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "HI0N", HI0N) 1356 Return (0x01) 1357 } 1358 1359 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1360 { 1361 Return (0x01) 1362 } 1363 1364 Local0-- 1365 If (LDCH (Arg0)) 1366 { 1367 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "HI0N", HI0N) 1368 Return (0x01) 1369 } 1370 } 1371 1372 Local0 = Arg1 1373 While (Local0) 1374 { 1375 If (UNLD ()) 1376 { 1377 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "HI0N", HI0N) 1378 Return (0x01) 1379 } 1380 1381 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1382 { 1383 Return (0x01) 1384 } 1385 1386 Local0-- 1387 If (LDCH (Arg0)) 1388 { 1389 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "HI0N", HI0N) 1390 Return (0x01) 1391 } 1392 } 1393 1394 Return (0x00) 1395 } 1396 1397 /* Exceptions when the Object argument does not refer to */ 1398 /* an operation region field or an operation region */ 1399 /* Originated from ssdt3.asl: iasl -tc ssdt3.asl */ 1400 Name (BUF3, Buffer (0x011D) 1401 { 1402 /* 0000 */ 0x53, 0x53, 0x44, 0x54, 0x1D, 0x01, 0x00, 0x00, // SSDT.... 1403 /* 0008 */ 0x02, 0x4F, 0x49, 0x6E, 0x74, 0x65, 0x6C, 0x00, // .OIntel. 1404 /* 0010 */ 0x4D, 0x61, 0x6E, 0x79, 0x00, 0x00, 0x00, 0x00, // Many.... 1405 /* 0018 */ 0x01, 0x00, 0x00, 0x00, 0x49, 0x4E, 0x54, 0x4C, // ....INTL 1406 /* 0020 */ 0x31, 0x08, 0x16, 0x20, 0x5B, 0x82, 0x47, 0x0F, // 1.. [.G. 1407 /* 0028 */ 0x41, 0x55, 0x58, 0x44, 0x08, 0x49, 0x4E, 0x54, // AUXD.INT 1408 /* 0030 */ 0x30, 0x0E, 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, // 0..2Tv.. 1409 /* 0038 */ 0xDC, 0xFE, 0x08, 0x53, 0x54, 0x52, 0x30, 0x0D, // ...STR0. 1410 /* 0040 */ 0x73, 0x6F, 0x75, 0x72, 0x63, 0x65, 0x20, 0x73, // source s 1411 /* 0048 */ 0x74, 0x72, 0x69, 0x6E, 0x67, 0x30, 0x00, 0x08, // tring0.. 1412 /* 0050 */ 0x42, 0x55, 0x46, 0x30, 0x11, 0x0C, 0x0A, 0x09, // BUF0.... 1413 /* 0058 */ 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, // ........ 1414 /* 0060 */ 0x01, 0x08, 0x50, 0x41, 0x43, 0x30, 0x12, 0x27, // ..PAC0.' 1415 /* 0068 */ 0x03, 0x0E, 0x1F, 0x32, 0x54, 0x76, 0x98, 0xBA, // ...2Tv.. 1416 /* 0070 */ 0xDC, 0xFE, 0x0D, 0x74, 0x65, 0x73, 0x74, 0x20, // ...test 1417 /* 0078 */ 0x70, 0x61, 0x63, 0x6B, 0x61, 0x67, 0x65, 0x30, // package0 1418 /* 0080 */ 0x00, 0x11, 0x0C, 0x0A, 0x09, 0x13, 0x12, 0x11, // ........ 1419 /* 0088 */ 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x5B, 0x80, // ......[. 1420 /* 0090 */ 0x4F, 0x50, 0x52, 0x30, 0x00, 0x0C, 0x21, 0x43, // OPR0..!C 1421 /* 0098 */ 0x65, 0x07, 0x0A, 0x98, 0x5B, 0x81, 0x0B, 0x4F, // e...[..O 1422 /* 00A0 */ 0x50, 0x52, 0x30, 0x01, 0x46, 0x4C, 0x55, 0x30, // PR0.FLU0 1423 /* 00A8 */ 0x20, 0x5B, 0x82, 0x10, 0x44, 0x45, 0x56, 0x30, // [..DEV0 1424 /* 00B0 */ 0x08, 0x53, 0x30, 0x30, 0x30, 0x0D, 0x44, 0x45, // .S000.DE 1425 /* 00B8 */ 0x56, 0x30, 0x00, 0x5B, 0x02, 0x45, 0x56, 0x45, // V0.[.EVE 1426 /* 00C0 */ 0x30, 0x14, 0x08, 0x4D, 0x4D, 0x4D, 0x30, 0x00, // 0..MMM0. 1427 /* 00C8 */ 0xA4, 0x00, 0x5B, 0x01, 0x4D, 0x54, 0x58, 0x30, // ..[.MTX0 1428 /* 00D0 */ 0x00, 0x5B, 0x84, 0x13, 0x50, 0x57, 0x52, 0x30, // .[..PWR0 1429 /* 00D8 */ 0x00, 0x00, 0x00, 0x08, 0x53, 0x30, 0x30, 0x30, // ....S000 1430 /* 00E0 */ 0x0D, 0x50, 0x57, 0x52, 0x30, 0x00, 0x5B, 0x83, // .PWR0.[. 1431 /* 00E8 */ 0x16, 0x43, 0x50, 0x55, 0x30, 0x00, 0xFF, 0xFF, // .CPU0... 1432 /* 00F0 */ 0xFF, 0xFF, 0x00, 0x08, 0x53, 0x30, 0x30, 0x30, // ....S000 1433 /* 00F8 */ 0x0D, 0x43, 0x50, 0x55, 0x30, 0x00, 0x5B, 0x85, // .CPU0.[. 1434 /* 0100 */ 0x10, 0x54, 0x5A, 0x4E, 0x30, 0x08, 0x53, 0x30, // .TZN0.S0 1435 /* 0108 */ 0x30, 0x30, 0x0D, 0x54, 0x5A, 0x4E, 0x30, 0x00, // 00.TZN0. 1436 /* 0110 */ 0x5B, 0x13, 0x42, 0x55, 0x46, 0x30, 0x00, 0x0A, // [.BUF0.. 1437 /* 0118 */ 0x45, 0x42, 0x46, 0x4C, 0x30 // EBFL0 1438 }) 1439 OperationRegion (IST3, SystemMemory, 0x0400, 0x011F) 1440 Field (IST3, ByteAcc, NoLock, Preserve) 1441 { 1442 RFU3, 2296 1443 } 1444 1445 Method (TSTB, 1, Serialized) 1446 { 1447 Name (DDB0, 0x00) 1448 Name (DDBH, 0x00) 1449 Concatenate (Arg0, "-tstb", Arg0) 1450 RFU3 = BUF3 /* \DTM0.BUF3 */ 1451 Load (RFU3, DDB0) /* \DTM0.TSTB.DDB0 */ 1452 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1453 { 1454 Return (0x01) 1455 } 1456 1457 /* Uninitialized: it can not be applied to Load which */ 1458 /* allows NameString only to be used as Object parameter */ 1459 /* Integer */ 1460 Load (\AUXD.INT0, DDBH) /* \DTM0.TSTB.DDBH */ 1461 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1462 Local0 = ObjectType (\AUXD.INT0) 1463 If ((C009 != Local0)) 1464 { 1465 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C009) 1466 } 1467 1468 /* String */ 1469 1470 Load (\AUXD.STR0, DDBH) /* \DTM0.TSTB.DDBH */ 1471 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1472 Local0 = ObjectType (\AUXD.STR0) 1473 If ((C00A != Local0)) 1474 { 1475 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C00A) 1476 } 1477 1478 /* Buffer */ 1479 1480 If (Y282) 1481 { 1482 /* TBD: LBZ480 update allows Buffer to be Source of Load */ 1483 1484 Load (\AUXD.BUF0, DDBH) /* \DTM0.TSTB.DDBH */ 1485 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1486 Local0 = ObjectType (\AUXD.BUF0) 1487 If ((C00B != Local0)) 1488 { 1489 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C00B) 1490 } 1491 } 1492 1493 /* Package */ 1494 1495 Load (\AUXD.PAC0, DDBH) /* \DTM0.TSTB.DDBH */ 1496 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1497 Local0 = ObjectType (\AUXD.PAC0) 1498 If ((C00C != Local0)) 1499 { 1500 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C00C) 1501 } 1502 1503 /* Field Unit */ 1504 /* Device */ 1505 Load (\AUXD.DEV0, DDBH) /* \DTM0.TSTB.DDBH */ 1506 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1507 Local0 = ObjectType (\AUXD.DEV0) 1508 If ((C00E != Local0)) 1509 { 1510 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C00E) 1511 } 1512 1513 /* Event */ 1514 1515 Load (\AUXD.EVE0, DDBH) /* \DTM0.TSTB.DDBH */ 1516 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1517 Local0 = ObjectType (\AUXD.EVE0) 1518 If ((C00F != Local0)) 1519 { 1520 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C00F) 1521 } 1522 1523 /* Method */ 1524 1525 Load (\AUXD.MMM0, DDBH) /* \DTM0.TSTB.DDBH */ 1526 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1527 Local0 = ObjectType (\AUXD.MMM0) 1528 If ((C010 != Local0)) 1529 { 1530 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C010) 1531 } 1532 1533 /* Mutex */ 1534 1535 Load (\AUXD.MTX0, DDBH) /* \DTM0.TSTB.DDBH */ 1536 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1537 Local0 = ObjectType (\AUXD.MTX0) 1538 If ((C011 != Local0)) 1539 { 1540 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C011) 1541 } 1542 1543 /* OpRegion */ 1544 /* Power Resource */ 1545 Load (\AUXD.PWR0, DDBH) /* \DTM0.TSTB.DDBH */ 1546 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1547 Local0 = ObjectType (\AUXD.PWR0) 1548 If ((C013 != Local0)) 1549 { 1550 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C013) 1551 } 1552 1553 /* Processor */ 1554 1555 Load (\AUXD.CPU0, DDBH) /* \DTM0.TSTB.DDBH */ 1556 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1557 Local0 = ObjectType (\AUXD.CPU0) 1558 If ((C014 != Local0)) 1559 { 1560 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C014) 1561 } 1562 1563 /* Thermal Zone */ 1564 1565 Load (\AUXD.TZN0, DDBH) /* \DTM0.TSTB.DDBH */ 1566 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1567 Local0 = ObjectType (\AUXD.TZN0) 1568 If ((C015 != Local0)) 1569 { 1570 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C015) 1571 } 1572 1573 /* Buffer Field */ 1574 1575 If (Y282) 1576 { 1577 /* TBD: LBZ480 update allows Buffer Field to be Source of Load */ 1578 1579 Load (\AUXD.BFL0, DDBH) /* \DTM0.TSTB.DDBH */ 1580 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1581 Local0 = ObjectType (\AUXD.BFL0) 1582 If ((C016 != Local0)) 1583 { 1584 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C016) 1585 } 1586 } 1587 1588 /* DDB Handle */ 1589 1590 Load (DDB0, DDBH) /* \DTM0.TSTB.DDBH */ 1591 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1592 Local0 = ObjectType (DDB0) 1593 If ((C017 != Local0)) 1594 { 1595 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C017) 1596 } 1597 1598 Unload (DDB0) 1599 Return (0x00) 1600 } 1601 1602 /* Exceptions when an OpRegion passed as the Object */ 1603 /* parameter of Load is not of SystemMemory type */ 1604 Method (TSTC, 1, Serialized) 1605 { 1606 Name (DDBH, 0x00) 1607 Concatenate (Arg0, "-tstc", Arg0) 1608 OperationRegion (RGN1, SystemIO, 0x0280, 0x0123) 1609 OperationRegion (RGN2, PCI_Config, 0x0480, 0x0125) 1610 OperationRegion (RGN3, EmbeddedControl, 0x0680, 0x0127) 1611 OperationRegion (RGN4, SMBus, 0x0880, 0x0109) 1612 OperationRegion (RGN5, SystemCMOS, 0x0A80, 0x012B) 1613 OperationRegion (RGN6, PCIBARTarget, 0x0C80, 0x012D) 1614 /* UserDefRegionSpace */ 1615 1616 OperationRegion (RGN7, 0x80, 0x0D80, 0x0137) 1617 OperationRegion (RGN8, 0xCF, 0x0E80, 0x0138) 1618 OperationRegion (RGN9, 0xFF, 0x0F80, 0x0139) 1619 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1620 { 1621 Return (0x01) 1622 } 1623 1624 /* SystemIO */ 1625 1626 Load (RGN1, DDBH) /* \DTM0.TSTC.DDBH */ 1627 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1628 Local0 = ObjectType (RGN1) 1629 If ((C012 != Local0)) 1630 { 1631 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C012) 1632 } 1633 1634 /* PCI_Config */ 1635 1636 Load (RGN2, DDBH) /* \DTM0.TSTC.DDBH */ 1637 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1638 Local0 = ObjectType (RGN2) 1639 If ((C012 != Local0)) 1640 { 1641 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C012) 1642 } 1643 1644 /* EmbeddedControl */ 1645 1646 Load (RGN3, DDBH) /* \DTM0.TSTC.DDBH */ 1647 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1648 Local0 = ObjectType (RGN3) 1649 If ((C012 != Local0)) 1650 { 1651 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C012) 1652 } 1653 1654 /* SMBus */ 1655 1656 Load (RGN4, DDBH) /* \DTM0.TSTC.DDBH */ 1657 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1658 Local0 = ObjectType (RGN4) 1659 If ((C012 != Local0)) 1660 { 1661 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C012) 1662 } 1663 1664 /* SystemCMOS */ 1665 1666 Load (RGN5, DDBH) /* \DTM0.TSTC.DDBH */ 1667 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1668 Local0 = ObjectType (RGN5) 1669 If ((C012 != Local0)) 1670 { 1671 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C012) 1672 } 1673 1674 /* PciBarTarget */ 1675 1676 Load (RGN6, DDBH) /* \DTM0.TSTC.DDBH */ 1677 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1678 Local0 = ObjectType (RGN6) 1679 If ((C012 != Local0)) 1680 { 1681 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C012) 1682 } 1683 1684 /* UserDefRegionSpace 0x80 */ 1685 1686 Load (RGN7, DDBH) /* \DTM0.TSTC.DDBH */ 1687 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1688 Local0 = ObjectType (RGN7) 1689 If ((C012 != Local0)) 1690 { 1691 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C012) 1692 } 1693 1694 /* UserDefRegionSpace 0xcf */ 1695 1696 Load (RGN8, DDBH) /* \DTM0.TSTC.DDBH */ 1697 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1698 Local0 = ObjectType (RGN8) 1699 If ((C012 != Local0)) 1700 { 1701 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C012) 1702 } 1703 1704 /* UserDefRegionSpace 0xff */ 1705 1706 Load (RGN9, DDBH) /* \DTM0.TSTC.DDBH */ 1707 CH04 (Arg0, 0x00, 0x2F, Z174, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */ 1708 Local0 = ObjectType (RGN9) 1709 If ((C012 != Local0)) 1710 { 1711 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C012) 1712 } 1713 1714 Return (0x00) 1715 } 1716 1717 /* Exceptions when the table contained in an OpRegion */ 1718 /* (Field) is not an SSDT */ 1719 Method (TSTD, 1, Serialized) 1720 { 1721 Name (HI0, 0x00) 1722 Concatenate (Arg0, "-tstd", Arg0) 1723 If (CondRefOf (\SSS0, Local0)) 1724 { 1725 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 1726 Return (0x01) 1727 } 1728 1729 RFU0 = BUF0 /* \DTM0.BUF0 */ 1730 /* Modify the Signature field of the Table Header */ 1731 1732 Local0 = SIG /* \DTM0.SIG_ */ 1733 Local0++ 1734 SIG = Local0 1735 /* Recalculate and save CheckSum */ 1736 1737 Local0 = RFU0 /* \DTM0.RFU0 */ 1738 Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.SUM_ */ 1739 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1740 { 1741 Return (0x01) 1742 } 1743 1744 /* Load operator execution, OpRegion case */ 1745 1746 If (Y290) 1747 { 1748 Load (IST0, HI0) /* \DTM0.TSTD.HI0_ */ 1749 CH04 (Arg0, 0x00, 0x25, Z174, __LINE__, 0x00, 0x00) /* AE_BAD_SIGNATURE */ 1750 If (CondRefOf (\SSS0, Local0)) 1751 { 1752 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 1753 Return (0x01) 1754 } 1755 } 1756 1757 /* Load operator execution, OpRegion Field case */ 1758 1759 Load (RFU0, HI0) /* \DTM0.TSTD.HI0_ */ 1760 CH04 (Arg0, 0x00, 0x25, Z174, __LINE__, 0x00, 0x00) /* AE_BAD_SIGNATURE */ 1761 If (CondRefOf (\SSS0, Local0)) 1762 { 1763 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 1764 } 1765 1766 Return (0x00) 1767 } 1768 1769 /* Exceptions when the length of the supplied SSDT is greater */ 1770 /* than the length of the respective OpRegion or Region Field, */ 1771 /* or less than the length of the Table Header */ 1772 /* Arg1: 0 - the 'greater' case, 1 - the 'less' case */ 1773 Method (TSTE, 2, Serialized) 1774 { 1775 Name (HI0, 0x00) 1776 Concatenate (Arg0, "-tste", Arg0) 1777 If (Arg1) 1778 { 1779 Concatenate (Arg0, ".less", Arg0) 1780 } 1781 1782 If (CondRefOf (\SSS0, Local0)) 1783 { 1784 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 1785 Return (0x01) 1786 } 1787 1788 RFU0 = BUF0 /* \DTM0.BUF0 */ 1789 /* Modify the Length field of the Table Header */ 1790 1791 If (Arg1) 1792 { 1793 Local0 = 0x23 1794 } 1795 Else 1796 { 1797 Local0 = SizeOf (BUF0) 1798 Local0++ 1799 } 1800 1801 LENG = Local0 1802 /* Recalculate and save CheckSum */ 1803 1804 Local0 = RFU0 /* \DTM0.RFU0 */ 1805 Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.SUM_ */ 1806 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1807 { 1808 Return (0x01) 1809 } 1810 1811 /* Load operator execution, OpRegion case */ 1812 1813 If (Y290) 1814 { 1815 Load (IST0, HI0) /* \DTM0.TSTE.HI0_ */ 1816 CH04 (Arg0, 0x00, 0x2A, Z174, __LINE__, 0x00, 0x00) /* AE_INVALID_TABLE_LENGTH */ 1817 If (CondRefOf (\SSS0, Local0)) 1818 { 1819 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 1820 /* CleanUp */ 1821 1822 Unload (HI0) 1823 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1824 { 1825 Return (0x01) 1826 } 1827 1828 If (CondRefOf (\SSS0, Local0)) 1829 { 1830 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 1831 Return (0x01) 1832 } 1833 } 1834 } 1835 1836 /* Load operator execution, OpRegion Field case */ 1837 1838 Load (RFU0, HI0) /* \DTM0.TSTE.HI0_ */ 1839 If (!Arg1) 1840 { 1841 /* If the table length in the header is larger than the buffer. */ 1842 1843 CH04 (Arg0, 0x00, 0x36, Z174, __LINE__, 0x00, 0x00) /* AE_AML_BUFFER_LIMIT */ 1844 } 1845 Else 1846 { 1847 /* If the table length is smaller than an ACPI table header. */ 1848 1849 CH04 (Arg0, 0x00, 0x2A, Z174, __LINE__, 0x00, 0x00) /* AE_INVALID_TABLE_LENGTH */ 1850 } 1851 1852 If (CondRefOf (\SSS0, Local0)) 1853 { 1854 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 1855 Unload (HI0) 1856 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1857 { 1858 Return (0x01) 1859 } 1860 1861 If (CondRefOf (\SSS0, Local0)) 1862 { 1863 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 1864 Return (0x01) 1865 } 1866 } 1867 1868 Return (0x00) 1869 } 1870 1871 /* Exceptions when the checksum of the supplied SSDT is invalid */ 1872 1873 Method (TSTF, 1, Serialized) 1874 { 1875 Name (HI0, 0x00) 1876 Concatenate (Arg0, "-tstf", Arg0) 1877 If (CondRefOf (\SSS0, Local0)) 1878 { 1879 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 1880 Return (0x01) 1881 } 1882 1883 RFU0 = BUF0 /* \DTM0.BUF0 */ 1884 /* Recalculate and save CheckSum */ 1885 1886 Local0 = RFU0 /* \DTM0.RFU0 */ 1887 Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.SUM_ */ 1888 /* Spoil the CheckSum */ 1889 1890 Store ((SUM + 0x01), SUM) /* \DTM0.SUM_ */ 1891 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1892 { 1893 Return (0x01) 1894 } 1895 1896 /* Load operator execution, OpRegion case */ 1897 1898 If (Y290) 1899 { 1900 Load (IST0, HI0) /* \DTM0.TSTF.HI0_ */ 1901 CH04 (Arg0, 0x00, 0x27, Z174, __LINE__, 0x00, 0x00) /* AE_BAD_CHECKSUM */ 1902 If (CondRefOf (\SSS0, Local0)) 1903 { 1904 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 1905 /*Cleanup */ 1906 1907 Unload (HI0) 1908 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1909 { 1910 Return (0x01) 1911 } 1912 1913 Store ((SUM + 0x01), SUM) /* \DTM0.SUM_ */ 1914 } 1915 } 1916 1917 /* Load operator execution, OpRegion Field case */ 1918 1919 Load (RFU0, HI0) /* \DTM0.TSTF.HI0_ */ 1920 CH04 (Arg0, 0x00, 0x27, Z174, __LINE__, 0x00, 0x00) /* AE_BAD_CHECKSUM */ 1921 If (CondRefOf (\SSS0, Local0)) 1922 { 1923 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 1924 /*Cleanup */ 1925 1926 Unload (HI0) 1927 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1928 { 1929 Return (0x01) 1930 } 1931 1932 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1933 { 1934 Return (0x01) 1935 } 1936 } 1937 1938 Return (0x00) 1939 } 1940 1941 /* Object of any type (expect Field Units and Buffer Fields) */ 1942 /* can be used as the DDBHandle argument */ 1943 Method (TSTG, 1, Serialized) 1944 { 1945 Name (DDB0, 0x00) 1946 Name (DDB1, 0x00) 1947 Name (DDBH, 0x00) 1948 Method (M000, 4, NotSerialized) 1949 { 1950 Concatenate (Arg0, "-m000.", Arg0) 1951 Concatenate (Arg0, Arg1, Arg0) 1952 Local0 = ObjectType (Arg2) 1953 If ((Arg3 != Local0)) 1954 { 1955 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, Arg3) 1956 Return (0x01) 1957 } 1958 1959 If (CondRefOf (\SSS0, Local0)) 1960 { 1961 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 1962 Return (0x01) 1963 } 1964 1965 Load (RFU0, Arg2) 1966 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1967 { 1968 Return (0x01) 1969 } 1970 1971 Local0 = ObjectType (Arg2) 1972 If ((C017 != Local0)) 1973 { 1974 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C017) 1975 } 1976 1977 If (CondRefOf (\SSS0, Local0)){} 1978 Else 1979 { 1980 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x00) 1981 Return (0x01) 1982 } 1983 1984 Unload (DerefOf (Arg2)) 1985 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 1986 { 1987 Return (0x01) 1988 } 1989 1990 If (CondRefOf (\SSS0, Local0)) 1991 { 1992 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 1993 Return (0x01) 1994 } 1995 1996 Return (0x00) 1997 } 1998 1999 Concatenate (Arg0, "-tstg", Arg0) 2000 /* Load Auxiliry table */ 2001 2002 RFU3 = BUF3 /* \DTM0.BUF3 */ 2003 Load (RFU3, DDB0) /* \DTM0.TSTG.DDB0 */ 2004 RFU0 = BUF0 /* \DTM0.BUF0 */ 2005 /* Recalculate and save CheckSum */ 2006 2007 Local0 = RFU0 /* \DTM0.RFU0 */ 2008 Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.SUM_ */ 2009 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 2010 { 2011 Return (0x01) 2012 } 2013 2014 /* Uninitialized */ 2015 2016 M000 (Arg0, "uni", RefOf (Local1), C008) 2017 /* Integer */ 2018 2019 M000 (Arg0, "int", RefOf (\AUXD.INT0), C009) 2020 /* String */ 2021 2022 M000 (Arg0, "str", RefOf (\AUXD.STR0), C00A) 2023 /* Buffer */ 2024 2025 M000 (Arg0, "buf", RefOf (\AUXD.BUF0), C00B) 2026 /* Writing NewObj to ArgX which is a RefOf(OldObj), should */ 2027 /* result in RefOf(NewObj), but this is currently not */ 2028 /* working. */ 2029 If (Y260) 2030 { 2031 /* Package */ 2032 2033 M000 (Arg0, "pac", RefOf (\AUXD.PAC0), C00C) 2034 /* Field Unit */ 2035 2036 M000 (Arg0, "flu", RefOf (\AUXD.FLU0), C00D) 2037 /* Device */ 2038 2039 M000 (Arg0, "dev", RefOf (\AUXD.DEV0), C00E) 2040 /* Event */ 2041 2042 M000 (Arg0, "evt", RefOf (\AUXD.EVE0), C00F) 2043 /* Method */ 2044 2045 M000 (Arg0, "met", RefOf (\AUXD.MMM0), C010) 2046 /* Mutex */ 2047 2048 M000 (Arg0, "mtx", RefOf (\AUXD.MTX0), C011) 2049 /* OpRegion */ 2050 2051 M000 (Arg0, "opr", RefOf (\AUXD.OPR0), C012) 2052 /* Power Resource */ 2053 2054 M000 (Arg0, "pwr", RefOf (\AUXD.PWR0), C013) 2055 /* Processor */ 2056 2057 M000 (Arg0, "cpu", RefOf (\AUXD.CPU0), C014) 2058 /* Thermal Zone */ 2059 2060 M000 (Arg0, "tzn", RefOf (\AUXD.TZN0), C015) 2061 /* Buffer Field */ 2062 2063 M000 (Arg0, "bfl", RefOf (\AUXD.BFL0), C016) 2064 /* DDB Handle */ 2065 2066 CopyObject (DDB0, DDB1) /* \DTM0.TSTG.DDB1 */ 2067 M000 (Arg0, "ddb", RefOf (DDB1), C017) 2068 } 2069 2070 Unload (DDB0) 2071 CH03 (Arg0, Z174, __LINE__, 0x00, 0x00) 2072 Return (0x00) 2073 } 2074 2075 /* AE_OWNER_ID_LIMIT exception when too many Tables loaded, */ 2076 /* Arg1: 0 - Load case, 1 - LoadTable case */ 2077 Method (TSTH, 2, Serialized) 2078 { 2079 Name (MAXT, 0xF6) 2080 Name (DDB1, 0x00) 2081 Name (DDB3, 0x00) 2082 Concatenate (Arg0, "-tsth", Arg0) 2083 If (INIT ()) 2084 { 2085 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "INIT", 0x01) 2086 Return (0x01) 2087 } 2088 2089 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 2090 { 2091 Return (0x01) 2092 } 2093 2094 RFU1 = BUF1 /* \DTM0.BUF1 */ 2095 RFU3 = BUF3 /* \DTM0.BUF3 */ 2096 Local0 = MAXT /* \DTM0.TSTH.MAXT */ 2097 While (Local0) 2098 { 2099 Debug = HI0N /* \DTM0.HI0N */ 2100 If (LD ()) 2101 { 2102 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "HI0N", HI0N) 2103 Return (0x01) 2104 } 2105 2106 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 2107 { 2108 Return (0x01) 2109 } 2110 2111 Local0-- 2112 } 2113 2114 /* Methods can not be called after the following Load */ 2115 /* (OWNER_ID is exhausted) */ 2116 Load (RFU1, DDB1) /* \DTM0.TSTH.DDB1 */ 2117 /* The following Load should cause AE_OWNER_ID_LIMIT */ 2118 2119 If (Arg1) 2120 { 2121 LoadTable ("OEM1", "", "", "", "", Zero) 2122 } 2123 Else 2124 { 2125 Load (RFU3, DDB3) /* \DTM0.TSTH.DDB3 */ 2126 } 2127 2128 /* Further 1 Method can be called */ 2129 2130 Unload (DDB1) 2131 CH04 (Arg0, 0x00, 0x56, Z174, __LINE__, 0x00, 0x00) /* AE_OWNER_ID_LIMIT */ 2132 Local0 = MAXT /* \DTM0.TSTH.MAXT */ 2133 While (Local0) 2134 { 2135 If (UNLD ()) 2136 { 2137 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "HI0N", HI0N) 2138 Return (0x01) 2139 } 2140 2141 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 2142 { 2143 Return (0x01) 2144 } 2145 2146 Local0-- 2147 } 2148 2149 If (LDCH (0x00)) 2150 { 2151 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "HI0N", HI0N) 2152 Return (0x01) 2153 } 2154 2155 Return (0x00) 2156 } 2157 2158 /* Exception when SSDT specified as the Object parameter */ 2159 /* of the Load operator is already loaded */ 2160 Method (TSTI, 1, Serialized) 2161 { 2162 Name (HI0, 0x00) 2163 Name (HI1, 0x00) 2164 Concatenate (Arg0, "-tsti", Arg0) 2165 If (CondRefOf (\SSS0, Local0)) 2166 { 2167 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 2168 Return (0x01) 2169 } 2170 2171 RFU0 = BUF0 /* \DTM0.BUF0 */ 2172 /* Recalculate and save CheckSum */ 2173 2174 Local0 = RFU0 /* \DTM0.RFU0 */ 2175 Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.SUM_ */ 2176 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 2177 { 2178 Return (0x01) 2179 } 2180 2181 /* Load operator execution */ 2182 2183 Load (RFU0, HI0) /* \DTM0.TSTI.HI0_ */ 2184 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 2185 { 2186 Return (0x01) 2187 } 2188 2189 Local0 = ObjectType (HI0) 2190 If ((C017 != Local0)) 2191 { 2192 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C017) 2193 } 2194 2195 If (CondRefOf (\SSS0, Local0)){} 2196 Else 2197 { 2198 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x00) 2199 Return (0x01) 2200 } 2201 2202 Local1 = 0x05 2203 While (Local1) 2204 { 2205 /* Repeated Load operator execution */ 2206 2207 Load (RFU0, HI1) /* \DTM0.TSTI.HI1_ */ 2208 CH04 (Arg0, 0x00, 0x07, Z174, __LINE__, 0x05, Local1) /* AE_ALREADY_EXISTS */ 2209 Local0 = ObjectType (HI1) 2210 If ((C009 != Local0)) 2211 { 2212 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C009) 2213 } 2214 2215 Local1-- 2216 } 2217 2218 Unload (HI0) 2219 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 2220 { 2221 Return (0x01) 2222 } 2223 2224 If (CondRefOf (\SSS0, Local0)) 2225 { 2226 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 2227 } 2228 2229 Return (0x00) 2230 } 2231 2232 /* Exception when there already is an previously created Object */ 2233 /* referred by the namepath of the new Object in the Table loaded */ 2234 Method (TSTJ, 1, Serialized) 2235 { 2236 Name (HI0, 0x00) 2237 Name (HI1, 0x00) 2238 Concatenate (Arg0, "-tstj", Arg0) 2239 If (CondRefOf (\SSS0, Local0)) 2240 { 2241 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 2242 Return (0x01) 2243 } 2244 2245 ^RFU0 = BUF0 /* \DTM0.BUF0 */ 2246 /* Recalculate and save CheckSum */ 2247 2248 Local0 = ^RFU0 /* \DTM0.RFU0 */ 2249 Store ((^SUM + CHSM (Local0, SizeOf (Local0))), ^SUM) /* \DTM0.SUM_ */ 2250 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 2251 { 2252 Return (0x01) 2253 } 2254 2255 /* Load operator execution */ 2256 2257 Load (^RFU0, HI0) /* \DTM0.TSTJ.HI0_ */ 2258 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 2259 { 2260 Return (0x01) 2261 } 2262 2263 Local0 = ObjectType (HI0) 2264 If ((C017 != Local0)) 2265 { 2266 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C017) 2267 } 2268 2269 If (CondRefOf (\SSS0, Local0)){} 2270 Else 2271 { 2272 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x00) 2273 Return (0x01) 2274 } 2275 2276 /* Load another table, containing declaration of \SSS0 */ 2277 2278 OperationRegion (IST0, SystemMemory, 0x80000000, 0x34) 2279 Field (IST0, ByteAcc, NoLock, Preserve) 2280 { 2281 RFU0, 416 2282 } 2283 2284 Field (IST0, ByteAcc, NoLock, Preserve) 2285 { 2286 SIG, 32, 2287 LENG, 32, 2288 REV, 8, 2289 SUM, 8, 2290 OID, 48, 2291 OTID, 64, 2292 OREV, 32, 2293 CID, 32, 2294 CREV, 32, 2295 Offset (0x27), 2296 SSNM, 32, 2297 Offset (0x2F), 2298 SSRT, 32 2299 } 2300 2301 RFU0 = BUF0 /* \DTM0.BUF0 */ 2302 /* Modify Revision field of SSDT */ 2303 2304 Store ((CREV + 0x01), CREV) /* \DTM0.TSTJ.CREV */ 2305 /* Recalculate and save CheckSum */ 2306 2307 Local0 = RFU0 /* \DTM0.TSTJ.RFU0 */ 2308 Store ((SUM + CHSM (Local0, SizeOf (Local0))), SUM) /* \DTM0.TSTJ.SUM_ */ 2309 Local1 = 0x05 2310 While (Local1) 2311 { 2312 /* Any next Load */ 2313 2314 Load (RFU0, HI1) /* \DTM0.TSTJ.HI1_ */ 2315 CH04 (Arg0, 0x00, 0x07, Z174, __LINE__, 0x05, Local1) /* AE_ALREADY_EXISTS */ 2316 Local0 = ObjectType (HI1) 2317 If ((C009 != Local0)) 2318 { 2319 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, Local0, C009) 2320 } 2321 2322 Local1-- 2323 } 2324 2325 Unload (HI0) 2326 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 2327 { 2328 Return (0x01) 2329 } 2330 2331 If (CondRefOf (\SSS0, Local0)) 2332 { 2333 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 2334 } 2335 2336 Return (0x00) 2337 } 2338 2339 /* Originated from ssdt5.asl: iasl -tc ssdt5.asl */ 2340 2341 Name (BUF5, Buffer (0x92) 2342 { 2343 /* 0000 */ 0x53, 0x53, 0x44, 0x54, 0x92, 0x00, 0x00, 0x00, // SSDT.... 2344 /* 0008 */ 0x02, 0xBA, 0x69, 0x41, 0x53, 0x4C, 0x54, 0x53, // ..iASLTS 2345 /* 0010 */ 0x4C, 0x54, 0x42, 0x4C, 0x30, 0x30, 0x30, 0x35, // LTBL0005 2346 /* 0018 */ 0x01, 0x00, 0x00, 0x00, 0x49, 0x4E, 0x54, 0x4C, // ....INTL 2347 /* 0020 */ 0x31, 0x08, 0x16, 0x20, 0x08, 0x44, 0x44, 0x42, // 1.. .DDB 2348 /* 0028 */ 0x58, 0x00, 0x08, 0x42, 0x55, 0x46, 0x58, 0x11, // X..BUFX. 2349 /* 0030 */ 0x37, 0x0A, 0x34, 0x53, 0x53, 0x44, 0x54, 0x34, // 7.4SSDT4 2350 /* 0038 */ 0x00, 0x00, 0x00, 0x02, 0x98, 0x49, 0x6E, 0x74, // .....Int 2351 /* 0040 */ 0x65, 0x6C, 0x00, 0x4D, 0x61, 0x6E, 0x79, 0x00, // el.Many. 2352 /* 0048 */ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x49, // .......I 2353 /* 0050 */ 0x4E, 0x54, 0x4C, 0x15, 0x12, 0x06, 0x20, 0x14, // NTL... . 2354 /* 0058 */ 0x0F, 0x5C, 0x53, 0x53, 0x53, 0x30, 0x00, 0xA4, // .\SSS0.. 2355 /* 0060 */ 0x0D, 0x5C, 0x53, 0x53, 0x53, 0x30, 0x00, 0x5B, // .\SSS0.[ 2356 /* 0068 */ 0x80, 0x49, 0x53, 0x54, 0x58, 0x00, 0x00, 0x0A, // .ISTX... 2357 /* 0070 */ 0x34, 0x5B, 0x81, 0x0C, 0x49, 0x53, 0x54, 0x58, // 4[..ISTX 2358 /* 0078 */ 0x01, 0x52, 0x46, 0x55, 0x58, 0x40, 0x1A, 0x70, // .RFUX@.p 2359 /* 0080 */ 0x42, 0x55, 0x46, 0x58, 0x52, 0x46, 0x55, 0x58, // BUFXRFUX 2360 /* 0088 */ 0x5B, 0x20, 0x52, 0x46, 0x55, 0x58, 0x44, 0x44, // [ RFUXDD 2361 /* 0090 */ 0x42, 0x58 // BX 2362 }) 2363 OperationRegion (IST5, SystemMemory, 0x0600, 0x92) 2364 Field (IST5, ByteAcc, NoLock, Preserve) 2365 { 2366 RFU5, 1168 2367 } 2368 2369 /* DDB Handle */ 2370 2371 External (\DDBX, UnknownObj) 2372 2373 /* Recursive Load in module level code */ 2374 2375 Method (TSTK, 1, Serialized) 2376 { 2377 Name (DDBH, 0x00) 2378 Concatenate (Arg0, "-tstk", Arg0) 2379 If (CondRefOf (\DDBX, Local0)) 2380 { 2381 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\DDBX", 0x01) 2382 Return (Zero) 2383 } 2384 2385 If (CondRefOf (\SSS0, Local0)) 2386 { 2387 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 2388 Return (Zero) 2389 } 2390 2391 RFU5 = BUF5 /* \DTM0.BUF5 */ 2392 Load (RFU5, DDBH) /* \DTM0.TSTK.DDBH */ 2393 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 2394 { 2395 Return (0x01) 2396 } 2397 2398 If (CondRefOf (\DDBX, Local0)){} 2399 Else 2400 { 2401 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\DDBX", 0x01) 2402 Return (Zero) 2403 } 2404 2405 If (CondRefOf (\SSS0, Local0)){} 2406 Else 2407 { 2408 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 2409 Return (Zero) 2410 } 2411 2412 Unload (DDBX) 2413 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 2414 { 2415 Return (0x01) 2416 } 2417 2418 If (CondRefOf (\SSS0, Local0)) 2419 { 2420 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\SSS0", 0x01) 2421 Return (Zero) 2422 } 2423 2424 Unload (DDBH) 2425 If (CH03 (Arg0, Z174, __LINE__, 0x00, 0x00)) 2426 { 2427 Return (0x01) 2428 } 2429 2430 If (CondRefOf (\DDBX, Local0)) 2431 { 2432 ERR (Arg0, Z174, __LINE__, 0x00, 0x00, "\\DDBX", 0x01) 2433 Return (Zero) 2434 } 2435 } 2436 2437 /* Load a table and check to see if PAC0 is initialized properly */ 2438 Method (TSTL, 1, Serialized) 2439 { 2440 Concatenate (Arg0, "-tstl", Arg0) 2441 CH03 (Arg0, Z174, __LINE__, 0x00, 0x00) 2442 External (SS01, methodobj) 2443 2444 /* iasl -ts ssdt6.asl */ 2445 2446 Name (BUF1, Buffer() 2447 { 2448 0x53,0x53,0x44,0x54,0x3E,0x00,0x00,0x00, /* 00000000 "SSDT>..." */ 2449 0x02,0x80,0x49,0x6E,0x74,0x65,0x6C,0x00, /* 00000008 "..Intel." */ 2450 0x5F,0x42,0x33,0x30,0x37,0x00,0x00,0x00, /* 00000010 "_B307..." */ 2451 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ 2452 0x27,0x04,0x18,0x20,0x14,0x0B,0x53,0x53, /* 00000020 "'.. ..SS" */ 2453 0x30,0x31,0x00,0xA4,0x50,0x4B,0x47,0x31, /* 00000028 "01..PKG1" */ 2454 0x08,0x50,0x4B,0x47,0x31,0x12,0x08,0x04, /* 00000030 ".PKG1..." */ 2455 0x00,0x01,0x0A,0x02,0x0A,0x03 /* 00000038 "......" */ 2456 }) 2457 Name (DDBH, 0x00) 2458 Load (BUF1, DDBH) 2459 Local0 = SS01() 2460 Local1 = sizeof (Local0) 2461 if (Local1 != 0x4) 2462 { 2463 ERR (Arg0, ZFFF, __LINE__, 0x00, 0x00, Local1, 0x4) 2464 } 2465 Unload (DDBH) 2466 CH03 (Arg0, Z174, __LINE__, 0x00, 0x00) 2467 } 2468 } 2469 2470 Method (TLD0, 0, Serialized) 2471 { 2472 /* Loading SSDT from a SystemMemory OpRegion, */ 2473 /* different targets for DDBHandle */ 2474 CH03 (__METHOD__, Z174, __LINE__, 0x00, 0x00) 2475 /* Named Objects */ 2476 2477 SRMT ("TLD0.tst0") 2478 \DTM0.TST0 (__METHOD__) 2479 CH03 (__METHOD__, Z174, __LINE__, 0x00, 0x00) 2480 /* LocalX Object */ 2481 2482 SRMT ("TLD0.tst1") 2483 \DTM0.TST1 (__METHOD__) 2484 CH03 (__METHOD__, Z174, __LINE__, 0x00, 0x00) 2485 /* Package element */ 2486 2487 SRMT ("TLD0.tst2") 2488 \DTM0.TST2 (__METHOD__) 2489 CH03 (__METHOD__, Z174, __LINE__, 0x00, 0x00) 2490 /* By Reference in ArgX */ 2491 2492 SRMT ("TLD0.tst3") 2493 \DTM0.TST3 (__METHOD__) 2494 /* Loading SSDT from a Field of an OpRegion of any type, */ 2495 /* different targets for DDBHandle */ 2496 CH03 (__METHOD__, Z174, __LINE__, 0x00, 0x00) 2497 /* SystemMemory Region */ 2498 2499 SRMT ("TLD0.tst4") 2500 \DTM0.TST4 (__METHOD__) 2501 CH03 (__METHOD__, Z174, __LINE__, 0x00, 0x00) 2502 /* SystemIO Region */ 2503 2504 SRMT ("TLD0.tst5") 2505 \DTM0.TST5 (__METHOD__) 2506 CH03 (__METHOD__, Z174, __LINE__, 0x00, 0x00) 2507 /* EmbeddedControl Region */ 2508 2509 SRMT ("TLD0.tst6") 2510 \DTM0.TST6 (__METHOD__) 2511 CH03 (__METHOD__, Z174, __LINE__, 0x00, 0x00) 2512 /* User defined Region */ 2513 2514 SRMT ("TLD0.tst7") 2515 \DTM0.TST7 (__METHOD__) 2516 CH03 (__METHOD__, Z174, __LINE__, 0x00, 0x00) 2517 /* Check that "namespace location to load the Definition Block */ 2518 /* is relative to the current namespace" scope, */ 2519 SRMT ("TLD0.tst8") 2520 \DTM0.TST8 (__METHOD__) 2521 CH03 (__METHOD__, Z174, __LINE__, 0x00, 0x00) 2522 /* Check global and dynamic declarations of OpRegions */ 2523 /* and the appropriate _REG Methods invocation for the */ 2524 /* loaded SSDT */ 2525 SRMT ("TLD0.tst9") 2526 \DTM0.TST9 (__METHOD__) 2527 CH03 (__METHOD__, Z174, __LINE__, 0x00, 0x00) 2528 /* Object of any type can be used as the DDBHandle argument */ 2529 2530 SRMT ("TLD0.tstg") 2531 \DTM0.TSTG (__METHOD__) 2532 CH03 (__METHOD__, Z174, __LINE__, 0x00, 0x00) 2533 /* Loading a number of different SSDTs */ 2534 2535 SRMT ("TLD0.tsta") 2536 If (Y261) 2537 { 2538 \DTM0.TSTA (__METHOD__, 0xF0) 2539 } 2540 Else 2541 { 2542 BLCK () 2543 } 2544 2545 CH03 (__METHOD__, Z174, __LINE__, 0x00, 0x00) 2546 /* Recursive Load in module level */ 2547 2548 SRMT ("TLD0.tstk") 2549 \DTM0.TSTK (__METHOD__) 2550 CH03 (__METHOD__, Z174, __LINE__, 0x00, 0x00) 2551 2552 SRMT ("TLD0.tstl") 2553 \DTM0.TSTL (__METHOD__) 2554 CH03 (__METHOD__, Z174, __LINE__, 0x00, 0x00) 2555 } 2556 2557 /* Exceptional conditions */ 2558 2559 Method (TLD1, 0, Serialized) 2560 { 2561 /* Exceptions when the Object argument does not refer to */ 2562 /* an operation region field or an operation region */ 2563 SRMT ("TLD1.tstb") 2564 \DTM0.TSTB (__METHOD__) 2565 /* Exceptions when the an OpRegion passed as the Object */ 2566 /* parameter of Load is not of SystemMemory type */ 2567 SRMT ("TLD1.tstc") 2568 \DTM0.TSTC (__METHOD__) 2569 /* Exceptions when the table contained in an OpRegion */ 2570 /* (Field) is not an SSDT */ 2571 SRMT ("TLD1.tstd") 2572 \DTM0.TSTD (__METHOD__) 2573 /* Exceptions when the length of the supplied SSDT is greater */ 2574 /* than the length of the respective OpRegion or Region Field, */ 2575 SRMT ("TLD1.tste.0") 2576 If (Y284) 2577 { 2578 \DTM0.TSTE (__METHOD__, 0x00) 2579 } 2580 Else 2581 { 2582 BLCK () 2583 } 2584 2585 /* Exceptions when the length of the supplied SSDT is */ 2586 /* less than the length of the Table Header */ 2587 SRMT ("TLD1.tste.1") 2588 \DTM0.TSTE (__METHOD__, 0x01) 2589 /* Exceptions when the checksum of the supplied SSDT is invalid */ 2590 2591 SRMT ("TLD1.tstf") 2592 \DTM0.TSTF (__METHOD__) 2593 /* AE_OWNER_ID_LIMIT exception when too many Tables loaded */ 2594 2595 SRMT ("TLD1.tsth") 2596 If (Y294) 2597 { 2598 \DTM0.TSTH (__METHOD__, 0x00) 2599 } 2600 Else 2601 { 2602 BLCK () 2603 } 2604 2605 /* Exception when SSDT specified as the Object parameter */ 2606 /* of the Load operator is already loaded */ 2607 SRMT ("TLD1.tsti") 2608 \DTM0.TSTI (__METHOD__) 2609 /* Exception when there already is an previously created Object */ 2610 /* referred by the namepath of the new Object in the Table loaded */ 2611 SRMT ("TLD1.tstj") 2612 \DTM0.TSTJ (__METHOD__) 2613 } 2614