1/* 2 * Some or all of this work - Copyright (c) 2006 - 2016, 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// 30// 31// Grammar.asl - Minimally excercises most ASL constructs 32// 33// NOTE -- use: iasl -f -of grammar.asl to compile 34// 35// This 1) Ignores errors (checks compiler error handling) 36// 2) Disables constant folding 37// 38// 39 40/******************************************************************************* 41Compilation should look like this: 42 43C:\acpica\tests\misc>iasl -f -of grammar.asl 44 45Intel ACPI Component Architecture 46ASL Optimizing Compiler version 20090422 [Apr 22 2009] 47Copyright (C) 2000 - 2009 Intel Corporation 48Supports ACPI Specification Revision 3.0a 49 50grammar.asl 187: Name (_NPK, Package (8) 51Warning 1098 - ^ Unknown reserved name (_NPK) 52 53grammar.asl 510: NAME (ESC1, "abcdefg\x00hijklmn") 54Warning 1042 - ^ Invalid Hex/Octal Escape - Non-ASCII or NULL 55 56grammar.asl 511: NAME (ESC2, "abcdefg\000hijklmn") 57Warning 1042 - ^ Invalid Hex/Octal Escape - Non-ASCII or NULL 58 59grammar.asl 601: Method (RCIV, 1) 60Warning 1087 - ^ Not all control paths return a value (RCIV) 61 62grammar.asl 608: RCIV (Subtract (Arg0, 1)) 63Remark 5073 - ^ Recursive method call (RCIV) 64 65grammar.asl 937: Method (_ERR, 2) 66Warning 1077 - ^ Reserved method has too few arguments (_ERR requires 3) 67 68grammar.asl 1377: Store (0x1234567887654321, QWD2) 69Warning 1032 - ^ 64-bit integer in 32-bit table, truncating 70 71grammar.asl 1379: if (LNotEqual (Local0, 0x1234567887654321)) 72Warning 1032 - 64-bit integer in 32-bit table, truncating ^ 73 74grammar.asl 1459: SizeOf (BUFO) 75Warning 1105 - ^ Result is not used, operator has no effect 76 77grammar.asl 1485: Acquire (MTX2, 1) 78Warning 1104 - ^ Possible operator timeout is ignored 79 80grammar.asl 1633: Add (Local0, Local1) 81Warning 1105 - ^ Result is not used, operator has no effect 82 83grammar.asl 1804: Method (COND) 84Warning 1087 - ^ Not all control paths return a value (COND) 85 86grammar.asl 6010: Name (_HID, "*PNP0A06") 87Error 4001 - ^ String must be entirely alphanumeric (*PNP0A06) 88 89grammar.asl 6461: Name (_CRS, Buffer(26) {"\_SB_.PCI2._CRS..........."}) 90Warning 1038 - Invalid or unknown escape sequence ^ 91 92grammar.asl 6800: And (Local0, 1, Local0) // Local0 &= 1 93Error 4050 - ^ Method local variable is not initialized (Local0) 94 95grammar.asl 6886: Name (_HID, "*PNP0C0A") // Control Method Battey ID 96Error 4001 - ^ String must be entirely alphanumeric (*PNP0C0A) 97 98ASL Input: grammar.asl - 10254 lines, 322162 bytes, 4810 keywords 99AML Output: grammar.aml - 43392 bytes, 669 named objects, 4141 executable opcodes 100 101Compilation complete. 3 Errors, 12 Warnings, 1 Remarks, 1101 Optimizations 102 103***************************************************************************************************/ 104 105DefinitionBlock ( 106 "grammar.aml", //Output filename 107 "DSDT", //Signature 108 0x01, //DSDT Revision ---> 32-bit table 109 "Intel", //OEMID 110 "GRMTEST", //TABLE ID 111 0x20090511 //OEM Revision 112 ) 113{ 114 115 External (\ABCD, UnknownObj) 116 117 118 /* Device with _STA and _INI */ 119 120 Device (A1) 121 { 122 Method (_STA) 123 { 124 Return (0x0F) 125 } 126 127 Method (_INI) 128 { 129 Return 130 } 131 } 132 133 /* Device with no _STA, has _INI */ 134 135 Device (A2) 136 { 137 Method (_INI) 138 { 139 Return 140 } 141 } 142 143 /* Device with _STA, no _INI */ 144 145 Device (A3) 146 { 147 Method (_STA) 148 { 149 Return (0x0F) 150 } 151 } 152 153 /* Device with _STA and _INI, but not present */ 154 155 Device (A4) 156 { 157 Method (_STA) 158 { 159 Return (Zero) 160 } 161 162 Method (_INI) 163 { 164 Return 165 } 166 } 167 168 169 /* Resource descriptors */ 170 171 Device (IRES) 172 { 173 Name (PRT0, ResourceTemplate () 174 { 175 IRQ (Edge, ActiveHigh, Exclusive) {3,4,5,6,7,9,10,11,14,15} 176 177 StartDependentFn (1,1) 178 { 179 IRQNoFlags () {0,1,2} 180 } 181 EndDependentFn () 182 }) 183 184 Method (_CRS, 0, NotSerialized) 185 { 186 Store ("_CRS:", Debug) 187 Store (PRT0, Debug) 188 Return (PRT0) 189 } 190 191 Method (_SRS, 1, Serialized) 192 { 193 Store ("_SRS:", Debug) 194 Store (Arg0, Debug) 195 Return (Zero) 196 } 197 } 198 199 Name (_NPK, Package () 200 { 201 0x1111, 202 0x2222, 203 0x3333, 204 0x4444 205 }) 206 207 208 Device (RES) 209 { 210 Name (_PRT, Package (0x04) 211 { 212 Package (0x04) 213 { 214 0x0002FFFF, 215 Zero, 216 Zero, 217 Zero 218 }, 219 220 Package (0x04) 221 { 222 0x0002FFFF, 223 One, 224 Zero, 225 Zero 226 }, 227 228 Package (0x04) 229 { 230 0x000AFFFF, 231 Zero, 232 Zero, 233 Zero 234 }, 235 236 Package (0x04) 237 { 238 0x000BFFFF, 239 Zero, 240 Zero, 241 Zero 242 } 243 }) 244 245 Method (_CRS, 0, Serialized) 246 { 247 Name (PRT0, ResourceTemplate () 248 { 249 WordBusNumber (ResourceConsumer, MinFixed, MaxFixed, SubDecode, 250 0x0000, // Address Space Granularity 251 0xFFF2, // Address Range Minimum 252 0xFFF3, // Address Range Maximum 253 0x0032, // Address Translation Offset 254 0x0002,,,) 255 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, 256 0x0000, // Address Space Granularity 257 0x0000, // Address Range Minimum 258 0x00FF, // Address Range Maximum 259 0x0000, // Address Translation Offset 260 0x0100,,,) 261 WordSpace (0xC3, ResourceConsumer, PosDecode, MinFixed, MaxFixed, 0xA5, 262 0x0000, // Address Space Granularity 263 0xA000, // Address Range Minimum 264 0xBFFF, // Address Range Maximum 265 0x0000, // Address Translation Offset 266 0x2000,,,) 267 IO (Decode16, 0x0CF8, 0x0CFF, 0x01, 0x08) 268 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, 269 0x0000, // Address Space Granularity 270 0x0000, // Address Range Minimum 271 0x0CF7, // Address Range Maximum 272 0x0000, // Address Translation Offset 273 0x0CF8,,, 274 , TypeStatic) 275 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, 276 0x0000, // Address Space Granularity 277 0x0D00, // Address Range Minimum 278 0xFFFF, // Address Range Maximum 279 0x0000, // Address Translation Offset 280 0xF300,,, 281 , TypeStatic) 282 DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, 283 0x00000000, // Address Space Granularity 284 0x00000000, // Address Range Minimum 285 0x00000CF7, // Address Range Maximum 286 0x00000000, // Address Translation Offset 287 0x00000CF8,,, 288 , TypeStatic) 289 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, 290 0x00000000, // Address Space Granularity 291 0x000C8000, // Address Range Minimum 292 0x000EFFFF, // Address Range Maximum 293 0x00000000, // Address Translation Offset 294 0x00028000,,, 295 , AddressRangeMemory, TypeStatic) 296 DWordSpace (0xC3, ResourceConsumer, PosDecode, MinFixed, MaxFixed, 0xA5, 297 0x00000000, // Address Space Granularity 298 0x000C8000, // Address Range Minimum 299 0x000EFFFF, // Address Range Maximum 300 0x00000000, // Address Translation Offset 301 0x00028000,,,) 302 QWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, 303 0x0000000000000000, // Address Space Granularity 304 0x0000000000000000, // Address Range Minimum 305 0x0000000000000CF7, // Address Range Maximum 306 0x0000000000000000, // Address Translation Offset 307 0x0000000000000CF8, 0x44, "This is a ResouceSource string", 308 , TypeStatic) 309 QWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, 310 0x0000000000000000, // Address Space Granularity 311 0x0000000000000000, // Address Range Minimum 312 0x0000000000000CF7, // Address Range Maximum 313 0x0000000000000000, // Address Translation Offset 314 0x0000000000000CF8,,, 315 , TypeStatic) 316 QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, 317 0x0000000000000000, // Address Space Granularity 318 0x0000000000100000, // Address Range Minimum 319 0x00000000FFDFFFFF, // Address Range Maximum 320 0x0000000000000000, // Address Translation Offset 321 0x00000000FFD00000,,, 322 , AddressRangeMemory, TypeStatic) 323 QWordSpace (0xC3, ResourceConsumer, PosDecode, MinFixed, MaxFixed, 0xA5, 324 0x0000000000000000, // Address Space Granularity 325 0x0000000000000000, // Address Range Minimum 326 0x0000000000000CF7, // Address Range Maximum 327 0x0000000000000000, // Address Translation Offset 328 0x0000000000000CF8,,,) 329 ExtendedIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, 330 0x0000000000000000, // Address Space Granularity 331 0x0000000000000000, // Address Range Minimum 332 0x0000000000000CF7, // Address Range Maximum 333 0x0000000000000000, // Address Translation Offset 334 0x0000000000000CF8, // Address Length 335 0x0000000000000000, // Type Specific Attributes 336 , TypeStatic) 337 ExtendedMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, 338 0x0000000000000000, // Address Space Granularity 339 0x0000000000100000, // Address Range Minimum 340 0x00000000FFDFFFFF, // Address Range Maximum 341 0x0000000000000000, // Address Translation Offset 342 0x00000000FFD00000, // Address Length 343 0x0000000000000000, // Type Specific Attributes 344 , AddressRangeMemory, TypeStatic) 345 ExtendedSpace (0xC3, ResourceProducer, PosDecode, MinFixed, MaxFixed, 0xA3, 346 0x0000000000000000, // Address Space Granularity 347 0x0000000000100000, // Address Range Minimum 348 0x00000000FFDFFFFF, // Address Range Maximum 349 0x0000000000000000, // Address Translation Offset 350 0x00000000FFD00000, // Address Length 351 0x0000000000000000) // Type Specific Attributes 352 IO (Decode16, 0x0010, 0x0020, 0x01, 0x10) 353 IO (Decode16, 0x0090, 0x00A0, 0x01, 0x10) 354 FixedIO (0x0061, 0x01) 355 IRQNoFlags () {2} 356 DMA (Compatibility, BusMaster, Transfer8_16) {4} 357 DMA (Compatibility, BusMaster, Transfer8) {2,5,7} 358 Memory32Fixed (ReadWrite, 0x00100000, 0x00000000) 359 Memory32Fixed (ReadOnly, 0xFFFE0000, 0x00020000) 360 Memory32 (ReadOnly, 0x00020000, 0xFFFE0000, 0x00000004, 0x00000200) 361 Memory24 (ReadOnly, 0x1111, 0x2222, 0x0004, 0x0200) 362 Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, 0xE, "\\_SB_.TEST") 363 { 364 0x00000E01, 365 } 366 Interrupt (ResourceConsumer, Edge, ActiveHigh, Exclusive, 0x6, "xxxx") 367 { 368 0x00000601, 369 0x00000003, 370 0x00000002, 371 0x00000001, 372 } 373 Interrupt (ResourceProducer, Edge, ActiveHigh, Exclusive) 374 { 375 0xFFFF0000, 376 0x00000003, 377 0x00000002, 378 0x00000001, 379 0x00000005, 380 0x00000007, 381 0x00000009, 382 } 383 VendorShort () {0x01, 0x02, 0x03} 384 VendorLong () 385 { 386 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 387 0x09 388 } 389 Register (SystemIO, 0x08, 0x00, 0x00000000000000B2, , R000) 390 Register (SystemMemory, 0x08, 0x00, 0x00000000000000B2) 391 StartDependentFnNoPri () 392 { 393 IRQNoFlags () {0,1,2} 394 IRQ (Level, ActiveLow, Shared) {3,4,5,6,7,9,10,11,14,15} 395 } 396 EndDependentFn () 397 }) 398 CreateWordField (PRT0, 0x08, BMIN) 399 CreateByteField (PRT0, R000._ASZ, RSIZ) 400 Store (0x03, BMIN) 401 Return (PRT0) 402 } 403 404 Method (_PRS, 0, Serialized) 405 { 406 Name (BUF0, ResourceTemplate () 407 { 408 StartDependentFn (0x01, 0x02) 409 { 410 IO (Decode16, 0x03D8, 0x03F8, 0x01, 0x08) 411 IRQNoFlags () {4} 412 } 413 StartDependentFn (0x02, 0x01) 414 { 415 IO (Decode16, 0x03D8, 0x03E8, 0x01, 0x08) 416 IRQNoFlags () {4} 417 } 418 StartDependentFn (0x00, 0x02) 419 { 420 IO (Decode16, 0x02E8, 0x02F8, 0x01, 0x08) 421 IRQNoFlags () {3} 422 } 423 StartDependentFn (0x00, 0x02) 424 { 425 IO (Decode16, 0x02D8, 0x02E8, 0x01, 0x08) 426 IRQNoFlags () {3} 427 } 428 StartDependentFn (0x02, 0x00) 429 { 430 IO (Decode16, 0x0100, 0x03F8, 0x08, 0x08) 431 IRQNoFlags () {1,3,4,5,6,7,8,10,11,12,13,14,15} 432 } 433 EndDependentFn () 434 }) 435 Return (BUF0) 436 } 437 438 Method (_SRS, 1, Serialized) 439 { 440 Return (Zero) 441 } 442 } 443 444 445 Name(\_S0,Package(0x04){ 446 0x00, 447 0x00, 448 0x00, 449 0x00 450 }) 451 Name(\_S3,Package(0x04){ 452 0x05, 453 0x05, 454 0x00, 455 0x00 456 }) 457 Name(\_S4,Package(0x04){ 458 0x06, 459 0x06, 460 0x00, 461 0x00 462 }) 463 Name(\_S5,Package(0x04){ 464 0x07, 465 0x07, 466 0x00, 467 0x00 468 }) 469 470/* Examine this table header (DSDT) */ 471 472/* 473 DataTableRegion (HDR, "DSDT", "", "") 474 Field (HDR, AnyAcc, NoLock, Preserve) 475 { 476 SIG, 32, 477 LENG, 32, 478 REV, 8, 479 SUM, 8, 480 OID, 48, 481 OTID, 64, 482 OREV, 32, 483 CID, 32, 484 CREV, 32 485 } 486 487 Method (SIZE) 488 { 489 If (LLess (REV, 2)) 490 { 491 Store ("32-bit table", Debug) 492 } 493 else 494 { 495 Store ("64-bit table", Debug) 496 } 497 Return (0) 498 } 499 500*/ 501 Name (SIZE, 0) 502 503 /* Custom operation region */ 504 505 OperationRegion(MYOP,0x80,0xFD60,0x6) 506 Field(MYOP,ByteAcc,NoLock,Preserve) 507 { 508 MFLD,8 509 } 510 511 Method (TCOP,, Serialized) 512 { 513 Name (_STR, Unicode ("test")) 514 Store (4, MFLD) 515 Store (MFLD, Local0) 516 } 517 518 Name (ERRS, 0x0) 519 520 /* Warning should be issued for premature string termination */ 521 522 NAME (ESC1, "abcdefg\x00hijklmn") 523 NAME (ESC2, "abcdefg\000hijklmn") 524 Name (ESC3, "abc\a\bdef\f\n\r\t\v\x03ffff\432") 525 526 527 Name(CRSA,ResourceTemplate() 528 { 529 WORDBusNumber(ResourceProducer,MinFixed,MaxFixed,PosDecode,0x0000,0x0019,0x001D,0x0000,0x0005) 530 WORDIO(ResourceProducer,MinFixed,MaxFixed,PosDecode,NonISAOnlyRanges,0x0000,0xC000,0xCFFF,0x0000,0x1000) 531 DWORDMemory(ResourceProducer,PosDecode,MinFixed,MaxFixed,NonCacheable,ReadWrite,0x00000000,0xD8000000,0xDBFFFFFF,0x00000000,0x04000000) 532 533 }) 534 Name(CRSB,ResourceTemplate() 535 { 536 DWORDMemory(ResourceProducer,PosDecode,MinFixed,MaxFixed,NonCacheable,ReadWrite,0x00000000,0xD8000000,0xDBFFFFFF,0x00000000,0x04000000) 537 538 }) 539 540 Name(CRSC,ResourceTemplate() 541 { 542 VendorShort () {0x1, 0x2, 0x3} 543 }) 544 Name(CRSD,ResourceTemplate() 545 { 546 VendorLong (VNDL) {0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9} 547 }) 548 549 Name(CRSE,ResourceTemplate() 550 { 551 IRQNoFlags(){3,4,10,11} 552 IRQNoFlags(xxxt){3,4,10,11} 553 }) 554 Name(CRSR, Buffer (Add (SizeOf(CRSA),SizeOf(CRSB))){}) 555 Method(_CRS,0,NotSerialized) 556 { 557 Return(CRSR) 558 } 559 560 561 // 562 // Unnamed scope 563 // 564 Scope (\) 565 { 566 Name(Bxxx,0xFFFFFFFF) 567 } 568 569 Name (LANS, 0x0) 570 571 PowerResource(LANP,1,0) 572 { 573 Method(_STA){ 574 If(LEqual(And(LANS,0x30),0x30)){ 575 Return(One) 576 } Else { 577 Return(Zero) 578 } 579 } 580 Method(_ON){ 581 If(LNot(_STA())){ 582 Store (0x30, LANS) 583 } 584 } 585 Method(_OFF){ 586 If(_STA()){ 587 Store (0, LANS) 588 } 589 } 590 } 591 592 593 /* Can a method define another method? */ 594 595 /********************************** 596 Method (TASK, 2, SERIALIZED) 597 { 598 Sleep (100) 599 600 Method (TAS2) 601 { 602 Sleep (100) 603 } 604 605 TAS2() 606 Return 607 608 } 609 ************************************/ 610 611 /* A recursive method */ 612 613 Method (RCIV, 1) 614 { 615 Store (Arg0, Debug) 616 If (Lequal (Arg0, 0)) 617 { 618 Return () 619 } 620 RCIV (Subtract (Arg0, 1)) 621 } 622 623 Method (RTOP) 624 { 625 RCIV (100) 626 } 627 628 629 Scope(\_PR) 630 { 631 Processor(CPU0,0x0,0xFFFFFFFF,0x0) {} 632 } 633 634 Name(B1TP,0xFFFFFFFF) 635 636 Name(B2TP,0xFFFFFFFF) 637 Name(ADPS,0xFFFFFFFF) 638 Name(B1PS,0xFFFFFFFF) 639 Name(B1RS,0xFFFFFFFF) 640 Name(B1CS,0xFFFFFFFF) 641 Name(B2PS,0xFFFFFFFF) 642 Name(B2RS,0xFFFFFFFF) 643 Name(B2CS,0xFFFFFFFF) 644 Name(B1DC,3000) 645 Name(B2DC,2600) 646 Name(B1LF,3000) 647 Name(B2LF,2600) 648 Name(BPIF,0) 649 Name(PBLL,0) 650 651 Name(RBIF,Package() 652 { 653 0x1, 654 2200, 655 2200, 656 0x1, 657 10800, 658 0, 659 0, 660 1, 661 1, 662 "CA54200-5003/5", 663 "1", 664 "LION", 665 "Fujitsu" 666 }) 667 668 Method(SMWE, 4) 669 { 670 return(ONES) 671 } 672 673 Method(SMRE, 4) 674 { 675 return(ONES) 676 } 677 678/* 679 Method(RDBT,0,Serialized){ 680 If(LNot(SMWE(0x09,0x15,1,1))){ 681 Store(0x18,Local2) 682 } 683 } 684*/ 685 Scope(_SB) 686 { 687 688 Name (SBUF, Buffer (128) {}) 689 690 CreateBitField (SBUF, 3, BITY) 691 CreateByteField (SBUF, 1, BYTY) 692 CreateWordField (SBUF, 2, WRDZ) 693 CreateDwordField (SBUF, 4, DWDZ) 694 CreateQwordField (SBUF, 8, QWDZ) 695 CreateField (SBUF, 128, 12, FLDZ) 696 CreateField (SBUF, 148, 96, FLDY) 697 CreateField (SBUF, 148, 96, \_SB_.FLDW) 698 699 Method (_INI) 700 { 701 CreateField (\_SB_.SBUF, 148, 96, FLDV) 702 } 703 704 705 Device(PCI0) 706 { 707 Name(_HID,EISAID("PNP0A03")) 708 Name(_ADR,0x0) 709 710 Method(_CRS,, Serialized) 711 { 712 Name(PRT0, ResourceTemplate() { 713 WORDBusNumber( // Bus number resource(0) 714 ResourceConsumer, // bit 0 of general flags is 1 715 MinFixed, // Range is notfixed 716 MaxFixed, // Range is not fixed 717 SubDecode, // SubDecode 718 0x0000, // Granularity 719 0xfff1, // Min 720 0xfff2, // Max 721 0x0032, // Translation 722 0x0002,,, // Range Length 723 BUS0 724 ) } )// PRT0 725 726 CreateWordField(PRT0, BUS0._MIN, BMIN) //Minimum bus number suported under this bridge. 727 728 Store(3, BMIN) 729 Return(PRT0) 730 731 } // _CRS 732 733 Method(_SRS) 734 { 735 Return () 736 } 737 738 Device(EIO) 739 { 740 OperationRegion(FJIO,SystemIO,0xFD60,0x6) 741 Field(FJIO,ByteAcc,NoLock,Preserve) 742 { 743 GIDX,8, 744 745 GDTA,8, 746 747 PIDX,8, 748 749 PDTA,8, 750 751 SIDX,8, 752 753 SDTA,8 754 } 755 IndexField(GIDX,GDTA,ByteAcc,NoLock,Preserve) 756 { 757 Offset(0x2), 758 ,5, 759 VGAS,2, 760 Offset(0x4), 761 ,4, 762 DCKE,1, 763 Offset(0x5), 764 ,6, 765 ACPW,1, 766 767 Offset(0xA), 768 B1P,1, 769 770 B2P,1, 771 772 B1C,1, 773 774 B2C,1, 775 776 B1ER,1, 777 778 B2ER,1, 779 780 Offset(0xB), 781 B1CP,8, 782 783 B2CP,8, 784 785 BCP,8, 786 787 B1VH,8, 788 789 B1VL,8, 790 791 B2VH,8, 792 793 B2VL,8, 794 795 B1TM,8, 796 797 B2TM,8, 798 799 B1CH,8, 800 801 B1CL,8, 802 803 B2CH,8, 804 805 B2CL,8 806 } 807 } 808 } 809 } 810 811 Method(RDBT,3,Serialized){ 812 Store(0x1FFF,Local1) 813 If( Arg0 ){ 814 Store(0x2FFF,Local1) 815 } 816 Store(0x18,Local2) 817 If( Arg1 ){ 818 Store(0x10,Local2) 819 } 820 If(LNot(SMRE(0x09,0x15,1,RefOf(Local0)))){ 821 If(LNot(SMWE(0x08,0x14,1,Local1))){ 822 If(LNot(SMRE(0x09,0x17,Local2,RefOf(Local3)))){ 823 Store(Local1,Arg2) 824 } 825 } 826 Or(Local0,0xFFF,Local0) 827 SMWE(0x08,0x14,1,Local0) 828 } 829 } 830 Method(MKWD,2) 831 { 832 If(And(Arg1,0x80)) { 833 Or(0xFFFF0000,Arg0,Local0) 834 Or(Local0,ShiftLeft(Arg1,8),Local0) 835 Subtract(Zero,Local0,Local0) 836 } else { 837 Store(Arg0,Local0) 838 Or(Local0,ShiftLeft(Arg1,8),Local0) 839 } 840 Return(Local0) 841 } 842 843 Device(CMB1) 844 { 845 Name(_HID,EISAID("PNP0C0A")) 846 Name(_UID,0x1) 847 Alias(\_SB.PCI0.EIO.B1P,\_SB_.PCI0.XXXX) 848 Alias(\_SB.PCI0.EIO.B1P,B1P) 849 Alias(\_SB.PCI0.EIO.B1C,B1C) 850 Alias(\_SB.PCI0.EIO.B1CH,B1CH) 851 Alias(\_SB.PCI0.EIO.B1CL,B1CL) 852 Alias(\_SB.PCI0.EIO.B1VH,B1VH) 853 Alias(\_SB.PCI0.EIO.B1VL,B1VL) 854 Alias(\_SB.PCI0.EIO.B1CP,B1CP) 855 856 Method(_INI) 857 { 858 Store(B1P, B1PS) 859 Store(B1CP,B1RS) 860 Store(B1C, B1CS) 861 } 862 863 Method(_BIF){ 864 RDBT(Zero,Zero,RefOf(B1DC)) 865 RDBT(Zero,One,RefOf(B1LF)) 866 Store(B1DC,Index(RBIF,1)) 867 Store(B1LF,Index(RBIF,2)) 868 Store("CA54200-5003/5",Index(RBIF,9)) 869 Store("1",Index(RBIF,10)) 870 Return(RBIF) 871 } 872 873 Method(_BST,, Serialized) { 874 875 _INI() 876 877 Store(Zero,Local0) 878 879 if (LAnd(B1P,LNot(B1C))){ 880 Or(Local0,1,Local0) 881 } 882 883 if (LAnd(B1P,B1C)) { 884 Or(Local0,2,Local0) 885 } 886 887 if (LLessEqual(B1CP,1)) { 888 Or(Local0,4,Local0) 889 } 890 891 Store(MKWD(B1CL,B1CH),Local1) 892 893 Store(Divide(Add(Multiply(B1CP,B1LF),99),100),Local2) 894 895 Store(MKWD(B1VL,B1VH),Local3) 896 897 Name(STAT,Package(4){}) 898 Store(Local0,Index(STAT,0)) 899 Store(Local1,Index(STAT,1)) 900 Store(Local2,Index(STAT,2)) 901 Store(Local3,Index(STAT,3)) 902 903 If(LNot(BPIF)){ 904// \_SB.PCI0.EIO.EC0.IECT() 905// \_SB.PCI0.EIO.EC0.SECT() 906 Store(One,BPIF) 907 } 908 return(STAT) 909 } 910 911 } 912 913 Device (DEV1) 914 { 915 } 916 917 Scope(\_TZ) 918 { 919 ThermalZone(TZ1) 920 { 921 Name(_PSL,Package() 922 { 923 \_PR.CPU0 924 }) 925 } 926 } 927 928 Method (TZ2, 0, SERIALIZED) 929 { 930 Name(_PSL,Package() 931 { 932 \_PR.CPU0 933 }) 934 935 Return (_PSL) 936 } 937 938 ThermalZone (THM1) 939 { 940 } 941 942 Method (NOTI) 943 { 944 Notify (\DEV1, 0) 945 Notify (\THM1, 0) 946 Notify (\_PR.CPU0, 0) 947 } 948 949 Method (_ERR, 2) 950 { 951 Increment (ERRS) 952 Store ("Run-time exception:", Debug) 953 Store (Arg0, Debug) 954 Store (Arg1, Debug) 955 956 Return (0) // Map error to AE_OK 957 } 958 959 Method (DIV0) 960 { 961 Store (1, Local0) 962 Store (0, Local1) 963 Divide (Local0, Local1, Local3) 964 965 Store ("DIV0 - noabort", Debug) 966 } 967 968 Method (ERR_, 1) 969 { 970 if (LEqual (Arg0, 0)) 971 { 972 Store ("+*+*+*+* MTHD_ERROR: Results not equal!", Debug) 973 } 974 if (LEqual (Arg0, 1)) 975 { 976 Store ("+*+*+*+* MTHD_ERROR: Numeric result is incorrect!", Debug) 977 } 978 if (LEqual (Arg0, 2)) 979 { 980 Store ("+*+*+*+* MTHD_ERROR: Operand was clobbered!", Debug) 981 } 982 983 Notify (DEV1, Arg0) 984 Increment (ERRS) 985 } 986 987 Method (R226, 2) 988 { 989 } 990 Method (R225, 2) 991 { 992 R226 (Arg0, Arg1) 993 } 994 Method (R224, 2) 995 { 996 R225 (Arg1, Arg0) 997 } 998 Method (R223, 2) 999 { 1000 R224 (Arg0, Arg1) 1001 } 1002 Method (R222, 2) 1003 { 1004 R223 (Arg1, Arg0) 1005 } 1006 Method (R111) 1007 { 1008 Store (0x01010101, Local0) 1009 R222 (0xABAB, Local0) 1010 Store (Local0, Local1) 1011 } 1012 1013 Method (MAIN) 1014 { 1015 1016// SIZE() 1017 Store (NUM1(), Local0) 1018 \CMB1._BST() 1019 RDBT(1,2,3) 1020 OBJ1(1) 1021 OBJ2(2) 1022 CHEK() 1023 RETZ() 1024 BITZ() 1025 LOGS() 1026 REFS() 1027 COND() 1028 TZ2() 1029 1030 // 1031 // iPCO tests added 1032 // 1033 Store (\IFEL.TEST(), Local0) 1034 if (LGreater (Local0, 0)) 1035 { 1036 ERR_ (1) 1037 Return(Local0) 1038 } 1039 1040 Store (\NOSV.TEST(), Local0) 1041 if (LGreater (Local0, 0)) 1042 { 1043 ERR_ (1) 1044 Return(Local0) 1045 } 1046 1047 Store (\IDXF.TEST(), Local0) 1048 if (LGreater (Local0, 0)) 1049 { 1050 ERR_ (1) 1051 Return(Local0) 1052 } 1053 1054 Store (\_SB_.NSTL.TEST(), Local0) 1055 if (LGreater (Local0, 0)) 1056 { 1057 ERR_ (1) 1058 Return(Local0) 1059 } 1060 1061 Store (\RTBF.TEST(), Local0) 1062 if (LGreater (Local0, 0)) 1063 { 1064 ERR_ (1) 1065 Return(Local0) 1066 } 1067 1068 Store (\_SB_.RTLV.TEST(), Local0) 1069 if (LGreater (Local0, 0)) 1070 { 1071 ERR_ (1) 1072 Return(Local0) 1073 } 1074 1075 Store (\_SB_.RETP.TEST(), Local0) 1076 if (LGreater (Local0, 0)) 1077 { 1078 ERR_ (1) 1079 Return(Local0) 1080 } 1081 1082 Store (\WHLR.TEST(), Local0) 1083 if (LGreater (Local0, 0)) 1084 { 1085 ERR_ (1) 1086 Return(Local0) 1087 } 1088 1089 Store (\ANDO.TEST(), Local0) 1090 if (LGreater (Local0, 0)) 1091 { 1092 ERR_ (1) 1093 Return(Local0) 1094 } 1095 1096 Store (\BRKP.TEST(), Local0) 1097 if (LGreater (Local0, 0)) 1098 { 1099 ERR_ (1) 1100 Return(Local0) 1101 } 1102 1103 Store (\ADSU.TEST(), Local0) 1104 if (LGreater (Local0, 0)) 1105 { 1106 ERR_ (1) 1107 Return(Local0) 1108 } 1109 1110 Store (\INDC.TEST(), Local0) 1111 if (LGreater (Local0, 0)) 1112 { 1113 ERR_ (1) 1114 Return(Local0) 1115 } 1116 1117 Store (\LOPS.TEST(), Local0) 1118 if (LGreater (Local0, 0)) 1119 { 1120 ERR_ (1) 1121 Return(Local0) 1122 } 1123 1124 Store (\FDSO.TEST(), Local0) 1125 if (LGreater (Local0, 0)) 1126 { 1127 ERR_ (1) 1128 Return(Local0) 1129 } 1130 1131 Store (\MLDV.TEST(), Local0) 1132 if (LGreater (Local0, 0)) 1133 { 1134 ERR_ (1) 1135 Return(Local0) 1136 } 1137 1138 Store (\NBIT.TEST(), Local0) 1139 if (LGreater (Local0, 0)) 1140 { 1141 ERR_ (1) 1142 Return(Local0) 1143 } 1144 1145 Store (\SHFT.TEST(), Local0) 1146 if (LGreater (Local0, 0)) 1147 { 1148 ERR_ (1) 1149 Return(Local0) 1150 } 1151 1152 Store (\XORD.TEST(), Local0) 1153 if (LGreater (Local0, 0)) 1154 { 1155 ERR_ (1) 1156 Return(Local0) 1157 } 1158 1159 Store (\CRBF.TEST(), Local0) 1160 if (LGreater (Local0, 0)) 1161 { 1162 ERR_ (1) 1163 Return(Local0) 1164 } 1165 1166 Store (\IDX4.TEST(), Local0) 1167 if (LGreater (Local0, 0)) 1168 { 1169 ERR_ (1) 1170 Return(Local0) 1171 } 1172 1173 Store (\EVNT.TEST(), Local0) 1174 if (LGreater (Local0, 0)) 1175 { 1176 ERR_ (1) 1177 Return(Local0) 1178 } 1179 1180 Store (\SZLV.TEST(), Local0) 1181 if (LGreater (Local0, 0)) 1182 { 1183 ERR_ (1) 1184 Return(Local0) 1185 } 1186 1187 Store (\_SB_.BYTF.TEST(), Local0) 1188 if (LGreater (Local0, 0)) 1189 { 1190 ERR_ (1) 1191 Return(Local0) 1192 } 1193 1194 Store (\DWDF.TEST(), Local0) 1195 if (LGreater (Local0, 0)) 1196 { 1197 ERR_ (1) 1198 Return(Local0) 1199 } 1200 1201 Store (\DVAX.TEST(), Local0) 1202 if (LGreater (Local0, 0)) 1203 { 1204 ERR_ (1) 1205 Return(Local0) 1206 } 1207 1208 Store (\IDX6.TEST(), Local0) 1209 if (LGreater (Local0, 0)) 1210 { 1211 ERR_ (1) 1212 Return(Local0) 1213 } 1214 1215 Store (\IDX5.TEST(), Local0) 1216 if (LGreater (Local0, 0)) 1217 { 1218 ERR_ (1) 1219 Return(Local0) 1220 } 1221 1222 Store (\_SB_.IDX0.TEST(), Local0) 1223 if (LGreater (Local0, 0)) 1224 { 1225 ERR_ (1) 1226 Return(Local0) 1227 } 1228 1229 Store (\_SB_.IDX3.TEST(), Local0) 1230 if (LGreater (Local0, 0)) 1231 { 1232 ERR_ (1) 1233 Return(Local0) 1234 } 1235 1236 Store (\IDX7.TEST(), Local0) 1237 if (LGreater (Local0, 0)) 1238 { 1239 ERR_ (1) 1240 Return(Local0) 1241 } 1242 1243 Store (\MTCH.TEST(), Local0) 1244 if (LGreater (Local0, 0)) 1245 { 1246 ERR_ (1) 1247 Return(Local0) 1248 } 1249 1250 Store (\WHLB.TEST(), Local0) 1251 if (LGreater (Local0, 0)) 1252 { 1253 ERR_ (1) 1254 Return(Local0) 1255 } 1256 1257 Store (\_SB_.IDX2.TEST(), Local0) 1258 if (LGreater (Local0, 0)) 1259 { 1260 ERR_ (1) 1261 Return(Local0) 1262 } 1263 1264 Store (\SIZO.TEST(), Local0) 1265 if (LGreater (Local0, 0)) 1266 { 1267 ERR_ (1) 1268 Return(Local0) 1269 } 1270 1271 Store (\_SB_.SMIS.TEST(), Local0) 1272 if (LGreater (Local0, 0)) 1273 { 1274 ERR_ (1) 1275 Return(Local0) 1276 } 1277 1278 if (LGreater (ERRS, 0)) 1279 { 1280 Store ("****** There were errors during the execution of the test ******", Debug) 1281 } 1282 1283 // Flush all notifies 1284 1285 Sleep (250) 1286 1287 // 1288 // Last Test 1289 // 1290 1291 Return(0) // Success 1292 } 1293 1294 1295 Method (OBJ1, 1, SERIALIZED) 1296 { 1297 1298 Store (3, Local0) 1299 Name(BUFR, Buffer (Local0) {}) 1300 Name(BUF1, Buffer (4) {1,2,3,4}) 1301 Name(BUF2, Buffer (4) {}) 1302 1303 Store (BUF1, BUF2) 1304 Mutex (MTX1, 4) 1305 1306 Alias (MTX1, MTX2) 1307 } 1308 1309 1310 Mutex (MTXT, 0) 1311 Mutex (MTXX, 0) 1312 1313 /* 1314 * Field Creation 1315 */ 1316 1317 Method (FLDS,, Serialized) 1318 { 1319 Store ("++++++++ Creating BufferFields", Debug) 1320 Name (BUF2, Buffer (128) {}) 1321 1322 CreateBitField (BUF2, 3, BIT2) 1323 CreateByteField (BUF2, 1, BYT2) 1324 CreateWordField (BUF2, 2, WRD2) 1325 CreateDwordField (BUF2, 4, DWD2) 1326 CreateQwordField (BUF2, 8, QWD2) 1327 CreateField (BUF2, 128, 12, FLD2) 1328 CreateField (BUF2, 148, 96, FLD3) 1329 1330 Store (0x1, BIT2) 1331 Store (BIT2, Local0) 1332 if (LNotEqual (Local0, 0x1)) 1333 { 1334 ERR_ (1) 1335 } 1336 else 1337 { 1338 Store (DerefOf (Index (BUF2, 0)), Local0) 1339 if (LNotEqual (Local0, 0x08)) 1340 { 1341 ERR_ (1) 1342 } 1343 else 1344 { 1345 Store ("++++++++ Bit BufferField I/O PASS", Debug) 1346 } 1347 } 1348 1349 Store (0x1A, BYT2) 1350 Store (BYT2, Local0) 1351 if (LNotEqual (Local0, 0x1A)) 1352 { 1353 ERR_ (1) 1354 } 1355 else 1356 { 1357 Store ("++++++++ Byte BufferField I/O PASS", Debug) 1358 } 1359 1360 Store (0x1234, WRD2) 1361 Store (WRD2, Local0) 1362 if (LNotEqual (Local0, 0x1234)) 1363 { 1364 ERR_ (1) 1365 } 1366 else 1367 { 1368 Store ("++++++++ Word BufferField I/O PASS", Debug) 1369 } 1370 1371 Store (0x123, FLD2) 1372 Store (FLD2, Local0) 1373 if (LNotEqual (Local0, 0x123)) 1374 { 1375 ERR_ (1) 1376 } 1377 else 1378 { 1379 Store ("++++++++ 12-bit BufferField I/O PASS", Debug) 1380 } 1381 1382 Store (0x12345678, DWD2) 1383 Store (DWD2, Local0) 1384 if (LNotEqual (Local0, 0x12345678)) 1385 { 1386 ERR_ (1) 1387 } 1388 else 1389 { 1390 Store ("++++++++ Dword BufferField I/O PASS", Debug) 1391 } 1392 1393 Store (0x1234567887654321, QWD2) 1394 Store (QWD2, Local0) 1395 if (LNotEqual (Local0, 0x1234567887654321)) 1396 { 1397 ERR_ (1) 1398 } 1399 else 1400 { 1401 Store ("++++++++ Qword BufferField I/O PASS", Debug) 1402 } 1403 } 1404 1405 1406 /* Field execution */ 1407 1408 Method (FLDX,, Serialized) 1409 { 1410 Field (\_SB_.MEM.SMEM, AnyAcc, NoLock, Preserve) 1411 { // Field: SMEM overlay using 32-bit field elements 1412 SMD0, 32, // 32-bits 1413 SMD1, 32, // 32-bits 1414 SMD2, 32, // 32-bits 1415 SMD3, 32 // 32-bits 1416 } // Field: SMEM overlay using 32-bit field elements 1417 Field (\_SB_.MEM.SMEM, AnyAcc, NoLock, Preserve) 1418 { // Field: SMEM overlay using greater than 32-bit field elements 1419 SME0, 69, // larger than an integer (32 or 64) 1420 SME1, 97 // larger than an integer 1421 } // Field: SMEM overlay using greater than 32-bit field elements 1422 } 1423 1424 1425 Method (MTX_, ) 1426 { 1427 /* Test "Force release" of mutex on method exit */ 1428 1429 Acquire (MTXT, 0xFFFF) 1430 Acquire (MTXX, 0xFFFF) 1431 1432 Store ("++++++++ Acquiring Mutex MTX2", Debug) 1433 Acquire (_GL_, 0xFFFF) 1434 1435 1436 Store ("++++++++ Releasing Mutex MTX2", Debug) 1437 Release (_GL_) 1438 } 1439 1440 1441 Method (OBJ2, 1, Serialized) 1442 { 1443 Store ("++++++++ Creating Buffer BUFO", Debug) 1444 Name (BUFO, Buffer (32) {}) 1445 1446 Store ("++++++++ Creating OpRegion OPR2", Debug) 1447 OperationRegion (OPR2, SystemMemory, Arg0, 256) 1448 1449 Store ("++++++++ Creating Field(s) in OpRegion OPR2", Debug) 1450 Field (OPR2, ByteAcc, NoLock, Preserve) 1451 { 1452 IDX2, 8, 1453 DAT2, 8, 1454 BNK2, 4 1455 } 1456 1457 Store ("++++++++ Creating BankField BNK2 in OpRegion OPR2", Debug) 1458 // 1459 // mcw 3/20/00 - changed FET0, 4, FET1, 3 to FET0, 1, FET1, 1 1460 // 1461 BankField (OPR2, BNK2, 0, ByteAcc, NoLock, Preserve) 1462 { 1463 FET0, 4, 1464 FET1, 3 1465 } 1466 1467 Store ("++++++++ Creating IndexField", Debug) 1468 IndexField (IDX2, DAT2, ByteAcc, NoLock, Preserve) 1469 { 1470 FET2, 4, 1471 FET3, 3 1472 } 1473 1474 Store ("++++++++ SizeOf (BUFO)", Debug) 1475 SizeOf (BUFO) 1476 1477 Store ("++++++++ Store (SizeOf (BUFO), Local0)", Debug) 1478 Store (SizeOf (BUFO), Local0) 1479 1480 Store ("++++++++ Concatenate (\"abd\", \"def\", Local0)", Debug) 1481 Concatenate ("abd", "def", Local0) 1482 Store (Local0, Debug) 1483 1484 Store ("++++++++ Concatenate (\"abd\", 0x7B, Local0)", Debug) 1485 Concatenate ("abd", 0x7B, Local0) 1486 Store (Local0, Debug) 1487 1488 Store ("++++++++ Creating Event EVT2", Debug) 1489 Event (EVT2) 1490 1491 Store ("++++++++ Creating Mutex MTX2", Debug) 1492 Mutex (MTX2, 0) 1493 1494 Store ("++++++++ Creating Alias MTXA to MTX2", Debug) 1495 Alias (MTX2, MTXA) 1496 1497 Store ("++++++++ Acquiring Mutex MTX2", Debug) 1498 Acquire (MTX2, 0xFFFF) 1499 1500 Store ("++++++++ Acquiring Mutex MTX2 (2nd acquire)", Debug) 1501 Acquire (MTX2, 1) 1502 1503 Store ("++++++++ Releasing Mutex MTX2", Debug) 1504 Release (MTX2) 1505 1506 // Type 1 opcodes 1507 1508 Store ("++++++++ Signalling Event EVT2", Debug) 1509 Signal (EVT2) 1510 1511 Store ("++++++++ Resetting Event EVT2", Debug) 1512 Reset (EVT2) 1513 1514 Store ("++++++++ Signalling Event EVT2", Debug) 1515 Signal (EVT2) 1516 1517 Store ("++++++++ Waiting Event EVT2", Debug) 1518 Wait (EVT2, 0xFFFF) 1519 1520 Store ("++++++++ Sleep", Debug) 1521 Sleep (100) 1522 1523 Store ("++++++++ Stall", Debug) 1524 Stall (254) 1525 1526 Store ("++++++++ NoOperation", Debug) 1527 Noop 1528 1529 // Type 2 Opcodes 1530 1531 Store ("++++++++ Return from Method OBJ2", Debug) 1532 return (4) 1533 } 1534 1535 1536 Method (NUM1, 0) 1537 { 1538 /* ADD */ 1539 1540 Store ("++++++++ Add (0x12345678, 0x11111111, Local0)", Debug) 1541 Add (0x12345678, 0x11111111, Local0) 1542 1543 Store ("++++++++ Store (Add (0x12345678, 0x11111111), Local1)", Debug) 1544 Store (Add (0x12345678, 0x11111111), Local1) 1545 1546 Store ("++++++++ Checking result from ADD", Debug) 1547 if (LNotEqual (Local0, Local1)) 1548 { 1549 ERR_ (0) 1550 } 1551 1552 1553 /* SUBTRACT */ 1554 1555 Store ("++++++++ Subtract (0x87654321, 0x11111111, Local4)", Debug) 1556 Subtract (0x87654321, 0x11111111, Local4) 1557 1558 Store ("++++++++ Store (Subtract (0x87654321, 0x11111111), Local5)", Debug) 1559 Store (Subtract (0x87654321, 0x11111111), Local5) 1560 1561 Store ("++++++++ Checking result from SUBTRACT", Debug) 1562 if (LNotEqual (Local4, Local5)) 1563 { 1564 ERR_ (0) 1565 } 1566 1567 1568 /* MULTIPLY */ 1569 1570 Store ("++++++++ Multiply (33, 10, Local6)", Debug) 1571 Multiply (33, 10, Local6) 1572 1573 Store ("++++++++ Store (Multiply (33, 10), Local7)", Debug) 1574 Store (Multiply (33, 10), Local7) 1575 1576 1577 Store ("++++++++ Checking result from MULTIPLY", Debug) 1578 if (LNotEqual (Local6, Local7)) 1579 { 1580 ERR_ (0) 1581 } 1582 1583 1584 /* DIVIDE */ 1585 1586 Store ("++++++++ Divide (100, 9, Local1, Local2)", Debug) 1587 Divide (100, 9, Local1, Local2) 1588 1589 Store ("++++++++ Store (Divide (100, 9), Local3)", Debug) 1590 Store (Divide (100, 9), Local3) 1591 1592 Store ("++++++++ Checking (quotient) result from DIVIDE", Debug) 1593 if (LNotEqual (Local2, Local3)) 1594 { 1595 ERR_ (0) 1596 } 1597 1598 1599 /* INCREMENT */ 1600 1601 Store ("++++++++ Increment (Local0)", Debug) 1602 Store (1, Local0) 1603 Store (2, Local1) 1604 Increment (Local0) 1605 1606 Store ("++++++++ Checking result from INCREMENT", Debug) 1607 if (LNotEqual (Local0, Local1)) 1608 { 1609 ERR_ (0) 1610 } 1611 1612 1613 /* DECREMENT */ 1614 1615 Store ("++++++++ Decrement (Local0)", Debug) 1616 Store (2, Local0) 1617 Store (1, Local1) 1618 Decrement (Local0) 1619 1620 Store ("++++++++ Checking result from DECREMENT", Debug) 1621 if (LNotEqual (Local0, Local1)) 1622 { 1623 ERR_ (0) 1624 } 1625 1626 1627 /* TOBCD */ 1628 /* FROMBCD */ 1629 1630 Store ("++++++++ ToBCD (0x1234, Local5)", Debug) 1631 ToBCD (0x1234, Local5) 1632 1633 Store ("++++++++ FromBCD (Local5, Local6)", Debug) 1634 FromBCD (Local5, Local6) 1635 1636 Store ("++++++++ Return (Local6)", Debug) 1637 Return (Local6) 1638 } 1639 1640 1641 Method (CHEK) 1642 { 1643 1644 Store (3, Local0) 1645 Store (3, Debug) 1646 Store (Local0, Debug) 1647 Store (7, Local1) 1648 1649 Add (Local0, Local1) 1650 if (LNotEqual (Local0, 3)) 1651 { 1652 ERR_ (2) 1653 } 1654 if (LNotEqual (Local1, 7)) 1655 { 1656 ERR_ (2) 1657 } 1658 1659 1660 Add (Local0, Local1, Local2) 1661 if (LNotEqual (Local0, 3)) 1662 { 1663 ERR_ (2) 1664 } 1665 if (LNotEqual (Local1, 7)) 1666 { 1667 ERR_ (2) 1668 } 1669 } 1670 1671 1672 Method (RET1) 1673 { 1674 Store (3, Local0) 1675 Return (Local0) 1676 } 1677 1678 Method (RET2) 1679 { 1680 Return (RET1()) 1681 } 1682 1683 Method (RETZ) 1684 { 1685 RET2 () 1686 } 1687 1688 1689 Method (BITZ) 1690 { 1691 Store ("++++++++ FindSetLeftBit (0x00100100, Local0)", Debug) 1692 FindSetLeftBit (0x00100100, Local0) 1693 if (LNotEqual (Local0, 21)) 1694 { 1695 ERR_ (1) 1696 } 1697 1698 Store ("++++++++ FindSetRightBit (0x00100100, Local1)", Debug) 1699 FindSetRightBit (0x00100100, Local1) 1700 if (LNotEqual (Local1, 9)) 1701 { 1702 ERR_ (1) 1703 } 1704 1705 Store ("++++++++ And (0xF0F0F0F0, 0x11111111, Local2)", Debug) 1706 And (0xF0F0F0F0, 0x11111111, Local2) 1707 if (LNotEqual (Local2, 0x10101010)) 1708 { 1709 ERR_ (1) 1710 } 1711 1712 Store ("++++++++ NAnd (0xF0F0F0F0, 0x11111111, Local3)", Debug) 1713 NAnd (0xF0F0F0F0, 0x11111111, Local3) 1714 if (LNotEqual (Local3, 0xEFEFEFEF)) 1715 { 1716 ERR_ (1) 1717 } 1718 1719 Store ("++++++++ Or (0x11111111, 0x22222222, Local4)", Debug) 1720 Or (0x11111111, 0x22222222, Local4) 1721 if (LNotEqual (Local4, 0x33333333)) 1722 { 1723 ERR_ (1) 1724 } 1725 1726 Store ("++++++++ NOr (0x11111111, 0x22222222, Local5)", Debug) 1727 NOr (0x11111111, 0x22222222, Local5) 1728 if (LNotEqual (Local5, 0xCCCCCCCC)) 1729 { 1730 ERR_ (1) 1731 } 1732 1733 Store ("++++++++ XOr (0x11113333, 0x22222222, Local6)", Debug) 1734 XOr (0x11113333, 0x22222222, Local6) 1735 if (LNotEqual (Local6, 0x33331111)) 1736 { 1737 ERR_ (1) 1738 } 1739 1740 Store ("++++++++ ShiftLeft (0x11112222, 2, Local7)", Debug) 1741 ShiftLeft (0x11112222, 2, Local7) 1742 if (LNotEqual (Local7, 0x44448888)) 1743 { 1744 ERR_ (1) 1745 } 1746 1747 Store ("++++++++ ShiftRight (Local7, 2, Local7)", Debug) 1748 ShiftRight (Local7, 2, Local7) 1749 if (LNotEqual (Local7, 0x11112222)) 1750 { 1751 ERR_ (1) 1752 } 1753 1754 1755 Store ("++++++++ Not (Local0, Local1)", Debug) 1756 Store (0x22224444, Local0) 1757 Not (Local0, Local1) 1758 if (LNotEqual (Local0, 0x22224444)) 1759 { 1760 ERR_ (2) 1761 } 1762 1763 if (LNotEqual (Local1, 0xDDDDBBBB)) 1764 { 1765 ERR_ (1) 1766 } 1767 1768 Return (Local7) 1769 } 1770 1771 1772 Method (LOGS) 1773 { 1774 1775 Store ("++++++++ Store (LAnd (0xFFFFFFFF, 0x11111111), Local0)", Debug) 1776 Store (LAnd (0xFFFFFFFF, 0x11111111), Local0) 1777 1778 Store ("++++++++ Store (LEqual (0xFFFFFFFF, 0x11111111), Local)", Debug) 1779 Store (LEqual (0xFFFFFFFF, 0x11111111), Local1) 1780 1781 Store ("++++++++ Store (LGreater (0xFFFFFFFF, 0x11111111), Local2)", Debug) 1782 Store (LGreater (0xFFFFFFFF, 0x11111111), Local2) 1783 1784 Store ("++++++++ Store (LGreaterEqual (0xFFFFFFFF, 0x11111111), Local3)", Debug) 1785 Store (LGreaterEqual (0xFFFFFFFF, 0x11111111), Local3) 1786 1787 Store ("++++++++ Store (LLess (0xFFFFFFFF, 0x11111111), Local4)", Debug) 1788 Store (LLess (0xFFFFFFFF, 0x11111111), Local4) 1789 1790 Store ("++++++++ Store (LLessEqual (0xFFFFFFFF, 0x11111111), Local5)", Debug) 1791 Store (LLessEqual (0xFFFFFFFF, 0x11111111), Local5) 1792 1793 Store ("++++++++ Store (LNot (0x31313131), Local6)", Debug) 1794 Store (0x00001111, Local6) 1795 Store (LNot (Local6), Local7) 1796 if (LNotEqual (Local6, 0x00001111)) 1797 { 1798 ERR_ (2) 1799 } 1800 1801 if (LNotEqual (Local7, 0x0)) 1802 { 1803 ERR_ (1) 1804 } 1805 1806 1807 Store ("++++++++ Store (LNotEqual (0xFFFFFFFF, 0x11111111), Local7)", Debug) 1808 Store (LNotEqual (0xFFFFFFFF, 0x11111111), Local7) 1809 1810 Store ("++++++++ Lor (0x0, 0x1)", Debug) 1811 if (Lor (0x0, 0x1)) 1812 { 1813 Store ("+_+_+_+_+ Lor (0x0, 0x1) returned TRUE", Debug) 1814 } 1815 1816 return (Local7) 1817 } 1818 1819 1820 Method (COND) 1821 { 1822 Store ("++++++++ Store (0x4, Local0)", Debug) 1823 Store (0x4, Local0) 1824 1825 Store ("++++++++ While (Local0)", Debug) 1826 While (Local0) 1827 { 1828 Store ("++++++++ Decrement (Local0)", Debug) 1829 Decrement (Local0) 1830 } 1831 1832 1833 Store ("++++++++ Store (0x3, Local6)", Debug) 1834 Store (0x3, Local6) 1835 1836 Store ("++++++++ While (Subtract (Local6, 1))", Debug) 1837 While (Subtract (Local6, 1)) 1838 { 1839 Store ("++++++++ Decrement (Local6)", Debug) 1840 Decrement (Local6) 1841 } 1842 1843 1844 Store ("++++++++ [LVL1] If (LGreater (0x2, 0x1))", Debug) 1845 If (LGreater (0x2, 0x1)) 1846 { 1847 Store ("++++++++ [LVL2] If (LEqual (0x11111111, 0x22222222))", Debug) 1848 If (LEqual (0x11111111, 0x22222222)) 1849 { 1850 Store ("++++++++ ERROR: If (LEqual (0x11111111, 0x22222222)) returned TRUE", Debug) 1851 } 1852 1853 else 1854 { 1855 Store ("++++++++ [LVL3] If (LNot (0x0))", Debug) 1856 If (LNot (0x0)) 1857 { 1858 Store ("++++++++ [LVL4] If (LAnd (0xEEEEEEEE, 0x2))", Debug) 1859 If (LAnd (0xEEEEEEEE, 0x2)) 1860 { 1861 Store ("++++++++ [LVL5] If (LLess (0x44444444, 0x3))", Debug) 1862 If (LLess (0x44444444, 0x3)) 1863 { 1864 Store ("++++++++ ERROR: If (LLess (0x44444444, 0x3)) returned TRUE", Debug) 1865 } 1866 1867 else 1868 { 1869 Store ("++++++++ Exiting from nested IF/ELSE statements", Debug) 1870 } 1871 } 1872 } 1873 } 1874 } 1875 1876 1877 Store ("++++++++ [LVL1] If (LGreater (0x2, 0x1))", Debug) 1878 If (LGreater (0x2, 0x1)) 1879 { 1880 Store ("++++++++ [LVL2] If (LEqual (0x11111111, 0x22222222))", Debug) 1881 If (LEqual (0x11111111, 0x22222222)) 1882 { 1883 Store ("++++++++ ERROR: If (LEqual (0x11111111, 0x22222222)) returned TRUE", Debug) 1884 } 1885 1886 else 1887 { 1888 Store ("++++++++ [LVL3] If (LNot (0x0))", Debug) 1889 If (LNot (0x0)) 1890 { 1891 Store ("++++++++ [LVL4] If (LAnd (0xEEEEEEEE, 0x2))", Debug) 1892 If (LAnd (0xEEEEEEEE, 0x2)) 1893 { 1894 Store ("++++++++ [LVL5] If (LLess (0x44444444, 0x3))", Debug) 1895 If (LLess (0x44444444, 0x3)) 1896 { 1897 Store ("++++++++ ERROR: If (LLess (0x44444444, 0x3)) returned TRUE", Debug) 1898 } 1899 1900 else 1901 { 1902 Store ("++++++++ Returning from nested IF/ELSE statements", Debug) 1903 Return (Local6) 1904 } 1905 } 1906 } 1907 } 1908 } 1909 1910 } 1911 1912 1913 Method (REFS,, Serialized) 1914 { 1915 Name (BBUF, Buffer() {0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7}) 1916 1917 Name (NEST, Package () 1918 { 1919 Package () 1920 { 1921 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 1922 }, 1923 Package () 1924 { 1925 0x11, 0x12, 0x12, 0x14, 0x15, 0x16 1926 } 1927 }) 1928 1929 Store (RefOf (MAIN), Local5) 1930 1931 // For this to work, ABCD must NOT exist. 1932 1933 Store (CondRefOf (ABCD, Local0), Local1) 1934 if (LNotEqual (Local1, 0)) 1935 { 1936 ERR_ (2) 1937 } 1938 1939 Store (CondRefOf (BBUF, Local0), Local1) 1940 if (LNotEqual (Local1, Ones)) 1941 { 1942 ERR_ (2) 1943 } 1944 1945 Store (DeRefOf (Index (BBUF, 3)), Local6) 1946 if (LNotEqual (Local6, 0xB3)) 1947 { 1948 ERR_ (2) 1949 } 1950 1951 Store (DeRefOf (Index (DeRefOf (Index (NEST, 1)), 3)), Local0) 1952 if (LNotEqual (Local0, 0x14)) 1953 { 1954 ERR_ (2) 1955 } 1956 1957 1958 Store (0x11223344, Local0) 1959 Store (RefOf (Local0), Local1) 1960 1961 Store (DerefOf (Local1), Local2) 1962 If (LNotEqual (Local2, 0x11223344)) 1963 { 1964 ERR_ (2) 1965 } 1966 1967 1968 /* Parser thinks this is a method invocation!! */ 1969 1970 // RefOf (MAIN) 1971 1972 1973 // RefOf (R___) 1974 // RefOf (BBUF) 1975 1976 // Store (RefOf (Local0), Local1) 1977 1978 // CondRefOf (BBUF, Local2) 1979 // CondRefOf (R___, Local3) 1980 1981 // Store (DerefOf (Local1), Local4) 1982 1983 // Return (Local4) 1984 } 1985 1986 1987 Method (INDX, 0, Serialized) 1988 { 1989 Name(STAT,Package(4){}) 1990 Store(0x44443333,Index(STAT,0)) 1991 } 1992 1993//================================================================= 1994//================================================================= 1995//===================== iPCO TESTS ================================ 1996//================================================================= 1997//================================================================= 1998// 1999// 2000// test IfElseOp.asl 2001// 2002// test for IfOp and ElseOp, including validation of object stack cleanup 2003// 2004 Device (IFEL) 2005 { 2006 Name (DWRD, 1) 2007 Name (RSLT, 0) 2008 2009 // IFNR control method executes IfOp branch with NO nested Return 2010 // and no Else branch 2011 Method (IFNR) 2012 { 2013 Store (DWRD, RSLT) 2014 If (LEqual (DWRD, 1)) 2015 { 2016 Store (0, RSLT) 2017 } 2018 } // IFNR 2019 2020 // NINR control method does not execute If branch and has no Else branch 2021 Method (NINR) 2022 { 2023 Store (0, RSLT) 2024 If (LNotEqual (DWRD, 1)) 2025 { 2026 Store (DWRD, RSLT) 2027 } 2028 } // NINR 2029 2030 // IENR control method executes IfOp branch with NO nested Return 2031 Method (IENR) 2032 { 2033 If (LEqual (DWRD, 1)) 2034 { 2035 Store (0, RSLT) 2036 } 2037 Else 2038 { 2039 Store (DWRD, RSLT) 2040 } 2041 } // IENR 2042 2043 // ELNR control method executes ElseOp branch with NO nested Return 2044 Method (ELNR) 2045 { 2046 If (LNotEqual (DWRD, 1)) 2047 { 2048 Store (DWRD, RSLT) 2049 } 2050 Else 2051 { 2052 Store (0, RSLT) 2053 } 2054 } // ELNR 2055 2056 // IFRT control method executes IfOp branch with nested Return with 2057 // no Else branch 2058 Method (IFRT) 2059 2060 { 2061 If (LEqual (DWRD, 1)) 2062 { 2063 Return (0) 2064 } 2065 Return (DWRD) 2066 } // IFRT 2067 2068 // IERT control method executes IfOp branch with nested Return with 2069 // Else branch 2070 Method (IERT) 2071 { 2072 If (LEqual (DWRD, 1)) 2073 { 2074 Return (0) 2075 } 2076 Else 2077 { 2078 Return (DWRD) 2079 } 2080 } // IERT 2081 2082 // ELRT control method executes ElseOp branch with nested Return 2083 Method (ELRT) 2084 { 2085 If (LNotEqual (DWRD, 1)) 2086 { 2087 Return (DWRD) 2088 } 2089 Else 2090 { 2091 Return (0) 2092 } 2093 } // ELRT 2094 2095 Method (TEST) 2096 { 2097 Store ("++++++++ IfElseOp Test", Debug) 2098 2099 // IfOp with NO return value 2100 IFNR() 2101 If (LNotEqual (RSLT, 0)) 2102 { 2103 Return (RSLT) 2104 } 2105 2106 // IfOp with NO return value 2107 NINR() 2108 If (LNotEqual (RSLT, 0)) 2109 { 2110 Return (RSLT) 2111 } 2112 2113 // IfOp with NO return value 2114 IENR() 2115 If (LNotEqual (RSLT, 0)) 2116 { 2117 Return (RSLT) 2118 } 2119 2120 // ElseOp with NO return value 2121 ELNR() 2122 If (LNotEqual (RSLT, 0)) 2123 { 2124 Return (RSLT) 2125 } 2126 2127 // IfOp with return value 2128 Store (IFRT, RSLT) 2129 If (LNotEqual (RSLT, 0)) 2130 { 2131 Return (RSLT) 2132 } 2133 2134 // IfOp with return value 2135 Store (IERT, RSLT) 2136 If (LNotEqual (RSLT, 0)) 2137 { 2138 Return (RSLT) 2139 } 2140 2141 // ElseOp with return value 2142 Store (ELRT, RSLT) 2143 If (LNotEqual (RSLT, 0)) 2144 { 2145 Return (RSLT) 2146 } 2147 2148 Return (0) 2149 } // TEST 2150 } // IFEL 2151 2152// 2153// test NoSave.asl 2154// 2155// 2156// Internal test cases to validate IfOp (Operator (,,)) where Operator 2157// target is ZeroOp to throw away the results. 2158// Includes internal test cases for logical operators with no destination 2159// operands. 2160// 2161 Device (NOSV) 2162 { 2163 Method (TEST,, Serialized) 2164 { 2165 Store ("++++++++ NoSave Test", Debug) 2166 2167 Name (WRD, 0x1234) 2168 2169 // 2170 // Begin test of nested operators without saving results 2171 // 2172 2173 // Test If (And ()) with no save of And result 2174 If (And (3, 1, )) 2175 { 2176 Store (1, WRD) // pass -- just do something 2177 } 2178 else 2179 { 2180 Return (1) // fail 2181 } 2182 2183 // Test If (And ()) with no save of And result 2184 If (And (4, 1, )) 2185 { 2186 Return (2) // fail 2187 } 2188 else 2189 { 2190 Store (2, WRD) // pass -- just do something 2191 } 2192 2193 2194 // Test If (NAnd ()) with no save of NAnd result 2195 If (NAnd (3, 1, )) 2196 { 2197 Store (3, WRD) // pass -- just do something 2198 } 2199 else 2200 { 2201 Return (3) // fail 2202 } 2203 2204 // Test If (NAnd ()) with no save of NAnd result 2205 If (NAnd (0xFFFFFFFF, 0xFFFFFFFF, )) 2206 { 2207 Return (4) // fail 2208 } 2209 else 2210 { 2211 Store (4, WRD) // pass -- just do something 2212 } 2213 2214 2215 // Test If (NOr ()) with no save of NOr result 2216 If (NOr (0, 1, )) 2217 { 2218 Store (5, WRD) // pass -- just do something 2219 } 2220 else 2221 { 2222 Return (5) // fail 2223 } 2224 2225 // Test If (NOr ()) with no save of NOr result 2226 If (NOr (0xFFFFFFFE, 1, )) 2227 { 2228 Return (6) // fail 2229 } 2230 else 2231 { 2232 Store (6, WRD) // pass -- just do something 2233 } 2234 2235 2236 // Test If (Not ()) with no save of Not result 2237 If (Not (1, )) 2238 { 2239 Store (7, WRD) // pass -- just do something 2240 } 2241 else 2242 { 2243 Return (7) // fail 2244 } 2245 2246 // Test If (Not ()) with no save of Not result 2247 If (Not (0xFFFFFFFF, )) 2248 { 2249 Return (8) // fail 2250 } 2251 else 2252 { 2253 Store (8, WRD) // pass -- just do something 2254 } 2255 2256 2257 // Test If (Or ()) with no save of Or result 2258 If (Or (3, 1, )) 2259 { 2260 Store (9, WRD) // pass -- just do something 2261 } 2262 else 2263 { 2264 Return (9) // fail 2265 } 2266 2267 // Test If (Or ()) with no save of Or result 2268 If (Or (0, 0, )) 2269 { 2270 Return (10) // fail 2271 } 2272 else 2273 { 2274 Store (10, WRD) // pass -- just do something 2275 } 2276 2277 2278 // Test If (XOr ()) with no save of XOr result 2279 If (XOr (3, 1, )) 2280 { 2281 Store (11, WRD) // pass -- just do something 2282 } 2283 else 2284 { 2285 Return (11) // fail 2286 } 2287 2288 // Test If (XOr ()) with no save of XOr result 2289 If (XOr (3, 3, )) 2290 { 2291 Return (12) // fail 2292 } 2293 else 2294 { 2295 Store (12, WRD) // pass -- just do something 2296 } 2297 2298 2299 // 2300 // Begin test of logical operators with no destination operands 2301 // 2302 2303 // Test If (LAnd ()) with no save of LAnd result 2304 If (LAnd (3, 3)) 2305 { 2306 Store (21, WRD) // pass -- just do something 2307 } 2308 else 2309 { 2310 Return (21) // fail 2311 } 2312 2313 // Test If (LAnd ()) with no save of LAnd result 2314 If (LAnd (3, 0)) 2315 { 2316 Return (22) // fail 2317 } 2318 else 2319 { 2320 Store (22, WRD) // pass -- just do something 2321 } 2322 2323 // Test If (LAnd ()) with no save of LAnd result 2324 If (LAnd (0, 3)) 2325 { 2326 Return (23) // fail 2327 } 2328 else 2329 { 2330 Store (23, WRD) // pass -- just do something 2331 } 2332 2333 // Test If (LAnd ()) with no save of LAnd result 2334 If (LAnd (0, 0)) 2335 { 2336 Return (24) // fail 2337 } 2338 else 2339 { 2340 Store (24, WRD) // pass -- just do something 2341 } 2342 2343 2344 // Test If (LEqual ()) with no save of LEqual result 2345 If (LEqual (3, 3)) 2346 { 2347 Store (31, WRD) // pass -- just do something 2348 } 2349 else 2350 { 2351 Return (31) // fail 2352 } 2353 2354 // Test If (LEqual ()) with no save of LEqual result 2355 If (LEqual (1, 3)) 2356 { 2357 Return (32) // fail 2358 } 2359 else 2360 { 2361 Store (32, WRD) // pass -- just do something 2362 } 2363 2364 2365 // Test If (LGreater ()) with no save of LGreater result 2366 If (LGreater (3, 1)) 2367 { 2368 Store (41, WRD) // pass -- just do something 2369 } 2370 else 2371 { 2372 Return (41) // fail 2373 } 2374 2375 // Test If (LGreater ()) with no save of LGreater result 2376 If (LGreater (4, 4)) 2377 { 2378 Return (42) // fail 2379 } 2380 else 2381 { 2382 Store (42, WRD) // pass -- just do something 2383 } 2384 2385 // Test If (LGreater ()) with no save of LGreater result 2386 If (LGreater (1, 4)) 2387 { 2388 Return (43) // fail 2389 } 2390 else 2391 { 2392 Store (43, WRD) // pass -- just do something 2393 } 2394 2395 // Test If (LGreaterEqual ()) with no save of LGreaterEqual result 2396 If (LGreaterEqual (3, 1)) 2397 { 2398 Store (44, WRD) // pass -- just do something 2399 } 2400 else 2401 { 2402 Return (44) // fail 2403 } 2404 2405 // Test If (LGreaterEqual ()) with no save of LGreaterEqual result 2406 If (LGreaterEqual (3, 3)) 2407 { 2408 Store (45, WRD) // pass -- just do something 2409 } 2410 else 2411 { 2412 Return (45) // fail 2413 } 2414 2415 // Test If (LGreaterEqual ()) with no save of LGreaterEqual result 2416 If (LGreaterEqual (3, 4)) 2417 { 2418 Return (46) // fail 2419 } 2420 else 2421 { 2422 Store (46, WRD) // pass -- just do something 2423 } 2424 2425 2426 // Test If (LLess ()) with no save of LLess result 2427 If (LLess (1, 3)) 2428 { 2429 Store (51, WRD) // pass -- just do something 2430 } 2431 else 2432 { 2433 Return (51) // fail 2434 } 2435 2436 // Test If (LLess ()) with no save of LLess result 2437 If (LLess (2, 2)) 2438 { 2439 Return (52) // fail 2440 } 2441 else 2442 { 2443 Store (52, WRD) // pass -- just do something 2444 } 2445 2446 // Test If (LLess ()) with no save of LLess result 2447 If (LLess (4, 2)) 2448 { 2449 Return (53) // fail 2450 } 2451 else 2452 { 2453 Store (53, WRD) // pass -- just do something 2454 } 2455 2456 2457 // Test If (LLessEqual ()) with no save of LLessEqual result 2458 If (LLessEqual (1, 3)) 2459 { 2460 Store (54, WRD) // pass -- just do something 2461 } 2462 else 2463 { 2464 Return (54) // fail 2465 } 2466 2467 // Test If (LLessEqual ()) with no save of LLessEqual result 2468 If (LLessEqual (2, 2)) 2469 { 2470 Store (55, WRD) // pass -- just do something 2471 } 2472 else 2473 { 2474 Return (55) // fail 2475 } 2476 2477 // Test If (LLessEqual ()) with no save of LLessEqual result 2478 If (LLessEqual (4, 2)) 2479 { 2480 Return (56) // fail 2481 } 2482 else 2483 { 2484 Store (56, WRD) // pass -- just do something 2485 } 2486 2487 2488 // Test If (LNot ()) with no save of LNot result 2489 If (LNot (0)) 2490 { 2491 Store (61, WRD) // pass -- just do something 2492 } 2493 else 2494 { 2495 Return (61) // fail 2496 } 2497 2498 // Test If (LNot ()) with no save of LNot result 2499 If (LNot (1)) 2500 { 2501 Return (62) // fail 2502 } 2503 else 2504 { 2505 Store (62, WRD) // pass -- just do something 2506 } 2507 2508 2509 // Test If (LNotEqual ()) with no save of LNotEqual result 2510 If (LNotEqual (3, 3)) 2511 { 2512 Return (63) // fail 2513 } 2514 else 2515 { 2516 Store (63, WRD) // pass -- just do something 2517 } 2518 2519 // Test If (LNotEqual ()) with no save of LNotEqual result 2520 If (LNotEqual (1, 3)) 2521 { 2522 Store (64, WRD) // pass -- just do something 2523 } 2524 else 2525 { 2526 Return (64) // fail 2527 } 2528 2529 2530 // Test If (LOr ()) with no save of LOr result 2531 If (LOr (3, 1)) 2532 { 2533 Store (71, WRD) // pass -- just do something 2534 } 2535 else 2536 { 2537 Return (71) // fail 2538 } 2539 2540 // Test If (LOr ()) with no save of LOr result 2541 If (LOr (0, 1)) 2542 { 2543 Store (72, WRD) // pass -- just do something 2544 } 2545 else 2546 { 2547 Return (72) // fail 2548 } 2549 2550 // Test If (LOr ()) with no save of LOr result 2551 If (LOr (3, 0)) 2552 { 2553 Store (73, WRD) // pass -- just do something 2554 } 2555 else 2556 { 2557 Return (73) // fail 2558 } 2559 2560 // Test If (LOr ()) with no save of LOr result 2561 If (LOr (0, 0)) 2562 { 2563 Return (74) // fail 2564 } 2565 else 2566 { 2567 Store (74, WRD) // pass -- just do something 2568 } 2569 2570 Return (0) 2571 } // TEST 2572 } // NOSV 2573 2574 2575// 2576// test IndxFld.asl 2577// 2578// IndexFld test 2579// This is just a subset of the many RegionOp/Index Field test cases. 2580// Tests index field element AccessAs macro. 2581// 2582 Device (IDXF) 2583 { // Test device name 2584 2585 OperationRegion (SIO, SystemIO, 0x100, 2) 2586 Field (SIO, ByteAcc, NoLock, Preserve) 2587 { 2588 INDX, 8, 2589 DATA, 8 2590 } 2591 IndexField (INDX, DATA, AnyAcc, NoLock, WriteAsOnes) 2592 { 2593 AccessAs (ByteAcc, 0), 2594 IFE0, 8, 2595 IFE1, 8, 2596 IFE2, 8, 2597 IFE3, 8, 2598 IFE4, 8, 2599 IFE5, 8, 2600 IFE6, 8, 2601 IFE7, 8, 2602 IFE8, 8, 2603 IFE9, 8, 2604 } 2605 2606 Method (TEST) 2607 { 2608 Store ("++++++++ IndxFld Test", Debug) 2609 2610 Store (IFE0, Local0) 2611 Store (IFE1, Local1) 2612 Store (IFE2, Local2) 2613 2614 Return (0) 2615 } // TEST 2616 } // IDXF 2617 2618// 2619// test NestdLor.asl 2620// 2621 Scope (\_SB) // System Bus 2622 { // _SB system bus 2623 2624 Name (ZER0, 0) 2625 Name (ZER1, 0) 2626 Name (ZER2, 0) 2627 Name (ONE0, 1) 2628 2629 Device (NSTL) 2630 { 2631 Method (TEST) 2632 { 2633 Store ("++++++++ NestdLor Test", Debug) 2634 2635 If (Lor (ZER0, Lor (ZER1, Lor (ZER2, ONE0)))) 2636 { // Indicate Pass 2637 Store (0x00, Local0) 2638 } 2639 2640 Else 2641 { // Indicate Fail 2642 Store (0x01, Local0) 2643 } 2644 2645 Return (Local0) 2646 } // End Method TEST 2647 } // Device NSTL 2648 } // _SB system bus 2649 2650// 2651// test RetBuf.asl 2652// 2653// Test ReturnOp(Buffer) 2654// This is required to support Control Method Batteries on 2655// Dell Latitude Laptops (e.g., CP1-A) 2656// 2657 Device (RTBF) 2658 { 2659 Method (SUBR, 1) 2660 { 2661 Return (Arg0) 2662 } 2663 2664 Method (RBUF,, Serialized) 2665 { // RBUF: Return Buffer from local variable 2666 Name (ABUF, Buffer() {"ARBITRARY_BUFFER"}) 2667 2668 // store local buffer ABUF into Local0 2669 Store (ABUF, Local0) 2670 2671 // save Local0 object type value into Local1 2672 Store (ObjectType (Local0), Local1) 2673 2674 // validate Local0 is a Buffer 2675 If (LNotEqual (Local1, 3)) // Buffer type is 3 2676 { 2677 Return (1) // failure 2678 } 2679 2680 // store value returned by control method SUBR into Local0 2681 Store (SUBR (ABUF), Local0) 2682 2683 // save Local0 object type value into Local1 2684 Store (ObjectType (Local0), Local1) 2685 2686 // validate Local0 is a Buffer 2687 If (LNotEqual (Local1, 3)) // Buffer type is 3 2688 { 2689 Return (2) // failure 2690 } 2691 2692 // allocate buffer using Local1 as buffer size (run-time evaluation) 2693 Store (5, Local1) 2694 Name (BUFR, Buffer(Local1) {}) 2695 2696 // store value returned by control method SUBR into Local0 2697 Store (SUBR (BUFR), Local0) 2698 2699 // save Local0 object type value into Local1 2700 Store (ObjectType (Local0), Local1) 2701 2702 // validate Local0 is a Buffer 2703 If (LNotEqual (Local1, 3)) // Buffer type is 3 2704 { 2705 Return (3) // failure 2706 } 2707 2708 // store BUFR Buffer into Local0 2709 Store (BUFR, Local0) 2710 2711 // save Local0 object type value into Local1 2712 Store (ObjectType (Local0), Local1) 2713 2714 // validate Local0 is a Buffer 2715 If (LNotEqual (Local1, 3)) // Buffer type is 3 2716 { 2717 Return (4) // failure 2718 } 2719 2720 2721 // return Local0 Buffer 2722 Return (Local0) 2723 } // RBUF 2724 2725 Method (TEST) 2726 { 2727 Store ("++++++++ RetBuf Test", Debug) 2728 2729 // store RBUF Buffer return value into Local0 2730 Store (RBUF, Local0) 2731 2732 // save Local0 object type value into Local1 2733 Store (ObjectType (Local0), Local1) 2734 2735 // validate Local0 is a Buffer 2736 If (LNotEqual (Local1, 3)) // Buffer type is 3 2737 { 2738 Return (10) // failure 2739 } 2740 Else 2741 { 2742 Return (0) // success 2743 } 2744 } // TEST 2745 } // RTBF 2746 2747// 2748// test RetLVal.asl 2749// 2750// Test ReturnOp(Lvalue) 2751// This is required to support _PSR on IBM ThinkPad 560D and 2752// _DCK on Toshiba Tecra 8000. 2753// 2754 2755 Device (GPE2) 2756 { 2757 Method (_L03) 2758 { 2759 Store ("Method GPE2._L03 invoked", Debug) 2760 Return () 2761 } 2762 2763 Method (_E05) 2764 { 2765 Store ("Method GPE2._E05 invoked", Debug) 2766 Return () 2767 } 2768 } 2769 2770 Device (PRW2) 2771 { 2772 Name (_PRW, Package(2) {Package(2){\GPE2, 0x05}, 3}) 2773 } 2774 2775 2776 Scope (\_GPE) 2777 { 2778 Name (ACST, 0xFF) 2779 2780 Method (_L08) 2781 { 2782 Store ("Method _GPE._L08 invoked", Debug) 2783 Return () 2784 } 2785 2786 Method (_E09) 2787 { 2788 Store ("Method _GPE._E09 invoked", Debug) 2789 Return () 2790 } 2791 2792 Method (_E11) 2793 { 2794 Store ("Method _GPE._E11 invoked", Debug) 2795 Notify (\PRW1, 2) 2796 } 2797 2798 Method (_L22) 2799 { 2800 Store ("Method _GPE._L22 invoked", Debug) 2801 Return () 2802 } 2803 2804 Method (_L33) 2805 { 2806 Store ("Method _GPE._L33 invoked", Debug) 2807 Return () 2808 } 2809 2810 Method (_E64) 2811 { 2812 Store ("Method _GPE._E64 invoked", Debug) 2813 Return () 2814 } 2815 2816 } // _GPE 2817 2818 Device (PRW1) 2819 { 2820 Name (_PRW, Package(2) {0x11, 3}) 2821 } 2822 2823 Device (PWRB) 2824 { 2825 Name (_HID, EISAID("PNP0C0C")) 2826 Name (_PRW, Package(2) {0x33, 3}) 2827 } 2828 2829 2830 Scope (\_SB) // System Bus 2831 { // _SB system bus 2832 2833 Device (ACAD) 2834 { // ACAD: AC adapter device 2835 Name (_HID, "ACPI0003") // AC adapter device 2836 2837 Name (_PCL, Package () {\_SB}) 2838 2839 OperationRegion (AREG, SystemIO, 0x0372, 2) 2840 Field (AREG, ByteAcc, NoLock, Preserve) 2841 { 2842 AIDX, 8, 2843 ADAT, 8 2844 } 2845 IndexField (AIDX, ADAT, ByteAcc, NoLock, Preserve) 2846 { 2847 , 1, // skips 2848 ACIN, 1, 2849 , 2, // skips 2850 CHAG, 1, 2851 , 3, // skips 2852 , 7, // skips 2853 ABAT, 1, 2854 } // IndexField 2855 2856 Method (_PSR) 2857 { 2858 Store (\_GPE.ACST, Local0) 2859 Store (ACIN, Local1) 2860 If (LNotEqual (\_GPE.ACST, Local1)) 2861 { 2862 Store (Local1, \_GPE.ACST) 2863 // This Notify is commented because it causes a 2864 // method error when running on a system without the 2865 // specific device. 2866 // Notify (\_SB_.ACAD, 0) 2867 } 2868 Return (Local0) 2869 } // _PSR 2870 2871 Method (_STA) 2872 { 2873 Return (0x0F) 2874 } 2875 2876 Method (_INI) 2877 { 2878 Store (ACIN, \_GPE.ACST) 2879 } 2880 } // ACAD: AC adapter device 2881 2882 // test implicit return from control method 2883 Method (DIS_, 1) 2884 { 2885 Store (Arg0, Local0) 2886 } 2887 2888 Device (RTLV) 2889 { 2890 // test implicit return inside nested if with explicit return of Lvalue 2891 Method (_DCK, 1) 2892 // Arg0: 1 == dock, 0 == undock 2893 { 2894 If (Arg0) 2895 { // dock 2896 Store (0x87, Local0) 2897 2898 If (Local0) 2899 { 2900 DIS_ (0x23) 2901 Return (1) 2902 } 2903 2904 Return (0) 2905 } // dock 2906 Else 2907 { // undock 2908 Store (Arg0, Local0) 2909 2910 If (Local0) 2911 { 2912 DIS_ (0x23) 2913 Return (1) 2914 } 2915 2916 Return (0) 2917 } // undock 2918 } // _DCK control method 2919 2920 Method (TEST) 2921 { 2922 Store ("++++++++ RetLVal Test", Debug) 2923 2924 // store _PSR return value into Local0 2925 Store (\_SB_.ACAD._PSR, Local0) 2926 2927 // save Local0 object type value into Local1 2928 Store (ObjectType (Local0), Local1) 2929 2930 // validate Local0 is a Number 2931 If (LNotEqual (Local1, 1)) // Number/Integer type is 1 2932 { 2933 Return (1) // failure 2934 } 2935 2936 // test implicit return inside nested if with explicit return of Lvalue 2937 Store (_DCK (1), Local2) 2938 2939 // save Local2 object type value into Local3 2940 Store (ObjectType (Local2), Local3) 2941 2942 // validate Local2 is a Number 2943 If (LNotEqual (Local3, 1)) // Number/Integer type is 1 2944 { 2945 Return (2) // failure 2946 } 2947 2948 If (LNotEqual (Local2, 1)) 2949 { 2950 Return (3) // failure 2951 } 2952 2953 Return (0) // success 2954 } // TEST 2955 } // RTLV 2956 } // _SB system bus 2957 2958// 2959// test RetPkg.asl 2960// 2961// Test ReturnOp(Package) 2962// This is required to support _PRT on Dell Optiplex Workstations (e.g. GX1) 2963// 2964 2965 Scope (\_SB) // System Bus 2966 { // _SB system bus 2967 Device(LNKA) 2968 { 2969 Name (_HID, EISAID("PNP0C0F")) // PCI interrupt link 2970 Name (_UID, 1) 2971 } 2972 Device(LNKB) 2973 { 2974 Name (_HID, EISAID("PNP0C0F")) // PCI interrupt link 2975 Name (_UID, 2) 2976 } 2977 Device(LNKC) 2978 { 2979 Name (_HID, EISAID("PNP0C0F")) // PCI interrupt link 2980 Name (_UID, 3) 2981 } 2982 Device(LNKD) 2983 { 2984 Name (_HID, EISAID("PNP0C0F")) // PCI interrupt link 2985 Name (_UID, 4) 2986 } 2987 2988 Device (PCI1) 2989 { // PCI1: Root PCI Bus 2990 Name (_HID, "PNP0A03") // Need _HID for root device (String format) 2991 Name (_ADR,0x00000000) 2992 Name (_CRS,0) 2993 2994 Name (_PRT, Package () 2995 { 2996 Package () {0x0004ffff, 0, LNKA, 0}, // Slot 1, INTA 2997 Package () {0x0004ffff, 1, LNKB, 0}, // Slot 1, INTB 2998 Package () {0x0004ffff, 2, LNKC, 0}, // Slot 1, INTC 2999 Package () {0x0004ffff, 3, LNKD, 0}, // Slot 1, INTD 3000 Package () {0x0005ffff, 0, \_SB_.LNKB, 0}, // Slot 2, INTA 3001 Package () {0x0005ffff, 1, \_SB_.LNKC, 0}, // Slot 2, INTB 3002 Package () {0x0005ffff, 2, \_SB_.LNKD, 0}, // Slot 2, INTC 3003 Package () {0x0006ffff, 3, \_SB_.LNKA, 0}, // Slot 2, INTD 3004 Package () {0x0006ffff, 0, LNKC, 0}, // Slot 3, INTA 3005 Package () {0x0006ffff, 1, LNKD, 0}, // Slot 3, INTB 3006 Package () {0x0006ffff, 2, LNKA, 0}, // Slot 3, INTC 3007 Package () {0x0006ffff, 3, LNKB, 0}, // Slot 3, INTD 3008 }) 3009 3010 Device (PX40) 3011 { // Map f0 space, Start PX40 3012 Name (_ADR,0x00070000) // Address+function. 3013 } 3014 } // PCI0: Root PCI Bus 3015 3016 Device (RETP) 3017 { 3018 Method (RPKG) 3019 { // RPKG: Return Package from local variable 3020 3021 // store _PRT package into Local0 3022 Store (\_SB_.PCI1._PRT, Local0) 3023 3024 // return Local0 Package 3025 Return (Local0) 3026 } // RPKG 3027 3028 Method (TEST) 3029 { 3030 Store ("++++++++ RetPkg Test", Debug) 3031 3032 // store RPKG package return value into Local0 3033 Store (RPKG, Local0) 3034 3035 // save Local0 object type value into Local1 3036 Store (ObjectType (Local0), Local1) 3037 3038 // validate Local0 is a Package 3039 If (LNotEqual (Local1, 4)) // Package type is 4 3040 { Return (1) } // failure 3041 Else 3042 { Return (0) } // success 3043 } // TEST 3044 } // RETP 3045 } // _SB_ 3046 3047// 3048// test WhileRet.asl 3049// 3050// WhileRet.asl tests a ReturnOp nested in a IfOp nested in a WhileOp. 3051// 3052 Device (WHLR) 3053 { 3054 Name (LCNT, 0) 3055 Method (WIR) 3056 { // WIR: control method that returns inside of IfOp inside of WhileOp 3057 While (LLess (LCNT, 4)) 3058 { 3059 If (LEqual (LCNT, 2)) 3060 { 3061 Return (0) 3062 } 3063 3064 Increment (LCNT) 3065 } 3066 3067 Return (LCNT) 3068 } // WIR: control method that returns inside of IfOp inside of WhileOp 3069 3070 Method (TEST) 3071 { 3072 Store ("++++++++ WhileRet Test", Debug) 3073 3074 Store (WIR, Local0) 3075 3076 Return (Local0) 3077 } // TEST 3078 } // WHLR 3079 3080// 3081// test AndOrOp.asl 3082// 3083//This code tests the bitwise AndOp and OrOp Operator terms 3084// 3085//Syntax of Andop term 3086//And - Bitwise And 3087//AndTerm := And( 3088// Source1, //TermArg=>Integer 3089// Source2, //TermArg=>Integer 3090// Result //Nothing | SuperName 3091//) => Integer 3092//Source1 and Source2 are evaluated as integer data types, 3093// a bit-wise AND is performed, and the result is optionally 3094//stored into Result. 3095// 3096// 3097//Syntax of OrOp 3098//Or - Bit-wise Or 3099//OrTerm := Or( 3100// Source1, //TermArg=>Integer 3101// Source2 //TermArg=>Integer 3102// Result //Nothing | SuperName 3103//) => Integer 3104//Source1 and Source2 are evaluated as integer data types, 3105// a bit-wide OR is performed, and the result is optionally 3106//stored in Result 3107// 3108 Device (ANDO) 3109 { 3110 OperationRegion (TMEM, SystemMemory, 0xC4, 0x02) 3111 Field (TMEM, ByteAcc, NoLock, Preserve) 3112 { 3113 , 3, 3114 TOUD, 13 3115 } 3116 3117 //Create System Memory Operation Region and field overlays 3118 OperationRegion (RAM, SystemMemory, 0x400000, 0x100) 3119 Field (RAM, AnyAcc, NoLock, Preserve) 3120 { 3121 SMDW, 32, // 32-bit DWORD 3122 SMWD, 16, // 16-bit WORD 3123 SMBY, 8, // 8-bit BYTE 3124 }// Field(RAM) 3125 3126 3127 //And with Byte Data 3128 Name (BYT1, 0xff) 3129 Name (BYT2, 0xff) 3130 Name (BRSL, 0x00) 3131 3132 //And with Word Data 3133 Name (WRD1, 0xffff) 3134 Name (WRD2, 0xffff) 3135 Name (WRSL, 0x0000) 3136 3137 //And with DWord Data 3138 Name (DWD1, 0xffffffff) 3139 Name (DWD2, 0xffffffff) 3140 Name (DRSL, 0x00000000) 3141 3142 Method (ANDP) 3143 { 3144 //Check with 1 And 1 on byte data 3145 And(BYT1, BYT2, BRSL) 3146 if(LNotEqual(BRSL,0xff)) 3147 {Return(1)} 3148 3149 //Check with 1 And 1 on Word data 3150 And(WRD1, WRD2, WRSL) 3151 if(LNotEqual(WRSL,0xffff)) 3152 { 3153 Return (1) // failure 3154 } 3155 3156 //Check with 1 And 1 Dword 3157 And(DWD1, DWD2, DRSL) 3158 if(LNotEqual(DRSL,0xffffffff)) 3159 { 3160 Return (1) // failure 3161 } 3162 3163 //Check with 0 And 0 on byte data 3164 Store(0x00,BYT1) 3165 Store(0x00,BYT2) 3166 Store(0x00,BRSL) 3167 And(BYT1, BYT2, BRSL) 3168 if(LNotEqual(BRSL,0x00)) 3169 { 3170 Return (1) // failure 3171 } 3172 3173 //Check with 0 And 0 on Word data 3174 Store (0x0000,WRD1) 3175 Store (0x0000,WRD2) 3176 Store (0x0000,WRSL) 3177 And(WRD1, WRD2, WRSL) 3178 if(LNotEqual(WRSL,0x0000)) 3179 { 3180 Return (1) // failure 3181 } 3182 3183 //Check with 0 And 0 Dword 3184 Store (0x00000000,DWD1) 3185 Store (0x00000000,DWD2) 3186 Store (0x00000000,DRSL) 3187 And(DWD1, DWD2, DRSL) 3188 if(LNotEqual(DRSL,0x00000000)) 3189 { 3190 Return (1) // failure 3191 } 3192 3193 3194 //Check with 1 And 0 on byte data 3195 Store(0x55,BYT1) 3196 Store(0xAA,BYT2) 3197 Store(0x00,BRSL) 3198 And(BYT1, BYT2, BRSL) 3199 if(LNotEqual(BRSL,0x00)) 3200 { 3201 Return (1) // failure 3202 } 3203 3204 //Check with 1 And 0 on Word data 3205 Store (0x5555,WRD1) 3206 Store (0xAAAA,WRD2) 3207 Store (0x0000,WRSL) 3208 And(WRD1, WRD2, WRSL) 3209 if(LNotEqual(WRSL,0x0000)) 3210 { 3211 Return (1) // failure 3212 } 3213 3214 //Check with 1 And 0 on Dword 3215 Store (0x55555555,DWD1) 3216 Store (0xAAAAAAAA,DWD2) 3217 Store (0x00000000,DRSL) 3218 And(DWD1, DWD2, DRSL) 3219 if(LNotEqual(DRSL,0x00000000)) 3220 { 3221 Return (1) // failure 3222 } 3223 3224 Store (0x1FFF, TOUD) 3225 Store (TOUD, Local0) 3226 if(LNotEqual(Local0,0x1FFF)) 3227 { 3228 Return (1) // failure 3229 } 3230 3231 //TBD- Do We need to check for system memory data also for each test case ?? 3232 3233 Return(0) 3234 3235 }//ANDP 3236 3237 Method (OROP) 3238 { 3239 3240 //Check with 1 Ored with 1 on byte data 3241 Store(0xff,BYT1) 3242 Store(0xff,BYT2) 3243 Store(0x00,BRSL) 3244 Or(BYT1, BYT2, BRSL) 3245 if(LNotEqual(BRSL,0xff)) 3246 { 3247 Return (1) // failure 3248 } 3249 3250 3251 //Check with 1 Ored with 1 on Word data 3252 Store(0xffff,WRD1) 3253 Store(0xffff,WRD2) 3254 Store(0x0000,WRSL) 3255 Or(WRD1, WRD2, WRSL) 3256 if(LNotEqual(WRSL,0xffff)) 3257 { 3258 Return (1) // failure 3259 } 3260 3261 //Check with 1 Ored with 1 on Dword data 3262 Store(0xffffffff,DWD1) 3263 Store(0xffffffff,DWD2) 3264 Store(0x00000000,DRSL) 3265 Or(DWD1, DWD2, DRSL) 3266 if(LNotEqual(DRSL,0xffffffff)) 3267 { 3268 Return (1) // failure 3269 } 3270 3271 //Check with 0 Ored with 0 on byte data 3272 Store(0x00,BYT1) 3273 Store(0x00,BYT2) 3274 Store(0x00,BRSL) 3275 Or(BYT1, BYT2, BRSL) 3276 if(LNotEqual(BRSL,0x00)) 3277 { 3278 Return (1) // failure 3279 } 3280 3281 //Check with 0 Ored with 0 on Word data 3282 Store (0x0000,WRD1) 3283 Store (0x0000,WRD2) 3284 Store (0x0000,WRSL) 3285 Or(WRD1, WRD2, WRSL) 3286 if(LNotEqual(WRSL,0x0000)) 3287 { 3288 Return (1) // failure 3289 } 3290 3291 //Check with 0 Ored with 0 Dword data 3292 Store (0x00000000,DWD1) 3293 Store (0x00000000,DWD2) 3294 Store (0x00000000,DRSL) 3295 Or(DWD1, DWD2, DRSL) 3296 if(LNotEqual(DRSL,0x00000000)) 3297 { 3298 Return (1) // failure 3299 } 3300 3301 3302 //Check with 1 Ored with 0 on byte data 3303 Store(0x55,BYT1) 3304 Store(0xAA,BYT2) 3305 Store(0x00,BRSL) 3306 Or(BYT1, BYT2, BRSL) 3307 if(LNotEqual(BRSL,0xff)) 3308 { 3309 Return (1) // failure 3310 } 3311 3312 //Check with 1 Ored with 0 on Word data 3313 Store (0x5555,WRD1) 3314 Store (0xAAAA,WRD2) 3315 Store (0x0000,WRSL) 3316 Or(WRD1, WRD2, WRSL) 3317 if(LNotEqual(WRSL,0xffff)) 3318 { 3319 Return (1) // failure 3320 } 3321 3322 //Check with 1 Ored with 0 on Dword data 3323 Store (0x55555555,DWD1) 3324 Store (0xAAAAAAAA,DWD2) 3325 Store (0x00000000,DRSL) 3326 Or(DWD1, DWD2, DRSL) 3327 if(LNotEqual(DRSL,0xffffffff)) 3328 { 3329 Return (1) // failure 3330 } 3331 3332 //TBD - Do We need to check for system memory data also for each test case ?? 3333 3334 Return(0) 3335 3336 }//OROP 3337 3338 Method(TEST,, Serialized) 3339 { 3340 Store ("++++++++ AndOrOp Test", Debug) 3341 3342 Name(RSLT,1) 3343 //Call Andop method 3344 Store(ANDP,RSLT) 3345 if(LEqual(RSLT,1)) 3346 { 3347 Return (RSLT) 3348 } 3349 3350 //Call OrOp Method 3351 Store(OROP,RSLT) 3352 if(LEqual(RSLT,1)) 3353 { 3354 Return(RSLT) 3355 } 3356 3357 // 3358 // Return original conditions to allow iterative execution 3359 // 3360 Store(0xff,BYT1) 3361 Store(0xff,BYT2) 3362 Store(0x00,BRSL) 3363 Store (0xffff,WRD1) 3364 Store (0xffff,WRD2) 3365 Store (0x0000,WRSL) 3366 Store (0xffffffff,DWD1) 3367 Store (0xffffffff,DWD2) 3368 Store (0x00000000,DRSL) 3369 3370 Return(0) 3371 } //TEST 3372 } //ANDO 3373 3374// 3375// test BreakPnt.asl 3376// 3377// This code tests the BreakPoint opcode term. The syntax of BreakPoint Term is 3378// BreakPointTerm := BreakPoint 3379// Used for debugging, the Breakpoint opcode stops the execution and enters the AML debugger. 3380// In the non-debug version of the interpreter, BreakPoint is equivalent to Noop. 3381// 3382 Device (BRKP) 3383 { 3384 Name(CNT0,0) 3385 3386 Method (BK1) 3387 { 3388 BreakPoint 3389 Return(0) 3390 } 3391 3392 Method (TEST) 3393 { 3394 Store ("++++++++ BreakPnt Test", Debug) 3395 3396 Store(0,CNT0) 3397 3398 //Check BreakPoint statement 3399 While(LLess(CNT0,10)) 3400 { 3401 Increment(CNT0) 3402 } 3403 3404 //Check the BreakPoint statement 3405 If(LEqual(CNT0,10)) 3406 { 3407 // BreakPoint 3408 Return(0) 3409 } 3410 3411 //failed 3412 Return(1) 3413 } 3414 } 3415 3416// 3417// test AddSubOp.asl 3418// 3419 Device (ADSU) 3420 { 3421 // create System Memory Operation Region and field overlays 3422 OperationRegion (RAM, SystemMemory, 0x400000, 0x100) 3423 Field (RAM, AnyAcc, NoLock, Preserve) 3424 { 3425 SMDW, 32, // 32-bit DWORD 3426 SMWD, 16, // 16-bit WORD 3427 SMBY, 8, // 8-bit BYTE 3428 } // Field(RAM) 3429 3430 Method (TEST,, Serialized) 3431 { 3432 Store ("++++++++ AddSubOp Test", Debug) 3433 3434 Name (DWRD, 0x12345678) 3435 Name (WRD, 0x1234) 3436 Name (BYT, 0x12) 3437 3438 // Test AddOp with DWORD data 3439 Store (0x12345678, DWRD) 3440 Add (DWRD, 7, DWRD) 3441 If (LNotEqual (DWRD, 0x1234567F)) 3442 { Return (DWRD) } 3443 3444 // Test AddOp with WORD data 3445 Add (WRD, 5, WRD) 3446 If (LNotEqual (WRD, 0x1239)) 3447 { Return (WRD) } 3448 3449 // Test AddOp with BYTE data 3450 Add (BYT, 3, BYT) 3451 If (LNotEqual (BYT, 0x15)) 3452 { Return (BYT) } 3453 3454 // Test SubtractOp with DWORD data 3455 Subtract (DWRD, 7, DWRD) 3456 If (LNotEqual (DWRD, 0x12345678)) 3457 { Return (DWRD) } 3458 3459 // Test SubtractOp with WORD data 3460 Subtract (WRD, 3, WRD) 3461 If (LNotEqual (WRD, 0x1236)) 3462 { Return (WRD) } 3463 3464 // Test SubtractOp with BYTE data 3465 Subtract (BYT, 3, BYT) 3466 If (LNotEqual (BYT, 0x12)) 3467 { Return (BYT) } 3468 3469 3470 // test AddOp with DWORD SystemMemory OpRegion 3471 Store (0x01234567, SMDW) 3472 Add (SMDW, 8, SMDW) 3473 If (LNotEqual (SMDW, 0x0123456F)) 3474 { Return (SMDW) } 3475 3476 // test SubtractOp with DWORD SystemMemory OpRegion 3477 Subtract (SMDW, 7, SMDW) 3478 If (LNotEqual (SMDW, 0x01234568)) 3479 { Return (SMDW) } 3480 3481 3482 // test AddOp with WORD SystemMemory OpRegion 3483 Store (0x0123, SMWD) 3484 Add (SMWD, 6, SMWD) 3485 If (LNotEqual (SMWD, 0x0129)) 3486 { Return (SMWD) } 3487 3488 // test SubtractOp with WORD SystemMemory OpRegion 3489 Subtract (SMWD, 5, SMWD) 3490 If (LNotEqual (SMWD, 0x0124)) 3491 { Return (SMWD) } 3492 3493 3494 // test AddOp with BYTE SystemMemory OpRegion 3495 Store (0x01, SMBY) 3496 Add (SMBY, 4, SMBY) 3497 If (LNotEqual (SMBY, 0x05)) 3498 { Return (SMBY) } 3499 3500 // test SubtractOp with BYTE SystemMemory OpRegion 3501 Subtract (SMBY, 3, SMBY) 3502 If (LNotEqual (SMBY, 0x02)) 3503 { Return (SMBY) } 3504 3505 Return (0) 3506 } // TEST 3507 } // ADSU 3508 3509// 3510// test IncDecOp.asl 3511// 3512 Device (INDC) 3513 { 3514 // create System Memory Operation Region and field overlays 3515 OperationRegion (RAM, SystemMemory, 0x400000, 0x100) 3516 Field (RAM, AnyAcc, NoLock, Preserve) 3517 { 3518 SMDW, 32, // 32-bit DWORD 3519 SMWD, 16, // 16-bit WORD 3520 SMBY, 8, // 8-bit BYTE 3521 } // Field(RAM) 3522 3523 Method (TEST,, Serialized) 3524 { 3525 Store ("++++++++ IncDecOp Test", Debug) 3526 3527 Name (DWRD, 0x12345678) 3528 Name (WRD, 0x1234) 3529 Name (BYT, 0x12) 3530 3531 // Test IncrementOp with DWORD data 3532 Store (0x12345678, DWRD) 3533 Increment (DWRD) 3534 If (LNotEqual (DWRD, 0x12345679)) 3535 { Return (DWRD) } 3536 3537 // Test IncrementOp with WORD data 3538 Increment (WRD) 3539 If (LNotEqual (WRD, 0x1235)) 3540 { Return (WRD) } 3541 3542 // Test IncrementOp with BYTE data 3543 Increment (BYT) 3544 If (LNotEqual (BYT, 0x13)) 3545 { Return (BYT) } 3546 3547 // Test DecrementOp with DWORD data 3548 Decrement (DWRD) 3549 If (LNotEqual (DWRD, 0x12345678)) 3550 { Return (DWRD) } 3551 3552 // Test DecrementOp with WORD data 3553 Decrement (WRD) 3554 If (LNotEqual (WRD, 0x1234)) 3555 { Return (WRD) } 3556 3557 // Test DecrementOp with BYTE data 3558 Decrement (BYT) 3559 If (LNotEqual (BYT, 0x12)) 3560 { Return (BYT) } 3561 3562 3563 // test IncrementOp with DWORD SystemMemory OpRegion 3564 Store (0x01234567, SMDW) 3565 Increment (SMDW) 3566 If (LNotEqual (SMDW, 0x01234568)) 3567 { Return (SMDW) } 3568 3569 // test DecrementOp with DWORD SystemMemory OpRegion 3570 Decrement (SMDW) 3571 If (LNotEqual (SMDW, 0x01234567)) 3572 { Return (SMDW) } 3573 3574 3575 // test IncrementOp with WORD SystemMemory OpRegion 3576 Store (0x0123, SMWD) 3577 Increment (SMWD) 3578 If (LNotEqual (SMWD, 0x0124)) 3579 { Return (SMWD) } 3580 3581 // test DecrementOp with WORD SystemMemory OpRegion 3582 Decrement (SMWD) 3583 If (LNotEqual (SMWD, 0x0123)) 3584 { Return (SMWD) } 3585 3586 3587 // test IncrementOp with BYTE SystemMemory OpRegion 3588 Store (0x01, SMBY) 3589 Increment (SMBY) 3590 If (LNotEqual (SMBY, 0x02)) 3591 { Return (SMBY) } 3592 3593 // test DecrementOp with BYTE SystemMemory OpRegion 3594 Decrement (SMBY) 3595 If (LNotEqual (SMBY, 0x01)) 3596 { Return (SMBY) } 3597 3598 Return (0) 3599 } // TEST 3600 } // INDC 3601 3602// 3603// test LOps.asl 3604// 3605//This source tests all the logical operators. Logical operators in ASL are as follows. 3606//LAnd, LEqual, LGreater, LLess, LNot, LNotEqual, LOr. 3607// Success will return 0 and failure will return a non zero number. Check the source code for 3608// non zero number to find where the test failed 3609 3610 Device (LOPS) 3611 { 3612 //Create System Memory Operation Region and field overlays 3613 OperationRegion (RAM, SystemMemory, 0x400000, 0x100) 3614 Field (RAM, AnyAcc, NoLock, Preserve) 3615 { 3616 SMDW, 32, // 32-bit DWORD 3617 SMWD, 16, // 16-bit WORD 3618 SMBY, 8, // 8-bit BYTE 3619 }// Field(RAM) 3620 3621 //And with Byte Data 3622 Name (BYT1, 0xff) 3623 Name (BYT2, 0xff) 3624 Name (BRSL, 0x00) 3625 3626 //And with Word Data 3627 Name (WRD1, 0xffff) 3628 Name (WRD2, 0xffff) 3629 Name (WRSL, 0x0000) 3630 3631 //And with DWord Data 3632 Name (DWD1, 0xffffffff) 3633 Name (DWD2, 0xffffffff) 3634 Name (DRSL, 0x00000000) 3635 3636 Name(RSLT,1) 3637 3638 Method (ANDL,2) // Test Logical And 3639 { 3640 //test with the arguments passed 3641 if(LEqual(Arg0,Arg1)) 3642 { Store(LAnd(Arg0,Arg1),RSLT) 3643 if(LNotEqual(Ones,RSLT)) 3644 {Return(11)} 3645 } 3646 3647 //test with he locals 3648 Store(Arg0,Local0) 3649 Store(Arg1,Local1) 3650 3651 if(LEqual(Local0,Local1)) 3652 { 3653 Store(LAnd(Local0,Local1),RSLT) 3654 if(LNotEqual(Ones,RSLT)) 3655 {Return(12)} 3656 } 3657 3658 //test with BYTE data 3659 if(LEqual(BYT1,BYT2)) 3660 { Store(LAnd(BYT1,BYT2),BRSL) 3661 if(LNotEqual(Ones,BRSL)) 3662 {Return(13)} 3663 } 3664 3665 //test with WORD data 3666 if(LEqual(WRD1,WRD2)) 3667 { Store(LAnd(WRD1,WRD2),WRSL) 3668 if(LNotEqual(Ones,WRSL)) 3669 {Return(14)} 3670 } 3671 3672 //test with DWORD data 3673 if(LEqual(DWD1,DWD2)) 3674 { Store(LAnd(DWD1,DWD2),DRSL) 3675 if(LNotEqual(Ones,DRSL)) 3676 {Return(15)} 3677 } 3678 3679 //Test for system memory data for each test case. 3680 3681 Store(0xff,BYT1) 3682 Store(0xff,SMBY) 3683 Store(0x00,BRSL) 3684 3685 //test with BYTE system memory data 3686 if(LEqual(BYT1,SMBY)) 3687 { Store(LAnd(BYT1,SMBY),BRSL) 3688 if(LNotEqual(Ones,BRSL)) 3689 {Return(16)} 3690 } 3691 3692 Store (0xffff,WRD1) 3693 Store(0xffff,SMWD) 3694 Store(0x0000,WRSL) 3695 //test with WORD system memory data 3696 if(LEqual(WRD1,SMWD)) 3697 { Store(LAnd(WRD1,SMWD),WRSL) 3698 if(LNotEqual(Ones,WRSL)) 3699 {Return(17)} 3700 } 3701 3702 Store(0x000000,DRSL) 3703 Store (0xffffff,DWD1) 3704 Store(0xffffff,SMDW) 3705 3706 //test with DWORD system memory data 3707 if(LEqual(DWD1,SMDW)) 3708 { Store(LAnd(DWD1,SMDW),DRSL) 3709 if(LNotEqual(Ones,DRSL)) 3710 {Return(18)} 3711 } 3712 3713 Return(0) 3714 3715 }//ANDL 3716 3717 //Test the LOr Operator 3718 3719 Method (ORL_,2) 3720 {//ORL_ 3721 3722 //test with the arguments passed 3723 if(LEqual(Arg0,Arg1)) 3724 { 3725 Store(LOr(Arg0,Arg1),RSLT) 3726 if(LNotEqual(Ones,RSLT)) 3727 { 3728 Return(21) 3729 } 3730 } 3731 3732 //test with he locals 3733 Store(Arg0,Local0) 3734 Store(Arg1,Local1) 3735 3736 if(LEqual(Local0,Local1)) 3737 { 3738 Store(LOr(Local0,Local1),RSLT) 3739 if(LNotEqual(Ones,RSLT)) 3740 {Return(22)} 3741 } 3742 3743 //Check with 1 LOred with 0 on byte data 3744 Store(0xff,BYT1) 3745 Store(0x00,BYT2) 3746 Store(0x00,BRSL) 3747 3748 if(LNotEqual(BYT1, BYT2)) 3749 { 3750 Store(LOr(BYT1, BYT2), BRSL) 3751 if(LNotEqual(Ones,BRSL)) 3752 {Return(23)} 3753 } 3754 3755 //Check with 1 LOred with 0 on WORD data 3756 Store(0xffff,WRD1) 3757 Store(0x0000,WRD2) 3758 Store(0x0000,WRSL) 3759 3760 if(LNotEqual(WRD1, WRD2)) 3761 { 3762 Store(LOr(WRD1, WRD2), WRSL) 3763 if(LNotEqual(Ones,WRSL)) 3764 {Return(24)} 3765 } 3766 3767 //Check with 1 LOred with 0 on DWORD data 3768 Store(0xffffffff,DWD1) 3769 Store(0x00000000,DWD2) 3770 Store(0x00000000,DRSL) 3771 3772 if(LNotEqual(DWD1, DWD2)) 3773 { 3774 Store(LOr(DWD1, DWD2), DRSL) 3775 if(LNotEqual(Ones,DRSL)) 3776 {Return(25)} 3777 } 3778 3779 Store(0x00,BYT1) 3780 Store(0xff,SMBY) 3781 Store(0x00,BRSL) 3782 3783 //test with BYTE system memory data 3784 if(LEqual(BYT1,SMBY)) 3785 { Store(LOr(BYT1,SMBY),BRSL) 3786 if(LNotEqual(Ones,BRSL)) 3787 {Return(26)} 3788 } 3789 3790 Store (0x0000,WRD1) 3791 Store(0xffff,SMWD) 3792 Store(0x0000,WRSL) 3793 3794 //test with WORD system memory data 3795 if(LEqual(WRD1,SMWD)) 3796 { Store(LOr(WRD1,SMWD),WRSL) 3797 if(LNotEqual(Ones,WRSL)) 3798 {Return(27)} 3799 } 3800 3801 3802 Store(0x00000000,DWD1) 3803 Store(0xffffffff,SMDW) 3804 Store(0x00000000,DRSL) 3805 3806 //test with DWORD system memory data 3807 if(LEqual(DWD1,SMDW)) 3808 { Store(LAnd(DWD1,SMDW),DRSL) 3809 if(LNotEqual(Ones,DRSL)) 3810 {Return(28)} 3811 } 3812 Return(0) 3813 3814 }//ORL_ 3815 3816 //This method tests LGreater and LNot operator 3817 Method(LSGR,2) 3818 {//LSGR 3819 3820 //Test on arguements passed 3821 3822 //in test data, Arg1 > Arg0 3823 if(LEqual(Ones,LNot(LGreater(Arg1,Arg0)))) 3824 {Return(31)} 3825 3826 //test LLessEqual 3827 if(LEqual(Ones,LNot(LGreaterEqual(Arg1,Arg0)))) 3828 {Return(32)} 3829 3830 if(LEqual(Ones,LLess(Arg1,Arg0))) 3831 {Return(33)} 3832 3833 //test LLessEqual 3834 if(LEqual(Ones,LLessEqual(Arg1,Arg0))) 3835 {Return(34)} 3836 3837 Store(Arg0,Local0) 3838 Store(Arg1,Local1) 3839 3840 //test with the locals 3841 if(LNot(LGreater(Local1,Local0))) 3842 {Return(35)} 3843 3844 //test on Byte data 3845 Store(0x12,BYT1) 3846 Store(0x21,BYT2) 3847 3848 if(LNot(LGreater(BYT2,BYT1))) 3849 {Return(36)} 3850 3851 if(LNot(LLess(BYT1,BYT2))) 3852 {Return(37)} 3853 3854 //test LGreaterEqual with byte data 3855 if(LNot(LGreaterEqual(BYT2,BYT1))) 3856 {Return(38)} 3857 3858 //test LLessEqual byte data 3859 if(LNot(LLessEqual(BYT1,BYT2))) 3860 {Return(39)} 3861 3862 3863 //test on Word data 3864 Store(0x1212,WRD1) 3865 Store(0x2121,WRD2) 3866 3867 if(LNot(LGreater(WRD2,WRD1))) 3868 {Return(310)} 3869 3870 if(LNot(LLess(WRD1,WRD2))) 3871 {Return(311)} 3872 3873 //Test LGreaterEqual with Word Data 3874 if(LNot(LGreaterEqual(WRD2,WRD1))) 3875 {Return(312)} 3876 3877 3878 //Test LLessEqual with Word Data 3879 if(LNot(LLessEqual(WRD1,WRD2))) 3880 {Return(313)} 3881 3882 //test on DWord data 3883 Store(0x12121212,DWD1) 3884 Store(0x21212121,DWD2) 3885 3886 if(LNot(LGreater(DWD2,DWD1))) 3887 {Return(314)} 3888 3889 if(LNot(LLess(DWD1,DWD2))) 3890 {Return(315)} 3891 3892 3893 //Test LGreaterEqual with Dword 3894 if(LNot(LGreaterEqual(DWD2,DWD1))) 3895 {Return(316)} 3896 3897 //Test LLessEqual DWord 3898 if(LNot(LLessEqual(DWD1,DWD2))) 3899 {Return(317)} 3900 3901 Return(0) 3902 }//LSGR 3903 3904 //The test method 3905 Method(TEST) 3906 { 3907 Store ("++++++++ LOps Test", Debug) 3908 3909 Store(0,RSLT) 3910 //Call LAndOp method 3911 Store(ANDL(2,2),RSLT) 3912 if(LNotEqual(RSLT,0)) 3913 {Return(RSLT)} 3914 3915 //Call LOrOp Method 3916 Store(ORL_(5,5),RSLT) 3917 if(LNotEqual(RSLT,0)) 3918 {Return(RSLT)} 3919 3920 //Call LSGR Method 3921 Store(LSGR(5,7),RSLT) 3922 if(LNotEqual(RSLT,0)) 3923 {Return(RSLT)} 3924 3925 Return(0) 3926 }//TEST 3927 }//LOPS 3928 3929// 3930// test FdSetOps.asl 3931// 3932// FindSetLeftBit - Find Set Left Bit 3933// FindSetLeftBitTerm := FindSetLeftBit 3934// ( Source, //TermArg=>Integer 3935// Result //Nothing | SuperName 3936// ) => Integer 3937// Source is evaluated as integer data type, and the one-based bit location of 3938// the first MSb (most significant set bit) is optionally stored into Result. 3939// The result of 0 means no bit was set, 1 means the left-most bit set is the 3940// first bit, 2 means the left-most bit set is the second bit, and so on. 3941// FindSetRightBit - Find Set Right Bit 3942 3943// FindSetRightBitTerm := FindSetRightBit 3944// ( Source, //TermArg=>Integer 3945// Result //Nothing | SuperName 3946// ) => Integer 3947// Source is evaluated as integer data type, and the one-based bit location of 3948// the most LSb (least significant set bit) is optionally stored in Result. 3949// The result of 0 means no bit was set, 32 means the first bit set is the 3950// 32nd bit, 31 means the first bit set is the 31st bit, and so on. 3951 3952// If the Control method is success Zero is returned. Otherwise a non-zero 3953// number is returned. 3954// 3955 Device (FDSO) 3956 { // FDSO 3957 3958 // Create System Memory Operation Region and field overlays 3959 OperationRegion (RAM, SystemMemory, 0x400000, 0x100) 3960 Field (RAM, AnyAcc, NoLock, Preserve) 3961 { 3962 SMDW, 32, // 32-bit DWORD 3963 SMWD, 16, // 16-bit WORD 3964 SMBY, 8, // 8-bit BYTE 3965 } // Field(RAM) 3966 3967 // Byte Data 3968 Name (BYT1, 1) 3969 Name (BRSL, 0x00) 3970 3971 // Word Data 3972 Name (WRD1, 0x100) 3973 Name (WRSL, 0x0000) 3974 3975 // DWord Data 3976 Name (DWD1, 0x10000) 3977 Name (DRSL, 0x00000000) 3978 Name (RSLT, 1) 3979 Name (CNTR, 1) 3980 3981 Method (SHFT,2) 3982 // Arg0 is the actual data and Arg1 is the bit position 3983 { // SHFT 3984 Store (Arg0, Local0) 3985 Store (Arg1, Local1) 3986 3987 FindSetLeftBit (Arg0, BRSL) 3988 If (LNotEqual (BRSL, Arg1)) 3989 { Return (0x11) } 3990 If (LNotEqual (Arg0, Local0)) 3991 { Return (0x12) } 3992 3993 FindSetLeftBit (Local0, BRSL) 3994 If (LNotEqual (BRSL, Local1)) 3995 { Return (0x13) } 3996 If (LNotEqual (Arg0, Local0)) 3997 { Return (0x14) } 3998 3999 // test the byte value for SetLeftBit 4000 Store (7, BYT1) 4001 FindSetLeftBit (BYT1, BRSL) 4002 If (LNotEqual (BRSL, 3)) 4003 { Return (0x15) } 4004 If (LNotEqual (BYT1, 7)) 4005 { Return (0x16) } 4006 4007 Store (1, BYT1) 4008 Store (1, CNTR) 4009 While (LLessEqual (CNTR, 8)) 4010 { // FindSetLeftBit check loop for byte data 4011 FindSetLeftBit (BYT1, BRSL) 4012 If (LNotEqual (BRSL, CNTR)) 4013 { Return (0x17) } 4014 4015 // Shift the bits to check the same 4016 ShiftLeft (BYT1, 1, BYT1) 4017 Increment (CNTR) 4018 } // FindSetLeftBit check loop for byte data 4019 4020 4021 // Check BYTE value for SetRightBit 4022 Store (7, BYT1) 4023 FindSetRightBit (BYT1, BRSL) 4024 If (LNotEqual (BRSL, 1)) 4025 { Return (0x21) } 4026 If (LNotEqual (BYT1, 7)) 4027 { Return (0x22) } 4028 4029 Store (1, CNTR) 4030 Store (0xFF, BYT1) 4031 While (LLessEqual (CNTR, 8)) 4032 { // FindSetRightBit check loop for byte data 4033 FindSetRightBit (BYT1, BRSL) 4034 If (LNotEqual (BRSL, CNTR)) 4035 { Return (0x23) } 4036 4037 ShiftLeft (BYT1, 1, BYT1) 4038 Increment (CNTR) 4039 } // FindSetRightBit check loop for byte data 4040 4041 4042 // Test Word value for SetLeftBit 4043 Store (9, CNTR) 4044 Store (0x100, WRD1) 4045 While (LLessEqual (CNTR, 16)) 4046 { 4047 // FindSetLeftBit check loop for Word data 4048 FindSetLeftBit (WRD1, WRSL) 4049 If (LNotEqual (WRSL, CNTR)) 4050 { Return (0x31) } 4051 4052 // Shift the bits to check the same 4053 ShiftLeft (WRD1, 1, WRD1) 4054 Increment (CNTR) 4055 } // FindSetLeftBit check loop for Word data 4056 4057 // Check Word value for SetRightBit 4058 Store (9, CNTR) 4059 Store (0xFF00, WRD1) 4060 While (LLessEqual (CNTR, 16)) 4061 { 4062 // FindSetRightBit check loop for Word data 4063 FindSetRightBit (WRD1, WRSL) 4064 If (LNotEqual (WRSL, CNTR)) 4065 { Return (0x32) } 4066 4067 ShiftLeft (WRD1, 1, WRD1) 4068 Increment (CNTR) 4069 } // FindSetRightBit check loop for Word data 4070 4071 // Test the DWord value for SetLeftBit 4072 Store (17, CNTR) 4073 Store (0x10000, DWD1) 4074 While (LLessEqual (CNTR, 32)) 4075 { 4076 // FindSetLeftBit check loop for Dword 4077 FindSetLeftBit (DWD1, DRSL) 4078 If (LNotEqual (DRSL, CNTR)) 4079 { Return (0x41) } 4080 4081 // Shift the bits to check the same 4082 ShiftLeft (DWD1, 1, DWD1) 4083 Increment (CNTR) 4084 } // FindSetLeftBit check loop for Dword 4085 4086 // Check DWord value for SetRightBit 4087 Store (17, CNTR) 4088 Store (0xFFFF0000, DWD1) 4089 While (LLessEqual (CNTR, 32)) 4090 { // FindSetRightBit Check loop for DWORD 4091 FindSetRightBit (DWD1, DRSL) 4092 If (LNotEqual (DRSL, CNTR)) 4093 { Return (0x42) } 4094 4095 ShiftLeft (DWD1, 1, DWD1) 4096 Increment (CNTR) 4097 } // FindSetRightBit Check loop for DWORD 4098 4099 Return (0) 4100 } // SHFT 4101 4102 // Test method called from amlexec 4103 Method (TEST) 4104 { // TEST 4105 4106 Store ("++++++++ FdSetOps Test", Debug) 4107 4108 Store (SHFT (0x80, 8), RSLT) 4109 If (LNotEqual (RSLT, 0)) 4110 { Return (RSLT) } 4111 4112 Return (0) // pass 4113 } // TEST 4114 } // Device FDSO 4115 4116// 4117// test MulDivOp.asl 4118// 4119 Device (MLDV) 4120 { 4121 // create System Memory Operation Region and field overlays 4122 OperationRegion (RAM, SystemMemory, 0x400000, 0x100) 4123 Field (RAM, AnyAcc, NoLock, Preserve) 4124 { 4125 SMDW, 32, // 32-bit DWORD 4126 SMWD, 16, // 16-bit WORD 4127 SMBY, 8, // 8-bit BYTE 4128 } // Field(RAM) 4129 4130 Method (TEST,, Serialized) 4131 { 4132 Store ("++++++++ MulDivOp Test", Debug) 4133 4134 Name (RMDR, 0) 4135 Name (DWRD, 0x12345678) 4136 Name (WRD, 0x1234) 4137 Name (BYT, 0x12) 4138 4139 // Test MultiplyOp with DWORD data 4140 Store (0x12345678, DWRD) 4141 Multiply (DWRD, 3, DWRD) 4142 If (LNotEqual (DWRD, 0x369D0368)) 4143 { Return (DWRD) } 4144 4145 // Test MultiplyOp with WORD data 4146 Multiply (WRD, 4, WRD) 4147 If (LNotEqual (WRD, 0x48D0)) 4148 { Return (WRD) } 4149 4150 // Test MultiplyOp with BYTE data 4151 Multiply (BYT, 5, BYT) 4152 If (LNotEqual (BYT, 0x5A)) 4153 { Return (BYT) } 4154 4155 // Test DivideOp with DWORD data 4156 Divide (DWRD, 3, DWRD, RMDR) 4157 If (LNotEqual (DWRD, 0x12345678)) 4158 { Return (DWRD) } 4159 If (LNotEqual (RMDR, 0)) 4160 { Return (RMDR) } 4161 4162 // Test DivideOp with WORD data 4163 Divide (WRD, 4, WRD, RMDR) 4164 If (LNotEqual (WRD, 0x1234)) 4165 { Return (WRD) } 4166 If (LNotEqual (RMDR, 0)) 4167 { Return (RMDR) } 4168 4169 // Test DivideOp with BYTE data 4170 Divide (BYT, 5, BYT, RMDR) 4171 If (LNotEqual (BYT, 0x12)) 4172 { Return (BYT) } 4173 If (LNotEqual (RMDR, 0)) 4174 { Return (RMDR) } 4175 4176 4177 // test MultiplyOp with DWORD SystemMemory OpRegion 4178 Store (0x01234567, SMDW) 4179 Multiply (SMDW, 2, SMDW) 4180 If (LNotEqual (SMDW, 0x02468ACE)) 4181 { Return (SMDW) } 4182 4183 // test DivideOp with DWORD SystemMemory OpRegion 4184 Divide (SMDW, 3, SMDW, RMDR) 4185 If (LNotEqual (SMDW, 0x00C22E44)) 4186 { Return (SMDW) } 4187 If (LNotEqual (RMDR, 2)) 4188 { Return (RMDR) } 4189 4190 4191 // test MultiplyOp with WORD SystemMemory OpRegion 4192 Store (0x0123, SMWD) 4193 Multiply (SMWD, 3, SMWD) 4194 If (LNotEqual (SMWD, 0x369)) 4195 { Return (SMWD) } 4196 4197 // test DivideOp with WORD SystemMemory OpRegion 4198 Divide (SMWD, 2, SMWD, RMDR) 4199 If (LNotEqual (SMWD, 0x01B4)) 4200 { Return (SMWD) } 4201 If (LNotEqual (RMDR, 1)) 4202 { Return (RMDR) } 4203 4204 4205 // test MultiplyOp with BYTE SystemMemory OpRegion 4206 Store (0x01, SMBY) 4207 Multiply (SMBY, 7, SMBY) 4208 If (LNotEqual (SMBY, 0x07)) 4209 { Return (SMBY) } 4210 4211 // test DivideOp with BYTE SystemMemory OpRegion 4212 Divide (SMBY, 4, SMBY, RMDR) 4213 If (LNotEqual (SMBY, 0x01)) 4214 { Return (SMBY) } 4215 If (LNotEqual (RMDR, 3)) 4216 { Return (RMDR) } 4217 4218 Return (0) 4219 } // TEST 4220 } // MLDV 4221 4222// 4223// test NBitOps.asl 4224// 4225//NAnd - Bit-wise NAnd 4226//NAndTerm := NAnd( 4227// Source1, //TermArg=>Integer 4228// Source2 //TermArg=>Integer 4229// Result //Nothing | SuperName 4230//) => Integer 4231//Source1 and Source2 are evaluated as integer data types, a bit-wise NAND is performed, and the result is optionally 4232//stored in Result. 4233 4234//NOr - Bitwise NOr 4235//NOrTerm := NOr( 4236// Source1, //TermArg=>Integer 4237// Source2 //TermArg=>Integer 4238// Result //Nothing | SuperName 4239//) => Integer 4240//Source1 and Source2 are evaluated as integer data types, a bit-wise NOR is performed, and the result is optionally 4241//stored in Result. 4242// Not - Not 4243//NotTerm := Not( 4244// Source, //TermArg=>Integer 4245// Result //Nothing | SuperName 4246//) => Integer 4247//Source1 is evaluated as an integer data type, a bit-wise NOT is performed, and the result is optionally stored in 4248//Result. 4249 4250//If the Control method is success Zero is returned else a non-zero number is returned 4251 4252 Device (NBIT) 4253 {//NBIT 4254 4255 //Create System Memory Operation Region and field overlays 4256 OperationRegion (RAM, SystemMemory, 0x400000, 0x100) 4257 Field (RAM, AnyAcc, NoLock, Preserve) 4258 { 4259 SMDW, 32, // 32-bit DWORD 4260 SMWD, 16, // 16-bit WORD 4261 SMBY, 8, // 8-bit BYTE 4262 }// Field(RAM) 4263 4264 4265 //And with Byte Data 4266 Name (BYT1, 0xff) 4267 Name (BYT2, 0xff) 4268 Name (BRSL, 0x00) 4269 4270 //And with Word Data 4271 Name (WRD1, 0xffff) 4272 Name (WRD2, 0xffff) 4273 Name (WRSL, 0x0000) 4274 4275 //And with DWord Data 4276 Name (DWD1, 0xffffffff) 4277 Name (DWD2, 0xffffffff) 4278 Name (DRSL, 0x00000000) 4279 Name(RSLT,1) 4280 4281 4282 Name(ARSL,0x00) 4283 Name(LRSL,0x00) 4284 4285 Method(NNDB,2) 4286 {//NNDB 4287 4288 Store(0xffffffff,SMDW) 4289 Store(0xffff,SMWD) 4290 Store(0xff,SMBY) 4291 4292 4293 NAnd(Arg0,Arg1,ARSL) 4294 if(LNotEqual(ARSL,0xfffffffd)) 4295 {Return(11)} 4296 4297 Store(Arg0,local0) 4298 Store(Arg1,Local1) 4299 4300 NAnd(Local0,Local1,LRSL) 4301 if(LNotEqual(LRSL,0xfffffffd)) 4302 {Return(12)} 4303 4304 4305 //Byte data 4306 NAnd(BYT1,BYT2,BRSL) 4307 if(LNotEqual(BRSL,0xffffff00)) 4308 {Return(13)} 4309 4310 //Word Data 4311 NAnd(WRD1,WRD2,WRSL) 4312 if(LNotEqual(WRSL,0xffff0000)) 4313 {Return(14)} 4314 4315 //DWord Data 4316 NAnd(DWD1,DWD2,DRSL) 4317 if(LNotEqual(DRSL,0x00000000)) 4318 {Return(15)} 4319 4320 //Byte data 4321 NAnd(SMBY,0xff,BRSL) 4322 if(LNotEqual(BRSL,0xffffff00)) 4323 {Return(16)} 4324 4325 //Word Data 4326 NAnd(SMWD,0xffff,WRSL) 4327 if(LNotEqual(WRSL,0xffff0000)) 4328 {Return(17)} 4329 4330 //DWord Data 4331 NAnd(SMDW,0xffffffff,DRSL) 4332 if(LNotEqual(DRSL,0x00000000)) 4333 {Return(18)} 4334 4335 Return(0) 4336 4337 }//NNDB 4338 4339 Method(NNOR,2) 4340 {//NNOR 4341 4342 NOr(Arg0,Arg1,ARSL) 4343 if(LNotEqual(ARSL,0xfffffffd)) 4344 {Return(21)} 4345 4346 Store(Arg0,local0) 4347 Store(Arg1,Local1) 4348 4349 NOr(Local0,Local1,LRSL) 4350 if(LNotEqual(LRSL,0xfffffffd)) 4351 {Return(22)} 4352 4353 4354 //Byte data 4355 NOr(BYT1,BYT2,BRSL) 4356 if(LNotEqual(BRSL,0xffffff00)) 4357 {Return(23)} 4358 4359 //Word Data 4360 NOr(WRD1,WRD2,WRSL) 4361 if(LNotEqual(WRSL,0xffff0000)) 4362 {Return(24)} 4363 4364 //DWord Data 4365 NOr(DWD1,DWD2,DRSL) 4366 if(LNotEqual(DRSL,0x00000000)) 4367 {Return(25)} 4368 4369 //System Memory Byte data 4370 NOr(SMBY,0xff,BRSL) 4371 if(LNotEqual(BRSL,0xffffff00)) 4372 {Return(26)} 4373 4374 //System Memory Word Data 4375 NOr(SMWD,0xffff,WRSL) 4376 if(LNotEqual(WRSL,0xffff0000)) 4377 {Return(27)} 4378 4379 //System Memory DWord Data 4380 NOr(SMDW,0xffffffff,DRSL) 4381 if(LNotEqual(DRSL,0x00000000)) 4382 {Return(28)} 4383 4384 Return(0) 4385 4386 }//NNOR 4387 4388 Method(NNOT,2) 4389 {//NNOT 4390 4391 Or(Arg0,Arg1,ARSL) 4392 Not(ARSL,ARSL) 4393 if(LNotEqual(ARSL,0xfffffffd)) 4394 {Return(31)} 4395 4396 Store(Arg0,local0) 4397 Store(Arg1,Local1) 4398 4399 Or(Local0,Local1,LRSL) 4400 Not(LRSL,LRSL) 4401 if(LNotEqual(LRSL,0xfffffffd)) 4402 {Return(32)} 4403 4404 4405 //Byte data 4406 Or(BYT1,BYT2,BRSL) 4407 Not(BRSL,BRSL) 4408 if(LNotEqual(BRSL,0xffffff00)) 4409 {Return(33)} 4410 4411 //Word Data 4412 Or(WRD1,WRD2,WRSL) 4413 Not(WRSL,WRSL) 4414 if(LNotEqual(WRSL,0xffff0000)) 4415 {Return(34)} 4416 4417 //DWord Data 4418 Or(DWD1,DWD2,DRSL) 4419 Not(DRSL,DRSL) 4420 if(LNotEqual(DRSL,0x00000000)) 4421 {Return(35)} 4422 4423 //System Memory Byte data 4424 Or(SMBY,0xff,BRSL) 4425 Not(BRSL,BRSL) 4426 if(LNotEqual(BRSL,0xffffff00)) 4427 {Return(36)} 4428 4429 //System Memory Word Data 4430 Or(SMWD,0xffff,WRSL) 4431 Not(WRSL,WRSL) 4432 if(LNotEqual(WRSL,0xffff0000)) 4433 {Return(37)} 4434 4435 //System Memory DWord Data 4436 Or(SMDW,0xffffffff,DRSL) 4437 Not(DRSL,DRSL) 4438 if(LNotEqual(DRSL,0x00000000)) 4439 {Return(38)} 4440 4441 Return(0) 4442 }//NNOT 4443 4444 4445 Method(TEST) 4446 { 4447 4448 Store ("++++++++ NBitOps Test", Debug) 4449 4450 Store(NNDB(2,2),RSLT) 4451 if(LNotEqual(RSLT,0)) 4452 {Return(RSLT)} 4453 4454 Store(NNOR(2,2),RSLT) 4455 if(LNotEqual(RSLT,0)) 4456 {Return(RSLT)} 4457 4458 Store(NNOT(2,2),RSLT) 4459 if(LNotEqual(RSLT,0)) 4460 {Return(RSLT)} 4461 4462 4463 Return(0) 4464 } 4465 4466 }//Device NBIT 4467 4468// 4469// test ShftOp.asl 4470// 4471//ShiftRightTerm := ShiftRight( 4472// Source, //TermArg=>Integer 4473// ShiftCount //TermArg=>Integer 4474// Result //Nothing | SuperName 4475//) => Integer 4476//Source and ShiftCount are evaluated as integer data types. Source is shifted right with the most significant bit 4477//zeroed ShiftCount times. The result is optionally stored into Result. 4478 4479//ShiftLeft( 4480// Source, //TermArg=>Integer 4481// ShiftCount //TermArg=>Integer 4482// Result //Nothing | SuperName 4483//) => Integer 4484//Source and ShiftCount are evaluated as integer data types. Source is shifted left with the least significant 4485//bit zeroed ShiftCount times. The result is optionally stored into Result. 4486 4487//If the Control method is success Zero is returned else a non-zero number is returned 4488 Device (SHFT) 4489 {//SHFT 4490 4491 //Create System Memory Operation Region and field overlays 4492 OperationRegion (RAM, SystemMemory, 0x400000, 0x100) 4493 Field (RAM, AnyAcc, NoLock, Preserve) 4494 { 4495 SMDW, 32, // 32-bit DWORD 4496 SMWD, 16, // 16-bit WORD 4497 SMBY, 8, // 8-bit BYTE 4498 }// Field(RAM) 4499 4500 4501 Name(SHFC,0x00) 4502 4503 //And with Byte Data 4504 Name (BYT1, 0xff) 4505 Name (BRSL, 0x00) 4506 4507 //And with Word Data 4508 Name (WRD1, 0xffff) 4509 Name (WRSL, 0x0000) 4510 4511 //And with DWord Data 4512 Name (DWD1, 0xffffffff) 4513 Name (DRSL, 0x00000000) 4514 4515 Name(RSLT,1) 4516 4517 Name(ARSL,0x00) 4518 Name(LRSL,0x00) 4519 4520 Method(SLFT,2) 4521 {//SLFT 4522 4523 Store(0xffffffff,SMDW) 4524 Store(0xffff,SMWD) 4525 Store(0xff,SMBY) 4526 4527 4528 //Arg0-> 2 & Arg1->2 4529 ShiftLeft(Arg0,Arg1,ARSL) 4530 if(LNotEqual(ARSL,8)) 4531 {Return(11)} 4532 4533 Store(Arg0,local0) 4534 Store(Arg1,Local1) 4535 4536 //Local0->8 and Local1->2 4537 ShiftLeft(Local0,Local1,LRSL) 4538 if(LNotEqual(LRSL,8)) 4539 {Return(12)} 4540 4541 Store(2,SHFC) 4542 //Byte data 4543 ShiftLeft(BYT1,SHFC,BRSL) 4544 if(LNotEqual(BRSL,0x3FC)) 4545 {Return(13)} 4546 4547 Store(4,SHFC) 4548 //Word Data 4549 ShiftLeft(WRD1,SHFC,WRSL) 4550 if(LNotEqual(WRSL,0xFFFF0)) 4551 {Return(14)} 4552 4553 Store(8,SHFC) 4554 //DWord Data 4555 ShiftLeft(DWD1,SHFC,DRSL) 4556 if(LNotEqual(DRSL,0xFFFFFF00)) 4557 {Return(15)} 4558 4559 4560 //System Memory Byte data 4561 Store(4,SHFC) 4562 ShiftLeft(SMBY,SHFC,BRSL) 4563 if(LNotEqual(BRSL,0xFF0)) 4564 {Return(16)} 4565 4566 //Word Data 4567 Store(4,SHFC) 4568 ShiftLeft(SMWD,SHFC,WRSL) 4569 if(LNotEqual(WRSL,0xffff0)) 4570 {Return(17)} 4571 4572 //DWord Data 4573 Store(8,SHFC) 4574 ShiftLeft(SMDW,SHFC,DRSL) 4575 if(LNotEqual(DRSL,0xFFFFFF00)) 4576 {Return(18)} 4577 4578 Return(0) 4579 4580 }//SLFT 4581 4582 Method(SRGT,2) 4583 {//SRGT 4584 //And with Byte Data 4585 Store (0xff,BYT1) 4586 Store (0x00,BRSL) 4587 4588 //And with Word Data 4589 Store (0xffff,WRD1) 4590 Store (0x0000,WRSL) 4591 4592 //And with DWord Data 4593 Store(0xffffffff,DWD1) 4594 Store (0x00000000,DRSL) 4595 4596 //Reinitialize the result objects 4597 Store(0x00,ARSL) 4598 Store(0x00,LRSL) 4599 4600 Store(0xffffffff,SMDW) 4601 Store(0xffff,SMWD) 4602 Store(0xff,SMBY) 4603 4604 //Arg0-> 2 & Arg1->2 4605 ShiftRight(Arg0,Arg1,ARSL) 4606 if(LNotEqual(ARSL,0)) 4607 {Return(21)} 4608 4609 Store(Arg0,local0) 4610 Store(Arg1,Local1) 4611 4612 //Local0->8 and Local1->2 4613 ShiftRight(Local0,Local1,LRSL) 4614 if(LNotEqual(LRSL,0)) 4615 {Return(22)} 4616 4617 Store(2,SHFC) 4618 //Byte data 4619 ShiftRight(BYT1,SHFC,BRSL) 4620 if(LNotEqual(BRSL,0x3F)) 4621 {Return(23)} 4622 4623 Store(4,SHFC) 4624 //Word Data 4625 ShiftRight(WRD1,SHFC,WRSL) 4626 if(LNotEqual(WRSL,0xFFF)) 4627 {Return(24)} 4628 4629 Store(8,SHFC) 4630 //DWord Data 4631 ShiftRight(DWD1,SHFC,DRSL) 4632 if(LNotEqual(DRSL,0xFFFFFF)) 4633 {Return(25)} 4634 4635 //System Memory Byte data 4636 Store(4,SHFC) 4637 ShiftRight(SMBY,SHFC,BRSL) 4638 if(LNotEqual(BRSL,0xF)) 4639 {Return(26)} 4640 4641 //Word Data 4642 Store(4,SHFC) 4643 ShiftRight(SMWD,SHFC,WRSL) 4644 if(LNotEqual(WRSL,0xFFF)) 4645 {Return(27)} 4646 4647 //DWord Data 4648 Store(8,SHFC) 4649 ShiftRight(SMDW,SHFC,DRSL) 4650 if(LNotEqual(DRSL,0xFFFFFF)) 4651 {Return(28)} 4652 4653 Return(0) 4654 }//SRGT 4655 4656 //Test method called from amlexec 4657 Method(TEST) 4658 { 4659 Store ("++++++++ ShftOp Test", Debug) 4660 4661 Store(SLFT(2,2),RSLT) 4662 if(LNotEqual(RSLT,0)) 4663 {Return(RSLT)} 4664 Store(SRGT(2,2),RSLT) 4665 if(LNotEqual(RSLT,0)) 4666 {Return(RSLT)} 4667 Return(0) 4668 } 4669 4670 }//Device SHFT 4671 4672// 4673// test Xor.asl and slightly modified 4674// 4675//This code tests the XOR opcode term 4676//Syntax of XOR term 4677// XOr( 4678// Source1 //TermArg=>BufferTerm 4679// Source2 //TermArg=>Integer 4680// Result //NameString 4681// ) 4682//"Source1" and "Source2" are evaluated as integers, a bit-wise XOR is performed, and the result is optionally stored in 4683// Result 4684 Device (XORD) 4685 { 4686 //This Method tests XOr operator for all the data types i.e. BYTE, WORD and DWORD 4687 Method (TEST,, Serialized) 4688 { 4689 Store ("++++++++ Xor Test", Debug) 4690 4691 //Overlay in system memory 4692 OperationRegion (RAM, SystemMemory, 0x800000, 256) 4693 Field (RAM, ByteAcc, NoLock, Preserve) 4694 { 4695 RES1, 1, //Offset 4696 BYT1, 8, //First BYTE 4697 BYT2, 8, //Second BYTE 4698 RBYT, 8, //Result Byte 4699 RES2, 1, //Offset 4700 WRD1, 16, //First WORD field 4701 WRD2, 16, //Second WORD field 4702 RWRD, 16, //RSLT WORD field 4703 RES3, 1, //Offset 4704 DWD1, 32, //First Dword 4705 DWD2, 32, //Second Dword 4706 RDWD, 32, //Result Dword 4707 RES4, 1, //Offset 4708 } 4709 4710 // Store bits in the single bit fields for checking 4711 // at the end 4712 Store(1, RES1) 4713 Store(1, RES2) 4714 Store(1, RES3) 4715 Store(1, RES4) 4716 4717 // Check the stored single bits 4718 if(LNotEqual(RES1, 1)) 4719 { 4720 Return(1) 4721 } 4722 4723 if(LNotEqual(RES2, 1)) 4724 { 4725 Return(1) 4726 } 4727 4728 if(LNotEqual(RES3, 1)) 4729 { 4730 Return(1) 4731 } 4732 4733 if(LNotEqual(RES4, 1)) 4734 { 4735 Return(1) 4736 } 4737 4738 //************************************************ 4739 // (BYT1) Bit1 ->0 and (BYT2)Bit2 -> 0 condition 4740 Store(0x00,BYT1) 4741 Store(0x00,BYT2) 4742 XOr(BYT1,BYT2,Local0) 4743 Store (Local0, RBYT) 4744 if(LNotEqual(RBYT,0)) 4745 { Return(1)} 4746 4747 // (BYT1) Bit1 ->1 and (BYT2)Bit2 -> 1 condition 4748 Store(0xff,BYT1) 4749 Store(0xff,BYT2) 4750 XOr(BYT1,BYT2,Local0) 4751 Store (Local0, RBYT) 4752 if(LNotEqual(RBYT,0)) 4753 { Return(1)} 4754 4755 // (BYT1) Bit1 ->1 and (BYT)Bit2 -> 0 condition 4756 Store(0x55,BYT1) 4757 Store(0xAA,BYT2) 4758 XOr(BYT1,BYT2,Local0) 4759 Store (Local0, RBYT) 4760 if(LNotEqual(RBYT,0xFF)) 4761 { Return(1)} 4762 4763 //(BYT1) Bit1 ->0 and (BYT2)Bit2 -> 1 condition 4764 Store(0xAA,BYT1) 4765 Store(0x55,BYT2) 4766 XOr(BYT1,BYT2,Local0) 4767 Store (Local0, RBYT) 4768 if(LNotEqual(RBYT,0xFF)) 4769 { Return(1)} 4770 4771 Store(0x12,BYT1) 4772 Store(0xED,BYT2) 4773 4774 XOr(BYT1,BYT2,Local0) 4775 Store (Local0, RBYT) 4776 if(LNotEqual(RBYT,0xFF)) 4777 { 4778 Return(1) 4779 } 4780 4781 // Store known values for checking later 4782 Store(0x12, BYT1) 4783 if(LNotEqual(BYT1, 0x12)) 4784 { 4785 Return(1) 4786 } 4787 4788 Store(0xFE, BYT2) 4789 if(LNotEqual(BYT2, 0xFE)) 4790 { 4791 Return(1) 4792 } 4793 4794 Store(0xAB, RBYT) 4795 if(LNotEqual(RBYT, 0xAB)) 4796 { 4797 Return(1) 4798 } 4799 4800 //*********************************************** 4801 // (WRD1) Bit1 ->0 and (WRD2)Bit2 -> 0 condition 4802 Store(0x0000,WRD1) 4803 Store(0x0000,WRD2) 4804 XOr(WRD1,WRD2,RWRD) 4805 if(LNotEqual(RWRD,0)) 4806 { Return(1)} 4807 4808 // (WRD1) Bit1 ->1 and (WRD2)Bit2 -> 1 condition 4809 Store(0xffff,WRD1) 4810 Store(0xffff,WRD2) 4811 XOr(WRD1,WRD2,RWRD) 4812 if(LNotEqual(RWRD,0)) 4813 { Return(1)} 4814 4815 // (WRD1) Bit1 ->1 and (WRD2)Bit2 -> 0 condition 4816 Store(0x5555,WRD1) 4817 Store(0xAAAA,WRD2) 4818 XOr(WRD1,WRD2,RWRD) 4819 if(LNotEqual(RWRD,0xFFFF)) 4820 { Return(1)} 4821 4822 //(WRD1) Bit1 ->0 and (WRD2)Bit2 -> 1 condition 4823 Store(0xAAAA,WRD1) 4824 Store(0x5555,WRD2) 4825 XOr(WRD1,WRD2,RWRD) 4826 if(LNotEqual(RWRD,0xFFFF)) 4827 { Return(1)} 4828 4829 Store(0x1234,WRD1) 4830 Store(0xEDCB,WRD2) 4831 XOr(WRD1,WRD2,RWRD) 4832 if(LNotEqual(RWRD,0xFFFF)) 4833 { Return(1)} 4834 4835 // Store known values for checking later 4836 Store(0x1234, WRD1) 4837 if(LNotEqual(WRD1, 0x1234)) 4838 { 4839 Return(1) 4840 } 4841 4842 Store(0xFEDC, WRD2) 4843 if(LNotEqual(WRD2, 0xFEDC)) 4844 { 4845 Return(1) 4846 } 4847 4848 Store(0x87AB, RWRD) 4849 if(LNotEqual(RWRD, 0x87AB)) 4850 { 4851 Return(1) 4852 } 4853 4854 4855 //************************************************** 4856 // (DWD1) Bit1 ->0 and (DWD2)Bit2 -> 0 condition 4857 Store(0x00000000,DWD1) 4858 Store(0x00000000,DWD2) 4859 XOr(DWD1,DWD2,RDWD) 4860 if(LNotEqual(RDWD,0)) 4861 { Return(1)} 4862 4863 // (DWD1) Bit1 ->1 and (DWD2)Bit2 -> 1 condition 4864 Store(0xffffffff,DWD1) 4865 Store(0xffffffff,DWD2) 4866 XOr(DWD1,DWD2,RDWD) 4867 if(LNotEqual(RDWD,0)) 4868 { Return(1)} 4869 4870 // (DWD1) Bit1 ->1 and (DWD2)Bit2 -> 0 condition 4871 Store(0x55555555,DWD1) 4872 Store(0xAAAAAAAA,DWD2) 4873 XOr(DWD1,DWD2,RDWD) 4874 if(LNotEqual(RDWD,0xFFFFFFFF)) 4875 { Return(1)} 4876 4877 //(DWD1) Bit1 ->0 and (DWD2)Bit2 -> 1 condition 4878 Store(0xAAAAAAAA,DWD1) 4879 Store(0x55555555,DWD2) 4880 XOr(DWD1,DWD2,RDWD) 4881 if(LNotEqual(RDWD,0xFFFFFFFF)) 4882 { Return(1)} 4883 4884 // (DWD1) Bit1 ->1 and (DWD2)Bit2 -> 0 condition 4885 Store(0x12345678,DWD1) 4886 Store(0xEDCBA987,DWD2) 4887 XOr(DWD1,DWD2,RDWD) 4888 if(LNotEqual(RDWD,0xFFFFFFFF)) 4889 { Return(1)} 4890 4891 Store(0x12345678,DWD1) 4892 if(LNotEqual(DWD1,0x12345678)) 4893 { 4894 Return(1) 4895 } 4896 4897 Store(0xFEDCBA98,DWD2) 4898 if(LNotEqual(DWD2,0xFEDCBA98)) 4899 { 4900 Return(1) 4901 } 4902 4903 Store(0x91827364,RDWD) 4904 if(LNotEqual(RDWD,0x91827364)) 4905 { 4906 Return(1) 4907 } 4908 4909 //**************************************************** 4910 // Check the stored single bits 4911 if(LNotEqual(RES1, 1)) 4912 { 4913 Return(1) 4914 } 4915 4916 if(LNotEqual(RES2, 1)) 4917 { 4918 Return(1) 4919 } 4920 4921 if(LNotEqual(RES3, 1)) 4922 { 4923 Return(1) 4924 } 4925 4926 if(LNotEqual(RES4, 1)) 4927 { 4928 Return(1) 4929 } 4930 4931 // Change all of the single bit fields to zero 4932 Store(0, RES1) 4933 Store(0, RES2) 4934 Store(0, RES3) 4935 Store(0, RES4) 4936 4937 // Now, check all of the fields 4938 4939 // Byte 4940 if(LNotEqual(BYT1, 0x12)) 4941 { 4942 Return(1) 4943 } 4944 4945 if(LNotEqual(BYT2, 0xFE)) 4946 { 4947 Return(1) 4948 } 4949 4950 if(LNotEqual(RBYT, 0xAB)) 4951 { 4952 Return(1) 4953 } 4954 4955 // Word 4956 if(LNotEqual(WRD1, 0x1234)) 4957 { 4958 Return(1) 4959 } 4960 4961 if(LNotEqual(WRD2, 0xFEDC)) 4962 { 4963 Return(1) 4964 } 4965 4966 if(LNotEqual(RWRD, 0x87AB)) 4967 { 4968 Return(1) 4969 } 4970 4971 // Dword 4972 if(LNotEqual(DWD1, 0x12345678)) 4973 { 4974 Return(1) 4975 } 4976 4977 if(LNotEqual(DWD2, 0xFEDCBA98)) 4978 { 4979 Return(1) 4980 } 4981 4982 if(LNotEqual(RDWD, 0x91827364)) 4983 { 4984 Return(1) 4985 } 4986 4987 // Bits 4988 if(LNotEqual(RES1, 0)) 4989 { 4990 Return(1) 4991 } 4992 4993 if(LNotEqual(RES2, 0)) 4994 { 4995 Return(1) 4996 } 4997 4998 if(LNotEqual(RES3, 0)) 4999 { 5000 Return(1) 5001 } 5002 5003 if(LNotEqual(RES4, 0)) 5004 { 5005 Return(1) 5006 } 5007 5008 5009 Return(0) 5010 } // TEST 5011 } // XORD 5012 5013// 5014// test CrBytFld.asl 5015// 5016// CrBytFld test 5017// Test for CreateByteField. 5018// Tests creating byte field overlay of buffer stored in Local0. 5019// Tests need to be added for Arg0 and Name buffers. 5020// 5021 Device (CRBF) 5022 { // Test device name 5023 Method (TEST) 5024 { 5025 Store ("++++++++ CrBytFld Test", Debug) 5026 5027 // Local0 is unitialized buffer with 4 elements 5028 Store (Buffer (4) {}, Local0) 5029 5030 // create Byte Field named BF0 based on Local0 element 0 5031 CreateByteField (Local0, 0, BF0) 5032 5033 // validate CreateByteField did not alter Local0 5034 Store (ObjectType (Local0), Local1) // Local1 = Local0 object type 5035 If (LNotEqual (Local1, 3)) // Buffer object type value is 3 5036 { Return (2) } 5037 5038 // store something into BF0 5039 Store (1, BF0) 5040 5041 // validate Store did not alter Local0 object type 5042 Store (ObjectType (Local0), Local1) // Local1 = Local0 object type 5043 If (LNotEqual (Local1, 3)) // Buffer object type value is 3 5044 { Return (3) } 5045 5046 // verify that the Store into BF0 was successful 5047 If (LNotEqual (BF0, 1)) 5048 { Return (4) } 5049 5050 5051 // create Byte Field named BF1 based on Local0 element 1 5052 CreateByteField (Local0, 1, BF1) 5053 5054 // validate CreateByteField did not alter Local0 5055 Store (ObjectType (Local0), Local1) // Local1 = Local0 object type 5056 If (LNotEqual (Local1, 3)) // Buffer object type value is 3 5057 { Return (10) } 5058 5059 // store something into BF1 5060 Store (5, BF1) 5061 5062 // validate Store did not alter Local0 object type 5063 Store (ObjectType (Local0), Local1) // Local1 = Local0 object type 5064 If (LNotEqual (Local1, 3)) // Buffer object type value is 3 5065 { Return (11) } 5066 5067 // verify that the Store into BF1 was successful 5068 If (LNotEqual (BF1, 5)) 5069 { Return (12) } 5070 5071 // verify that the Store into BF1 did not alter BF0 5072 If (LNotEqual (BF0, 1)) 5073 { Return (13) } 5074 5075 5076 // store something into BF0 5077 Store (0xFFFF, BF0) 5078 5079 // verify that the Store into BF0 was successful 5080 If (LNotEqual (BF0, 0xFF)) 5081 { Return (20) } 5082 5083 // verify that the Store into BF0 did not alter BF1 5084 If (LNotEqual (BF1, 5)) 5085 { Return (21) } 5086 5087 5088 Return (0) 5089 } // TEST 5090 } // CRBF 5091 5092// 5093// test IndexOp4.asl 5094// 5095// IndexOp4 test 5096// This is just a subset of the many RegionOp/Index Field test cases. 5097// Tests access of index fields smaller than 8 bits. 5098// 5099 Device (IDX4) 5100 { // Test device name 5101 5102 // MADM: Misaligned Dynamic RAM SystemMemory OperationRegion 5103 // Tests OperationRegion memory access using misaligned BYTE, 5104 // WORD, and DWORD field element accesses. Validation is performed 5105 // using both misaligned field entries and aligned field entries. 5106 // 5107 // MADM returns 0 if all test cases pass or non-zero identifying 5108 // the failing test case for debug purposes. This non-zero numbers 5109 // are not guaranteed to be in perfect sequence (i.e., test case 5110 // index), but are guaranteed to be unique so the failing test 5111 // case can be uniquely identified. 5112 // 5113 Method (MADM, 1, Serialized) // Misaligned Dynamic RAM SystemMemory OperationRegion 5114 // Arg0 -- SystemMemory OperationRegion base address 5115 { // MADM: Misaligned Dynamic RAM SystemMemory OperationRegion 5116 OperationRegion (RAM, SystemMemory, Arg0, 0x100) 5117 Field (RAM, DwordAcc, NoLock, Preserve) 5118 { // aligned field definition (for verification) 5119 DWD0, 32, // aligned DWORD field 5120 DWD1, 32 // aligned DWORD field 5121 } 5122 Field (RAM, ByteAcc, NoLock, Preserve) 5123 { // bit access field definition 5124 BIT0, 1, // single bit field entry 5125 BIT1, 1, // single bit field entry 5126 BIT2, 1, // single bit field entry 5127 BIT3, 1, // single bit field entry 5128 BIT4, 1, // single bit field entry 5129 BIT5, 1, // single bit field entry 5130 BIT6, 1, // single bit field entry 5131 BIT7, 1, // single bit field entry 5132 BIT8, 1, // single bit field entry 5133 BIT9, 1, // single bit field entry 5134 BITA, 1, // single bit field entry 5135 BITB, 1, // single bit field entry 5136 BITC, 1, // single bit field entry 5137 BITD, 1, // single bit field entry 5138 BITE, 1, // single bit field entry 5139 BITF, 1, // single bit field entry 5140 BI10, 1, // single bit field entry 5141 BI11, 1, // single bit field entry 5142 BI12, 1, // single bit field entry 5143 BI13, 1, // single bit field entry 5144 BI14, 1, // single bit field entry 5145 BI15, 1, // single bit field entry 5146 BI16, 1, // single bit field entry 5147 BI17, 1, // single bit field entry 5148 BI18, 1, // single bit field entry 5149 BI19, 1, // single bit field entry 5150 BI1A, 1, // single bit field entry 5151 BI1B, 1, // single bit field entry 5152 BI1C, 1, // single bit field entry 5153 BI1D, 1, // single bit field entry 5154 BI1E, 1, // single bit field entry 5155 BI1F, 1 // single bit field entry 5156 } // bit access field definition 5157 5158 Field (RAM, ByteAcc, NoLock, Preserve) 5159 { // two-bit access field definition 5160 B2_0, 2, // single bit field entry 5161 B2_1, 2, // single bit field entry 5162 B2_2, 2, // single bit field entry 5163 B2_3, 2, // single bit field entry 5164 B2_4, 2, // single bit field entry 5165 B2_5, 2, // single bit field entry 5166 B2_6, 2, // single bit field entry 5167 B2_7, 2, // single bit field entry 5168 B2_8, 2, // single bit field entry 5169 B2_9, 2, // single bit field entry 5170 B2_A, 2, // single bit field entry 5171 B2_B, 2, // single bit field entry 5172 B2_C, 2, // single bit field entry 5173 B2_D, 2, // single bit field entry 5174 B2_E, 2, // single bit field entry 5175 B2_F, 2 // single bit field entry 5176 } // bit access field definition 5177 5178 // initialize memory contents using aligned field entries 5179 Store (0x5AA55AA5, DWD0) 5180 Store (0x5AA55AA5, DWD1) 5181 5182 // set memory contents to known values using misaligned field entries 5183 Store (0, BIT0) 5184 // verify memory contents using misaligned field entries 5185 If (LNotEqual (BIT0, 0)) 5186 { Return (1) } 5187 // verify memory contents using aligned field entries 5188 If (LNotEqual (DWD0, 0x5AA55AA4)) 5189 { Return (2) } 5190 5191 // set memory contents to known values using misaligned field entries 5192 Store (1, BIT1) 5193 // verify memory contents using misaligned field entries 5194 If (LNotEqual (BIT1, 1)) 5195 { Return (3) } 5196 // verify memory contents using aligned field entries 5197 If (LNotEqual (DWD0, 0x5AA55AA6)) 5198 { Return (4) } 5199 5200 // set memory contents to known values using misaligned field entries 5201 Store (0, BIT2) 5202 // verify memory contents using misaligned field entries 5203 If (LNotEqual (BIT2, 0)) 5204 { Return (5) } 5205 // verify memory contents using aligned field entries 5206 If (LNotEqual (DWD0, 0x5AA55AA2)) 5207 { Return (6) } 5208 5209 // set memory contents to known values using misaligned field entries 5210 Store (1, BIT3) 5211 // verify memory contents using misaligned field entries 5212 If (LNotEqual (BIT3, 1)) 5213 { Return (7) } 5214 // verify memory contents using aligned field entries 5215 If (LNotEqual (DWD0, 0x5AA55AAA)) 5216 { Return (8) } 5217 5218 // set memory contents to known values using misaligned field entries 5219 Store (1, BIT4) 5220 // verify memory contents using misaligned field entries 5221 If (LNotEqual (BIT4, 1)) 5222 { Return (9) } 5223 // verify memory contents using aligned field entries 5224 If (LNotEqual (DWD0, 0x5AA55ABA)) 5225 { Return (10) } 5226 5227 // set memory contents to known values using misaligned field entries 5228 Store (0, BIT5) 5229 // verify memory contents using misaligned field entries 5230 If (LNotEqual (BIT5, 0)) 5231 { Return (11) } 5232 // verify memory contents using aligned field entries 5233 If (LNotEqual (DWD0, 0x5AA55A9A)) 5234 { Return (12) } 5235 5236 // set memory contents to known values using misaligned field entries 5237 Store (1, BIT6) 5238 // verify memory contents using misaligned field entries 5239 If (LNotEqual (BIT6, 1)) 5240 { Return (13) } 5241 // verify memory contents using aligned field entries 5242 If (LNotEqual (DWD0, 0x5AA55ADA)) 5243 { Return (14) } 5244 5245 // set memory contents to known values using misaligned field entries 5246 Store (0, BIT7) 5247 // verify memory contents using misaligned field entries 5248 If (LNotEqual (BIT7, 0)) 5249 { Return (15) } 5250 // verify memory contents using aligned field entries 5251 If (LNotEqual (DWD0, 0x5AA55A5A)) 5252 { Return (16) } 5253 5254 // set memory contents to known values using misaligned field entries 5255 Store (1, BIT8) 5256 // verify memory contents using misaligned field entries 5257 If (LNotEqual (BIT8, 1)) 5258 { Return (17) } 5259 // verify memory contents using aligned field entries 5260 If (LNotEqual (DWD0, 0x5AA55B5A)) 5261 { Return (18) } 5262 5263 // set memory contents to known values using misaligned field entries 5264 Store (0, BIT9) 5265 // verify memory contents using misaligned field entries 5266 If (LNotEqual (BIT9, 0)) 5267 { Return (19) } 5268 // verify memory contents using aligned field entries 5269 If (LNotEqual (DWD0, 0x5AA5595A)) 5270 { Return (20) } 5271 5272 // set memory contents to known values using misaligned field entries 5273 Store (1, BITA) 5274 // verify memory contents using misaligned field entries 5275 If (LNotEqual (BITA, 1)) 5276 { Return (21) } 5277 // verify memory contents using aligned field entries 5278 If (LNotEqual (DWD0, 0x5AA55D5A)) 5279 { Return (22) } 5280 5281 // set memory contents to known values using misaligned field entries 5282 Store (0, BITB) 5283 // verify memory contents using misaligned field entries 5284 If (LNotEqual (BITB, 0)) 5285 { Return (23) } 5286 // verify memory contents using aligned field entries 5287 If (LNotEqual (DWD0, 0x5AA5555A)) 5288 { Return (24) } 5289 5290 // set memory contents to known values using misaligned field entries 5291 Store (0, BITC) 5292 // verify memory contents using misaligned field entries 5293 If (LNotEqual (BITC, 0)) 5294 { Return (25) } 5295 // verify memory contents using aligned field entries 5296 If (LNotEqual (DWD0, 0x5AA5455A)) 5297 { Return (26) } 5298 5299 // set memory contents to known values using misaligned field entries 5300 Store (1, BITD) 5301 // verify memory contents using misaligned field entries 5302 If (LNotEqual (BITD, 1)) 5303 { Return (27) } 5304 // verify memory contents using aligned field entries 5305 If (LNotEqual (DWD0, 0x5AA5655A)) 5306 { Return (28) } 5307 5308 // set memory contents to known values using misaligned field entries 5309 Store (0, BITE) 5310 // verify memory contents using misaligned field entries 5311 If (LNotEqual (BITE, 0)) 5312 { Return (29) } 5313 // verify memory contents using aligned field entries 5314 If (LNotEqual (DWD0, 0x5AA5255A)) 5315 { Return (30) } 5316 5317 // set memory contents to known values using misaligned field entries 5318 Store (1, BITF) 5319 // verify memory contents using misaligned field entries 5320 If (LNotEqual (BITF, 1)) 5321 { Return (31) } 5322 // verify memory contents using aligned field entries 5323 If (LNotEqual (DWD0, 0x5AA5A55A)) 5324 { Return (32) } 5325 5326 // set memory contents to known values using misaligned field entries 5327 Store (0, BI10) 5328 // verify memory contents using misaligned field entries 5329 If (LNotEqual (BI10, 0)) 5330 { Return (33) } 5331 // verify memory contents using aligned field entries 5332 If (LNotEqual (DWD0, 0x5AA4A55A)) 5333 { Return (34) } 5334 5335 // set memory contents to known values using misaligned field entries 5336 Store (1, BI11) 5337 // verify memory contents using misaligned field entries 5338 If (LNotEqual (BI11, 1)) 5339 { Return (35) } 5340 // verify memory contents using aligned field entries 5341 If (LNotEqual (DWD0, 0x5AA6A55A)) 5342 { Return (36) } 5343 5344 // set memory contents to known values using misaligned field entries 5345 Store (0, BI12) 5346 // verify memory contents using misaligned field entries 5347 If (LNotEqual (BI12, 0)) 5348 { Return (37) } 5349 // verify memory contents using aligned field entries 5350 If (LNotEqual (DWD0, 0x5AA2A55A)) 5351 { Return (38) } 5352 5353 // set memory contents to known values using misaligned field entries 5354 Store (1, BI13) 5355 // verify memory contents using misaligned field entries 5356 If (LNotEqual (BI13, 1)) 5357 { Return (39) } 5358 // verify memory contents using aligned field entries 5359 If (LNotEqual (DWD0, 0x5AAAA55A)) 5360 { Return (40) } 5361 5362 // set memory contents to known values using misaligned field entries 5363 Store (1, BI14) 5364 // verify memory contents using misaligned field entries 5365 If (LNotEqual (BI14, 1)) 5366 { Return (41) } 5367 // verify memory contents using aligned field entries 5368 If (LNotEqual (DWD0, 0x5ABAA55A)) 5369 { Return (42) } 5370 5371 // set memory contents to known values using misaligned field entries 5372 Store (0, BI15) 5373 // verify memory contents using misaligned field entries 5374 If (LNotEqual (BI15, 0)) 5375 { Return (43) } 5376 // verify memory contents using aligned field entries 5377 If (LNotEqual (DWD0, 0x5A9AA55A)) 5378 { Return (44) } 5379 5380 // set memory contents to known values using misaligned field entries 5381 Store (1, BI16) 5382 // verify memory contents using misaligned field entries 5383 If (LNotEqual (BI16, 1)) 5384 { Return (45) } 5385 // verify memory contents using aligned field entries 5386 If (LNotEqual (DWD0, 0x5ADAA55A)) 5387 { Return (46) } 5388 5389 // set memory contents to known values using misaligned field entries 5390 Store (0, BI17) 5391 // verify memory contents using misaligned field entries 5392 If (LNotEqual (BI17, 0)) 5393 { Return (47) } 5394 // verify memory contents using aligned field entries 5395 If (LNotEqual (DWD0, 0x5A5AA55A)) 5396 { Return (48) } 5397 5398 // set memory contents to known values using misaligned field entries 5399 Store (1, BI18) 5400 // verify memory contents using misaligned field entries 5401 If (LNotEqual (BI18, 1)) 5402 { Return (49) } 5403 // verify memory contents using aligned field entries 5404 If (LNotEqual (DWD0, 0x5B5AA55A)) 5405 { Return (50) } 5406 5407 // set memory contents to known values using misaligned field entries 5408 Store (0, BI19) 5409 // verify memory contents using misaligned field entries 5410 If (LNotEqual (BI19, 0)) 5411 { Return (51) } 5412 // verify memory contents using aligned field entries 5413 If (LNotEqual (DWD0, 0x595AA55A)) 5414 { Return (52) } 5415 5416 // set memory contents to known values using misaligned field entries 5417 Store (1, BI1A) 5418 // verify memory contents using misaligned field entries 5419 If (LNotEqual (BI1A, 1)) 5420 { Return (53) } 5421 // verify memory contents using aligned field entries 5422 If (LNotEqual (DWD0, 0x5D5AA55A)) 5423 { Return (54) } 5424 5425 // set memory contents to known values using misaligned field entries 5426 Store (0, BI1B) 5427 // verify memory contents using misaligned field entries 5428 If (LNotEqual (BI1B, 0)) 5429 { Return (55) } 5430 // verify memory contents using aligned field entries 5431 If (LNotEqual (DWD0, 0x555AA55A)) 5432 { Return (56) } 5433 5434 // set memory contents to known values using misaligned field entries 5435 Store (0, BI1C) 5436 // verify memory contents using misaligned field entries 5437 If (LNotEqual (BI1C, 0)) 5438 { Return (57) } 5439 // verify memory contents using aligned field entries 5440 If (LNotEqual (DWD0, 0x455AA55A)) 5441 { Return (58) } 5442 5443 // set memory contents to known values using misaligned field entries 5444 Store (1, BI1D) 5445 // verify memory contents using misaligned field entries 5446 If (LNotEqual (BI1D, 1)) 5447 { Return (59) } 5448 // verify memory contents using aligned field entries 5449 If (LNotEqual (DWD0, 0x655AA55A)) 5450 { Return (60) } 5451 5452 // set memory contents to known values using misaligned field entries 5453 Store (0, BI1E) 5454 // verify memory contents using misaligned field entries 5455 If (LNotEqual (BI1E, 0)) 5456 { Return (61) } 5457 // verify memory contents using aligned field entries 5458 If (LNotEqual (DWD0, 0x255AA55A)) 5459 { Return (62) } 5460 5461 // set memory contents to known values using misaligned field entries 5462 Store (1, BI1F) 5463 // verify memory contents using misaligned field entries 5464 If (LNotEqual (BI1F, 1)) 5465 { Return (63) } 5466 // verify memory contents using aligned field entries 5467 If (LNotEqual (DWD0, 0xA55AA55A)) 5468 { Return (64) } 5469 5470 5471 // set memory contents to known values using misaligned field entries 5472 Store (3, B2_0) 5473 // verify memory contents using misaligned field entries 5474 If (LNotEqual (B2_0, 3)) 5475 { Return (65) } 5476 // verify memory contents using aligned field entries 5477 If (LNotEqual (DWD0, 0xA55AA55B)) 5478 { Return (66) } 5479 5480 // set memory contents to known values using misaligned field entries 5481 Store (1, B2_1) 5482 // verify memory contents using misaligned field entries 5483 If (LNotEqual (B2_1, 1)) 5484 { Return (67) } 5485 // verify memory contents using aligned field entries 5486 If (LNotEqual (DWD0, 0xA55AA557)) 5487 { Return (68) } 5488 5489 // set memory contents to known values using misaligned field entries 5490 Store (0, B2_2) 5491 // verify memory contents using misaligned field entries 5492 If (LNotEqual (B2_2, 0)) 5493 { Return (69) } 5494 // verify memory contents using aligned field entries 5495 If (LNotEqual (DWD0, 0xA55AA547)) 5496 { Return (70) } 5497 5498 // set memory contents to known values using misaligned field entries 5499 Store (3, B2_3) 5500 // verify memory contents using misaligned field entries 5501 If (LNotEqual (B2_3, 3)) 5502 { Return (71) } 5503 // verify memory contents using aligned field entries 5504 If (LNotEqual (DWD0, 0xA55AA5C7)) 5505 { Return (72) } 5506 5507 // set memory contents to known values using misaligned field entries 5508 Store (3, B2_4) 5509 // verify memory contents using misaligned field entries 5510 If (LNotEqual (B2_4, 3)) 5511 { Return (73) } 5512 // verify memory contents using aligned field entries 5513 If (LNotEqual (DWD0, 0xA55AA7C7)) 5514 { Return (74) } 5515 5516 // set memory contents to known values using misaligned field entries 5517 Store (0, B2_5) 5518 // verify memory contents using misaligned field entries 5519 If (LNotEqual (B2_5, 0)) 5520 { Return (75) } 5521 // verify memory contents using aligned field entries 5522 If (LNotEqual (DWD0, 0xA55AA3C7)) 5523 { Return (76) } 5524 5525 // set memory contents to known values using misaligned field entries 5526 Store (1, B2_6) 5527 // verify memory contents using misaligned field entries 5528 If (LNotEqual (B2_6, 1)) 5529 { Return (77) } 5530 // verify memory contents using aligned field entries 5531 If (LNotEqual (DWD0, 0xA55A93C7)) 5532 { Return (78) } 5533 5534 // set memory contents to known values using misaligned field entries 5535 Store (1, B2_7) 5536 // verify memory contents using misaligned field entries 5537 If (LNotEqual (B2_7, 1)) 5538 { Return (79) } 5539 // verify memory contents using aligned field entries 5540 If (LNotEqual (DWD0, 0xA55A53C7)) 5541 { Return (80) } 5542 5543 // set memory contents to known values using misaligned field entries 5544 Store (0, B2_8) 5545 // verify memory contents using misaligned field entries 5546 If (LNotEqual (B2_8, 0)) 5547 { Return (81) } 5548 // verify memory contents using aligned field entries 5549 If (LNotEqual (DWD0, 0xA55853C7)) 5550 { Return (82) } 5551 5552 // set memory contents to known values using misaligned field entries 5553 Store (1, B2_9) 5554 // verify memory contents using misaligned field entries 5555 If (LNotEqual (B2_9, 1)) 5556 { Return (83) } 5557 // verify memory contents using aligned field entries 5558 If (LNotEqual (DWD0, 0xA55453C7)) 5559 { Return (84) } 5560 5561 // set memory contents to known values using misaligned field entries 5562 Store (2, B2_A) 5563 // verify memory contents using misaligned field entries 5564 If (LNotEqual (B2_A, 2)) 5565 { Return (85) } 5566 // verify memory contents using aligned field entries 5567 If (LNotEqual (DWD0, 0xA56453C7)) 5568 { Return (86) } 5569 5570 // set memory contents to known values using misaligned field entries 5571 Store (2, B2_B) 5572 // verify memory contents using misaligned field entries 5573 If (LNotEqual (B2_B, 2)) 5574 { Return (87) } 5575 // verify memory contents using aligned field entries 5576 If (LNotEqual (DWD0, 0xA5A453C7)) 5577 { Return (88) } 5578 5579 // set memory contents to known values using misaligned field entries 5580 Store (3, B2_C) 5581 // verify memory contents using misaligned field entries 5582 If (LNotEqual (B2_C, 3)) 5583 { Return (89) } 5584 // verify memory contents using aligned field entries 5585 If (LNotEqual (DWD0, 0xA7A453C7)) 5586 { Return (90) } 5587 5588 // set memory contents to known values using misaligned field entries 5589 Store (3, B2_D) 5590 // verify memory contents using misaligned field entries 5591 If (LNotEqual (B2_D, 3)) 5592 { Return (91) } 5593 // verify memory contents using aligned field entries 5594 If (LNotEqual (DWD0, 0xAFA453C7)) 5595 { Return (92) } 5596 5597 // set memory contents to known values using misaligned field entries 5598 Store (1, B2_E) 5599 // verify memory contents using misaligned field entries 5600 If (LNotEqual (B2_E, 1)) 5601 { Return (93) } 5602 // verify memory contents using aligned field entries 5603 If (LNotEqual (DWD0, 0x9FA453C7)) 5604 { Return (94) } 5605 5606 // set memory contents to known values using misaligned field entries 5607 Store (0, B2_F) 5608 // verify memory contents using misaligned field entries 5609 If (LNotEqual (B2_F, 0)) 5610 { Return (95) } 5611 // verify memory contents using aligned field entries 5612 If (LNotEqual (DWD0, 0x1FA453C7)) 5613 { Return (96) } 5614 5615 5616 Return (0) // pass 5617 } // MADM: Misaligned Dynamic RAM SystemMemory OperationRegion 5618 5619 Method (TEST) 5620 { 5621 Store ("++++++++ IndexOp4 Test", Debug) 5622 5623 // MADM (Misaligned Dynamic RAM SystemMemory OperationRegion) arguments: 5624 // Arg0 -- SystemMemory OperationRegion base address 5625 Store (MADM (0x800000), Local0) 5626 If (LNotEqual (Local0, 0)) // MADM returns zero if successful 5627 { Return (Local0) } // failure: return MADM error code 5628 5629 Return (Local0) 5630 } // TEST 5631 } // IDX4 5632 5633// 5634// test Event.asl 5635// 5636// EventOp, ResetOp, SignalOp, and WaitOp test cases. 5637// 5638 Device (EVNT) 5639 { 5640 Event (EVNT) // event synchronization object 5641 5642 Method (TEVN, 1) 5643 // Arg0: time to Wait for event in milliseconds 5644 { // TEVN control method to test ResetOp, SignalOp, and WaitOp 5645 // reset EVNT to initialization (zero) state 5646 Reset (EVNT) 5647 5648 // prime EVNT with two outstanding signals 5649 Signal (EVNT) 5650 Signal (EVNT) 5651 5652 5653 // acquire existing signal 5654 Store (Wait (EVNT, Arg0), Local0) 5655 5656 // validate Local0 is a Number 5657 Store (ObjectType (Local0), Local1) 5658 If (LNotEqual (Local1, 1)) // Number is type 1 5659 { Return (0x21) } // Local1 indicates Local0 is not a Number 5660 5661 If (LNotEqual (Local0, 0)) // Number is type 1 5662 { Return (0x22) } // timeout occurred without acquiring signal 5663 5664 Store ("Acquire 1st existing signal PASS", Debug) 5665 5666 5667 // acquire existing signal 5668 Store (Wait (EVNT, Arg0), Local0) 5669 5670 // validate Local0 is a Number 5671 Store (ObjectType (Local0), Local1) 5672 If (LNotEqual (Local1, 1)) // Number is type 1 5673 { Return (0x31) } // Local1 indicates Local0 is not a Number 5674 5675 If (LNotEqual (Local0, 0)) // Number is type 1 5676 { Return (0x32) } // timeout occurred without acquiring signal 5677 5678 Store ("Acquire 2nd existing signal PASS", Debug) 5679 5680 5681 // ensure WaitOp timeout test cases do not hang 5682 if (LEqual (Arg0, 0xFFFF)) 5683 { Store (0xFFFE, Arg0) } 5684 5685 // acquire non-existing signal 5686 Store (Wait (EVNT, Arg0), Local0) 5687 5688 // validate Local0 is a Number 5689 Store (ObjectType (Local0), Local1) 5690 If (LNotEqual (Local1, 1)) // Number is type 1 5691 { Return (0x41) } // Local1 indicates Local0 is not a Number 5692 5693 If (LEqual (Local0, 0)) // Number is type 1 5694 { Return (0x42) } // non-existant signal was acquired 5695 5696 Store ("Acquire signal timeout PASS", Debug) 5697 5698 5699 // prime EVNT with two outstanding signals 5700 Signal (EVNT) 5701 Signal (EVNT) 5702 5703 // reset EVNT to initialization (zero) state 5704 Reset (EVNT) 5705 5706 // acquire non-existing signal 5707 Store (Wait (EVNT, Arg0), Local0) 5708 5709 // validate Local0 is a Number 5710 Store (ObjectType (Local0), Local1) 5711 If (LNotEqual (Local1, 1)) // Number is type 1 5712 { Return (0x51) } // Local1 indicates Local0 is not a Number 5713 5714 If (LEqual (Local0, 0)) // Number is type 1 5715 { Return (0x52) } // non-existant signal was acquired 5716 5717 Store ("Reset signal PASS", Debug) 5718 5719 5720 // acquire non-existing signal using Lvalue timeout 5721 Store (Wait (EVNT, Zero), Local0) 5722 5723 // validate Local0 is a Number 5724 Store (ObjectType (Local0), Local1) 5725 If (LNotEqual (Local1, 1)) // Number is type 1 5726 { Return (0x61) } // Local1 indicates Local0 is not a Number 5727 5728 If (LEqual (Local0, 0)) // Number is type 1 5729 { Return (0x62) } // non-existant signal was acquired 5730 5731 Store ("Zero Lvalue PASS", Debug) 5732 5733 5734 // acquire non-existing signal using Lvalue timeout 5735 Store (Wait (EVNT, One), Local0) 5736 5737 // validate Local0 is a Number 5738 Store (ObjectType (Local0), Local1) 5739 If (LNotEqual (Local1, 1)) // Number is type 1 5740 { Return (0x71) } // Local1 indicates Local0 is not a Number 5741 5742 If (LEqual (Local0, 0)) // Number is type 1 5743 { Return (0x72) } // non-existant signal was acquired 5744 5745 Store ("One Lvalue PASS", Debug) 5746 5747 // Lvalue Event test cases 5748 // ILLEGAL SOURCE OPERAND Store (EVNT, Local2) 5749 5750 // validate Local2 is an Event 5751 Store (ObjectType (EVNT), Local1) 5752 If (LNotEqual (Local1, 7)) // Event is type 7 5753 { Return (0x81) } // Local1 indicates Local0 is not a Number 5754 5755 // reset EVNT to initialization (zero) state 5756 Reset (EVNT) 5757 5758 // prime EVNT with two outstanding signals 5759 Signal (EVNT) 5760 5761 // acquire existing signal 5762 Store (Wait (EVNT, Arg0), Local0) 5763 5764 // validate Local0 is a Number 5765 Store (ObjectType (Local0), Local1) 5766 If (LNotEqual (Local1, 1)) // Number is type 1 5767 { Return (0x82) } // Local1 indicates Local0 is not a Number 5768 5769 If (LNotEqual (Local0, 0)) // Number is type 1 5770 { Return (0x83) } // timeout occurred without acquiring signal 5771 5772 Store ("Acquire Lvalue existing signal PASS", Debug) 5773 5774 5775 // acquire non-existing signal 5776 Store (Wait (EVNT, Arg0), Local0) 5777 5778 // validate Local0 is a Number 5779 Store (ObjectType (Local0), Local1) 5780 If (LNotEqual (Local1, 1)) // Number is type 1 5781 { Return (0x84) } // Local1 indicates Local0 is not a Number 5782 5783 If (LEqual (Local0, 0)) // Number is type 1 5784 { Return (0x85) } // non-existant signal was acquired 5785 5786 Store ("Acquire Lvalue signal timeout PASS", Debug) 5787 5788 5789 Return (0) // success 5790 } // TEVN control method to test ResetOp, SignalOp, and WaitOp 5791 5792 Method (TEST) 5793 { 5794 Store ("++++++++ Event Test", Debug) 5795 5796 Store (TEVN (100), Local0) 5797 5798 Return (Local0) 5799 } // TEST 5800 } // EVNT 5801 5802// 5803// test SizeOfLv.asl 5804// 5805// Test for SizeOf (Lvalue) 5806// 5807// This next section will contain the packages that the SizeOfOp will be 5808// exercised on. The first one, PKG0, is a regular package of 3 elements. 5809// The 2nd one, PKG1, is a nested package with 3 packages inside it, each 5810// with 3 elements. It is expected that SizeOf operator will return the 5811// same value for these two packages since they both have 3 elements. The 5812// final package, PKG2, has 4 elements and the SizeOf operator is expected 5813// to return different results for this package. 5814 5815 Name (PKG0, 5816 Package (3) 5817 {0x0123, 0x4567, 0x89AB} 5818 ) // PKG0 5819 5820 Name (PKG1, 5821 Package (3) 5822 { 5823 Package (3) {0x0123, 0x4567, 0x89AB}, 5824 Package (3) {0xCDEF, 0xFEDC, 0xBA98}, 5825 Package (3) {0x7654, 0x3210, 0x1234} 5826 } 5827 ) // PKG1 5828 5829 Name (PKG2, 5830 Package (4) 5831 {0x0123, 0x4567, 0x89AB, 0x8888} 5832 ) // PKG2 5833 5834 Name (PKG3, 5835 Package (5) 5836 {0x0123, 0x4567, 0x89AB, 0x8888, 0x7777} 5837 ) // PKG3 5838 5839// End Packages ********************************************************** 5840 5841// The following section will declare the data strings that will be used to 5842// exercise the SizeOf operator. STR0 and STR1 are expected to be equal, 5843// STR2 is expected to have a different SizeOf value than STR0 and STR1. 5844 5845 Name (STR0, "ACPI permits very flexible methods of expressing a system") 5846 5847 Name (STR1, "MIKE permits very flexible methods of expressing a system") 5848 5849 Name (STR2, "Needless to say, Mike and ACPI are frequently at odds") 5850 5851// This string is being made in case we want to do a SizeOf comparison 5852// between strings and packages or buffers 5853 Name (STR3, "12345") 5854 5855// End Strings ********************************************************** 5856 5857// The following section will declare the buffers that will be used to exercise 5858// the SizeOf operator. 5859 5860 Name (BUF0, Buffer (10) {}) 5861 Name (BUF1, Buffer (10) {}) 5862 Name (BUF2, Buffer (8) {}) 5863 Name (BUF3, Buffer (5) {}) 5864 5865// End Buffers ********************************************************** 5866 Device (SZLV) 5867 { 5868 5869 Method (CMPR, 2) 5870 { 5871 // CMPR is passed two arguments. If unequal, return 1 to indicate 5872 // that, otherwise return 0 to indicate SizeOf each is equal. 5873 5874 Store (0x01, Local0) 5875 5876 if (LEqual (SizeOf(Arg0), SizeOf(Arg1))) 5877 { 5878 Store (0x00, Local0) 5879 } 5880 5881 return (Local0) 5882 } // CMPR 5883 5884 5885 Method (TEST) 5886 { 5887 5888 Store ("++++++++ SizeOfLv Test", Debug) 5889 5890 // TBD: SizeOf ("string") 5891 // SizeOf (Buffer) 5892 // SizeOf (Package) 5893 // SizeOf (String) 5894 // SizeOf (STR0) -- where Name (STR0,...) -- lot's of cases 5895 // buffer, string, package, 5896 // SizeOf (METH) -- where METH control method returns 5897 // buffer, string, package, 5898 5899 // TBD: SLOC [SizeOf (Local0)] -- dup SARG 5900 5901 // Compare the elements that we expect to be the same. Exit out with an error 5902 // code on the first failure. 5903 if (LNotEqual (0x00, CMPR (STR0, STR1))) 5904 { 5905 Return (0x01) 5906 } 5907 5908 if (LNotEqual (0x00, CMPR (STR3, BUF3))) 5909 { 5910 Return (0x02) 5911 } 5912 5913 if (LNotEqual (0x00, CMPR (STR3, PKG3))) 5914 { 5915 Return (0x03) 5916 } 5917 5918 // In the following section, this test will cover the SizeOf 5919 // operator for Local values. 5920 // In this case, both Local0 and Local1 should have the same Size 5921 Store (STR0, Local0) 5922 Store (STR1, Local1) 5923 5924 if (LNotEqual (SizeOf (Local0), SizeOf (Local1))) 5925 { 5926 Return (0x04) 5927 } 5928 5929 // Now create a case where Local0 and Local1 are different 5930 Store (STR2, Local1) 5931 5932 if (LEqual (SizeOf (Local0), SizeOf (Local1))) 5933 { 5934 Return (0x05) 5935 } 5936 5937 // Finally, check for the return of SizeOf for a known Buffer. Just 5938 // in case we magically pass above cases due to all Buffers being Zero 5939 // bytes in size, or Infinity, etc. 5940 if (LNotEqual (0x05, SizeOf (BUF3))) 5941 { 5942 Return (0x06) 5943 } 5944 5945 Return (0) 5946 } // TEST 5947 } // SZLV 5948 5949 5950// 5951// test BytField.asl 5952// 5953// BytField test 5954// This is just a subset of the many RegionOp/Index Field test cases. 5955// Tests access of TBD. 5956// 5957 Scope (\_SB) // System Bus 5958 { // _SB system bus 5959 Device (BYTF) 5960 { // Test device name 5961 Method (TEST) 5962 { 5963 Store ("++++++++ BytField Test", Debug) 5964 5965 Return (\_TZ.C19B.RSLT) 5966 } // TEST 5967 } // BYTF 5968 5969 Device (C005) 5970 { // Device C005 5971 Device (C013) 5972 { // Device C013 5973 } // Device C013 5974 } // Device C005 5975 5976 Method (C115) 5977 { // C115 control method 5978 Acquire (\_GL, 0xFFFF) 5979 Store (\_SB.C005.C013.C058.C07E, Local0) 5980 Release (\_GL) 5981 And (Local0, 16, Local0) 5982 Store (ShiftRight (Local0, 4, ), Local1) 5983 If (LEqual (Local1, 0)) 5984 { Return (1) } 5985 Else 5986 { Return (0) } 5987 } // C115 control method 5988 } // _SB system bus 5989 5990 OperationRegion (C018, SystemIO, 0x5028, 4) 5991 Field (C018, AnyAcc, NoLock, Preserve) 5992 { // Field overlaying C018 5993 C019, 32 5994 } // Field overlaying C018 5995 5996 OperationRegion (C01A, SystemIO, 0x5030, 4) 5997 Field (C01A, ByteAcc, NoLock, Preserve) 5998 { // Field overlaying C01A 5999 C01B, 8, 6000 C01C, 8, 6001 C01D, 8, 6002 C01E, 8 6003 } // Field overlaying C01A 6004 6005 Mutex (\C01F, 0) 6006 Name (\C020, 0) 6007 Name (\C021, 0) 6008 6009 Method (\C022, 0) 6010 { // \C022 control method 6011 Acquire (\C01F, 0xFFFF) 6012 If (LEqual (\C021, 0)) 6013 { 6014 Store (C019, Local0) 6015 And (Local0, 0xFFFEFFFE, Local0) 6016 Store (Local0, C019) 6017 Increment (\C021) 6018 } 6019 Release (\C01F) 6020 } // \C022 control method 6021 6022 Scope (\_SB.C005.C013) 6023 { // Scope \_SB.C005.C013 6024 Device (C058) 6025 { // Device C058 6026 Name (_HID, "*PNP0A06") 6027 6028 OperationRegion (C059, SystemIO, 0xE0, 2) 6029 Field (C059, ByteAcc, NoLock, Preserve) 6030 { // Field overlaying C059 6031 C05A, 8, 6032 C05B, 8 6033 } // Field overlaying C059 6034 6035 OperationRegion (C05C, SystemIO, 0xE2, 2) 6036 Field (C05C, ByteAcc, NoLock, Preserve) 6037 { // Field overlaying C05C 6038 C05D, 8, 6039 C05E, 8 6040 } // Field overlaying C05C 6041 IndexField (C05D, C05E, ByteAcc, NoLock, Preserve) 6042 { // IndexField overlaying C05D/C05E 6043 , 0x410, // skip 6044 C05F, 8, 6045 C060, 8, 6046 C061, 8, 6047 C062, 8, 6048 C063, 8, 6049 C064, 8, 6050 C065, 8, 6051 C066, 8, 6052 C067, 8, 6053 C068, 8, 6054 C069, 8, 6055 C06A, 8, 6056 C06B, 8, 6057 C06C, 8, 6058 C06D, 8, 6059 C06E, 8, 6060 , 0x70, // skip 6061 C06F, 8, 6062 C070, 8, 6063 C071, 8, 6064 C072, 8, 6065 C073, 8, 6066 C074, 8, 6067 C075, 8, 6068 C076, 8, 6069 C077, 8, 6070 C078, 8, 6071 C079, 8, 6072 C07A, 8, 6073 C07B, 8, 6074 C07C, 8, 6075 C07D, 8, 6076 C07E, 8 6077 } // IndexField overlaying C05D/C05E 6078 6079 OperationRegion (C07F, SystemIO, 0xE4, 2) 6080 Field (C07F, ByteAcc, NoLock, Preserve) 6081 { // Field overlaying C07F 6082 C080, 8, 6083 C081, 8 6084 } // Field overlaying C07F 6085 6086 OperationRegion (C082, SystemIO, 0xE0, 1) 6087 Field (C082, ByteAcc, NoLock, Preserve) 6088 { // Field overlaying C082 6089 C083, 8 6090 } // Field overlaying C082 6091 6092 OperationRegion (C084, SystemIO, 0xFF, 1) 6093 Field (C084, ByteAcc, NoLock, Preserve) 6094 { // Field overlaying C084 6095 C085, 8 6096 } // Field overlaying C084 6097 6098 OperationRegion (C086, SystemIO, 0xFD, 1) 6099 Field (C086, ByteAcc, NoLock, Preserve) 6100 { // Field overlaying C086 6101 C087, 8 6102 } // Field overlaying C086 6103 6104 Mutex (C088, 0) 6105 Mutex (C089, 0) 6106 Mutex (C08A, 0) 6107 Mutex (C08B, 0) 6108 Mutex (C08C, 0) 6109 Mutex (C08D, 0) 6110 6111 Name (C08E, 0xFFFFFFFD) 6112 Name (C08F, 0) 6113 6114 Method (C0AA, 4) 6115 { // C0AA control method 6116 Store (Buffer (4) {}, Local7) 6117 CreateByteField (Local7, 0, C0AB) 6118 CreateByteField (Local7, 1, C0AC) 6119 CreateByteField (Local7, 2, C0AD) 6120 CreateByteField (Local7, 3, C0AE) 6121 Acquire (^C08B, 0xFFFF) 6122 Acquire (\_GL, 0xFFFF) 6123 \C022 () 6124 Store (1, \_SB.C005.C013.C058.C06B) 6125 While (LNot (LEqual (0, \_SB.C005.C013.C058.C06B))) 6126 { Stall (100) } 6127 Store (Arg3, \_SB.C005.C013.C058.C06E) 6128 Store (Arg2, \_SB.C005.C013.C058.C06D) 6129 Store (Arg1, \_SB.C005.C013.C058.C06C) 6130 Store (Arg0, \_SB.C005.C013.C058.C06B) 6131 While (LNot (LEqual (0, \_SB.C005.C013.C058.C06B))) 6132 { Stall (100) } 6133 Store (\_SB.C005.C013.C058.C06E, C0AB) 6134 Store (\_SB.C005.C013.C058.C06D, C0AC) 6135 Store (\_SB.C005.C013.C058.C06C, C0AD) 6136 Store (\_SB.C005.C013.C058.C06B, C0AE) 6137 If (LNot (LEqual (Arg0, 23))) 6138 { 6139 Store (2, \_SB.C005.C013.C058.C06B) 6140 Stall (100) 6141 } 6142 Release (\_GL) 6143 Release (^C08B) 6144 Return (Local7) 6145 } // C0AA control method 6146 } // Device C058 6147 } // Scope \_SB.C005.C013 6148 6149 Scope (\_TZ) 6150 { // \_TZ thermal zone scope 6151 Name (C18B, Package (2) 6152 { 6153 Package (2) 6154 { 6155 Package (5) {0x05AC, 0x0CD2, 0x0D68, 0x0DE0, 0x0E4E}, 6156 Package (5) {0x0D04, 0x0D9A, 0x0DFE, 0x0E80, 0x0FA2} 6157 }, 6158 Package (2) 6159 { 6160 Package (5) {0x05AC, 0x0CD2, 0x0D68, 0x0DE0, 0x0E4E}, 6161 Package (5) {0x0D04, 0x0D9A, 0x0DFE, 0x0E80, 0x0FA2} 6162 } 6163 }) // C18B 6164 6165 Name (C18C, Package (2) 6166 { 6167 Package (2) 6168 { 6169 Package (3) {0x64, 0x4B, 0x32}, 6170 Package (3) {0x64, 0x4B, 0x32} 6171 } 6172 }) // C81C 6173 6174 Name (C18D, 0) 6175 Name (C18E, 0) 6176 Name (C18F, 0) 6177 Name (C190, 0) 6178 Name (C191, 3) 6179 Name (C192, 0) 6180 Name (C193, 1) 6181 Name (C194, 2) 6182 Mutex (C195, 0) 6183 Name (C196, 1) 6184 Name (C197, 0x0B9C) 6185 Name (C198, 0x0B9C) 6186 Name (C199, 0xFFFFFFFD) 6187 Name (C19A, 0) 6188 6189 Device (C19B) 6190 { // Device C19B 6191 Name (RSLT, 0) // default to zero 6192 6193 Method (XINI) 6194 { // _INI control method (Uses Global Lock -- can't run under AcpiExec) 6195 Store (\_SB.C115, C19A) 6196 \_TZ.C19C._SCP (0) 6197 Subtract (0x0EB2, 0x0AAC, Local1) // Local1 = AACh - EB2h 6198 Divide (Local1, 10, Local0, Local2) // Local0 = Local1 / 10 6199 // Local2 = Local1 % 10 6200 \_SB.C005.C013.C058.C0AA (14, Local2, 0, 0) 6201 Store 6202 (DerefOf (Index (DerefOf (Index (\_TZ.C18C, C19A, )), 0, )), C18D) 6203 Store 6204 (DerefOf (Index (DerefOf (Index (\_TZ.C18C, C19A, )), 1, )), C18E) 6205 Store 6206 (DerefOf (Index (DerefOf (Index (\_TZ.C18C, C19A, )), 2, )), C18F) 6207 6208 Store (1, RSLT) // set RSLT to 1 if _INI control method completes 6209 } // _INI control method 6210 6211 // PowerResource (C19D) {...} 6212 } // Device C19B 6213 6214 ThermalZone (C19C) 6215 { 6216 Method (_SCP, 1) 6217 { // _SCP control method 6218 Store (Arg0, Local0) 6219 If (LEqual (Local0, 0)) 6220 { 6221 Store (0, \_TZ.C192) 6222 Store (1, \_TZ.C193) 6223 Store (2, \_TZ.C194) 6224 Store (3, \_TZ.C191) 6225 } 6226 Else 6227 { 6228 Store (0, \_TZ.C191) 6229 Store (1, \_TZ.C192) 6230 Store (2, \_TZ.C193) 6231 Store (3, \_TZ.C194) 6232 } 6233 } // _SCP control method 6234 } // ThermalZone C19C 6235 } // \_TZ thermal zone scope 6236 6237 6238// 6239// test DwrdFld.asl 6240// 6241 Name (BUFR, buffer(10) {0,0,0,0,0,0,0,0,0,0} ) 6242 6243 Device (DWDF) 6244 { 6245 Method (TEST) 6246 { 6247 Store ("++++++++ DwrdFld Test", Debug) 6248 6249 CreateByteField (BUFR, 0, BYTE) 6250 Store (0xAA, BYTE) 6251 6252 CreateWordField (BUFR, 1, WORD) 6253 Store (0xBBCC, WORD) 6254 6255 CreateDWordField (BUFR, 3, DWRD) 6256 Store (0xDDEEFF00, DWRD) 6257 6258 CreateByteField (BUFR, 7, BYT2) 6259 Store (0x11, BYT2) 6260 6261 CreateWordField (BUFR, 8, WRD2) 6262 Store (0x2233, WRD2) 6263 6264 Return (0) 6265 6266 } // End Method TEST 6267 } // Device DWDF 6268 6269 // 6270 // test DivAddx.asl 6271 // 6272 Name (B1LO, 0xAA) 6273 Name (B1HI, 0xBB) 6274 6275 Method (MKW_, 2) 6276 { // This control method will take two bytes and make them into a WORD 6277 6278 Multiply (B1HI, 256, Local0) // Make high byte.....high 6279 Or (Local0, B1LO, Local0) // OR in the low byte 6280 Return (Local0) // Return the WORD 6281 6282 } // MKW_ 6283 6284 Device (DVAX) 6285 { 6286 Method (TEST) 6287 { 6288 6289 Store ("++++++++ DivAddx Test", Debug) 6290 6291 Store (25, B1LO) 6292 Store (0, B1HI) 6293 6294 // We'll multiply 25 * 3 to get 75, add 99 to it then divide 6295 // by 100. We expect to get 74 for the remainder and 1 for 6296 // the quotient. 6297 Divide( 6298 Add (Multiply (3, MKW_ (B1LO, B1HI)), 0x63), 6299 // Dividend, 6300 100, // Divisor 6301 Local4, // Remainder 6302 Local2) // Quotient 6303 6304 If (LAnd (LEqual (74, Local4), LEqual (1, Local2))) 6305 { // Indicate Pass 6306 Store (0x00, Local0) 6307 } 6308 6309 Else 6310 { // Indicate Fail 6311 Store (0x01, Local0) 6312 } 6313 6314 Return (Local0) 6315 } // End Method TEST 6316 } // Device DVAX 6317 6318// 6319// test IndexFld.asl (IndexOp6.asl) 6320// 6321// IndexFld test 6322// This is just a subset of the many RegionOp/Index Field test cases. 6323// Tests index field element AccessAs macro. 6324// Also tests name resolution of index field elements with same names 6325// but different namespace scopes. 6326// 6327 Device (IDX6) 6328 { // Test device name 6329 6330 OperationRegion (SIO, SystemIO, 0x100, 2) 6331 Field (SIO, ByteAcc, NoLock, Preserve) 6332 { 6333 INDX, 8, 6334 DATA, 8 6335 } 6336 IndexField (INDX, DATA, AnyAcc, NoLock, WriteAsOnes) 6337 { 6338 AccessAs (ByteAcc, 0), 6339 IFE0, 8, 6340 IFE1, 8, 6341 IFE2, 8, 6342 IFE3, 8, 6343 IFE4, 8, 6344 IFE5, 8, 6345 IFE6, 8, 6346 IFE7, 8, 6347 IFE8, 8, 6348 IFE9, 8, 6349 } 6350 6351 Device (TST_) 6352 { // TST_: provides a different namespace scope for IFE0 and IFE1 6353 OperationRegion (SIO2, SystemIO, 0x100, 2) 6354 Field (SIO2, ByteAcc, NoLock, Preserve) 6355 { 6356 IND2, 8, 6357 DAT2, 8 6358 } 6359 IndexField (IND2, DAT2, AnyAcc, NoLock, WriteAsOnes) 6360 { 6361 IFE0, 8, // duplicate IndexField name with different scope 6362 IFE1, 8 6363 } 6364 } // TST_: provides a different namespace scope for IFE0 and IFE1 6365 6366 Method (TEST) 6367 { 6368 Store ("++++++++ IndexOp6 Test", Debug) 6369 6370 Store (IFE0, Local0) 6371 Store (IFE1, Local1) 6372 Store (IFE2, Local2) 6373 6374 // validate name resolution of IndexFields with different scopes 6375 Store (\IDX6.IFE0, Local3) 6376 Store (\IDX6.IFE1, Local4) 6377 // verioading of namespace can resolve following names 6378 Store (\IDX6.TST_.IFE0, Local5) 6379 Store (\IDX6.TST_.IFE1, Local6) 6380 6381 Return (0) 6382 } // TEST 6383 } // IDX6 6384 6385// 6386// test IndexOp5.asl 6387// 6388// IndexOp5 test 6389// This is just a subset of the many RegionOp/Index Field test cases. 6390// Tests copying string into buffer then performing IndexOp on result. 6391// 6392 Device (IDX5) 6393 { // Test device name 6394 6395 Name (OSFL, 0) // 0 == Windows 98, 1 == Windows NT 6396 6397 // MCTH is a control method to compare two strings. It returns 6398 // zero if the strings mismatch, or 1 if the strings match. 6399 // This exercises the test case of copying a string into a buffer 6400 // and performing an IndexOp on the resulting buffer. 6401 Method (MCTH, 2, Serialized) // Control Method to compare two strings 6402 { // MCTH: Control Method to compare two strings 6403 // Arg0: first string to compare 6404 // Arg1: second string to compare 6405 // Return: zero if strings mismatch, 1 if strings match 6406 6407 // check if first string's length is less than second string's length 6408 If (LLess (SizeOf (Arg0), SizeOf (Arg1))) 6409 { Return (0) } 6410 6411 // increment length to include NULL termination character 6412 Add (SizeOf (Arg0), 1, Local0) // Local0 = strlen(Arg0) + 1 6413 6414 // create two buffers of size Local0 [strlen(Arg0)+1] 6415 Name (BUF0, Buffer (Local0) {}) 6416 Name (BUF1, Buffer (Local0) {}) 6417 6418 // copy strings into buffers 6419 Store (Arg0, BUF0) 6420 Store (Arg1, BUF1) 6421 6422 // validate BUF0 and BUF1 are still buffers 6423 Store (ObjectType (BUF0), Local1) 6424 If (LNotEqual (Local1, 3)) // Buffer is type 3 6425 { Return (20) } 6426 Store (ObjectType (BUF1), Local1) 6427 If (LNotEqual (Local1, 3)) // Buffer is type 3 6428 { Return (21) } 6429 6430 // Decrement because the Index base below is zero based 6431 // while Local0 length is one based. 6432 Decrement (Local0) 6433 6434 While (Local0) 6435 { // loop through all BUF0 buffer elements 6436 Decrement (Local0) 6437 6438 // check if BUF0[n] == BUF1[n] 6439 If (LEqual (DerefOf (Index (BUF0, Local0, )), 6440 DerefOf (Index (BUF1, Local0, )))) 6441 { } // this is how the code was really implemented 6442 Else 6443 { Return (Zero) } 6444 } // loop through all BUF0 buffer elements 6445 6446 Return (One) // strings / buffers match 6447 } // MCTH: Control Method to compare two strings 6448 6449 6450 Method (TEST) 6451 { 6452 Store ("++++++++ IndexOp5 Test", Debug) 6453 6454 If (MCTH (\_OS, "Microsoft Windows NT")) 6455 { Store (1, OSFL) } 6456 6457 If (LNotEqual (OSFL, 1)) 6458 { Return (11) } 6459 6460 Return (0) 6461 } // TEST 6462 } // IDX5 6463 6464// 6465// test IndexOp.asl 6466// 6467 Scope (\_SB) // System Bus 6468 { // _SB system bus 6469 6470 Method (C097) 6471 { Return (1) } 6472 6473 Device (PCI2) 6474 { // Root PCI Bus 6475 Name (_HID, EISAID("PNP0A03")) 6476 Name (_ADR, 0x00000000) 6477 Name (_CRS, Buffer(26) {"\_SB_.PCI2._CRS..........."}) 6478 Method (_STA) {Return (0x0F)} 6479 6480 Device (ISA) 6481 { // ISA bridge 6482 Name (_ADR, 0x00030000) // ISA bus ID 6483 6484 Device (EC0) 6485 { // Embedded Controller 6486 Name (_GPE, 0) // EC use GPE0 6487 Name (_ADR, 0x0030000) // PCI address 6488 6489 Method (_STA,0) // EC Status 6490 { Return(0xF) } // EC is functioning 6491 6492 Name (_CRS, ResourceTemplate() 6493 { 6494 IO (Decode16, 0x62, 0x62, 1, 1) 6495 IO (Decode16, 0x66, 0x66, 1, 1) 6496 } 6497 ) 6498 6499 // create EC's region and field 6500 OperationRegion (RAM, SystemMemory, 0x400000, 0x100) 6501 Field (RAM, AnyAcc, NoLock, Preserve) 6502 { 6503 // AC information 6504 ADP, 1, // AC Adapter 1:On-line, 0:Off-line 6505 AFLT, 1, // AC Adapter Fault 1:Fault 0:Normal 6506 BAT0, 1, // BAT0 1:present, 0:not present 6507 , 1, // reserved 6508 , 28, // filler to force DWORD alignment 6509 6510 // CMBatt information 6511 BPU0, 32, // Power Unit 6512 BDC0, 32, // Designed Capacity 6513 BFC0, 32, // Last Full Charge Capacity 6514 BTC0, 32, // Battery Technology 6515 BDV0, 32, // Design Voltage 6516 BST0, 32, // Battery State 6517 BPR0, 32, // Battery Present Rate 6518 // (Designed Capacity)x(%)/{(h)x100} 6519 BRC0, 32, // Battery Remaining Capacity 6520 // (Designed Capacity)(%)^100 6521 BPV0, 32, // Battery Present Voltage 6522 BTP0, 32, // Trip Point 6523 BCW0, 32, // Design capacity of Warning 6524 BCL0, 32, // Design capacity of Low 6525 BCG0, 32, // capacity granularity 1 6526 BG20, 32, // capacity granularity 2 6527 BMO0, 32, // Battery model number field 6528 BIF0, 32, // OEM Information(00h) 6529 BSN0, 32, // Battery Serial Number 6530 BTY0, 32, // Battery Type (e.g., "Li-Ion") 6531 BTY1, 32 // Battery Type (e.g., "Li-Ion") 6532 } // Field 6533 } // EC0: Embedded Controller 6534 } // ISA bridge 6535 } // PCI2 Root PCI Bus 6536 6537 Device (IDX0) 6538 { // Test device name 6539 Name (_HID, EISAID ("PNP0C0A")) // Control Method Battey ID 6540 Name (_PCL, Package() {\_SB}) 6541 Method (_STA) 6542 { 6543 // _STA bits 0-3 indicate existence of battery slot 6544 // _STA bit 4 indicates battery (not) present 6545 If (\_SB.PCI2.ISA.EC0.BAT0) 6546 { Return (0x1F) } // Battery present 6547 else 6548 { Return (0x0F) } // Battery not present 6549 } // _STA 6550 6551 Method (_BIF,, Serialized) 6552 { 6553 Name (BUFR, Package(13) {}) 6554 Store (\_SB.PCI2.ISA.EC0.BPU0, Index (BUFR,0)) // Power Unit 6555 Store (\_SB.PCI2.ISA.EC0.BDC0, Index (BUFR,1)) // Designed Capacity 6556 Store (\_SB.PCI2.ISA.EC0.BFC0, Index (BUFR,2)) // Last Full Charge Capa. 6557 Store (\_SB.PCI2.ISA.EC0.BTC0, Index (BUFR,3)) // Battery Technology 6558 Store (\_SB.PCI2.ISA.EC0.BDV0, Index (BUFR,4)) // Designed Voltage 6559 Store (\_SB.PCI2.ISA.EC0.BCW0, Index (BUFR,5)) // Designed warning level 6560 Store (\_SB.PCI2.ISA.EC0.BCL0, Index (BUFR,6)) // Designed Low level 6561 Store (\_SB.PCI2.ISA.EC0.BCG0, Index (BUFR,7)) // Capacity granularity 1 6562 Store (\_SB.PCI2.ISA.EC0.BG20, Index (BUFR,8)) // Capacity granularity 2 6563 6564 Store ("", Index (BUFR,9)) // Model Number 6565 6566 Store ("", Index (BUFR,10)) // Serial Number 6567 6568 Store ("LiOn", Index (BUFR,11)) // Battery Type 6569 6570 Store ("Chicony", Index (BUFR,12)) // OEM Information 6571 6572 Return (BUFR) 6573 } // _BIF 6574 6575 Method (_BST,, Serialized) 6576 { 6577 Name (BUFR, Package(4) {1, 0x100, 0x76543210, 0x180}) 6578 Return (BUFR) 6579 } // _BST 6580 6581 Method (_BTP,1) 6582 { 6583 Store (arg0, \_SB.PCI2.ISA.EC0.BTP0) // Set Battery Trip point 6584 } 6585 6586 Method (TEST,, Serialized) 6587 { 6588 6589 Store ("++++++++ IndexOp Test", Debug) 6590 6591 // test storing into uninitialized package elements 6592 Name (PBUF, Package(4) {}) // leave unitialized 6593 Store (0x01234567, Index (PBUF,0)) 6594 Store (0x89ABCDEF, Index (PBUF,1)) 6595 Store (0xFEDCBA98, Index (PBUF,2)) 6596 Store (0x76543210, Index (PBUF,3)) 6597 6598 // verify values stored into uninitialized package elements 6599 If (LNotEqual (DerefOf (Index (PBUF,0)), 0x01234567)) 6600 { Return (0x10) } 6601 6602 If (LNotEqual (DerefOf (Index (PBUF,1)), 0x89ABCDEF)) 6603 { Return (0x11) } 6604 6605 If (LNotEqual (DerefOf (Index (PBUF,2)), 0xFEDCBA98)) 6606 { Return (0x12) } 6607 6608 If (LNotEqual (DerefOf (Index (PBUF,3)), 0x76543210)) 6609 { Return (0x13) } 6610 6611 6612 // store _BIF package return value into Local0 6613 Store (_BIF, Local0) 6614 6615 // save Local0 object type value into Local1 6616 Store (ObjectType (Local0), Local1) 6617 6618 // validate Local0 is a Package 6619 If (LNotEqual (Local1, 4)) // Package type is 4 6620 { Return (0x21) } // failure 6621 6622 6623 // test storing into buffer field elements 6624 Name (BUFR, Buffer(16) 6625 { // initial values 6626 00, 00, 00, 00, 00, 00, 00, 00, 6627 00, 00, 00, 00, 00, 00, 00, 00, 6628 } 6629 ) // BUFR 6630 // test storing into buffer field elements 6631 Store (0x01234567, Index (BUFR,0)) // should only store 0x67 6632 Store (0x89ABCDEF, Index (BUFR,4)) // should only store 0xEF 6633 Store (0xFEDCBA98, Index (BUFR,8)) // should only store 0x98 6634 Store (0x76543210, Index (BUFR,12)) // should only store 0x10 6635 6636 // verify storing into buffer field elements 6637 If (LNotEqual (DerefOf (Index (BUFR,0)), 0x67)) 6638 { Return (0x30) } 6639 6640 If (LNotEqual (DerefOf (Index (BUFR,1)), 0)) 6641 { Return (0x31) } 6642 6643 If (LNotEqual (DerefOf (Index (BUFR,4)), 0xEF)) 6644 { Return (0x34) } 6645 6646 If (LNotEqual (DerefOf (Index (BUFR,8)), 0x98)) 6647 { Return (0x38) } 6648 6649 If (LNotEqual (DerefOf (Index (BUFR,12)), 0x10)) 6650 { Return (0x3C) } 6651 6652 6653 Return (0) // pass 6654 } // TEST 6655 } // IDX0 6656 } // _SB system bus 6657 6658// 6659// test BitIndex.asl 6660// 6661// BitIndex test 6662// This is a test case for accessing fields defined as single bits in 6663// memory. This is done by creating two index fields that overlay the 6664// same DWORD in memory. One field accesses the DWORD as a DWORD, the 6665// other accesses individual bits of the same DWORD field in memory. 6666// 6667 Scope (\_SB) // System Bus 6668 { // _SB system bus 6669 OperationRegion (RAM, SystemMemory, 0x800000, 0x100) 6670 Field (RAM, AnyAcc, NoLock, Preserve) 6671 { // Any access 6672 TREE, 3, 6673 WRD0, 16, 6674 WRD1, 16, 6675 WRD2, 16, 6676 WRD3, 16, 6677 WRD4, 16, 6678 DWRD, 32, // DWORD field 6679 } 6680 Field (RAM, AnyAcc, NoLock, Preserve) 6681 { // Any access 6682 THRE, 3, 6683 WD00, 16, 6684 WD01, 16, 6685 WD02, 16, 6686 WD03, 16, 6687 WD04, 16, 6688 BYT0, 8, // Start off with a BYTE 6689 BIT0, 1, // single-bit field 6690 BIT1, 1, // single-bit field 6691 BIT2, 1, // single-bit field 6692 BIT3, 1, // single-bit field 6693 BIT4, 1, // single-bit field 6694 BIT5, 1, // single-bit field 6695 BIT6, 1, // single-bit field 6696 BIT7, 1, // single-bit field 6697 BIT8, 1, // single-bit field 6698 BIT9, 1, // single-bit field 6699 BITA, 1, // single-bit field 6700 BITB, 1, // single-bit field 6701 BITC, 1, // single-bit field 6702 BITD, 1, // single-bit field 6703 BITE, 1, // single-bit field 6704 BITF, 1, // single-bit field 6705 BYTZ, 8, // End with a BYTE for a total of 32 bits 6706 } 6707 6708 Device (BITI) 6709 { // Test device name 6710 6711 Method (MBIT) // Test single bit memory accesses 6712 { 6713 6714 If (LNotEqual (DWRD, 0x00)) 6715 { 6716 Store (0xFF00, Local0) 6717 } 6718 Else 6719 { 6720 // Prime Local0 with 0...assume passing condition 6721 Store (0, Local0) 6722 6723 // set memory contents to known values using DWORD field 6724 Store (0x5A5A5A5A, DWRD) 6725 6726 // Given the value programmed into DWRD, only the odd bits 6727 // of the lower nibble should be set. BIT1, BIT3 should be set. 6728 // BIT0 and BIT2 should be clear 6729 6730 If (BIT0) 6731 { 6732 Or (Local0, 0x01, Local0) 6733 } 6734 6735 If (LNot (BIT1)) 6736 { 6737 Or (Local0, 0x02, Local0) 6738 } 6739 6740 If (BIT2) 6741 { 6742 Or (Local0, 0x04, Local0) 6743 } 6744 6745 If (LNot (BIT3)) 6746 { 6747 Or (Local0, 0x08, Local0) 6748 } 6749 6750 // Now check the upper nibble. Only the "even" bits should 6751 // be set. BIT4, BIT6. BIT5 and BIT7 should be clear. 6752 If (LNot (BIT4)) 6753 { 6754 Or (Local0, 0x10, Local0) 6755 } 6756 6757 If (BIT5) 6758 { 6759 Or (Local0, 0x20, Local0) 6760 } 6761 6762 If (LNot (BIT6)) 6763 { 6764 Or (Local0, 0x40, Local0) 6765 } 6766 6767 If (BIT7) 6768 { 6769 Or (Local0, 0x80, Local0) 6770 } 6771 } // End Else DWRD zeroed out 6772 6773 Return (Local0) 6774 } // MBIT: Test single bit memory accesses 6775 6776 Method (TEST) 6777 { 6778 6779 Store ("++++++++ BitIndex Test", Debug) 6780 6781 // Zero out DWRD 6782 Store (0x00000000, DWRD) 6783 6784 // MBIT returns zero if successful 6785 // This may be causing problems -- Return (MBIT) 6786 Store (MBIT, Local0) 6787 6788 Return (Local0) 6789 } // TEST 6790 } // BITI 6791 } // _SB system bus 6792 6793// 6794// test IndexOp3.asl 6795// 6796// Additional IndexOp test cases to support ACPICMB (control method battery 6797// test) on Compaq laptops. Test cases include storing a package into 6798// an IndexOp target and validating that changing source and destination 6799// package contents are independent of each other. 6800// 6801 Scope (\_SB) // System Bus 6802 { // _SB system bus 6803 6804 Name (C174, 13) 6805 Name (C175, 8) 6806 6807 Device (C158) 6808 { // C158: AC Adapter device 6809 Name (_HID, "ACPI0003") // AC Adapter device 6810 Name (_PCL, Package (1) {\_SB}) 6811 6812 Method (_PSR) 6813 { 6814 Acquire (\_GL, 0xFFFF) 6815 Release (\_GL) 6816 And (Local0, 1, Local0) // Local0 &= 1 6817 Return (Local0) 6818 } // _PSR 6819 } // C158: AC Adapter device 6820 6821 Name (C176, Package (4) {"Primary", "MultiBay", "DockRight", "DockLeft"}) 6822 6823 Name (C177, Package (4) {0x99F5, 0x99F5, 0x995F, 0x995F}) 6824 6825 Name (C178, Package (4) 6826 { 6827 Package (4) {0, 0, 0x966B, 0x4190}, 6828 Package (4) {0, 0, 0x966B, 0x4190}, 6829 Package (4) {0, 0, 0x966B, 0x4190}, 6830 Package (4) {0, 0, 0x966B, 0x4190} 6831 }) // C178 6832 6833 Name (C179, Package (4) {0, 0, 0x966B, 0x4190}) 6834 6835 Name (C17A, Package (4) 6836 { 6837 Package (3) {0, 0, 0}, 6838 Package (3) {0, 0, 0}, 6839 Package (3) {0, 0, 0}, 6840 Package (3) {0, 0, 0} 6841 }) // C17A 6842 6843 Method (C17B, 1, Serialized) 6844 { // C17B: _BIF implementation 6845 Name (C17C, Package (13) 6846 { // C17C: _BIF control method return package 6847 0, // Power Unit (0 ==> mWh and mW) 6848 0x99F5, // Design Capacity 6849 0x99F5, // Last Full Charge Capacity 6850 1, // Battery Technology (1 ==> rechargeable) 6851 0x3840, // Design Voltage 6852 0x1280, // Design Capacity of Warning 6853 0x0AC7, // Design Capacity of Low 6854 1, // Battery Capacity Granularity 1 (Low -- Warning) 6855 1, // Battery Capacity Granularity 2 (Warning -- Full) 6856 "2891", // Model Number (ASCIIZ) 6857 "(-Unknown-)", // Serial Number (ASCIIZ) 6858 "LIon", // Battery Type (ASCIIZ) 6859 0 // OEM Information (ASCIIZ) 6860 }) // C17C: _BIF control method return package 6861 6862 And (Arg0, 7, Local0) // Local0 = Arg0 & 7 6863 6864 ShiftRight (Local0, 1, Local4) // Local4 = Local0 >> 1 6865 6866 Store (C179, Index (C178, Local4, )) // C178->Local4 = C179 6867 6868 // verify source and destination packages can be altered independent 6869 // of each other (i.e., changing one's contents does NOT change other's 6870 // contents) 6871 Store (0x1234, Index (C179, 2, )) // C179[2] = 0x1234 6872 Store (DerefOf (Index (C179, 2, )), Local2) // Local2 = C179[2] 6873 if (LNotEqual (Local2, 0x1234)) 6874 { Return (0x1234) } 6875 // Local2 = C178[0,2] 6876 Store (DerefOf (Index (DerefOf (Index (C178, 0, )), 2, )), Local2) 6877 if (LNotEqual (Local2, 0x966B)) 6878 { Return (0x1234) } 6879 6880 // Restore data to allow iterative execution 6881 Store (0x966B, Index (C179, 2, )) // C179[2] = 0x966B 6882 6883 // C178[0,3] = 0x5678 6884 Store (0x5678, Index (DerefOf (Index (C178, 0, )), 3, )) 6885 // Local2 = C178[0,3] 6886 Store (DerefOf (Index (DerefOf (Index (C178, 0, )), 3, )), Local2) 6887 if (LNotEqual (Local2, 0x5678)) 6888 { Return (0x5678) } 6889 6890 Store (DerefOf (Index (C179, 3, )), Local2) // Local2 = C179[3] 6891 if (LNotEqual (Local2, 0x4190)) 6892 { Return (0x5678) } 6893 6894 // Restore data to allow iterative execution 6895 Store (0x4190, Index (DerefOf (Index (C178, 0, )), 3, )) // C179[2] = 0x4190 6896 6897 Return (C17C) 6898 } // C17B: _BIF implementation 6899 6900 Device (C154) 6901 { // C154: Battery 0 6902 Name (_HID, "*PNP0C0A") // Control Method Battey ID 6903 Name (_UID, 0) // first instance 6904 6905 Method (_BIF) 6906 { // _BIF 6907 Return (C17B (48)) 6908 } // _BIF 6909 } // C154: Battery 0 6910 6911 Device (IDX3) 6912 { 6913 Method (LCLB,, Serialized) 6914 { // LCLB control method: test Index(Local#) where Local# is buffer 6915 // Local0 is index counter 6916 // Local1 is buffer 6917 // Local2 receives BUFR[Local0] via Deref(Index(Local1...)) 6918 // Local3 is Local1 or Local2 object type 6919 // Local4 is return error code 6920 6921 Name (BUFR, Buffer () {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}) 6922 6923 // save PKG into Local1 6924 Store (BUFR, Local1) 6925 6926 // save Local2 object type value into Local3 6927 Store (ObjectType (Local1), Local3) 6928 6929 // validate Local1 is a Buffer 6930 If (LNotEqual (Local3, 3)) // Buffer type is 3 6931 { Return (0x9F) } 6932 6933 6934 Store (0, Local0) 6935 While (LLess (Local0, 5)) 6936 { // While (Local0 < 5) 6937 // Local2 = Local1[Local0] 6938 Store (DerefOf (Index (Local1, Local0, )), Local2) 6939 6940 // save Local2 object type value into Local3 6941 Store (ObjectType (Local2), Local3) 6942 6943 // validate Local2 is a Number 6944 If (LNotEqual (Local3, 1)) // Number type is 1 6945 { Return (0x9E) } 6946 6947 // validate Local1[Local0] value == Local0 6948 If (LNotEqual (Local0, Local2)) 6949 { // Local0 != Local2 == PKG[Local0] 6950 // Local4 = 0x90 + loop index (Local0) 6951 Add (0x90, Local0, Local4) 6952 6953 // return 0x90 + loop index 6954 Return (Local4) 6955 } 6956 6957 Increment (Local0) 6958 } // While (Local0 < 5) 6959 6960 Store ("DerefOf(Index(LocalBuffer,,)) PASS", Debug) 6961 6962 Return (0) // Pass 6963 } // LCLB control method: test Index(Local#) where Local# is buffer 6964 6965 Method (LCLP,, Serialized) 6966 { // LCLP control method: test Index(Local#) where Local# is package 6967 // Local0 is index counter 6968 // Local1 is package 6969 // Local2 receives PKG[Local0] via Deref(Index(Local1...)) 6970 // Local3 is Local1 or Local2 object type 6971 // Local4 is return error code 6972 6973 Name (PKG, Package () {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}) 6974 6975 // save PKG into Local1 6976 Store (PKG, Local1) 6977 6978 // save Local2 object type value into Local3 6979 Store (ObjectType (Local1), Local3) 6980 6981 // validate Local1 is a Package 6982 If (LNotEqual (Local3, 4)) // Package type is 4 6983 { Return (0x8F) } 6984 6985 6986 Store (0, Local0) 6987 While (LLess (Local0, 5)) 6988 { // While (Local0 < 5) 6989 // Local2 = Local1[Local0] 6990 Store (DerefOf (Index (Local1, Local0, )), Local2) 6991 6992 // save Local2 object type value into Local3 6993 Store (ObjectType (Local2), Local3) 6994 6995 // validate Local2 is a Number 6996 If (LNotEqual (Local3, 1)) // Number type is 1 6997 { Return (0x8E) } 6998 6999 // validate Local1[Local0] value == Local0 7000 If (LNotEqual (Local0, Local2)) 7001 { // Local0 != Local2 == PKG[Local0] 7002 // Local4 = 0x80 + loop index (Local0) 7003 Add (0x80, Local0, Local4) 7004 7005 // return 0x80 + loop index 7006 Return (Local4) 7007 } 7008 7009 Increment (Local0) 7010 } // While (Local0 < 5) 7011 7012 Store ("DerefOf(Index(LocalPackage,,)) PASS", Debug) 7013 7014 Return (0) // Pass 7015 } // LCLP control method: test Index(Local#) where Local# is package 7016 7017 Method (TEST) 7018 { 7019 7020 Store ("++++++++ IndexOp3 Test", Debug) 7021 7022 // store _BIF package return value into Local0 7023 Store (\_SB.C154._BIF, Local0) 7024 7025 // save Local0 object type value into Local1 7026 Store (ObjectType (Local0), Local1) 7027 7028 // validate Local0 is a Package 7029 If (LNotEqual (Local1, 4)) // Package type is 4 7030 { // failure: did not return a Package (type 4) 7031 // if Local0 is a Number, it contains an error code 7032 If (LEqual (Local1, 1)) // Number type is 1 7033 { Return (Local0) } // return Local0 error code 7034 Else // Local0 is not a Number 7035 { Return (1) } // return default error code 7036 } // failure: did not return a Package (type 4) 7037 7038 // save LCLB control method return value into Local2 7039 Store (LCLB, Local2) 7040 If (LNotEqual (Local2, 0)) 7041 { Return (Local2) } // return failure code 7042 7043 // save LCLP control method return value into Local2 7044 Store (LCLP, Local2) 7045 If (LNotEqual (Local2, 0)) 7046 { Return (Local2) } // return failure code 7047 7048 Return (0) // Pass 7049 } // TEST 7050 } // IDX3: Test device name 7051 } // _SB system bus 7052 7053// 7054// MTL developed test to exercise Indexes into buffers 7055// 7056 Device(IDX7) 7057 { 7058 7059 Name (PKG4, Package() { 7060 0x2, 7061 "A short string", 7062 Buffer() {0xA, 0xB, 0xC, 0xD}, 7063 0x1234, 7064 Package() {IDX7, 0x3} 7065 }) 7066 7067 // 7068 // Generic Test method 7069 // 7070 // This test returns 0xE (14) - ObjectType = Buffer Field 7071 Method(TST1,, Serialized) 7072 { 7073 Name (DEST, Buffer () // 62 characters plus NULL 7074 {"Destination buffer that is longer than the short source buffer"}) 7075 7076 // verify object type returned by Index(Buffer,Element,) 7077 Store (Index (DEST, 2, ), Local1) 7078 Store (ObjectType (Local1), Local2) 7079 If (LEqual(Local2, 14)) 7080 { 7081 Return(0) 7082 } 7083 Else 7084 { 7085 Return(0x1) 7086 } 7087 7088 } 7089 7090 Method(TST2,, Serialized) 7091 { 7092 Name (BUF0, Buffer() {0x1, 0x2, 0x3, 0x4, 0x5}) 7093 Store(0x55, Index(BUF0, 2)) 7094 Store(DerefOf(Index(BUF0, 2)), Local0) 7095 If (LEqual(Local0, 0x55)) 7096 { 7097 Return(0) 7098 } 7099 Else 7100 { 7101 Return(0x2) 7102 } 7103 7104 7105 } 7106 7107 Method(TST3,, Serialized) 7108 { 7109 Name (BUF1, Buffer() {0x1, 0x2, 0x3, 0x4, 0x5}) 7110 Store(Index(BUF1, 1), Local0) 7111 Store(DerefOf(Local0), Local1) 7112 If (LEqual(Local1, 0x2)) 7113 { 7114 Return(0) 7115 } 7116 Else 7117 { 7118 Return(0x3) 7119 } 7120 7121 } 7122 7123 Method(TST4) 7124 { 7125 // Index (PKG4, 0) is a Number 7126 Store (Index (PKG4, 0), Local0) 7127 Store (ObjectType(Local0), Local1) 7128 If (LEqual(Local1, 0x1)) 7129 { 7130 Return(0) 7131 } 7132 Else 7133 { 7134 Return(0x4) 7135 } 7136 7137 } 7138 7139 Method(TST5) 7140 { 7141 // Index (PKG4, 1) is a String 7142 Store (Index (PKG4, 1), Local0) 7143 Store (ObjectType(Local0), Local1) 7144 If (LEqual(Local1, 0x2)) 7145 { 7146 Return(0) 7147 } 7148 Else 7149 { 7150 Return(0x5) 7151 } 7152 7153 } 7154 7155 Method(TST6) 7156 { 7157 // Index (PKG4, 2) is a Buffer 7158 Store (Index (PKG4, 2), Local0) 7159 Store (ObjectType(Local0), Local1) 7160 If (LEqual(Local1, 0x3)) 7161 { 7162 Return(0) 7163 } 7164 Else 7165 { 7166 Return(0x6) 7167 } 7168 7169 } 7170 7171 Method(TST7) 7172 { 7173 // Index (PKG4, 3) is a Number 7174 Store (Index (PKG4, 3), Local0) 7175 Store (ObjectType(Local0), Local1) 7176 If (LEqual(Local1, 0x1)) 7177 { 7178 Return(0) 7179 } 7180 Else 7181 { 7182 Return(0x7) 7183 } 7184 7185 } 7186 7187 Method(TST8) 7188 { 7189 // Index (PKG4, 4) is a Package 7190 Store (Index (PKG4, 4), Local0) 7191 Store (ObjectType(Local0), Local1) 7192 If (LEqual(Local1, 0x4)) 7193 { 7194 Return(0) 7195 } 7196 Else 7197 { 7198 Return(0x8) 7199 } 7200 7201 } 7202 7203 Method(TST9) 7204 { 7205 // DerefOf (Index (PKG4, 0)) is a Number 7206 Store (DerefOf (Index (PKG4, 0)), Local0) 7207 If (LEqual(Local0, 0x2)) 7208 { 7209 Return(0) 7210 } 7211 Else 7212 { 7213 Return(0x9) 7214 } 7215 7216 } 7217 7218 Method(TSTA) 7219 { 7220 // DerefOf (Index (PKG4, 1)) is a String 7221 Store (DerefOf (Index (PKG4, 1)), Local0) 7222 Store (SizeOf(Local0), Local1) 7223 If (LEqual(Local1, 0xE)) 7224 { 7225 Return(0) 7226 } 7227 Else 7228 { 7229 Return(0xA) 7230 } 7231 7232 } 7233 7234 Method(TSTB) 7235 { 7236 // DerefOf (Index (PKG4, 2)) is a Buffer 7237 Store (DerefOf (Index (PKG4, 2)), Local0) 7238 Store (SizeOf(Local0), Local1) 7239 If (LEqual(Local1, 0x4)) 7240 { 7241 Return(0) 7242 } 7243 Else 7244 { 7245 Return(0xB) 7246 } 7247 7248 } 7249 7250 Method(TSTC) 7251 { 7252 // DerefOf (Index (PKG4, 3)) is a Number 7253 Store (DerefOf (Index (PKG4, 3)), Local0) 7254 If (LEqual(Local0, 0x1234)) 7255 { 7256 Return(0) 7257 } 7258 Else 7259 { 7260 Return(0xC) 7261 } 7262 7263 } 7264 7265 Method(TSTD) 7266 { 7267 // DerefOf (Index (PKG4, 4)) is a Package 7268 Store (DerefOf (Index (PKG4, 4)), Local0) 7269 Store (SizeOf(Local0), Local1) 7270 If (LEqual(Local1, 0x2)) 7271 { 7272 Return(0) 7273 } 7274 Else 7275 { 7276 Return(0xD) 7277 } 7278 7279 } 7280 7281 Method(TSTE) 7282 { 7283 // DerefOf (Index (PKG4, 2)) is a Buffer 7284 Store (DerefOf (Index (PKG4, 2)), Local0) 7285 // DerefOf (Index (Local0, 1)) is a Number 7286 Store (DerefOf (Index (Local0, 1)), Local1) 7287 If (LEqual(Local1, 0xB)) 7288 { 7289 Return(0) 7290 } 7291 Else 7292 { 7293 Return(0xE) 7294 } 7295 7296 } 7297 7298 Method (TSTF,, Serialized) 7299 { 7300 Name (SRCB, Buffer (12) {}) // 12 characters 7301 Store ("Short Buffer", SRCB) 7302 7303 Name (DEST, Buffer () // 62 characters plus NULL 7304 {"Destination buffer that is longer than the short source buffer"}) 7305 7306 // overwrite DEST contents, starting at buffer position 2 7307 Store (SRCB, Index (DEST, 2)) 7308 7309 // 7310 // The DEST buffer element should be replaced with the last element of 7311 // the SRCB element (i.e. 's'->'r') 7312 Store (DerefOf (Index (DEST, 2)), Local0) 7313 7314 If (LNotEqual (Local0, 0x72)) // 'r' 7315 { 7316 // DEST element does not match the value from SRCB 7317 Return(Or(Local0, 0x1000)) 7318 } 7319 7320 Return(0) 7321 } 7322 7323 Method (TSTG,, Serialized) 7324 { 7325 7326 Name (SRCB, Buffer (12) {}) // 12 characters 7327 Store ("Short Buffer", SRCB) 7328 7329 Name (DEST, Buffer () // 62 characters plus NULL 7330 {"Destination buffer that is longer than the short source buffer"}) 7331 7332 // overwrite DEST contents, starting at buffer position 2 7333 Store (SRCB, Index (DEST, 2)) 7334 7335 // 7336 // The next element of DEST should be unchanged 7337 // 7338 Store (DerefOf (Index (DEST, 3)), Local0) 7339 7340 If (LNotEqual (Local0, 0x74)) // 't' 7341 { 7342 // DEST has been changed 7343 Return(Or(Local0, 0x2000)) 7344 } 7345 7346 // 7347 // The next element of DEST should be unchanged 7348 // 7349 Store (DerefOf (Index (DEST, 4)), Local0) 7350 7351 If (LNotEqual (Local0, 0x69)) // 'i' 7352 { 7353 // DEST has been changed 7354 Return(Or(Local0, 0x2100)) 7355 } 7356 7357 // 7358 // The next element of DEST should be unchanged 7359 // 7360 Store (DerefOf (Index (DEST, 5)), Local0) 7361 7362 If (LNotEqual (Local0, 0x6E)) // 'n' 7363 { 7364 // DEST has been changed 7365 Return(Or(Local0, 0x2200)) 7366 } 7367 7368 // 7369 // The next element of DEST should be unchanged 7370 // 7371 Store (DerefOf (Index (DEST, 6)), Local0) 7372 7373 If (LNotEqual (Local0, 0x61)) // 'a' 7374 { 7375 // DEST has been changed 7376 Return(Or(Local0, 0x2300)) 7377 } 7378 7379 // 7380 // The next element of DEST should be unchanged 7381 // 7382 Store (DerefOf (Index (DEST, 7)), Local0) 7383 7384 If (LNotEqual (Local0, 0x74)) // 't' 7385 { 7386 // DEST has been changed 7387 Return(Or(Local0, 0x2400)) 7388 } 7389 7390 // 7391 // Verify DEST elements beyond end of SRCB buffer copy 7392 // have not been changed 7393 Store (DerefOf (Index (DEST, 14)), Local0) 7394 7395 If (LNotEqual (Local0, 0x66)) // 'f' 7396 { 7397 // DEST has been changed 7398 Return(Or(Local0, 0x2400)) 7399 } 7400 7401 Return(0) 7402 } 7403 7404 // 7405 // This test shows that MS ACPI.SYS stores only the lower 8-bits of a 32-bit 7406 // number into the index'ed buffer 7407 // 7408 Method (TSTH,, Serialized) 7409 { 7410 // Create a Destination Buffer 7411 Name (DBUF, Buffer () {"abcdefghijklmnopqrstuvwxyz"}) 7412 7413 // Store a number > UINT8 into an index of the buffer 7414 Store (0x12345678, Index(DBUF, 2)) 7415 7416 // Check the results 7417 Store (DerefOf (Index (DBUF, 2)), Local0) 7418 If (LNotEqual (Local0, 0x78)) // 0x78 7419 { 7420 Return(Or(Local0, 0x3000)) 7421 } 7422 7423 Store (DerefOf (Index (DBUF, 3)), Local0) 7424 If (LNotEqual (Local0, 0x64)) // 'd' 7425 { 7426 Return(Or(Local0, 0x3100)) 7427 } 7428 7429 Store (DerefOf (Index (DBUF, 4)), Local0) 7430 If (LNotEqual (Local0, 0x65)) // 'e' 7431 { 7432 Return(Or(Local0, 0x3200)) 7433 } 7434 7435 Store (DerefOf (Index (DBUF, 5)), Local0) 7436 If (LNotEqual (Local0, 0x66)) // 'f' 7437 { 7438 Return(Or(Local0, 0x3300)) 7439 } 7440 7441 Return(0) 7442 } 7443 7444 Method (TSTI,, Serialized) 7445 { 7446 // Create a Destination Buffer 7447 Name (DBUF, Buffer () {"abcdefghijklmnopqrstuvwxyz"}) 7448 7449 // Store a String into an index of the buffer 7450 Store ("ABCDEFGH", Index(DBUF, 2)) 7451 7452 // Check the results 7453 Store (DerefOf (Index (DBUF, 2)), Local0) 7454 If (LNotEqual (Local0, 0x48)) // 'H' 7455 { 7456 Return(Or(Local0, 0x4000)) 7457 } 7458 7459 Store (DerefOf (Index (DBUF, 3)), Local0) 7460 If (LNotEqual (Local0, 0x64)) // 'd' 7461 { 7462 Return(Or(Local0, 0x4100)) 7463 } 7464 7465 Store (DerefOf (Index (DBUF, 4)), Local0) 7466 If (LNotEqual (Local0, 0x65)) // 'e' 7467 { 7468 Return(Or(Local0, 0x4200)) 7469 } 7470 7471 Store (DerefOf (Index (DBUF, 5)), Local0) 7472 If (LNotEqual (Local0, 0x66)) // 'f' 7473 { 7474 Return(Or(Local0, 0x4300)) 7475 } 7476 7477 Return(0) 7478 } 7479 7480 Method(TSTJ,, Serialized) 7481 { 7482 // Create a Destination Buffer 7483 Name (DBUF, Buffer () {"abcdefghijklmnopqrstuvwxyz"}) 7484 7485 // Store a number > UINT8 into an index of the buffer 7486 Store (0x1234, Index(DBUF, 2)) 7487 7488 // Check the results 7489 Store (DerefOf (Index (DBUF, 2)), Local0) 7490 If (LNotEqual (Local0, 0x34)) // 0x34 7491 { 7492 Return(Or(Local0, 0x3000)) 7493 } 7494 7495 Store (DerefOf (Index (DBUF, 3)), Local0) 7496 If (LNotEqual (Local0, 0x64)) // 'd' 7497 { 7498 Return(Or(Local0, 0x3100)) 7499 } 7500 7501 Store (DerefOf (Index (DBUF, 4)), Local0) 7502 If (LNotEqual (Local0, 0x65)) // 'e' 7503 { 7504 Return(Or(Local0, 0x3200)) 7505 } 7506 7507 Store (DerefOf (Index (DBUF, 5)), Local0) 7508 If (LNotEqual (Local0, 0x66)) // 'f' 7509 { 7510 Return(Or(Local0, 0x3300)) 7511 } 7512 7513 Return(0) 7514 } 7515 7516 Method(TSTK,, Serialized) 7517 { 7518 // Create a Destination Buffer 7519 Name (DBUF, Buffer () {"abcdefghijklmnopqrstuvwxyz"}) 7520 7521 // Store a number > UINT8 into an index of the buffer 7522 Store (0x123456, Index(DBUF, 2)) 7523 7524 // Check the results 7525 Store (DerefOf (Index (DBUF, 2)), Local0) 7526 If (LNotEqual (Local0, 0x56)) // 0x56 7527 { 7528 Return(Or(Local0, 0x3000)) 7529 } 7530 7531 Store (DerefOf (Index (DBUF, 3)), Local0) 7532 If (LNotEqual (Local0, 0x64)) // 'd' 7533 { 7534 Return(Or(Local0, 0x3100)) 7535 } 7536 7537 Store (DerefOf (Index (DBUF, 4)), Local0) 7538 If (LNotEqual (Local0, 0x65)) // 'e' 7539 { 7540 Return(Or(Local0, 0x3200)) 7541 } 7542 7543 Store (DerefOf (Index (DBUF, 5)), Local0) 7544 If (LNotEqual (Local0, 0x66)) // 'f' 7545 { 7546 Return(Or(Local0, 0x3300)) 7547 } 7548 7549 Return(0) 7550 } 7551 7552 Method(TSTL,, Serialized) 7553 { 7554 // Create a Destination Buffer 7555 Name (DBUF, Buffer () {"abcdefghijklmnopqrstuvwxyz"}) 7556 7557 // Store a number > UINT8 into an index of the buffer 7558 Store (0x12, Index(DBUF, 2)) 7559 7560 // Check the results 7561 Store (DerefOf (Index (DBUF, 2)), Local0) 7562 If (LNotEqual (Local0, 0x12)) // 0x12 7563 { 7564 Return(Or(Local0, 0x3000)) 7565 } 7566 7567 Store (DerefOf (Index (DBUF, 3)), Local0) 7568 If (LNotEqual (Local0, 0x64)) // 'd' 7569 { 7570 Return(Or(Local0, 0x3100)) 7571 } 7572 7573 Store (DerefOf (Index (DBUF, 4)), Local0) 7574 If (LNotEqual (Local0, 0x65)) // 'e' 7575 { 7576 Return(Or(Local0, 0x3200)) 7577 } 7578 7579 Store (DerefOf (Index (DBUF, 5)), Local0) 7580 If (LNotEqual (Local0, 0x66)) // 'f' 7581 { 7582 Return(Or(Local0, 0x3300)) 7583 } 7584 7585 Return(0) 7586 } 7587 7588 Method(TEST) 7589 { 7590 Store ("++++++++ IndexOp7 Test", Debug) 7591 7592 Store(TST1(), Local0) 7593 if (LGreater (Local0, 0)) 7594 { 7595 Return(Local0) 7596 } 7597 7598 Store(TST2(), Local0) 7599 if (LGreater (Local0, 0)) 7600 { 7601 Return(Local0) 7602 } 7603 7604 Store(TST3(), Local0) 7605 if (LGreater (Local0, 0)) 7606 { 7607 Return(Local0) 7608 } 7609 7610 Store(TST4(), Local0) 7611 if (LGreater (Local0, 0)) 7612 { 7613 Return(Local0) 7614 } 7615 7616 Store(TST5(), Local0) 7617 if (LGreater (Local0, 0)) 7618 { 7619 Return(Local0) 7620 } 7621 7622 Store(TST6(), Local0) 7623 if (LGreater (Local0, 0)) 7624 { 7625 Return(Local0) 7626 } 7627 7628 Store(TST7(), Local0) 7629 if (LGreater (Local0, 0)) 7630 { 7631 Return(Local0) 7632 } 7633 7634 Store(TST8(), Local0) 7635 if (LGreater (Local0, 0)) 7636 { 7637 Return(Local0) 7638 } 7639 7640 Store(TST9(), Local0) 7641 if (LGreater (Local0, 0)) 7642 { 7643 Return(Local0) 7644 } 7645 7646 Store(TSTA(), Local0) 7647 if (LGreater (Local0, 0)) 7648 { 7649 Return(Local0) 7650 } 7651 7652 Store(TSTB(), Local0) 7653 if (LGreater (Local0, 0)) 7654 { 7655 Return(Local0) 7656 } 7657 7658 Store(TSTC(), Local0) 7659 if (LGreater (Local0, 0)) 7660 { 7661 Return(Local0) 7662 } 7663 7664 Store(TSTD(), Local0) 7665 if (LGreater (Local0, 0)) 7666 { 7667 Return(Local0) 7668 } 7669 7670 Store(TSTE(), Local0) 7671 if (LGreater (Local0, 0)) 7672 { 7673 Return(Local0) 7674 } 7675 7676 /* No longer ACPI compliant */ 7677 /* 7678 Store(TSTF(), Local0) 7679 if (LGreater (Local0, 0)) 7680 { 7681 Return(Local0) 7682 } 7683 */ 7684 7685 Store(TSTG(), Local0) 7686 if (LGreater (Local0, 0)) 7687 { 7688 Return(Local0) 7689 } 7690 7691 Store(TSTH(), Local0) 7692 if (LGreater (Local0, 0)) 7693 { 7694 Return(Local0) 7695 } 7696 7697 /* No longer ACPI compliant */ 7698 /* 7699 Store(TSTI(), Local0) 7700 if (LGreater (Local0, 0)) 7701 { 7702 Return(Local0) 7703 } 7704 */ 7705 Store(TSTJ(), Local0) 7706 if (LGreater (Local0, 0)) 7707 { 7708 Return(Local0) 7709 } 7710 7711 Store(TSTK(), Local0) 7712 if (LGreater (Local0, 0)) 7713 { 7714 Return(Local0) 7715 } 7716 7717 Store(TSTL(), Local0) 7718 if (LGreater (Local0, 0)) 7719 { 7720 Return(Local0) 7721 } 7722 7723 Return(Local0) 7724 7725 } 7726 7727 } // Device(IDX7) 7728 7729// 7730// test MatchOp.asl 7731// 7732// MatchOp test cases that utilize nested DerefOf(Index(...)) to validate 7733// MatchOp, DerefOfOp, and IndexOp of nested packages. 7734// 7735 Device (MTCH) 7736 { 7737 7738 Method (TEST,, Serialized) 7739 { 7740 Store ("++++++++ MatchOp Test", Debug) 7741 7742 Name (TIM0, Package () 7743 { 7744 Package () {0x78, 0xB4, 0xF0, 0x0384}, 7745 Package () {0x23, 0x21, 0x10, 0}, 7746 Package () {0x0B, 9, 4, 0}, 7747 Package () {0x70, 0x49, 0x36, 0x27, 0x19}, 7748 Package () {0, 1, 2, 1, 2}, 7749 Package () {0, 0, 0, 1, 1}, 7750 Package () {4, 3, 2, 0}, 7751 Package () {2, 1, 0, 0} 7752 }) // TIM0 7753 7754 Name (TMD0, Buffer (20) {0xFF, 0xFF, 0xFF, 0xFF }) 7755 CreateDWordField (TMD0, 0, PIO0) // 0xFFFFFFFF 7756 CreateDWordField (TMD0, 4, DMA0) 7757 CreateDWordField (TMD0, 8, PIO1) 7758 CreateDWordField (TMD0, 12, DMA1) 7759 CreateDWordField (TMD0, 16, CHNF) 7760 7761 7762 // validate PIO0 value 7763 Store (PIO0, Local3) 7764 7765 // save Local3 object type value into Local2 7766 Store (ObjectType (Local3), Local2) 7767 7768 // validate Local3 is a Number 7769 If (LNotEqual (Local2, 1)) // Number type is 1 7770 { Return (2) } // failure 7771 7772 // validate Local3 Number value 7773 If (LNotEqual (Local3, 0xFFFFFFFF)) // Number value 0xFFFFFFFF 7774 { Return (3) } // failure 7775 7776 Store ("DWordField PASS", Debug) 7777 7778 7779 Store (0, Local5) 7780 Store (Match (DerefOf (Index (TIM0, 1, )), MLE, Local5, MTR, 0, 0), Local6) 7781 7782 // save Local6 object type value into Local2 7783 Store (ObjectType (Local6), Local2) 7784 7785 // validate Local6 is a Number 7786 If (LNotEqual (Local2, 1)) // Number type is 1 7787 { Return (4) } // failure 7788 7789 Store ("Match(DerefOf(Index(TIM0,1)),... PASS", Debug) 7790 7791 7792 // validate following produces a nested package to validate 7793 // that MatchOp did not corrupt SearchPackage (TIM0) 7794 Store (DerefOf (Index (TIM0, 1, )), Local4) 7795 7796 // save Local4 object type value into Local2 7797 Store (ObjectType (Local4), Local2) 7798 7799 // validate Local4 is a Package 7800 If (LNotEqual (Local2, 4)) // Package type is 4 7801 { Return (5) } // failure 7802 7803 Store ("DerefOf(Index(TIM0,1)),... PASS", Debug) 7804 7805 7806 And (Match (DerefOf (Index (TIM0, 0, )), MGE, PIO0, MTR, 0, 0), 3, Local0) 7807 7808 // save Local0 object type value into Local2 7809 Store (ObjectType (Local0), Local2) 7810 7811 // validate Local0 is a Number 7812 If (LNotEqual (Local2, 1)) // Number type is 1 7813 { Return (6) } // failure 7814 7815 // validate Local0 Number value 7816 If (LNotEqual (Local0, 3)) // Number value 3 7817 { Return (7) } // failure 7818 7819 Store ("And(Match(DerefOf(Index(TIM0,0)),... PASS", Debug) 7820 7821 7822 // again, validate following produces a nested package 7823 Store (DerefOf (Index (TIM0, 1, )), Local4) 7824 7825 // save Local4 object type value into Local2 7826 Store (ObjectType (Local4), Local2) 7827 7828 // validate Local4 is a Package 7829 If (LNotEqual (Local2, 4)) // Package type is 4 7830 { Return (8) } // failure 7831 7832 Store ("DerefOf(Index(TIM0,1)),... PASS again", Debug) 7833 7834 7835 // again, validate following produces a nested package 7836 Store (DerefOf (Index (TIM0, 1, )), Local4) 7837 7838 // save Local4 object type value into Local2 7839 Store (ObjectType (Local4), Local2) 7840 7841 // validate Local4 is a Package 7842 If (LNotEqual (Local2, 4)) // Package type is 4 7843 { Return (9) } // failure 7844 7845 Store ("DerefOf(Index(TIM0,1)),... PASS again", Debug) 7846 7847 7848 // test nested DerefOf(Index) operators 7849 Store (DerefOf (Index (DerefOf (Index (TIM0, 1, )), Local0, )), Local1) 7850 7851 // save Local1 object type value into Local2 7852 Store (ObjectType (Local1), Local2) 7853 7854 // validate Local1 is a Number 7855 If (LNotEqual (Local2, 1)) // Number type is 1 7856 { Return (10) } // failure 7857 7858 // zero indicates pass, non-zero is an error code 7859 If (LNotEqual (Local1, 0)) 7860 { Return (11) } // failure 7861 7862 Store ("DerefOf(Index(DerefOf(Index(TIM0,1)),... PASS", Debug) 7863 7864 7865 // again, validate following produces a nested package 7866 Store (DerefOf (Index (TIM0, 1, )), Local4) 7867 7868 // save Local4 object type value into Local2 7869 Store (ObjectType (Local4), Local2) 7870 7871 // validate Local4 is a Package 7872 If (LNotEqual (Local2, 4)) // Package type is 4 7873 { Return (12) } // failure 7874 7875 Store ("DerefOf(Index(TIM0,1)),... PASS again", Debug) 7876 7877 7878 // retest nested DerefOf(Index) operators 7879 Store (DerefOf (Index (DerefOf (Index (TIM0, 1, )), Local0, )), Local1) 7880 7881 // save Local1 object type value into Local2 7882 Store (ObjectType (Local1), Local2) 7883 7884 // validate Local1 is a Number 7885 If (LNotEqual (Local2, 1)) // Number type is 1 7886 { Return (13) } // failure 7887 7888 // zero indicates pass, non-zero is an error code 7889 If (LNotEqual (Local1, 0)) 7890 { Return (14) } // failure 7891 7892 Store ("DerefOf(Index(DerefOf(Index(TIM0,1)),... PASS again", Debug) 7893 7894 7895 // again, validate following produces a nested package 7896 Store (DerefOf (Index (TIM0, 1, )), Local4) 7897 7898 // save Local4 object type value into Local2 7899 Store (ObjectType (Local4), Local2) 7900 7901 // validate Local4 is a Package 7902 If (LNotEqual (Local2, 4)) // Package type is 4 7903 { Return (15) } // failure 7904 7905 Store ("DerefOf(Index(TIM0,1)),... PASS again", Debug) 7906 7907 7908 Return (0) // pass 7909 } // TEST 7910 } // MTCH 7911 7912// 7913// test WhileBrk.asl 7914// 7915// This code tests the Break term and While term 7916// 7917// Syntax of Break term 7918// BreakTerm := Break 7919// The break operation causes the current package execution to complete. 7920// 7921// Syntax of While Term 7922// WhileTerm := While( 7923// Predicate //TermArg=>Integer 7924// ) {TermList} 7925// Predicate is evaluated as an integer. 7926// If the integer is non-zero, the list of terms in TermList is executed. 7927// The operation repeats until the Predicate evaluates to zero. 7928// 7929// MTL NOTE: This test has been modified to reflect ACPI 2.0 break 7930// NOTE: This test, when run under the MS ACPI.SYS grinds the system to 7931// a halt. 7932// 7933 Device (WHLB) 7934 { 7935 Name (CNT0, 0) 7936 Name (CNT1, 0) 7937 7938 Method (TEST) 7939 { 7940 // Check Break statement nested in If nested in While nested in 7941 // While only exits inner-most While loop 7942 Store (0, CNT0) 7943 7944 While (LLess (CNT0, 4)) 7945 { 7946 Store (0, CNT1) 7947 While (LLess (CNT1, 10)) 7948 { 7949 if (LEqual (CNT1, 1)) 7950 { 7951 Break // exit encompassing loop 7952 } 7953 7954 Increment (CNT1) 7955 } 7956 7957 If (LNotEqual (CNT1, 1)) 7958 { 7959 // failure 7960 Return (7) 7961 } 7962 7963 Increment (CNT0) 7964 } 7965 7966 // Verify Break only exited inner-most While loop 7967 7968 If (LNotEqual (CNT0, 4)) 7969 { 7970 // failure 7971 Return (8) 7972 } 7973 7974 Store ("While/While/If/Break PASS", Debug) 7975 7976 Store ("++++++++ WhileBrk Test", Debug) 7977 7978 // Check Break statement nested in While 7979 Store (0, CNT0) 7980 7981 While (LLess (CNT0, 10)) 7982 { 7983 Break // exit encompassing package 7984 Increment (CNT0) 7985 } 7986 7987 If (LNotEqual (CNT0, 0)) // instruction after Break executed 7988 { 7989 Return (4) 7990 } 7991 7992 7993 Store (0, CNT0) 7994 7995 // Test While Term 7996 While (LLess (CNT0, 10)) 7997 { 7998 Increment (CNT0) 7999 } 8000 8001 // Check if the while loop was executed until the condition is satisfied. 8002 If (LNotEqual (CNT0, 10)) 8003 { 8004 Return (1) 8005 } 8006 8007 8008 // While loop in a reverse order 8009 While (LGreater (CNT0, 0)) 8010 { 8011 Decrement (CNT0) 8012 } 8013 8014 // Check if the while loop was executed until the condition is satisfied. 8015 If (LNotEqual (CNT0, 0)) 8016 { 8017 Return (2) 8018 } 8019 8020 8021 Store ("While/Break PASS", Debug) 8022 8023 8024 // Check Break statement nested in If nested in While 8025 Store (0, CNT0) 8026 8027 While (LLess (CNT0, 10)) 8028 { 8029 if (LEqual (CNT0, 5)) 8030 { 8031 Break // exit encompassing Package (If) 8032 8033 // if we execute the next instruction, 8034 // Break did not exit the loop 8035 Store (20, CNT0) // exit While loop with value larger 8036 // than above 8037 } 8038 8039 Increment (CNT0) // check if Break exited both If and While 8040 } // While 8041 8042 If (LGreater (CNT0, 19)) 8043 { // instruction after Break inside IfOp executed 8044 Return (5) 8045 } 8046 8047 // 8048 // Break will exit out of the while loop, therefore 8049 // the CNT0 counter should still Increment until 5 8050 // 8051 If (LNotEqual (CNT0, 5)) 8052 { // instruction after Break inside WhileOp executed 8053 Return (6) 8054 } 8055 Store ("While/If/Break PASS", Debug) 8056 8057 8058 // All the conditions passed 8059 Return (0) 8060 } // TEST 8061 } // WHLB 8062 8063 8064// 8065// test IndexOp2.asl 8066// 8067// Additional IndexOp test cases to support ACPICMB (control method battery 8068// test) on Toshiba Portege 7020CT. Test cases include appropriate bit 8069// shifting of Field elements and reading Field elements greater than 64 bits. 8070// 8071// MTL NOTE: This test has been modified slightly from the original test 8072// to take into account ACPI specification limitations. 8073// 8074 Scope (\_SB) // System Bus 8075 { // _SB system bus 8076 8077 Device (MEM) 8078 { // MEM 8079 Name (_HID, 0x010CD041) 8080 Name (_STA, 0x0F) 8081 8082 OperationRegion (SMEM, SystemMemory, 0x800000, 0x100) 8083 Field (SMEM, AnyAcc, NoLock, Preserve) 8084 { // Field: SMEM overlay using 32-bit field elements 8085 SMD0, 32, // 32-bits 8086 SMD1, 32, // 32-bits 8087 SMD2, 32, // 32-bits 8088 SMD3, 32 // 32-bits 8089 } // Field: SMEM overlay using 32-bit field elements 8090 Field (SMEM, AnyAcc, NoLock, Preserve) 8091 { // Field: SMEM overlay using greater than 32-bit field elements 8092 SME0, 69, // larger than an integer (32 or 64) 8093 SME1, 97 // larger than an integer 8094 } // Field: SMEM overlay using greater than 32-bit field elements 8095 8096 OperationRegion (SRAM, SystemMemory, 0x100B0000, 0xF000) 8097 Field (SRAM, AnyAcc, NoLock, Preserve) 8098 { // Field: SRAM overlay 8099 , 0x34000, // skip 8100 IEAX, 0x20, 8101 IEBX, 0x20, 8102 IECX, 0x20, 8103 IEDX, 0x20, 8104 IESI, 0x20, 8105 IEDI, 0x20, 8106 IEBP, 0x20, 8107 , 0x20, 8108 OEAX, 0x20, 8109 OEBX, 0x20, 8110 OECX, 0x20, 8111 OEDX, 0x20, 8112 OESI, 0x20, 8113 OEDI, 0x20, 8114 OEBP, 0x20, 8115 , 0x618, // skip 8116 ACST, 1, 8117 BES1, 1, 8118 BES2, 1, 8119 , 5, // skip 8120 BMN1, 0x68, 8121 BSN1, 0x58, 8122 BTP1, 0x48, 8123 BPU1, 0x20, 8124 BDC1, 0x20, 8125 BLF1, 0x20, 8126 BTC1, 0x20, 8127 BDV1, 0x20, 8128 BST1, 0x20, 8129 BPR1, 0x20, 8130 BRC1, 0x20, 8131 BPV1, 0x20, 8132 , 0x20, 8133 BCW1, 0x20, 8134 BCL1, 0x20, 8135 BG11, 0x20, 8136 BG21, 0x20, 8137 BOI1, 0x20, 8138 , 0x530, // skip 8139 BMN2, 0x68, 8140 BSN2, 0x58, 8141 BTP2, 0x48, 8142 BPU2, 0x20, 8143 BDC2, 0x20, 8144 BLF2, 0x20, 8145 BTC2, 0x20, 8146 BDV2, 0x20, 8147 BST2, 0x20, 8148 BPR2, 0x20, 8149 BRC2, 0x20, 8150 BPV2, 0x20, 8151 , 0x20, 8152 BCW2, 0x20, 8153 BCL2, 0x20, 8154 BG12, 0x20, 8155 BG22, 0x20, 8156 BOI2, 0x20, 8157 , 0x518, // skip 8158 AC01, 0x10, 8159 AC11, 0x10, 8160 PSV1, 0x10, 8161 CRT1, 0x10, 8162 TMP1, 0x10, 8163 AST1, 0x10, 8164 AC21, 0x10, 8165 AC31, 0x10, 8166 AC02, 0x10, 8167 AC12, 0x10, 8168 PSV2, 0x10, 8169 CRT2, 0x10, 8170 TMP2, 0x10, 8171 AST2, 0x10, 8172 AC22, 0x10, 8173 AC32, 0x10, 8174 AC03, 0x10, 8175 AC13, 0x10, 8176 PSV3, 0x10, 8177 CRT3, 0x10, 8178 TMP3, 0x10, 8179 AST3, 0x10, 8180 AC23, 0x10, 8181 AC33, 0x10, 8182 , 0x80, // skip 8183 TMPF, 0x10, 8184 , 0x570, // skip 8185 FANH, 1, 8186 FANL, 7, 8187 TF11, 1, 8188 TF21, 1, 8189 TF31, 1, 8190 , 1, 8191 TF10, 1, 8192 TF20, 1, 8193 TF30, 1, 8194 , 1, 8195 TP11, 1, 8196 TP21, 1, 8197 TP31, 1, 8198 , 0x6D, // 109 8199 GP50, 1, 8200 GP51, 1, 8201 GP52, 1, 8202 GP53, 1, 8203 , 4, 8204 GP60, 1, 8205 GP61, 1, 8206 GP62, 1, 8207 GP63, 1, 8208 GP64, 1, 8209 GP65, 1, 8210 GP66, 1, 8211 , 1, 8212 GP70, 1, 8213 GP71, 1, 8214 GP72, 1, 8215 GP73, 1, 8216 GP74, 1, 8217 GP75, 1, 8218 GP76, 1, 8219 , 1, 8220 WED0, 1, 8221 WED1, 1, 8222 WED2, 1, 8223 WED3, 1, 8224 WED4, 1, 8225 , 3, 8226 SBL0, 1, 8227 SBL1, 1, 8228 SBL2, 1, 8229 SBL3, 1, 8230 , 4, 8231 LIDS, 1, 8232 VALF, 1, 8233 , 2, 8234 DCKI, 1, 8235 DCKF, 1, 8236 BT1F, 1, 8237 BT2F, 1, 8238 , 0x7D0, // skip 8239 HKCD, 8, 8240 , 8, 8241 DLID, 0x20, 8242 DSRN, 0x20, 8243 , 0x20, 8244 BDID, 0x20, 8245 DSPW, 1, 8246 VGAF, 1, 8247 VWE0, 1, 8248 VWE1, 1, 8249 PPSC, 1, 8250 SPSC, 1, 8251 EWLD, 1, 8252 EWPS, 1, 8253 , 0x1768, // skip 8254 PRES, 0x8000 8255 } // Field: SRAM overlay 8256 } // MEM 8257 8258 Device (BAT1) 8259 { // BAT1 8260 Name (_HID, EISAID ("PNP0C0A")) // Control Method Battey ID 8261 Name (_UID, 1) 8262 Name (_PCL, Package (1) {\_SB}) 8263 8264 Method (_STA) 8265 { // _STA 8266 If (\_SB.MEM.BES1) 8267 { Return (0x1F) } // battery present 8268 Else 8269 { Return (0x0F) } // battery not present 8270 } // _STA 8271 8272 Method (_BIF,, Serialized) 8273 { // _BIF 8274 Name (BUFR, Package (13) {}) 8275 8276 Store (\_SB.MEM.BPU1, Index (BUFR, 0)) 8277 Store (\_SB.MEM.BDC1, Index (BUFR, 1)) 8278 Store (\_SB.MEM.BLF1, Index (BUFR, 2)) 8279 Store (\_SB.MEM.BTC1, Index (BUFR, 3)) 8280 Store (\_SB.MEM.BDV1, Index (BUFR, 4)) 8281 Store (\_SB.MEM.BCW1, Index (BUFR, 5)) 8282 Store (\_SB.MEM.BCL1, Index (BUFR, 6)) 8283 Store (\_SB.MEM.BG11, Index (BUFR, 7)) 8284 Store (\_SB.MEM.BG21, Index (BUFR, 8)) 8285 Store (\_SB.MEM.BMN1, Index (BUFR, 9)) 8286 Store (\_SB.MEM.BSN1, Index (BUFR, 10)) 8287 Store (\_SB.MEM.BTP1, Index (BUFR, 11)) 8288 Store (\_SB.MEM.BOI1, Index (BUFR, 12)) 8289 8290 Return (BUFR) 8291 } // _BIF 8292 } // BAT1 8293 8294 Device (IDX2) 8295 { 8296 Method (B2IB,, Serialized) 8297 { // B2IB: store from Buffer into Index'ed Buffer 8298 8299 Name (SRCB, Buffer () {"Short Buffer"}) // 12 characters plus NULL 8300 8301 Name (DEST, Buffer () // 62 characters plus NULL 8302 {"Destination buffer that is longer than the short source buffer"}) 8303 8304 8305 // verify object type returned by Index(Buffer,Element,) 8306 8307 Store (Index (DEST, 2, ), Local1) 8308 Store (ObjectType (Local1), Local2) 8309 8310 If (LNotEqual (Local2, 14)) // Buffer Field is type 14 8311 { 8312 // Local2 indicates Local1 is not a Buffer Field 8313 8314 Return (0x61) 8315 } 8316 8317 // verify object type and value returned by DerefOf(Index(Buffer,Element,)) 8318 // should return Number containing element value 8319 8320 Store (DerefOf (Local1), Local3) 8321 Store (ObjectType (Local3), Local4) 8322 8323 If (LNotEqual (Local4, 1)) // Number is type 1 8324 { 8325 // Local2 indicates Local1 is not a Number 8326 Return (0x62) 8327 } 8328 Else 8329 { 8330 If (LNotEqual (Local3, 0x73)) // expect 's' element from DEST 8331 { 8332 Return (0x63) 8333 } 8334 } 8335 8336 Store ("DerefOf(Index(Buffer,,)) PASS", Debug) 8337 8338 8339 // 8340 // The following sections have been rewritten because storing into 8341 // an Indexed buffer only changes one byte - the FIRST byte of the 8342 // buffer is written to the source index. This is the ONLY byte 8343 // written -- as per ACPI 2.0 8344 // 8345 // Overwrite DEST contents, at buffer position 2 [only] 8346 8347 Store (SRCB, Index (DEST, 2, )) 8348 8349 // 8350 // Check that the next byte is not changed 8351 // 8352 Store (DerefOf (Index (DEST, 3, )), Local0) 8353 If (LNotEqual (Local0, 0x74)) // 't' 8354 { 8355 // DEST element is not matching original value 8356 If (LEqual (Local0, 0x68)) 8357 { 8358 // DEST element was altered to 'h' 8359 Return (0x68) 8360 } 8361 Else 8362 { 8363 // DEST element is an unknown value 8364 Return (0x69) 8365 } 8366 } 8367 8368 // 8369 // Check that the elements beyond the SRCB buffer copy 8370 // have not been altered. 8371 // 8372 Store (DerefOf (Index (DEST, 14)), Local0) 8373 8374 // 8375 // This should be an 'f'. 8376 // 8377 If (LNotEqual (Local0, 0x66)) 8378 { 8379 // DEST element was zero'd by buffer copy 8380 If (LEqual (Local0, 0)) 8381 { 8382 // DEST element is zero 8383 Return (0x6A) 8384 } 8385 Else 8386 { 8387 // DEST element is unknown value 8388 Return (0x6B) 8389 } 8390 } 8391 8392 Store ("Store(SRCB,Index(Buffer,,)) PASS", Debug) 8393 8394 // 8395 // verify altering SRCB does NOT alter DEST 8396 // 8397 Store (0x6A, Index (SRCB, 1)) // SRCB = "Sjort Buffer" 8398 8399 Store (DerefOf (Index (SRCB, 1)), Local0) 8400 8401 If (LNotEqual (Local0, 0x6A)) // 'j' 8402 { 8403 // SRCB element is unaltered 8404 Return (0x71) 8405 } 8406 8407 Store (DerefOf (Index (DEST, 3)), Local0) // DEST = "Destination buffer that... 8408 8409 If (LNotEqual (Local0, 0x74)) // 't' 8410 { 8411 // DEST element is altered 8412 If (LEqual (Local0, 0x6A)) // 'j' 8413 { 8414 // SRCB change altered DEST element 8415 Return (0x72) 8416 } 8417 Else 8418 { 8419 // DEST element is unknown value 8420 Return (0x73) 8421 } 8422 } 8423 8424 // verify altering DEST does NOT alter SRCB 8425 8426 Store (0x6B, Index (DEST, 4, )) // DEST = "DeSkination buffer..." 8427 8428 Store (DerefOf (Index (DEST, 4, )), Local0) 8429 8430 If (LNotEqual (Local0, 0x6B)) // 'k' 8431 { 8432 // DEST element is unaltered 8433 Return (0x74) 8434 } 8435 8436 Store (DerefOf (Index (SRCB, 2, )), Local0) 8437 8438 If (LNotEqual (Local0, 0x6F)) // 'o' 8439 { // SRC element is altered 8440 If (LEqual (Local0, 0x6B)) // 'k' 8441 { 8442 // DEST change altered SRCB element 8443 Return (0x75) 8444 } 8445 Else 8446 { 8447 // SRCB element is unknown value 8448 Return (0x76) 8449 } 8450 } 8451 8452 Store ("SRCB and DEST independent PASS", Debug) 8453 8454 8455 // verify string can be written to Index target/destination 8456 // Only FIRST byte is written 8457 8458 Store ("New Buff", Index (DEST, 2, )) // DEST = "DeNkination buffer..." 8459 8460 Store (DerefOf (Index (DEST, 2, )), Local0) 8461 8462 If (LNotEqual (Local0, 0x4E)) // 'N' 8463 { 8464 // DEST element is unaltered 8465 Return (0x81) 8466 } 8467 8468 Store (DerefOf (Index (DEST, 6, )), Local0) 8469 8470 If (LNotEqual (Local0, 0x61)) // 'a' 8471 { 8472 // DEST element is unaltered 8473 Return (0x82) 8474 } 8475 8476 Store (DerefOf (Index (DEST, 10, )), Local0) 8477 8478 If (LNotEqual (Local0, 0x6E)) // 'n' 8479 { 8480 // DEST element is unaltered 8481 Return (0x83) 8482 } 8483 8484 Store ("Store(String,Index) PASS", Debug) 8485 8486 8487 Return (0) // pass 8488 } // B2IB: store from Buffer into Index'ed Buffer 8489 8490 Method (FB2P,, Serialized) 8491 { // FB2P: store from Field Buffer into Index'ed Package 8492 Name (DEST, Package (2) {}) 8493 8494 // initialize memory using 32-bit field elements 8495 Store (0x01234567, \_SB.MEM.SMD0) 8496 Store (0x89ABCDEF, \_SB.MEM.SMD1) 8497 Store (0xFEDCBA98, \_SB.MEM.SMD2) 8498 Store (0x76543210, \_SB.MEM.SMD3) 8499 8500 // move greater than 64-bit buffers into DEST package 8501 Store (\_SB.MEM.SME0, Index (DEST, 0)) 8502 Store (\_SB.MEM.SME1, Index (DEST, 1)) 8503 8504 // validate DEST contents 8505 Store (DerefOf (Index (DEST, 0, )), Local0) 8506 Store (DerefOf (Index (DEST, 1, )), Local1) 8507 8508 // verify Local0 and Local1 are Buffers 8509 Store (ObjectType (Local0), Local2) 8510 if (LNotEqual (Local2, 3)) // Buffer type is 3 8511 { 8512 Return (0x11) 8513 } 8514 8515 Store (ObjectType (Local1), Local3) 8516 if (LNotEqual (Local3, 3)) // Buffer type is 3 8517 { 8518 Return (0x12) 8519 } 8520 8521 // validate DEST buffer contents 8522 Store (DerefOf (Index (DerefOf (Index (DEST, 0)), 0)), Local4) 8523 If (LNotEqual (Local4, 0x67)) 8524 { 8525 Return (0x13) 8526 } 8527 8528 Store (DerefOf (Index (DerefOf (Index (DEST, 0)), 1)), Local4) 8529 If (LNotEqual (Local4, 0x45)) 8530 { 8531 Return (0x14) 8532 } 8533 8534 Store (DerefOf (Index (DerefOf (Index (DEST, 0)), 4)), Local4) 8535 If (LNotEqual (Local4, 0xEF)) 8536 { 8537 Return (0x15) 8538 } 8539 8540 Store (DerefOf (Index (DerefOf (Index (DEST, 0, )), 5, )), Local4) 8541 If (LNotEqual (Local4, 0xCD)) 8542 { 8543 Return (0x16) 8544 } 8545 8546 Store ("Store(Mem,PkgElement) PASS", Debug) 8547 8548 8549 // validate changing source \_SB.MEM.SMD* does not impact DEST 8550 Store (0x12345678, \_SB.MEM.SMD0) 8551 8552 Store (DerefOf (Index (DerefOf (Index (DEST, 0, )), 0, )), Local5) 8553 If (LNotEqual (Local5, 0x67)) 8554 { 8555 Return (0x21) 8556 } 8557 8558 Store (DerefOf (Index (DerefOf (Index (DEST, 0, )), 1, )), Local5) 8559 If (LNotEqual (Local5, 0x45)) 8560 { 8561 Return (0x22) 8562 } 8563 8564 // validate changing DEST does not impact source \_SB.MEM.SMD* 8565 Store (0x30, Index (DerefOf (Index (DEST, 0)), 0)) 8566 8567 Store (DerefOf(Index (DerefOf (Index (DEST, 0)), 0)), Local5) 8568 If (LNotEqual (Local5, 0x30)) 8569 { 8570 Return (0x23) 8571 } 8572 8573 // 8574 // This section was modified from the original iPCO code because 8575 // it attempted to compare two buffers. This is not allowed until 8576 // ACPI v2.0, so the test has been modified to just check the 8577 // changed \_SB.MEM.SMD0 8578 // 8579 Store (\_SB.MEM.SMD0, Local5) 8580 8581 If(LNotEqual(Local5, 0x12345678)) 8582 { 8583 Return (0x24) 8584 } 8585 8586 Store ("Mem and Pkg independent PASS", Debug) 8587 8588 8589 Return (0) 8590 } // FB2P: store from Field Buffer into Index'ed Package 8591 8592 Method (TEST) 8593 { 8594 Store ("++++++++ IndexOp2 Test", Debug) 8595 8596 // store _BIF package return value into Local0 8597 8598 Store (\_SB.BAT1._BIF, Local0) 8599 8600 // save Local0 object type value into Local1 8601 Store (ObjectType (Local0), Local1) 8602 8603 // validate Local0 is a Package 8604 If (LNotEqual (Local1, 4)) // Package type is 4 8605 { 8606 // failure 8607 Return (2) 8608 } 8609 8610 // validate source and destination buffers are independent of each 8611 // of each other (i.e., changing one's contents does not change 8612 // other's contents) using B2IB (store from Buffer into Index'ed 8613 // Buffer) and FB2P (store from Field Buffer into Index'ed Package) 8614 8615 // call B2IB (store from Buffer into Index'ed Buffer) 8616 Store (B2IB, Local2) // Local2 is B2IB return value 8617 8618 // save Local2 object type value into Local3 8619 Store (ObjectType (Local2), Local3) 8620 8621 // validate Local2 is a Number 8622 If (LNotEqual (Local3, 1)) // Number type is 1 8623 { 8624 // failure 8625 Return (4) 8626 } 8627 8628 // zero indicates pass, non-zero is an error code 8629 If (LNotEqual (Local2, 0)) 8630 { 8631 // return B2IB error code 8632 Return (Local2) 8633 } 8634 8635 // call FB2P (store from Field Buffer into Index'ed Package) 8636 Store (FB2P, Local2) // Local2 is FB2P return value 8637 8638 // save Local2 object type value into Local3 8639 Store (ObjectType (Local2), Local3) 8640 8641 // validate Local2 is a Number 8642 If (LNotEqual (Local3, 1)) // Number type is 1 8643 { 8644 // failure 8645 Return (5) 8646 } 8647 8648 // zero indicates pass, non-zero is an error code 8649 If (LNotEqual (Local2, 0)) 8650 { 8651 // return FB2P error code 8652 Return (Local2) 8653 } 8654 8655 8656 Return (0) 8657 } // TEST 8658 } // IDX2: Test device name 8659 } // _SB system bus 8660 8661// 8662// test SizeOf.asl 8663// 8664// Test for SizeOf 8665// test cases include following SizeOf arguments: 8666// buffer, buffer field; 8667// control method argument, control method local variable; 8668// control method return values; 8669// direct string, string; 8670// package; 8671// buffer, package, and string package elements 8672// 8673// MTL NOTE: This test has been modified to remove any SizeOf(Index(Buff,... 8674// calls because it is not legal to perform a SizeOf operation on a Buffer Field. 8675// This test has also been extended to test additional Package element sizes. 8676// 8677 Device (SIZO) 8678 { 8679 // SAR0 control method validates SizeOf(Arg) 8680 // SAR0 should only be called by SARG 8681 Method (SAR0, 2) 8682 // Arg0 object to determine size of 8683 // Arg1 expected Arg length 8684 { // SAR0: SizeOf(Arg) test control method 8685 // Local0 Arg0 length 8686 // Local1 Local0 object type 8687 8688 // Store first string size (Arg0) into Local7 8689 Store (SizeOf (Arg0), Local0) 8690 8691 // save Local0 object type value into Local1 8692 Store (ObjectType (Local0), Local1) 8693 8694 // validate Local0 is a Number 8695 If (LNotEqual (Local1, 1)) // Number type is 1 8696 { Return (0x21) } 8697 8698 // If strings are not of equal size, return error code 8699 If (LNotEqual (Local0, Arg1)) 8700 { Return (0x22) } 8701 8702 Return (0) 8703 } // SAR0: SizeOf(Arg) test control method 8704 8705 Method (SARG,, Serialized) 8706 { // SARG: SizeOf(Arg) test control method 8707 Name (BUFR, Buffer (12) {}) // uninitialized Buffer 8708 Name (BUF1, Buffer() {0x01, 0x02, 0x03, 0x04, 0x05}) 8709 Name (PKG0, Package (4) {}) // uninitialized Package 8710 Name (STR0, "String") 8711 Name (PKG1, Package (4) 8712 { 8713 BUFR, 8714 "String2", 8715 STR0, 8716 PKG0 8717 }) // PKG1 8718 8719 Name (PKG2, Package (4) 8720 { 8721 Buffer (15) {}, 8722 "String 1", 8723 Package (2) {} 8724 }) // PKG2 8725 8726 // Namespace entry buffer reference 8727 Store (SAR0 (BUFR, 12), Local0) 8728 8729 // save Local0 object type value into Local1 8730 Store (ObjectType (Local0), Local1) 8731 8732 // validate Local0 is a Number 8733 If (LNotEqual (Local1, 1)) // Number type is 1 8734 { 8735 Return (0x23) 8736 } 8737 8738 If (LNotEqual (Local0, 0)) // Local0 is SAR0 return error code 8739 { 8740 Return (Local0) 8741 } 8742 8743 Store ("SizeOf(Arg=BUFR) PASS", Debug) 8744 8745 8746 // Namespace entry package reference 8747 Store (SAR0 (PKG0, 4), Local0) 8748 8749 // save Local0 object type value into Local1 8750 Store (ObjectType (Local0), Local1) 8751 8752 // validate Local0 is a Number 8753 If (LNotEqual (Local1, 1)) // Number type is 1 8754 { 8755 Return (0x24) 8756 } 8757 8758 If (LNotEqual (Local0, 0)) // Local0 is SAR0 return error code 8759 { 8760 Return (Local0) 8761 } 8762 8763 Store ("SizeOf(Arg=PKG0) PASS", Debug) 8764 8765 8766 // Namespace entry string reference 8767 Store (SAR0 (STR0, 6), Local0) 8768 8769 // save Local0 object type value into Local1 8770 Store (ObjectType (Local0), Local1) 8771 8772 // validate Local0 is a Number 8773 If (LNotEqual (Local1, 1)) // Number type is 1 8774 { 8775 Return (0x25) 8776 } 8777 8778 If (LNotEqual (Local0, 0)) // Local0 is SAR0 return error code 8779 { 8780 Return (Local0) 8781 } 8782 8783 Store ("SizeOf(Arg=STR0) PASS", Debug) 8784 8785 8786 // direct string reference 8787 Store (SAR0 ("String", 6), Local0) 8788 8789 // save Local0 object type value into Local1 8790 Store (ObjectType (Local0), Local1) 8791 8792 // validate Local0 is a Number 8793 If (LNotEqual (Local1, 1)) // Number type is 1 8794 { 8795 Return (0x26) 8796 } 8797 8798 If (LNotEqual (Local0, 0)) // Local0 is SAR0 return error code 8799 { 8800 Return (Local0) 8801 } 8802 8803 Store ("SizeOf(Arg=String) PASS", Debug) 8804 8805 Store (0x55, Index (BUF1, 2)) 8806 8807 /**************************************************** 8808 // 8809 // This section is commented because it is illegal to 8810 // perform a SizeOf operation on a Buffer Field 8811 // 8812 // Namespace BufferField reference 8813 Store (SAR0 (Index (BUFR, 2, ), 10), Local0) 8814 8815 // save Local0 object type value into Local1 8816 Store (ObjectType (Local0), Local1) 8817 8818 // validate Local0 is a Number 8819 If (LNotEqual (Local1, 1)) // Number type is 1 8820 { Return (0x27) } 8821 8822 If (LNotEqual (Local0, 0)) // Local0 is SAR0 return error code 8823 { Return (Local0) } 8824 8825 Store ("SizeOf(Arg=BufferField) PASS", Debug) 8826 ****************************************************/ 8827 8828 // Namespace BufferPackageElement reference 8829 // 8830 Store (SAR0 (Index(PKG1, 0), 12), Local0) 8831 8832 // save Local0 object type value into Local1 8833 Store (ObjectType (Local0), Local1) 8834 8835 // validate Local0 is a Number 8836 If (LNotEqual (Local1, 1)) // Number type is 1 8837 { 8838 Return (0x28) 8839 } 8840 8841 If (LNotEqual (Local0, 0)) // Local0 is SAR0 return error code 8842 { 8843 Return (Local0) 8844 } 8845 8846 Store ("SizeOf(Arg=PackageBuffer NTE Reference Element) PASS", Debug) 8847 8848 8849 // Namespace StringPackageElement reference 8850 Store (SAR0 (Index (PKG1, 1, ), 7), Local0) 8851 8852 // save Local0 object type value into Local1 8853 Store (ObjectType (Local0), Local1) 8854 8855 // validate Local0 is a Number 8856 If (LNotEqual (Local1, 1)) // Number type is 1 8857 { 8858 Return (0x29) 8859 } 8860 8861 If (LNotEqual (Local0, 0)) // Local0 is SAR0 return error code 8862 { 8863 Return (Local0) 8864 } 8865 8866 Store ("SizeOf(Arg=Package String Element) PASS", Debug) 8867 8868 8869 // Namespace StringPackageElement reference 8870 Store (SAR0 (Index (PKG1, 2, ), 6), Local0) 8871 8872 // save Local0 object type value into Local1 8873 Store (ObjectType (Local0), Local1) 8874 8875 // validate Local0 is a Number 8876 If (LNotEqual (Local1, 1)) // Number type is 1 8877 { 8878 Return (0x2A) 8879 } 8880 8881 If (LNotEqual (Local0, 0)) // Local0 is SAR0 return error code 8882 { 8883 Return (Local0) 8884 } 8885 8886 Store ("SizeOf(Arg=Package String NTE Reference Element) PASS", Debug) 8887 8888 8889 // Namespace PackagePackageElement reference 8890 Store (SAR0 (Index (PKG1, 3, ), 4), Local0) 8891 8892 // save Local0 object type value into Local1 8893 Store (ObjectType (Local0), Local1) 8894 8895 // validate Local0 is a Number 8896 If (LNotEqual (Local1, 1)) // Number type is 1 8897 { 8898 Return (0x2B) 8899 } 8900 8901 If (LNotEqual (Local0, 0)) // Local0 is SAR0 return error code 8902 { 8903 Return (Local0) 8904 } 8905 8906 Store ("SizeOf(Arg=Package Package NTE Reference Element) PASS", Debug) 8907 8908 // Package Buffer Element 8909 Store (SAR0 (Index (PKG2, 0), 15), Local0) 8910 8911 // save Local0 object type value into Local1 8912 Store (ObjectType (Local0), Local1) 8913 8914 // validate Local0 is a Number 8915 If (LNotEqual (Local1, 1)) // Number type is 1 8916 { 8917 Return (0x2B) 8918 } 8919 8920 If (LNotEqual (Local0, 0)) // Local0 is SAR0 return error code 8921 { 8922 Return (Local0) 8923 } 8924 8925 Store ("SizeOf(Arg=Package Buffer Element) PASS", Debug) 8926 8927 // Package String Element 8928 Store (SAR0 (Index (PKG2, 1), 8), Local0) 8929 8930 // save Local0 object type value into Local1 8931 Store (ObjectType (Local0), Local1) 8932 8933 // validate Local0 is a Number 8934 If (LNotEqual (Local1, 1)) // Number type is 1 8935 { 8936 Return (0x2B) 8937 } 8938 8939 If (LNotEqual (Local0, 0)) // Local0 is SAR0 return error code 8940 { 8941 Return (Local0) 8942 } 8943 8944 Store ("SizeOf(Arg=Package String Element) PASS", Debug) 8945 8946 // Package Package Element 8947 Store (SAR0 (Index (PKG2, 2), 2), Local0) 8948 8949 // save Local0 object type value into Local1 8950 Store (ObjectType (Local0), Local1) 8951 8952 // validate Local0 is a Number 8953 If (LNotEqual (Local1, 1)) // Number type is 1 8954 { 8955 Return (0x2B) 8956 } 8957 8958 If (LNotEqual (Local0, 0)) // Local0 is SAR0 return error code 8959 { 8960 Return (Local0) 8961 } 8962 8963 Store ("SizeOf(Arg=Package Package Element) PASS", Debug) 8964 8965 Store ("SizeOf(Arg) PASS", Debug) 8966 8967 Return (0) 8968 } // SARG: SizeOf(Arg) test control method 8969 8970 Method (SBUF,, Serialized) 8971 { // SBUF: SizeOf(Buffer) test control method 8972 Name (BUFR, Buffer (12) {}) 8973 8974 // store size of BUFR buffer into Local0 8975 Store (SizeOf (BUFR), Local0) 8976 8977 // save Local0 object type value into Local1 8978 Store (ObjectType (Local0), Local1) 8979 8980 // validate Local0 is a Number 8981 If (LNotEqual (Local1, 1)) // Number type is 1 8982 { 8983 Return (0x31) 8984 } 8985 8986 If (LNotEqual (Local0, 12)) // BUFR size is 12 8987 { 8988 Return (0x32) 8989 } 8990 8991 Store ("SizeOf(BUFR) PASS", Debug) 8992 8993 Return (0) 8994 } // SBUF: SizeOf(Buffer) test control method 8995 8996 8997 /**************************************************** 8998 // 8999 // This section is commented because it is illegal to 9000 // perform a SizeOf operation on a Buffer Field 9001 // 9002 Method (SIND) 9003 { // SIND: SizeOf(Index(,,)) test control method 9004 Name (BUFR, Buffer (12) {}) 9005 9006 // store size of Index(BUFR,2,) buffer into Local0 9007 Store (SizeOf (Index (BUFR, 2, )), Local0) 9008 9009 // save Local0 object type value into Local1 9010 Store (ObjectType (Local0), Local1) 9011 9012 // validate Local0 is a Number 9013 If (LNotEqual (Local1, 1)) // Number type is 1 9014 { 9015 Return (0x41) 9016 } 9017 9018 If (LNotEqual (Local0, 10)) // 12 - 2 = 10 9019 { 9020 Return (0x42) 9021 } 9022 9023 Store ("SizeOf(Index(BUFR,,)) PASS", Debug) 9024 9025 // TBD: strings and packages 9026 9027 Return (0) 9028 } // SIND: SizeOf(Index(,,)) test control method 9029 ****************************************************/ 9030 9031 Method (SLOC,, Serialized) 9032 { // SLOC: SizeOf(Local) test control method 9033 Name (BUFR, Buffer (12) {}) // uninitialized Buffer 9034 Name (STR0, "String") 9035 Name (PKG0, Package (4) {}) // uninitialized Package 9036 9037 9038 // store BUFR Buffer into Local2 9039 Store (BUFR, Local2) 9040 9041 // store size of BUFR buffer into Local0 9042 Store (SizeOf (Local2), Local0) 9043 9044 // save Local0 object type value into Local1 9045 Store (ObjectType (Local0), Local1) 9046 9047 // validate Local0 is a Number 9048 If (LNotEqual (Local1, 1)) // Number type is 1 9049 { 9050 Return (0x51) 9051 } 9052 9053 If (LNotEqual (Local0, 12)) // BUFR size is 12 9054 { 9055 Return (0x52) 9056 } 9057 9058 Store ("SizeOf(Local2=Buffer) PASS", Debug) 9059 9060 9061 // store STR0 string into Local2 9062 Store (STR0, Local2) 9063 9064 // store size of STR0 buffer into Local0 9065 Store (SizeOf (Local2), Local0) 9066 9067 // save Local0 object type value into Local1 9068 Store (ObjectType (Local0), Local1) 9069 9070 // validate Local0 is a Number 9071 If (LNotEqual (Local1, 1)) // Number type is 1 9072 { 9073 Return (0x53) 9074 } 9075 9076 If (LNotEqual (Local0, 6)) // STR0 size is 6 9077 { 9078 Return (0x54) 9079 } 9080 9081 Store ("SizeOf(Local2=String) PASS", Debug) 9082 9083 9084 // store PKG0 Package into Local2 9085 Store (PKG0, Local2) 9086 9087 // store size of PKG0 buffer into Local0 9088 Store (SizeOf (Local2), Local0) 9089 9090 // save Local0 object type value into Local1 9091 Store (ObjectType (Local0), Local1) 9092 9093 // validate Local0 is a Number 9094 If (LNotEqual (Local1, 1)) // Number type is 1 9095 { 9096 Return (0x55) 9097 } 9098 9099 If (LNotEqual (Local0, 4)) // PKG0 size is 4 9100 { 9101 Return (0x56) 9102 } 9103 9104 Store ("SizeOf(Local2=Package) PASS", Debug) 9105 9106 9107 Return (0) 9108 } // SLOC: SizeOf(Local) test control method 9109 9110 Method (TEST) 9111 { 9112 Store ("++++++++ SizeOf Test", Debug) 9113 9114 // Store current operating system string into Local0 9115 Store (_OS, Local0) 9116 9117 Store (SizeOf (_OS), Local3) 9118 9119 // save Local3 object type value into Local4 9120 Store (ObjectType (Local3), Local4) 9121 9122 // validate Local3 is a Number 9123 If (LNotEqual (Local4, 1)) // Number type is 1 9124 { 9125 // failure 9126 Return (0x61) 9127 } 9128 9129 // Store current operating system string into Local0 9130 // This verifies above SizeOf(_OS) did not corrupt ACPI namespace 9131 Store (_OS, Local0) 9132 9133 // Store SARG [Validate SizeOf(Arg)] return value into Local1 9134 Store (SARG, Local1) 9135 9136 // save Local1 object type value into Local2 9137 Store (ObjectType (Local1), Local2) 9138 9139 // validate Local1 is a Number 9140 If (LNotEqual (Local2, 1)) // Number type is 1 9141 { 9142 // failure 9143 Return (0x62) 9144 } 9145 9146 // zero indicates pass, non-zero is an error code 9147 If (LNotEqual (Local1, 0)) 9148 { 9149 // return SARG error code 9150 Return (Local1) 9151 } 9152 9153 9154 // Store SBUF [Validate SizeOf(Buffer)] return value into Local1 9155 Store (SBUF, Local1) 9156 9157 // save Local1 object type value into Local2 9158 Store (ObjectType (Local1), Local2) 9159 9160 // validate Local1 is a Number 9161 If (LNotEqual (Local2, 1)) // Number type is 1 9162 { 9163 // failure 9164 Return (0x63) 9165 } 9166 9167 // zero indicates pass, non-zero is an error code 9168 If (LNotEqual (Local1, 0)) 9169 { 9170 // return SBUF error code 9171 Return (Local1) 9172 } 9173 9174 /**************************************************** 9175 // 9176 // This section is commented because it is illegal to 9177 // perform a SizeOf operation on a Buffer Field 9178 // 9179 // Store SIND [verify SizeOf(Index(,,))] return value into Local1 9180 Store (SIND, Local1) 9181 9182 // save Local1 object type value into Local2 9183 Store (ObjectType (Local1), Local2) 9184 9185 // validate Local1 is a Number 9186 If (LNotEqual (Local2, 1)) // Number type is 1 9187 { 9188 // failure 9189 Return (0x64) 9190 } 9191 9192 // zero indicates pass, non-zero is an error code 9193 If (LNotEqual (Local1, 0)) 9194 { 9195 // return SARG error code 9196 Return (Local1) 9197 } 9198 ****************************************************/ 9199 9200 // Store SLOC [verify SizeOf(Local)] return value into Local1 9201 Store (SLOC, Local1) 9202 9203 // save Local1 object type value into Local2 9204 Store (ObjectType (Local1), Local2) 9205 9206 // validate Local1 is a Number 9207 If (LNotEqual (Local2, 1)) // Number type is 1 9208 { 9209 // failure 9210 Return (0x65) 9211 } 9212 9213 // zero indicates pass, non-zero is an error code 9214 If (LNotEqual (Local1, 0)) 9215 { 9216 // return SLOC error code 9217 Return (Local1) 9218 } 9219 9220 9221 // TBD: SizeOf (METH) -- where METH control method returns 9222 // buffer, BufferField, string, package, package element 9223 9224 9225 Return (0) 9226 } // TEST 9227 } // SIZO 9228 9229// 9230// test SmiShare.asl 9231// 9232 Scope (\_SB) // System Bus 9233 { // _SB system bus 9234 // Declare an OpRegion in Memory starting at offset 0x400000 that is 10 bytes long 9235 OperationRegion(RAM1, SystemMemory, 0x400000, 0xA) 9236 9237 Field (RAM1, AnyAcc, NoLock, Preserve) 9238 { 9239 BI1T, 1, // Create some bits in memory to access 9240 BI2T, 2, 9241 BI3T, 3, 9242 LST2, 2 9243 } // End Field RAM1 9244 9245 Field (RAM1, WordAcc, NoLock, WriteAsZeros) 9246 { 9247 WRD, 16 9248 } // End 2nd Field RAM1 9249 9250 Field (RAM1, ByteAcc, NoLock, WriteAsOnes) 9251 { 9252 BYTE, 8 9253 } // End 3rd Field RAM1 9254 9255 Field (RAM1, ByteAcc, NoLock, Preserve) 9256 { 9257 SMIC, 8, 9258 SMID, 8 9259 } 9260 9261 Device (MBIT) 9262 { 9263 Method (_INI) 9264 { 9265 Store (0, BI1T) 9266 Store (3, BI2T) 9267 Store (7, BI3T) 9268 Store (0, LST2) 9269 } // End _INI Method 9270 } // End Device MBIT 9271 9272 Device (MWRD) 9273 { 9274 Method (_INI) 9275 { 9276 Store (0, WRD) 9277 } // End _INI Method 9278 } // End Device MWRD 9279 9280 Device (MBYT) 9281 { 9282 Method (_INI) 9283 { 9284 Store (0, BYTE) 9285 Store (0xC, SMIC) 9286 Store (0xD, SMID) 9287 } // End _INI Method 9288 } // End Device MBYT 9289 9290 /* 9291 // Declare an OpRegion in Memory starting at offset 0x400000 that is 10 bytes long 9292 OperationRegion(\RAM1, SystemMemory, 0x400000, 0xA) 9293 9294 Field (\RAM1, AnyAcc, NoLock, Preserve) 9295 { 9296 BI1T, 1, // Create some bits in memory to access 9297 BI2T, 2, 9298 BI3T, 3, 9299 LST2, 2 9300 } // End Field RAM1 9301 9302 Field (\RAM1, WordAcc, NoLock, WriteAsZeros) 9303 { 9304 WRD, 16 9305 } // End 2nd Field RAM1 9306 9307 Field (\RAM1, ByteAcc, NoLock, WriteAsOnes) 9308 { 9309 BYTE, 8 9310 } // End 3rd Field RAM1 9311 9312 Field (\RAM1, ByteAcc, NoLock, Preserve) 9313 { 9314 SMIC, 8, 9315 SMID, 8 9316 } 9317 */ 9318 Method (SMIX) 9319 { 9320 Return (BYTE) 9321 } // End SMIX 9322 9323 Method (EVNT) 9324 { 9325 Store (SMIX, Local0) 9326 9327 Notify (\_SB_, 0x29) 9328 If (And (Local0, 0x01)) 9329 { Notify (\_SB_.SMIS, 0x21)} 9330 9331 If (And (Local0, 0x02)) 9332 { Notify (\_SB_.SMIS, 0x22)} 9333 9334 If (And (Local0, 0x04)) 9335 { Notify (\_SB_.SMIS, 0x24)} 9336 9337 If (And (Local0, 0x08)) 9338 { Notify (\_SB_.SMIS, 0x28)} 9339 9340 } // End Method EVNT 9341 9342 Method (NTFY) 9343 { 9344 Notify (\_SB_, 1) 9345 Notify (\_TZ_.TZ1, 2) 9346 Notify (\_PR_.CPU0, 3) 9347 9348 Notify (\_SB_, 0x81) 9349 Notify (\_TZ_.TZ1, 0x82) 9350 Notify (\_PR_.CPU0, 0x83) 9351 } 9352 9353 Device (SMIS) 9354 { 9355 Method (BINK) 9356 { 9357 Store (0, Local0) // Zero out Local0 9358 9359 If (LNotEqual (SMID, 0xD)) 9360 { Or (0x80, Local0, Local0)} 9361 9362 If (LNotEqual (SMIC, 0xC)) 9363 { Or (0x40, Local0, Local0)} 9364 9365 If (LNotEqual (BYTE, 0)) 9366 { Or (0x20, Local0, Local0)} 9367 9368 If (LNotEqual (WRD, 0)) 9369 { Or (0x10, Local0, Local0)} 9370 9371 If (LNotEqual (LST2, 0)) 9372 { Or (0x8, Local0, Local0)} 9373 9374 If (LNotEqual (BI3T, 0x7)) 9375 { Or (0x4, Local0, Local0)} 9376 9377 If (LNotEqual (BI2T, 0x3)) 9378 { Or (0x2, Local0, Local0)} 9379 9380 If (LNotEqual (BI1T, 0)) 9381 { Or (0x1, Local0, Local0)} 9382 9383 Return (Local0) 9384 } // End Method BINK 9385 9386 Method (TEST) 9387 { 9388 Store ("++++++++ SmiShare Test", Debug) 9389 9390 // Expect EVNT to generate Notify value we just previously 9391 // stored in BYTE 9392 9393 Store (0x20, BYTE) 9394 EVNT () 9395 Store (0x21, BYTE) 9396 EVNT () 9397 Store (0x22, BYTE) 9398 EVNT () 9399 Store (0x23, BYTE) 9400 EVNT () 9401 9402 NTFY () 9403 Return (0) // pass 9404 } // End Method TEST 9405 } // Device SMIS 9406 9407 Device(CNDT) 9408 { 9409 Method(TEST) 9410 { 9411 If (ECOK) 9412 { 9413 return("Broken") 9414 } 9415 Else 9416 { 9417 return("Works") 9418 } 9419 } 9420 9421 Method(ECOK) 9422 { 9423 Return(0x0) 9424 } 9425 } 9426 9427 } // _SB system bus 9428 9429 9430/* Test a very big buffer */ 9431 9432 Name(WQAB, Buffer(6756) 9433 { 9434 0x46,0x4F,0x4D,0x42,0x01,0x00,0x00,0x00, 9435 0x54,0x1A,0x00,0x00,0xBA,0xAD,0x00,0x00, 9436 0x44,0x53,0x00,0x01,0x1A,0x7D,0xDA,0x54, 9437 0x98,0xBD,0x92,0x00,0x01,0x06,0x18,0x42, 9438 0x10,0x47,0x10,0x92,0x46,0x62,0x02,0x89, 9439 0x80,0x90,0x18,0x18,0x14,0x81,0x85,0x00, 9440 0x49,0x02,0x88,0xC4,0x41,0xE1,0x20,0xD4, 9441 0x9F,0x40,0x7E,0x05,0x20,0x74,0x28,0x40, 9442 0xA6,0x00,0x83,0x02,0x9C,0x22,0x88,0xA0, 9443 0x57,0x01,0x36,0x05,0x98,0x14,0x60,0x51, 9444 0x80,0x76,0x01,0x96,0x05,0xE8,0x16,0x20, 9445 0x1D,0x96,0x88,0x04,0x47,0x89,0x01,0x47, 9446 0xE9,0xC4,0x16,0x6E,0xD8,0xE0,0x85,0xA2, 9447 0x68,0x06,0x51,0x12,0x94,0x8B,0x20,0x5D, 9448 0x10,0x52,0x2E,0xC0,0x37,0x82,0x06,0x10, 9449 0xA5,0x77,0x01,0xB6,0x05,0x98,0x86,0x27, 9450 0xD2,0x20,0xE4,0x60,0x08,0x54,0xCE,0x80, 9451 0x20,0x69,0x44,0x21,0x1E,0xA7,0x44,0x08, 9452 0x0A,0x84,0x90,0xD4,0xF1,0xA0,0xA0,0x71, 9453 0x88,0xAD,0xCE,0x46,0x93,0xA9,0x74,0x7E, 9454 0x48,0x82,0x70,0xC6,0x2A,0x7E,0x3A,0x9A, 9455 0xD0,0xD9,0x9C,0x60,0xE7,0x18,0x72,0x3C, 9456 0x48,0xF4,0x20,0xB8,0x00,0x0F,0x1C,0x2C, 9457 0x34,0x84,0x22,0x6B,0x80,0xC1,0x8C,0xDD, 9458 0x63,0xB1,0x0B,0x4E,0x0A,0xEC,0x61,0xB3, 9459 0x01,0x19,0xA2,0x24,0x38,0xD4,0x11,0xC0, 9460 0x12,0x05,0x98,0x1F,0x87,0x0C,0x0F,0x95, 9461 0x8C,0x25,0x24,0x1B,0xAB,0x87,0xC2,0xA5, 9462 0x40,0x68,0x6C,0x27,0xED,0x19,0x45,0x2C, 9463 0x79,0x4A,0x82,0x49,0xE0,0x51,0x44,0x36, 9464 0x1A,0x27,0x28,0x1B,0x1A,0x25,0x03,0x42, 9465 0x9E,0x05,0x58,0x07,0x26,0x04,0x76,0x2F, 9466 0xC0,0x9A,0x00,0x73,0xB3,0x90,0xB1,0xB9, 9467 0xE8,0xFF,0x0F,0x71,0xB0,0x31,0xDA,0x9A, 9468 0xAE,0x90,0xC2,0xC4,0x88,0x12,0x2C,0x5E, 9469 0xC5,0xC3,0x10,0xCA,0x93,0x42,0xA8,0x48, 9470 0x95,0xA1,0x68,0xB4,0x51,0x2A,0x14,0xE0, 9471 0x4C,0x80,0x30,0x5C,0x1D,0x03,0x82,0x46, 9472 0x88,0x15,0x29,0x56,0xFB,0x83,0x20,0xF1, 9473 0x2D,0x40,0x54,0x01,0xA2,0x48,0xA3,0x41, 9474 0x9D,0x03,0x3C,0x5C,0x0F,0xF5,0xF0,0x3D, 9475 0xF6,0x93,0x0C,0x72,0x90,0x67,0xF1,0xA8, 9476 0x70,0x9C,0x06,0x49,0xE0,0x0B,0x80,0x4F, 9477 0x08,0x1E,0x38,0xDE,0x35,0xA0,0x66,0x7C, 9478 0xBC,0x4C,0x10,0x1C,0x6A,0x88,0x1E,0x68, 9479 0xB8,0x13,0x38,0x44,0x06,0xE8,0x49,0x3D, 9480 0x52,0x60,0x07,0x77,0x32,0xEF,0x01,0xAF, 9481 0x0A,0xCD,0x5E,0x12,0x08,0xC1,0xF1,0xF8, 9482 0x7E,0xC0,0x26,0x9C,0xC0,0xF2,0x07,0x81, 9483 0x1A,0x99,0xA1,0x3D,0xCA,0xD3,0x8A,0x19, 9484 0xF2,0x31,0xC1,0x04,0x16,0x0B,0x21,0x05, 9485 0x10,0x1A,0x0F,0xF8,0x6F,0x00,0x8F,0x17, 9486 0xBE,0x12,0xC4,0xF6,0x80,0x12,0x0C,0x0B, 9487 0x21,0x23,0xAB,0xF0,0x78,0xE8,0x28,0x7C, 9488 0x95,0x38,0x9C,0xD3,0x8A,0x67,0x82,0xE1, 9489 0x20,0xF4,0x05,0x90,0x00,0x51,0xE7,0x0C, 9490 0xD4,0x61,0xC1,0xE7,0x04,0x76,0x33,0x38, 9491 0x83,0x47,0x00,0x8F,0xE4,0x84,0xFC,0x2B, 9492 0xF1,0xC0,0xE0,0x03,0xE2,0xEF,0x1F,0xA7, 9493 0xEC,0x11,0x9C,0xA9,0x01,0x7D,0x1C,0xF0, 9494 0xFF,0x7F,0x28,0x7C,0x88,0x1E,0xDF,0x29, 9495 0x1F,0xAF,0x4F,0x17,0x96,0x35,0x4E,0xE8, 9496 0x77,0x08,0x9F,0x38,0x7C,0x64,0x71,0x44, 9497 0x08,0x39,0x39,0x05,0xA0,0x81,0x4F,0xF7, 9498 0xEC,0x22,0x9C,0xAE,0x27,0xE5,0x40,0xC3, 9499 0xA0,0xE3,0x04,0xC7,0x79,0x00,0x1C,0xE3, 9500 0x84,0x7F,0x2E,0x80,0x3F,0x40,0x7E,0xCA, 9501 0x78,0xC5,0x48,0xE0,0x98,0x23,0x44,0x9F, 9502 0x6B,0x3C,0x42,0x2C,0xFC,0x53,0x45,0xE1, 9503 0x03,0x21,0x63,0x04,0x17,0xA0,0xC7,0x08, 9504 0x7C,0x03,0x8E,0x11,0x7D,0x94,0xE0,0xEA, 9505 0x0F,0x1A,0x74,0x80,0xB8,0xFF,0xFF,0x00, 9506 0xE1,0x83,0x7A,0x80,0xC0,0x37,0xFA,0xD1, 9507 0x03,0x3D,0x2E,0x8B,0x3E,0x0F,0xC8,0xF8, 9508 0x89,0x46,0xF3,0xE2,0xA7,0x03,0x7E,0xF8, 9509 0x00,0x0F,0xA8,0x87,0x84,0x03,0xC5,0x4C, 9510 0x9B,0x83,0x3E,0xBB,0x1C,0x3A,0x76,0xB8, 9511 0xE0,0x3F,0x81,0x80,0x4B,0xDE,0x21,0x0C, 9512 0x14,0x23,0xC6,0x9F,0x83,0x7C,0x0A,0x03, 9513 0xFF,0xFF,0xFF,0x14,0x06,0xFE,0xE1,0xF0, 9514 0x20,0x4F,0x07,0x9F,0xB6,0xA8,0x74,0x18, 9515 0xD4,0x81,0x0B,0xB0,0x32,0x89,0x08,0xCF, 9516 0x12,0xB5,0x41,0xE8,0xD4,0xF0,0x36,0xF1, 9517 0xB6,0xE5,0x5B,0x40,0x9C,0xD3,0xEC,0xED, 9518 0xC0,0x45,0x30,0x22,0xD4,0x0C,0x45,0x4E, 9519 0x5A,0x11,0x63,0x44,0x79,0xDC,0x32,0xCA, 9520 0xDB,0xD6,0x0B,0x40,0xBC,0x13,0x7B,0xDE, 9521 0x32,0x46,0xF0,0xC8,0x0F,0x5C,0x2C,0xC6, 9522 0xEA,0xF5,0x5F,0xF3,0x81,0x0B,0x70,0xF6, 9523 0xFF,0x3F,0x70,0x01,0x1C,0x0A,0x7A,0x18, 9524 0x42,0x0F,0xC3,0x53,0x39,0x97,0x87,0xC8, 9525 0x53,0x89,0x18,0x35,0x4C,0xD4,0x67,0x28, 9526 0xDF,0x2D,0x7C,0x20,0x02,0xDF,0x99,0x0B, 9527 0xF8,0xFD,0xFF,0x0F,0x44,0x70,0x8E,0x29, 9528 0xB8,0x33,0x0D,0x78,0x7C,0xCE,0x40,0x20, 9529 0xA7,0xE2,0x43,0x0D,0x60,0x41,0xF4,0x13, 9530 0xC2,0x27,0x1A,0x2A,0x13,0x06,0x75,0xA8, 9531 0x01,0xAC,0x5C,0x61,0x9E,0x46,0xCF,0xF9, 9532 0x59,0xC6,0xA7,0x1A,0x1F,0x4A,0x8D,0x63, 9533 0x88,0x97,0x99,0x87,0x1A,0x1F,0x0B,0x5E, 9534 0x49,0x7D,0xA8,0x31,0x54,0x9C,0x87,0x1A, 9535 0x0F,0x37,0x50,0xD4,0x37,0x9B,0x67,0x1B, 9536 0xA3,0xC7,0xF7,0x0D,0xD5,0x10,0x0F,0x35, 9537 0x4C,0xF2,0x4A,0x35,0x16,0x1F,0x6A,0xC0, 9538 0xF1,0xFF,0x3F,0xD4,0x00,0xFC,0xFF,0xFF, 9539 0x1F,0x6A,0x00,0x47,0x47,0x03,0x38,0x47, 9540 0x46,0xDC,0xD1,0x00,0x5C,0x87,0x52,0xE0, 9541 0x70,0x34,0x00,0x1E,0x47,0x21,0x30,0x5F, 9542 0x68,0x7C,0x14,0x02,0x16,0xFF,0xFF,0xA3, 9543 0x10,0xF8,0x65,0x9F,0x83,0x50,0x42,0x8F, 9544 0x42,0x80,0xA0,0xDB,0xCF,0x53,0xC4,0xB3, 9545 0x8F,0x2F,0x3F,0x0F,0x04,0x11,0x5E,0xF3, 9546 0x7D,0x0A,0xF2,0x21,0xDF,0x47,0x21,0x06, 9547 0x63,0x28,0x5F,0x83,0x7C,0x14,0x62,0x50, 9548 0xAF,0x41,0xBE,0xEF,0x1B,0xE4,0xF1,0x22, 9549 0x48,0xEC,0x67,0x02,0x1F,0x85,0x98,0xE8, 9550 0xA3,0x10,0xA0,0xF0,0xFF,0x7F,0x14,0x02, 9551 0xF8,0xFF,0xFF,0x3F,0x0A,0x01,0xCE,0x02, 9552 0x1C,0x0D,0x40,0x37,0xAD,0x47,0x21,0xF0, 9553 0xDE,0x59,0x4E,0xFB,0x04,0x7C,0x16,0x02, 9554 0xCC,0xFE,0xFF,0xCF,0x42,0xC0,0xEC,0x28, 9555 0x74,0x14,0x67,0xF9,0x2A,0xF4,0x04,0xF0, 9556 0x02,0x10,0x23,0xCC,0x3B,0xD0,0x4B,0x26, 9557 0xBB,0x8B,0x1B,0xE7,0xC9,0xE5,0x2C,0x9E, 9558 0xC4,0x7D,0x09,0xF2,0x81,0xE2,0x59,0xC8, 9559 0x50,0xA7,0x1B,0xF4,0x8D,0xDC,0x03,0x8B, 9560 0x19,0x3F,0xC4,0xF3,0x90,0x21,0x9E,0x85, 9561 0x00,0x76,0xFD,0xFF,0xCF,0x42,0x00,0xFF, 9562 0xFF,0xFF,0x47,0x03,0xF8,0x2F,0x00,0x9F, 9563 0x85,0x80,0xE7,0x09,0xE0,0x41,0xDB,0x67, 9564 0x21,0x80,0x33,0x87,0xCB,0xF3,0x7F,0x05, 9565 0x3A,0x96,0xF7,0x08,0xCF,0xFA,0x24,0x5F, 9566 0x2F,0x3D,0xD3,0x87,0x82,0x67,0x21,0x86, 9567 0x75,0x18,0x3E,0x0B,0x31,0x88,0x17,0x4D, 9568 0x43,0xBC,0x70,0xFA,0x30,0xE0,0xFF,0x3F, 9569 0x5E,0xE0,0x57,0x4E,0x03,0x05,0x09,0xF4, 9570 0x2C,0x04,0x30,0xFE,0xFF,0x7F,0x16,0x02, 9571 0xC8,0xB8,0x46,0x9D,0x85,0x80,0xE5,0x6D, 9572 0xE5,0x19,0xDB,0xA7,0x95,0x04,0xFF,0xFF, 9573 0x67,0x21,0xC0,0x41,0x2E,0x23,0x07,0x21, 9574 0x4C,0xC4,0x87,0x83,0x8F,0x99,0x80,0x9E, 9575 0x29,0xBE,0xB8,0x1B,0xE3,0x09,0xE0,0x45, 9576 0xE2,0x31,0x93,0x1D,0x35,0x0D,0xF3,0x2C, 9577 0x64,0xBC,0xB3,0x78,0x0D,0x78,0x82,0xF7, 9578 0xE4,0x9F,0x85,0x18,0xD8,0x61,0x05,0x7B, 9579 0x14,0x32,0xA8,0xC1,0x63,0x87,0x08,0x13, 9580 0xE8,0x59,0x88,0xC5,0x7D,0xAE,0xE8,0x3C, 9581 0xE1,0xB3,0x10,0xF0,0xFE,0xFF,0x9F,0x25, 9582 0xE0,0x5E,0x0D,0x9E,0x85,0x00,0x13,0x87, 9583 0x0D,0x9F,0x35,0xC0,0x33,0x7C,0x8F,0xEA, 9584 0x1C,0x1E,0x8F,0x81,0x7F,0x56,0x1D,0xE7, 9585 0x04,0x96,0x7B,0xD1,0xB2,0x71,0xA0,0xA1, 9586 0x23,0xB2,0x3A,0x20,0x8D,0x0D,0x73,0x29, 9587 0x89,0x7C,0x72,0x6C,0xD4,0x56,0x04,0xA7, 9588 0x33,0x93,0x4F,0x00,0xD6,0x42,0x21,0x05, 9589 0x34,0x1A,0x8B,0xE1,0x9D,0xF9,0xE8,0x44, 9590 0x41,0x0C,0xE8,0xE3,0x90,0x6D,0x1C,0x0A, 9591 0x50,0x7B,0xD1,0x14,0xC8,0x39,0x07,0xA3, 9592 0x7F,0x76,0x74,0x36,0xBE,0x13,0x70,0x0D, 9593 0x10,0x3A,0x25,0x18,0xDA,0x6A,0x04,0xFC, 9594 0xFF,0x67,0x89,0x01,0x33,0xFE,0x53,0x8C, 9595 0x09,0x7C,0x8E,0xC1,0x1F,0x0C,0xF0,0x03, 9596 0x7F,0x31,0xA8,0xFA,0x5E,0xA0,0xFB,0x82, 9597 0xD5,0xDD,0x64,0x20,0xCC,0xC8,0x04,0xF5, 9598 0x9D,0x0E,0x40,0x01,0xE4,0x0B,0x81,0xCF, 9599 0x51,0x0F,0x05,0x6C,0x22,0x21,0xC2,0x44, 9600 0x33,0x3A,0x62,0xC2,0xA8,0xE8,0x13,0xA6, 9601 0x20,0x9E,0xB0,0x63,0x4D,0x18,0x3D,0x13, 9602 0x5F,0x74,0xD8,0x88,0x31,0x21,0xAE,0x1E, 9603 0xD0,0x26,0x18,0xD4,0x97,0x22,0x58,0x43, 9604 0xE6,0x63,0xF1,0x05,0x02,0x37,0x65,0x30, 9605 0xCE,0x89,0x5D,0x13,0x7C,0xD9,0xC1,0xCD, 9606 0x19,0x8C,0xF0,0x98,0xBB,0x18,0xBF,0x3A, 9607 0x79,0x74,0xFC,0xA0,0xE0,0x1B,0x0E,0xC3, 9608 0x7E,0x32,0xF3,0x8C,0xDE,0xCB,0x7C,0x8D, 9609 0xC3,0xC0,0x7A,0xBC,0x1C,0xD6,0x68,0x61, 9610 0x0F,0xED,0x3D,0xC4,0xFF,0xFF,0x43,0x8C, 9611 0xCF,0x13,0xC6,0x08,0xEB,0xDB,0x0B,0x38, 9612 0xEE,0x59,0xF0,0xEF,0x1A,0xE0,0xB9,0x84, 9613 0xF8,0xAE,0x01,0x30,0xF0,0xFF,0x7F,0xD7, 9614 0x00,0x4E,0xD7,0x04,0xDF,0x35,0x80,0xF7, 9615 0xD0,0x7D,0xD7,0x00,0xAE,0xD9,0xEF,0x1A, 9616 0xA8,0x63,0x80,0x15,0xDE,0x35,0xA0,0x5D, 9617 0xD9,0xDE,0xD7,0x9E,0xB0,0xAC,0xE9,0xB2, 9618 0x81,0x52,0x73,0xD9,0x00,0x14,0xFC,0xFF, 9619 0x2F,0x1B,0x80,0x01,0x29,0x13,0x46,0x85, 9620 0x9F,0x30,0x05,0xF1,0x84,0x1D,0xEC,0xB2, 9621 0x01,0x8A,0x18,0x97,0x0D,0xD0,0x8F,0xED, 9622 0x65,0x03,0x18,0xDC,0x13,0xF8,0x6D,0x03, 9623 0x78,0x43,0xFA,0xB6,0x01,0xD6,0xFF,0xFF, 9624 0x6D,0x03,0xAC,0xF9,0x6F,0x1B,0x28,0x0E, 9625 0xAB,0xBC,0x6D,0x40,0x3C,0xC9,0x33,0x02, 9626 0xAB,0xBA,0x6E,0xA0,0xF4,0x5C,0x37,0x00, 9627 0x12,0x88,0x99,0x30,0x2A,0xFE,0x84,0x29, 9628 0x88,0x27,0xEC,0x68,0xD7,0x0D,0x50,0x04, 9629 0xB9,0x6E,0x80,0x7E,0x5E,0x09,0xFE,0xFF, 9630 0xAF,0x1B,0xC0,0xE0,0xA2,0x80,0xB9,0x6F, 9631 0x00,0x6F,0x58,0x7E,0xDF,0x00,0x7C,0xDC, 9632 0xC4,0x31,0xF7,0x0D,0xC0,0xCC,0xFF,0xFF, 9633 0xBE,0x01,0xB0,0xE7,0xA2,0x80,0xBB,0x6F, 9634 0x00,0xEF,0x8B,0xB4,0xEF,0x1B,0x60,0xFE, 9635 0xFF,0xDF,0x37,0xC0,0x28,0x6D,0xFD,0x1E, 9636 0x1C,0x3D,0x21,0x78,0x7C,0xB8,0xFB,0xA5, 9637 0xC7,0xE7,0xBB,0x39,0x38,0x06,0x79,0x8C, 9638 0x87,0x76,0xC0,0xAF,0xEF,0x9E,0x98,0xEF, 9639 0xE6,0xC0,0xFF,0x4C,0x70,0x3C,0x18,0x68, 9640 0x1C,0x62,0xAB,0x97,0x06,0x72,0x34,0x38, 9641 0x3F,0xDC,0x19,0x81,0x61,0x15,0x7F,0xF2, 9642 0x47,0x38,0xC7,0xD0,0xD9,0xE1,0x20,0xB1, 9643 0x83,0xE0,0xC1,0x56,0x6D,0x02,0x85,0x86, 9644 0x50,0x14,0x18,0x14,0x8B,0x0F,0x18,0xF8, 9645 0x61,0xB3,0xB3,0x00,0x93,0x04,0x87,0x3A, 9646 0x02,0xF8,0x3E,0xD1,0xFC,0x38,0x74,0x37, 9647 0x38,0x54,0x8F,0xE5,0xA1,0x80,0x9E,0x01, 9648 0x71,0xC7,0x0C,0x32,0x69,0xCF,0x28,0xE2, 9649 0x53,0xC2,0x29,0x85,0x49,0xE0,0xF3,0x03, 9650 0x43,0xE3,0x04,0xAF,0x0D,0xA1,0xF9,0xFF, 9651 0xFF,0xA4,0xC0,0x3C,0xDF,0x31,0x04,0x6C, 9652 0x02,0xBB,0xBF,0x64,0xC8,0xDA,0xC0,0x75, 9653 0x4B,0x32,0x44,0x6F,0x38,0xB2,0x85,0xA2, 9654 0xE9,0x44,0x79,0xDF,0x88,0x62,0x67,0x08, 9655 0xC2,0x88,0x12,0x2C,0xC8,0xA3,0x42,0xAC, 9656 0x28,0x2F,0x05,0x46,0x88,0x18,0xE2,0x95, 9657 0x23,0xD0,0x09,0x87,0x0F,0xF2,0xD8,0x14, 9658 0xA7,0xFD,0x41,0x90,0x58,0x4F,0x02,0x8D, 9659 0xC5,0x91,0x46,0x83,0x3A,0x07,0x78,0xB8, 9660 0x3E,0xC4,0x78,0xF8,0x0F,0x21,0x06,0x39, 9661 0xC8,0x73,0x7B,0x54,0x38,0x4E,0x5F,0x25, 9662 0x4C,0xF0,0x02,0xE0,0x83,0x0A,0x1C,0xD7, 9663 0x80,0x9A,0xF1,0x33,0x06,0x58,0x8E,0xE3, 9664 0x3E,0xA9,0xC0,0x1D,0x8F,0xEF,0x07,0x6C, 9665 0xC2,0x09,0x2C,0x7F,0x10,0xA8,0xE3,0x0C, 9666 0x9F,0xE7,0x0B,0x8B,0x21,0x1F,0x13,0x4C, 9667 0x60,0xB1,0x27,0x1B,0x3A,0x1E,0xF0,0xDF, 9668 0x63,0x1E,0x2F,0x7C,0x32,0xF1,0x7C,0x4D, 9669 0x30,0x22,0x84,0x9C,0x8C,0x07,0x7D,0x87, 9670 0xC0,0x5C,0x6F,0xD8,0xB9,0x85,0x8B,0x3A, 9671 0x68,0xA0,0x4E,0x0B,0x3E,0x28,0xB0,0x9B, 9672 0x11,0xE6,0xB8,0xCE,0xCF,0x2A,0x60,0xF8, 9673 0xFF,0x9F,0x55,0x60,0x8F,0x10,0xFE,0xED, 9674 0xC1,0xF3,0xF2,0x95,0xE1,0xD5,0x21,0x81, 9675 0x43,0x8E,0x10,0x3D,0x2E,0x8F,0x10,0x73, 9676 0x3E,0xC2,0x0C,0x11,0x5C,0x67,0x01,0x70, 9677 0x0C,0x11,0xF8,0x1C,0x70,0xC0,0x71,0x69, 9678 0xE2,0x03,0xF5,0x01,0x07,0x70,0x70,0x4D, 9679 0xC3,0x1D,0x70,0xC0,0x71,0x16,0x60,0xFF, 9680 0xFF,0xC3,0x0D,0x2C,0x49,0x26,0x0E,0x23, 9681 0x18,0x11,0x30,0x28,0x02,0x02,0xA4,0xB3, 9682 0x80,0x0F,0x29,0x00,0x1F,0xAE,0x0C,0x0F, 9683 0x29,0xD8,0x93,0x86,0x07,0x8E,0x1B,0x85, 9684 0x07,0x8D,0x0B,0x30,0x68,0x7A,0xE2,0x80, 9685 0x7F,0x4C,0xF0,0x19,0x05,0x1C,0xE3,0x06, 9686 0xDF,0x2A,0x0C,0xFC,0xFF,0x3F,0x30,0xCC, 9687 0xE1,0xC2,0x63,0x39,0x8A,0xA0,0x07,0x1E, 9688 0xD4,0xF7,0x8C,0x33,0xF7,0x24,0x8F,0xD1, 9689 0x51,0x0F,0x27,0xF4,0xE4,0x85,0x3B,0x57, 9690 0xF9,0x0A,0x71,0x14,0x18,0xB8,0x77,0x29, 9691 0x8F,0xCF,0x17,0x2B,0xC3,0x63,0x46,0xFB, 9692 0x1E,0x72,0xD6,0x11,0x02,0xE2,0x2F,0x75, 9693 0x6C,0xC0,0x60,0x39,0x18,0x00,0x87,0x01, 9694 0xE3,0x13,0x0D,0x58,0x67,0x1B,0x3C,0xF4, 9695 0x69,0x31,0xC4,0xE3,0x0B,0xFB,0x56,0x61, 9696 0x82,0xEA,0x41,0x75,0x12,0xF4,0xD0,0xC0, 9697 0x01,0xE8,0xA1,0xC1,0x3F,0xB9,0x90,0xFB, 9698 0x2B,0x1D,0x82,0xB5,0xE2,0x69,0xDE,0x47, 9699 0x1E,0xF3,0xDC,0xA2,0xBC,0x0D,0x3C,0x07, 9700 0xF0,0xD3,0x82,0x87,0xE3,0x63,0x81,0xC7, 9701 0xE9,0x4B,0x58,0x82,0xF7,0x1A,0x9F,0x6C, 9702 0x1E,0x5C,0x58,0xB2,0x21,0xA0,0x06,0xEB, 9703 0x21,0x60,0xA6,0x9A,0xC0,0x49,0x46,0x80, 9704 0xCA,0x00,0xA1,0x1B,0xCB,0xE9,0x3E,0x8B, 9705 0x84,0x38,0xCD,0x47,0x99,0xC7,0x02,0x8F, 9706 0xF5,0xC1,0xC0,0xFF,0x7F,0xCD,0x23,0xD4, 9707 0x7D,0xCD,0x33,0x7B,0x3A,0xC0,0xAC,0x22, 9708 0xDC,0x7B,0xCE,0x1B,0x86,0xD1,0x9E,0x2D, 9709 0x7C,0xCD,0x78,0xD6,0x34,0x42,0x38,0x76, 9710 0x83,0xF3,0x48,0x8C,0xF0,0x82,0xC0,0x4E, 9711 0x0C,0x0F,0x30,0xC6,0x39,0x79,0xC3,0xFA, 9712 0xC2,0xCB,0x40,0x83,0x19,0xDB,0x97,0x01, 9713 0x36,0x2A,0xDF,0x88,0xC0,0x97,0xFC,0x62, 9714 0x00,0x65,0x16,0xBE,0x9E,0xF8,0xA0,0xC4, 9715 0x2E,0x06,0x2C,0xE5,0xC5,0x00,0x54,0x37, 9716 0x0C,0x5F,0x0C,0xE0,0x5F,0x89,0x5E,0x0C, 9717 0xC0,0x70,0x71,0xF2,0x3D,0xC0,0x1E,0xEE, 9718 0xA3,0x74,0x9C,0xBE,0xFD,0xBD,0x19,0xF8, 9719 0x6C,0xC0,0x60,0x3C,0xC3,0x30,0xC6,0x08, 9720 0xE3,0x51,0x86,0x31,0xC1,0xDC,0xB7,0x03, 9721 0xE8,0x39,0x87,0x81,0x4A,0x78,0x3B,0x80, 9722 0x72,0x0E,0xE8,0xF2,0x68,0x42,0x4F,0x01, 9723 0x4F,0x07,0x3E,0x29,0x1A,0xA2,0xAF,0xB1, 9724 0x0A,0x26,0x50,0xC4,0x07,0x0D,0x3E,0xB5, 9725 0x28,0x3E,0x15,0x78,0x2D,0xCF,0x4E,0xE1, 9726 0xE2,0x9C,0x89,0xA7,0x6A,0x38,0x03,0xBD, 9727 0xE6,0x86,0x63,0xFF,0x7F,0x38,0xFC,0xA9, 9728 0xE0,0x35,0x80,0x1D,0x24,0x3D,0x2D,0x23, 9729 0xC2,0x38,0xA4,0x3C,0x32,0xF8,0xB6,0x18, 9730 0xC7,0x90,0x0F,0x91,0xBE,0x13,0x18,0xF2, 9731 0x21,0xEF,0x79,0xC7,0xC0,0xAF,0x08,0x71, 9732 0x9E,0xB2,0x7C,0x67,0xF0,0x65,0x01,0x7C, 9733 0x91,0x2E,0x0B,0x68,0x68,0x9F,0x64,0x7C, 9734 0x41,0x30,0xEC,0x89,0xB3,0x00,0x77,0x05, 9735 0x50,0x81,0xFA,0xAE,0x00,0xFF,0x42,0xF0, 9736 0xAE,0x00,0x86,0x79,0xF9,0x56,0xC0,0x35, 9737 0x1D,0x4A,0xD0,0x67,0x12,0x5F,0x17,0x70, 9738 0x53,0x64,0xA9,0x8E,0x0A,0xD0,0x53,0x4C, 9739 0x02,0x75,0x47,0xF7,0x51,0x01,0xC6,0x4D, 9740 0xD9,0x07,0x54,0x76,0x5A,0x60,0x67,0x21, 9741 0x76,0x1D,0xC1,0x5D,0x49,0x18,0xCA,0xB3, 9742 0x81,0x2F,0x59,0xFC,0x70,0x00,0x03,0xDC, 9743 0xB3,0x38,0xC4,0x08,0xB1,0xD9,0x81,0xEB, 9744 0x75,0xD2,0x70,0x2F,0x44,0xEC,0xFF,0x7F, 9745 0x32,0x00,0xE3,0x51,0x1B,0x1C,0x27,0x9D, 9746 0xF0,0x91,0x9E,0x59,0xF8,0x49,0x19,0x30, 9747 0x71,0xF2,0x03,0xE3,0xC9,0x1A,0xC6,0x00, 9748 0xB8,0xBC,0x57,0x95,0x81,0xFC,0x43,0x90, 9749 0x20,0x18,0xD4,0x29,0x19,0x38,0x1C,0xC5, 9750 0x70,0xA7,0x64,0x78,0x50,0xF8,0xC3,0x00, 9751 0xE6,0x46,0xE8,0x7B,0x82,0xA1,0xDE,0x93, 9752 0x0E,0xE3,0x91,0xD0,0x04,0x3E,0x2D,0xC3, 9753 0xFA,0xFF,0x9F,0x96,0x81,0xD5,0xB1,0xDD, 9754 0x43,0xF6,0x59,0x01,0x77,0x76,0x80,0x3B, 9755 0x3D,0x7E,0x7A,0x00,0x9C,0x00,0x3D,0x3D, 9756 0x80,0xED,0xBC,0x01,0xF7,0x40,0x80,0x38, 9757 0xFE,0xA3,0x82,0x5F,0x59,0x28,0x1C,0x3F, 9758 0xB6,0xF3,0x63,0x09,0xEE,0x70,0xE0,0x23, 9759 0x83,0x0F,0x90,0xB8,0xA1,0xF8,0x50,0x81, 9760 0x3C,0x0B,0x80,0x62,0xF4,0x6C,0x04,0xEC, 9761 0x06,0xF3,0xD2,0x12,0xE5,0xFF,0xFF,0xDE, 9762 0xC0,0x4E,0x29,0xB8,0x83,0x00,0xF8,0x8E, 9763 0x01,0xE0,0x1D,0x0C,0x97,0x35,0x66,0x94, 9764 0x10,0x18,0x8D,0x19,0x77,0x08,0xE1,0x27, 9765 0x02,0xDC,0x98,0x3D,0x6E,0x8F,0x19,0x77, 9766 0x9C,0xE5,0xA3,0x7A,0xCA,0x08,0xE5,0x03, 9767 0x07,0x3B,0x67,0xBC,0x11,0xF0,0xA1,0x03, 9768 0x8F,0x03,0x0C,0xEE,0x48,0x01,0xC6,0xCB, 9769 0x01,0x1B,0x3B,0xB8,0x83,0x90,0x53,0x20, 9770 0x4B,0x87,0xD1,0xD8,0x71,0xB2,0x81,0x74, 9771 0x8C,0xF1,0x21,0xD7,0x63,0xC7,0x0D,0xD6, 9772 0x63,0xC7,0x1D,0x5F,0xB0,0xFF,0xFF,0xE3, 9773 0x0B,0x18,0xC6,0xC0,0xC5,0x0F,0x03,0x7D, 9774 0xF3,0xF3,0xE8,0x0C,0xEE,0x61,0xFB,0x04, 9775 0x13,0xE3,0xF9,0x25,0xC4,0x23,0xCC,0x8B, 9776 0x4B,0x84,0xA3,0x08,0xF2,0xE6,0x12,0xE7, 9777 0xD5,0x20,0xCC,0x63,0x4B,0x94,0x10,0x11, 9778 0x0E,0x26,0xCE,0x13,0x8C,0x11,0x0E,0x3C, 9779 0x8A,0x21,0x22,0x9C,0x40,0x88,0x93,0x3E, 9780 0xD9,0x20,0xE1,0x63,0x84,0x8D,0xF6,0x04, 9781 0xC3,0xC7,0xC2,0xCF,0x2B,0x1E,0x3C,0x3F, 9782 0xAD,0xF9,0x2E,0xE8,0xC9,0x9C,0xE3,0x43, 9783 0x96,0xA7,0xF6,0x38,0xE9,0xC3,0x2C,0x6E, 9784 0x50,0x0F,0x8E,0xEC,0xAE,0xE3,0xE3,0x35, 9785 0xF6,0x14,0xE4,0x21,0xF0,0x13,0x81,0x2F, 9786 0x88,0x9E,0xAC,0xEF,0x7A,0xEC,0x5E,0x66, 9787 0x8C,0xEA,0xA7,0x80,0x3A,0xA6,0x9C,0xC1, 9788 0x2B,0x04,0xBB,0xE7,0xF9,0x90,0xED,0xBB, 9789 0x24,0x1B,0x05,0xEE,0x90,0xE0,0x33,0x12, 9790 0x3F,0x55,0x78,0x18,0x1E,0x05,0x8C,0x19, 9791 0xBC,0x23,0x1C,0x5A,0x88,0x03,0x7E,0xDF, 9792 0x65,0x43,0x8D,0x71,0x7A,0x3E,0x7F,0xB0, 9793 0x41,0xC0,0x87,0x3A,0x54,0x0F,0xF3,0xA8, 9794 0x5E,0x0A,0x19,0xCE,0xD9,0xC1,0x1D,0x04, 9795 0xF6,0xF8,0xE1,0x41,0xF0,0x9B,0x25,0x1F, 9796 0x04,0x3B,0xDF,0xBC,0xC1,0x19,0xE4,0xFF, 9797 0x7F,0x0C,0xB0,0xCF,0x54,0x3E,0x9A,0x20, 9798 0x8E,0x80,0xE8,0xF3,0x87,0xC7,0xF0,0x26, 9799 0xC7,0x87,0x83,0x3D,0x7A,0xE0,0x4E,0x22, 9800 0x70,0x8F,0x5D,0x07,0xED,0x6B,0x9C,0x2F, 9801 0x5A,0x30,0xEE,0x7B,0xCF,0x22,0xE0,0xC7, 9802 0x78,0x6C,0x01,0xC7,0xA1,0x04,0xDC,0xC1, 9803 0x8E,0x6B,0x1C,0x42,0x51,0x60,0x74,0x28, 9804 0xC1,0xC5,0x00,0x12,0x8C,0x63,0x9C,0xD1, 9805 0xD0,0x97,0x48,0x1F,0xD2,0xE0,0x0C,0x1A, 9806 0xF6,0x3C,0x9F,0x50,0xB8,0x3D,0x01,0x8A, 9807 0x4E,0x28,0x20,0xC3,0x7D,0x06,0xC1,0x9E, 9808 0x10,0xF8,0x19,0x84,0xFD,0xFF,0x0F,0x8E, 9809 0x1E,0xF7,0x7B,0xA3,0x4F,0x8D,0x6C,0xEE, 9810 0x0F,0x01,0x27,0x70,0xEE,0xEC,0xD4,0x8C, 9811 0x3B,0x33,0x60,0xCF,0x1F,0x1E,0x02,0x3F, 9812 0x17,0x78,0xF8,0x1E,0x02,0x7E,0xF0,0x0F, 9813 0xCC,0x06,0x07,0xE3,0x29,0xC2,0xD7,0x0E, 9814 0x0E,0xCE,0x4F,0x03,0x06,0xE7,0xAF,0x50, 9815 0x9F,0xE7,0x19,0x38,0xF6,0xD4,0xEB,0x7B, 9816 0x87,0xE7,0xEB,0x43,0x05,0xFE,0xA6,0xE7, 9817 0x43,0x05,0x38,0x0E,0x0F,0xFC,0xB0,0xC2, 9818 0x86,0xF0,0x28,0x80,0x3F,0xB5,0xF8,0xF8, 9819 0x17,0xE7,0x29,0x82,0xDD,0x46,0xB0,0x87, 9820 0x0B,0xC0,0x51,0xB4,0xB3,0x18,0x2A,0xCC, 9821 0x59,0x8C,0xFC,0xFF,0xCF,0x51,0xA8,0xB3, 9822 0x18,0x3D,0x5C,0x00,0x2E,0x04,0x1F,0x0F, 9823 0x40,0x73,0x10,0x78,0x5C,0xF0,0x85,0xE0, 9824 0x48,0x0E,0xE4,0xE9,0x00,0xF0,0x19,0x4A, 9825 0xC3,0xA1,0x09,0x13,0x03,0x06,0x75,0x3E, 9826 0xF0,0x09,0xC5,0xC7,0x0E,0x7E,0x36,0xF0, 9827 0x8D,0xDC,0x43,0xE5,0xA7,0x66,0x5F,0xF2, 9828 0x11,0xE0,0x02,0x75,0xA0,0x61,0xA0,0x46, 9829 0xE4,0x23,0xD2,0xFF,0xFF,0xB9,0x0D,0x1B, 9830 0x60,0x68,0xF4,0x1C,0x0E,0xE3,0x80,0xEB, 9831 0x73,0x38,0x76,0x40,0x3E,0x87,0xC3,0x3F, 9832 0x47,0xC3,0x1F,0x1B,0x3B,0xDD,0xF3,0x81, 9833 0xC1,0xBA,0x7E,0x63,0x06,0x06,0xB6,0x6F, 9834 0x91,0x07,0x06,0x1C,0x51,0xCF,0xC6,0x57, 9835 0x08,0x0F,0x0C,0x6C,0x80,0x1E,0x18,0xF0, 9836 0x89,0x05,0x21,0x27,0x03,0x43,0x9D,0x32, 9837 0x8C,0x1C,0xF3,0x89,0xC3,0xC3,0xF0,0xA1, 9838 0x22,0xEA,0x33,0xC0,0x23,0x1E,0x1B,0x1B, 9839 0xFB,0xFF,0x8F,0x0D,0x2C,0xC7,0x16,0x8F, 9840 0x0D,0xFC,0x47,0x78,0xFC,0xD8,0xE0,0x8C, 9841 0xE5,0xD1,0xC4,0x97,0x99,0x23,0x3B,0x8D, 9842 0x33,0x7B,0x0D,0xF1,0xD1,0xEE,0xF1,0xDB, 9843 0x63,0x03,0x97,0x85,0xB1,0x01,0xA5,0x90, 9844 0x63,0x43,0x1F,0x52,0x7C,0x0A,0xB0,0x71, 9845 0x54,0x32,0x0F,0x1F,0xAF,0x7C,0x62,0x38, 9846 0xBA,0x20,0x6F,0xE8,0xBE,0x5C,0xF8,0x48, 9847 0x63,0x30,0x5F,0x5A,0x7C,0x06,0xE5,0x43, 9848 0x04,0xD7,0x57,0xC5,0x43,0x04,0x3E,0xA1, 9849 0x86,0x88,0x1E,0xCF,0xFF,0xFF,0x11,0xCC, 9850 0x43,0x64,0x43,0x03,0xAF,0x87,0xA1,0x01, 9851 0xA5,0x98,0xC0,0x5E,0x85,0x87,0x46,0x4F, 9852 0x3F,0x3E,0x04,0x30,0x08,0xDF,0x06,0xD8, 9853 0x55,0xC0,0x57,0x21,0x83,0x24,0x18,0xE7, 9854 0x64,0x41,0x07,0x07,0x8E,0x21,0x79,0x70, 9855 0xF0,0x07,0xE3,0x21,0x70,0x60,0xCF,0xE0, 9856 0xB9,0xE8,0x31,0xD8,0xA7,0x1D,0x9F,0x4A, 9857 0xC0,0x77,0xE6,0x04,0xC7,0xE9,0x1D,0x7B, 9858 0x29,0xF0,0x08,0x1E,0xAD,0x3C,0x02,0x7E, 9859 0xB4,0x02,0x66,0xFF,0xFF,0xA3,0x15,0x30, 9860 0x09,0x7A,0xE6,0xA4,0x03,0x77,0x34,0x18, 9861 0xD4,0xD1,0x0A,0x5C,0x11,0xC0,0x75,0xDC, 9862 0xF0,0xD1,0x02,0xCE,0x50,0x0F,0xDA,0x07, 9863 0x65,0xCF,0xDA,0x97,0x21,0x76,0xB4,0x00, 9864 0x97,0x89,0x43,0x08,0xD0,0x04,0x3E,0x89, 9865 0x67,0xEF,0x43,0x03,0xB3,0x8A,0xA1,0x01, 9866 0xA5,0xA3,0x01,0xEE,0x44,0x81,0xFD,0xFF, 9867 0x9F,0x28,0x60,0xDE,0x30,0x70,0x07,0x0A, 9868 0xC0,0xCD,0xE9,0xDB,0xE3,0xE2,0xD0,0x38, 9869 0xC4,0xE7,0xA7,0x73,0xF6,0xD1,0xE8,0x4C, 9870 0x71,0x67,0x11,0x30,0x9C,0x7D,0x11,0x8F, 9871 0x18,0x03,0xF9,0x81,0x21,0x59,0x30,0x28, 9872 0x16,0x0F,0xC5,0x07,0x03,0x0E,0xEC,0x23, 9873 0x02,0x3B,0x17,0xB0,0x73,0xAD,0xE1,0xF8, 9874 0x59,0xC0,0xA7,0x84,0xB7,0xA6,0x17,0x7B, 9875 0x9F,0xD7,0x7D,0xD6,0x08,0xC9,0xCE,0xF4, 9876 0x3E,0x89,0xE2,0x0E,0xA2,0x70,0x4E,0x9F, 9877 0xE0,0x22,0xF0,0x65,0xDF,0xA3,0xE0,0xA7, 9878 0x07,0xCF,0xF1,0x8D,0xC1,0xA7,0x07,0xE6, 9879 0x7E,0xF8,0x9A,0xF1,0x33,0xC3,0xE3,0x43, 9880 0x88,0x27,0xE2,0xDA,0xA6,0x20,0x5B,0x18, 9881 0x42,0x09,0xF4,0xFF,0x8F,0x10,0xE5,0x6D, 9882 0x20,0xCA,0x29,0x44,0x88,0x12,0xA4,0xB1, 9883 0xC9,0x0B,0x35,0xCA,0xD9,0x45,0x6E,0x6D, 9884 0xF6,0x82,0x0B,0x14,0x2A,0x66,0x9C,0x28, 9885 0xEF,0x10,0xB1,0xDA,0x1F,0x04,0x91,0xF4, 9886 0x32,0xD0,0x71,0xC9,0x91,0x0E,0x7D,0xE8, 9887 0x61,0xFB,0x04,0x8C,0x3F,0x48,0xE2,0xAE, 9888 0x2A,0x3E,0x28,0xF8,0x00,0x80,0x77,0x09, 9889 0xA8,0x5B,0x9D,0xC7,0xED,0xF3,0x06,0xF8, 9890 0xAF,0x17,0x58,0x82,0xF2,0x07,0x81,0x1A, 9891 0x99,0xA1,0x3D,0xCC,0xB7,0x19,0x43,0xBE, 9892 0x07,0x1C,0x16,0x3B,0x27,0xF9,0xF0,0x08, 9893 0x1C,0x8E,0x01,0x4F,0x1B,0xBE,0x51,0x7B, 9894 0xBE,0x3E,0x62,0x01,0x8E,0xFE,0xFF,0x47, 9895 0x2C,0x30,0x9D,0xDF,0x7D,0x82,0x01,0xC7, 9896 0xCD,0x82,0x9F,0x61,0x00,0x67,0x40,0xCF, 9897 0x30,0x60,0x1F,0x2A,0x6E,0x08,0x5C,0xEE, 9898 0x8A,0x28,0x90,0x05,0xC2,0xA0,0x0E,0xFD, 9899 0xE4,0x08,0x42,0xCF,0x9C,0x70,0x86,0x72, 9900 0xB2,0xBD,0x5F,0x1D,0xC8,0x2D,0xC2,0x43, 9901 0x3D,0x8B,0xC7,0x04,0x76,0xDA,0x02,0x36, 9902 0xFF,0xFF,0xE3,0x29,0xB0,0x98,0xF7,0xD3, 9903 0x69,0x84,0x63,0x03,0xFB,0x71,0x0B,0x38, 9904 0x1D,0xCC,0xE0,0xDC,0x7F,0xD8,0x2D,0x1A, 9905 0x37,0x34,0xB0,0x0D,0xCC,0x43,0x03,0x3E, 9906 0x27,0x47,0x30,0x9E,0x98,0xF8,0x55,0xE2, 9907 0xE1,0x89,0x1F,0x43,0xC0,0xFA,0xFF,0x3F, 9908 0x99,0x01,0xF6,0x84,0x1E,0xCB,0x50,0xD2, 9909 0x4E,0x66,0x80,0xC0,0xFB,0xD8,0x3B,0xC3, 9910 0x4B,0x83,0xE7,0x74,0xD2,0xCF,0x62,0x3E, 9911 0x99,0x19,0x21,0x0A,0xBB,0x8F,0x19,0xAD, 9912 0x37,0x14,0xCD,0x3C,0xE8,0x3B,0x99,0x51, 9913 0x62,0x46,0x6A,0x0E,0x4C,0x48,0x11,0x0F, 9914 0x27,0x4A,0x88,0x60,0xAF,0x13,0x6F,0x67, 9915 0x4F,0x66,0x4C,0xD6,0xC9,0x0C,0x24,0xFF, 9916 0xFF,0x93,0x19,0x98,0x5C,0x9F,0xCC,0x80, 9917 0xCA,0x39,0x0A,0x7F,0x32,0x03,0x78,0x74, 9918 0xC0,0xC2,0x9D,0xCC,0xC0,0xF2,0xFF,0x3F, 9919 0xC4,0x00,0xCE,0xC7,0x0A,0x63,0x0C,0x3C, 9920 0xDA,0xC1,0x0C,0x15,0xE6,0x6C,0x86,0x0E, 9921 0x72,0x08,0xA1,0xC1,0x0E,0x21,0x50,0xE6, 9922 0x72,0xA0,0xA7,0xF0,0x9A,0xE0,0x73,0x14, 9923 0xD8,0x0F,0x67,0xC0,0xE1,0xD4,0x80,0x0F, 9924 0x74,0xE2,0x42,0x8F,0xC2,0x23,0x0E,0x58, 9925 0xFD,0xC0,0xC8,0xFF,0xFF,0x64,0x06,0x18, 9926 0x78,0x6A,0xF8,0x40,0x82,0x63,0x31,0xEA, 9927 0x1B,0xC4,0x21,0xBE,0x8D,0xF8,0xE8,0xFE, 9928 0x6A,0xE2,0x4B,0x00,0xE6,0x42,0xE2,0xD3, 9929 0x09,0xB3,0x70,0x38,0x03,0x5A,0x43,0x60, 9930 0x57,0x26,0xCF,0x9C,0x0F,0xE1,0x6C,0x3C, 9931 0x7A,0xDC,0xE9,0x04,0xDE,0x38,0x7C,0x3A, 9932 0x01,0x5E,0x07,0x0C,0xCC,0x0C,0xC2,0x3F, 9933 0x84,0xB0,0x21,0x9C,0xAA,0xC7,0x70,0xEE, 9934 0xAF,0x38,0x3E,0x9D,0x80,0xF3,0xFF,0x7F, 9935 0x62,0x03,0x0C,0x0A,0x7E,0x32,0xF8,0xB8, 9936 0x46,0x25,0xC2,0xA0,0x8E,0xE6,0x80,0x7B, 9937 0x98,0x27,0x36,0x26,0x6F,0xC5,0x1A,0x8B, 9938 0x4F,0x6C,0x30,0xFF,0xFF,0x27,0x36,0x80, 9939 0xD1,0x87,0x20,0xB0,0xFD,0xFF,0x0F,0x41, 9940 0x60,0x1C,0xA0,0x0F,0x41,0x80,0x9B,0xD3, 9941 0x09,0xEE,0xC4,0x07,0xB6,0x63,0x10,0x60, 9942 0x6D,0xE8,0x3E,0x06,0x81,0xF9,0xFF,0x3F, 9943 0x5A,0x98,0xA3,0xE0,0xC2,0x8E,0x7C,0x28, 9944 0x29,0xA7,0x3E,0xB4,0x0C,0x20,0x69,0x38, 9945 0xC9,0x01,0x9D,0xD3,0x3D,0x70,0x92,0x75, 9946 0xEA,0x40,0x8F,0xC7,0xA0,0xAF,0x1C,0xBE, 9947 0x12,0xF0,0x23,0x07,0x93,0x00,0xAA,0x41, 9948 0xFA,0xCC,0x07,0x9C,0x8E,0x1C,0xE0,0x38, 9949 0x26,0x05,0xC6,0xDE,0x0E,0xDE,0x22,0x3D, 9950 0x89,0xA7,0xA1,0xE3,0x0C,0x51,0x38,0x26, 9951 0x39,0x18,0x44,0x7A,0x95,0x62,0x03,0x7C, 9952 0xAB,0xF1,0xD9,0xC8,0x07,0x10,0x78,0xE3, 9953 0xF6,0xD8,0x61,0xFF,0xFF,0x0F,0x75,0xC0, 9954 0x01,0xE2,0xA4,0xF8,0x21,0xC3,0x98,0x67, 9955 0xC5,0x0F,0x75,0x80,0xF5,0x18,0x27,0x3A, 9956 0x94,0xF0,0x43,0x1D,0x20,0xE8,0xFF,0x7F, 9957 0xA8,0x03,0x86,0x38,0x6F,0x24,0xD1,0x1E, 9958 0xEA,0x98,0xE8,0x43,0x1D,0x40,0xC8,0xFF, 9959 0xFF,0xA1,0x0E,0x18,0x9E,0x87,0x00,0xAE, 9960 0x9C,0xEF,0xC0,0x7C,0x22,0x02,0xEF,0xFF, 9961 0xFF,0x7C,0x07,0xB8,0x1B,0x2D,0xCC,0x51, 9962 0x70,0x41,0xAF,0x0E,0x03,0x51,0x09,0x30, 9963 0x28,0x02,0xC7,0x5F,0x9B,0x60,0x1C,0xEA, 9964 0x7C,0x87,0x3E,0x2F,0x78,0xD8,0x4F,0x05, 9965 0x9E,0xC4,0xA9,0xFA,0x5A,0x70,0x14,0x4F, 9966 0x00,0x3E,0xE1,0x01,0xFF,0xA1,0xC1,0x9A, 9967 0x44,0xF1,0x43,0x03,0xF5,0x11,0xE4,0xFF, 9968 0x7F,0x68,0xC0,0x28,0xEA,0xF9,0x06,0x7D, 9969 0xCC,0xF2,0xD9,0x20,0xE6,0x0B,0x48,0x84, 9970 0x07,0x10,0x5F,0x1F,0xD8,0x71,0xD2,0x67, 9971 0xA0,0x40,0x51,0xDE,0x37,0xF8,0x09,0x07, 9972 0x5C,0x83,0xF3,0x09,0x07,0xBC,0x87,0x23, 9973 0x1F,0x4B,0xC0,0x77,0xD0,0x84,0x73,0x81, 9974 0xF1,0x8D,0x8D,0x9D,0x06,0xC0,0x76,0x00, 9975 0x06,0xDF,0x69,0x00,0x1C,0xC7,0x24,0x7E, 9976 0x3A,0x04,0x13,0xCC,0xC1,0xBC,0x34,0xFB, 9977 0xFF,0xEF,0xFD,0x94,0x43,0xCF,0x86,0x80, 9978 0x75,0x49,0x07,0x43,0x94,0x88,0xB3,0x21, 9979 0x20,0xFD,0xFF,0x7F,0x36,0xC4,0x20,0xC4, 9980 0x09,0xFC,0x12,0xD1,0xDC,0xD9,0x90,0xAE, 9981 0xD8,0x67,0x43,0x80,0xE1,0xFF,0xFF,0x23, 9982 0x00,0xF6,0x7C,0x04,0x38,0x3D,0x64,0x83, 9983 0xE7,0x14,0x08,0xE3,0xE4,0x03,0x38,0xFE, 9984 0xFF,0x8F,0x15,0xE6,0x18,0x78,0xEA,0x97, 9985 0x9B,0x8F,0x03,0x54,0xD4,0x2B,0xC2,0x30, 9986 0x94,0xC5,0x87,0x05,0x1F,0x11,0xF8,0x61, 9987 0xC1,0x23,0xA8,0x78,0x9C,0xF4,0x74,0xE3, 9988 0x33,0x21,0x3B,0x24,0x38,0xFC,0x20,0xE9, 9989 0x41,0x13,0x3C,0xE7,0x23,0x78,0xB7,0x1E, 9990 0x38,0xA7,0x02,0xC0,0x4D,0xAE,0x27,0xA3, 9991 0x4E,0x17,0x0E,0x70,0x8E,0x92,0x8D,0x63, 9992 0x08,0xE5,0x70,0xCC,0xB7,0x87,0xA6,0xC9, 9993 0x4E,0x56,0x30,0x63,0x41,0xEA,0x24,0xE0, 9994 0x01,0x38,0x10,0x8C,0xB4,0x93,0x68,0x34, 9995 0x86,0xB3,0x5A,0x18,0xC1,0x19,0xC4,0xC7, 9996 0x11,0xE7,0x3A,0x19,0xA1,0x3F,0x07,0x3E, 9997 0x15,0x61,0x82,0xDC,0x4B,0xE8,0xBC,0x7D, 9998 0x37,0xE0,0x57,0x61,0x8F,0xC5,0xFF,0x7F, 9999 0x60,0xDF,0x4E,0xC0,0x31,0x17,0xAB,0x01, 10000 0x45,0x0D,0xC0,0x68,0x98,0x53,0xC0,0x53, 10001 0x09,0xB8,0x82,0xCD,0x0D,0x7D,0x61,0xB1, 10002 0xD6,0xA9,0xE8,0x14,0xF4,0x3E,0x70,0x70, 10003 0xC0,0x63,0xF6,0x1E,0x1C,0x2C,0x34,0x0F, 10004 0x0E,0x6C,0xD9,0x06,0x87,0x56,0x72,0x17, 10005 0x21,0x87,0x0F,0xFC,0xEC,0x80,0x03,0xA0, 10006 0x67,0x07,0x0B,0xC9,0xB3,0x03,0x9B,0xBE, 10007 0xB3,0x08,0x28,0x70,0xFE,0xFF,0x11,0xDE, 10008 0x3B,0x7C,0x6E,0x79,0xF6,0x60,0x63,0x78, 10009 0x74,0x31,0x9A,0xD1,0xB9,0xA6,0xDB,0x04, 10010 0x4A,0xC5,0x6D,0x82,0x82,0xF8,0x06,0xE0, 10011 0x84,0x34,0xBA,0x75,0xE2,0x66,0x62,0xFC, 10012 0x47,0x0C,0x1F,0x11,0x0E,0xE9,0x6C,0x4D, 10013 0x30,0x0F,0xA4,0x9E,0x81,0xBE,0xB3,0xE1, 10014 0x67,0x1F,0xF2,0xC1,0xC5,0xD3,0xF0,0xF5, 10015 0x86,0xDC,0x3B,0xE8,0xB4,0x7D,0x66,0xC0, 10016 0x1C,0x74,0x7D,0x9D,0x7A,0x83,0x27,0x57, 10017 0x09,0xEA,0xE1,0x02,0x42,0x2F,0x34,0xBE, 10018 0xDC,0x25,0x78,0xE0,0xF4,0xE9,0xEE,0xBD, 10019 0x84,0x9D,0xF1,0x12,0xBC,0xE0,0x25,0x98, 10020 0x77,0x10,0xA8,0x51,0x79,0x10,0x98,0xAB, 10021 0x3C,0xCB,0x37,0x06,0x54,0xB2,0x8B,0x16, 10022 0x3D,0xC3,0xBC,0xC3,0xF8,0x92,0xE0,0xEB, 10023 0x87,0xCF,0x2D,0x5E,0xC0,0xEB,0x16,0x0C, 10024 0x82,0x67,0xA0,0x57,0x17,0xDF,0xD9,0x0D, 10025 0xFC,0x2A,0xF0,0x46,0x13,0x22,0x98,0x61, 10026 0x0F,0xFF,0xDD,0xDD,0xA8,0xBE,0xE9,0x18, 10027 0xEB,0x75,0xC4,0x23,0xE5,0xC7,0x96,0x03, 10028 0x8A,0xF4,0xF2,0xE6,0x09,0xF8,0x2C,0xE3, 10029 0x53,0xDD,0x49,0xF9,0x7A,0x68,0xF4,0x57, 10030 0x08,0x1F,0x7E,0x8C,0xEC,0x73,0x0E,0x3B, 10031 0xDF,0xB1,0x41,0x71,0xC4,0x07,0x86,0x97, 10032 0x1A,0x4F,0x85,0x9D,0xBB,0x60,0x1C,0x1C, 10033 0xD8,0xB1,0x08,0x73,0x7C,0x05,0xD7,0xC9, 10034 0xE6,0xFF,0xFF,0xE4,0x00,0x6E,0x78,0xCC, 10035 0xC1,0xD7,0xE7,0x0D,0xDF,0x0C,0x3C,0x2E, 10036 0x7E,0xE4,0xF0,0x49,0xE3,0xA5,0xD3,0xD8, 10037 0xA7,0xE9,0xA3,0xD1,0xCB,0x9B,0x4F,0x2F, 10038 0x18,0x58,0x5F,0x1A,0x38,0xAC,0xD1,0xC2, 10039 0x3E,0x06,0x9C,0xB9,0x2F,0x44,0xB8,0xC3, 10040 0x23,0x58,0x00,0xF1,0xB7,0x92,0x47,0x0E, 10041 0x4F,0xC0,0x80,0x4C,0xD3,0xBA,0x74,0x20, 10042 0xE2,0xA7,0x3C,0x2B,0x5F,0x99,0x2E,0x43, 10043 0x0C,0xE3,0xA9,0xF2,0xF1,0xC3,0xB3,0xF1, 10044 0x51,0xC0,0xC7,0x28,0xCF,0xFC,0x8C,0x22, 10045 0xBD,0x32,0x10,0x50,0x9D,0x88,0xB8,0x42, 10046 0x18,0x89,0xA1,0xD1,0x9D,0x83,0xC7,0x1F, 10047 0x22,0x05,0x31,0xA0,0x6F,0x2E,0xC0,0xF4, 10048 0x4C,0x04,0x5C,0xFE,0xFF,0x37,0x17,0x80, 10049 0xFF,0xFF,0xFF,0x9B,0x0B,0xE0,0xE6,0xFE, 10050 0xE0,0x9B,0x0B,0x70,0x8D,0xB4,0x2A,0x7A, 10051 0x61,0x77,0x08,0x18,0xD4,0x9D,0x1D,0x70, 10052 0x78,0x2B,0x78,0x67,0x87,0xF5,0xFF,0xBF, 10053 0xB3,0xC3,0xC3,0x8C,0x13,0xE5,0x85,0x21, 10054 0xC6,0x3B,0x3B,0x0B,0xF0,0x26,0xD0,0x51, 10055 0xC6,0x77,0x76,0x80,0x1F,0x67,0xD8,0x77, 10056 0x69,0xF0,0x5E,0x75,0x81,0xF5,0xFF,0xFF, 10057 0xAA,0x0B,0x3C,0x04,0xDF,0xA7,0x41,0x3E, 10058 0x5E,0x30,0x8C,0x83,0x2B,0x27,0xA1,0xC7, 10059 0x02,0x6B,0x85,0x41,0xDD,0xA9,0xC1,0xA5, 10060 0x09,0x5C,0x17,0x5F,0x1F,0x6A,0x7C,0xA4, 10061 0xC5,0x9F,0x2F,0x70,0x01,0x86,0x4C,0x4F, 10062 0x65,0x30,0xAE,0x29,0x3E,0x95,0x61,0xEE, 10063 0x0E,0x1E,0x90,0x8F,0x18,0xC0,0x67,0x15, 10064 0x1E,0x18,0xEE,0xB4,0xE0,0x9B,0x92,0x41, 10065 0xCF,0x31,0xA8,0x8F,0x3C,0x27,0xEF,0x7B, 10066 0xC2,0xE3,0x84,0xA3,0x9E,0x83,0xE8,0xD8, 10067 0xC0,0x71,0xDC,0xC0,0xFD,0xFF,0xC7,0x06, 10068 0xEF,0x70,0x83,0x3B,0xE8,0xF8,0x62,0x70, 10069 0x5C,0x18,0xB8,0xE7,0x02,0x0F,0xC3,0x37, 10070 0x1D,0x8F,0x08,0x33,0xFE,0xD7,0x3F,0x23, 10071 0x04,0xC4,0x5F,0x8C,0xD8,0x80,0xC1,0x78, 10072 0x6B,0xF3,0xF5,0x0D,0x37,0x60,0x5F,0x1D, 10073 0x7C,0xC1,0xF0,0x09,0xCC,0xE8,0x2F,0x30, 10074 0x4F,0x62,0x3E,0x36,0x90,0x0B,0x1C,0x1D, 10075 0x30,0x38,0x00,0x3D,0x60,0xF8,0x87,0x8B, 10076 0x77,0x39,0x30,0x5C,0x05,0x7D,0x5C,0xF0, 10077 0xB1,0xC7,0x8A,0xEE,0x72,0xE8,0x9B,0x9C, 10078 0x61,0xE2,0x18,0xE2,0x0D,0x8C,0xDD,0x25, 10079 0xC8,0x61,0x0E,0xEA,0x5D,0xC2,0x73,0xE0, 10080 0x67,0x0B,0x9F,0xE0,0x7C,0xF3,0x09,0x71, 10081 0xAA,0x8F,0x56,0xEF,0x01,0x3E,0x7A,0xBC, 10082 0x77,0xF9,0xEC,0xC4,0x2E,0x02,0x3E,0x72, 10083 0x19,0xC7,0xD3,0xF4,0x15,0xD0,0x43,0x36, 10084 0xD8,0xAB,0x86,0x4F,0x60,0x3E,0xBA,0xE1, 10085 0x8E,0x51,0x9E,0x89,0xA7,0xEF,0x3B,0x08, 10086 0x3B,0x92,0x1C,0x75,0xA8,0x6B,0x7A,0x44, 10087 0xF9,0xFF,0x9F,0xD0,0x81,0xF8,0xD6,0x06, 10088 0xCE,0x68,0xF7,0x0F,0xF4,0x36,0x3D,0x32, 10089 0xCC,0xD1,0x00,0xD6,0x25,0x04,0x5C,0x77, 10090 0x0C,0x5F,0x42,0x80,0x4F,0xD0,0x4B,0x04, 10091 0xFA,0x9A,0xE1,0xD1,0x3D,0x02,0x60,0xAE, 10092 0x18,0xEC,0x58,0xE0,0xC3,0x86,0xAF,0x01, 10093 0xEC,0x5E,0xE0,0x30,0xF7,0x08,0x50,0x81, 10094 0x7A,0x78,0xF0,0xD5,0xDE,0x23,0x40,0x71, 10095 0xB2,0xF4,0xA1,0xC1,0x03,0xB5,0xAA,0x33, 10096 0x26,0x94,0x23,0x26,0x3F,0x9B,0xF9,0x26, 10097 0x81,0xB9,0x5D,0xFA,0x26,0x01,0x37,0xCF, 10098 0x2C,0x50,0x49,0x20,0xF4,0xFF,0xBF,0x49, 10099 0xC0,0x85,0xE9,0xF2,0x32,0x43,0xE7,0x7F, 10100 0xE0,0xBE,0xD5,0x79,0x84,0x3E,0x44,0x30, 10101 0x94,0xF7,0x3C,0x9F,0xC2,0xF8,0x19,0xC2, 10102 0x07,0x4C,0x76,0xA6,0xE0,0x67,0x4D,0xDC, 10103 0x1D,0xC0,0x28,0x6F,0x9E,0x9E,0x00,0x3B, 10104 0x7F,0x1A,0xF9,0xDD,0xE0,0x5D,0xC0,0xD3, 10105 0xF7,0xBD,0x88,0x9F,0x28,0xC0,0x17,0xEC, 10106 0x4E,0x07,0x05,0xFA,0x84,0x3C,0x22,0xA3, 10107 0xFA,0x88,0xC0,0x2F,0x49,0x60,0x3C,0x92, 10108 0xF8,0x40,0x01,0x84,0xEE,0x05,0xA8,0xD3, 10109 0x07,0x47,0x3D,0xE3,0x17,0x54,0x63,0xBE, 10110 0x5B,0x3D,0xC2,0x79,0x72,0x98,0xCB,0x01, 10111 0x8B,0x73,0x4D,0x02,0xD5,0x71,0x97,0x8F, 10112 0x0E,0xEE,0xB5,0x15,0xFB,0xFF,0x27,0x38, 10113 0xB8,0x77,0x96,0x77,0x3E,0x43,0x79,0x90, 10114 0xE0,0xBB,0xB6,0x82,0xE3,0xAA,0x06,0xE3, 10115 0xD8,0xC2,0x2F,0x79,0x80,0x9D,0x61,0x71, 10116 0xC1,0x7F,0x0F,0x03,0x51,0x89,0x30,0x28, 10117 0x02,0xCB,0xBB,0xB7,0x52,0xF8,0x43,0x06, 10118 0xE3,0x4D,0x81,0x4F,0x1A,0x3B,0x6A,0xE0, 10119 0xFB,0xFF,0x1F,0x35,0xD8,0x86,0x8A,0xBB, 10120 0x29,0x82,0x75,0xAA,0x98,0x21,0xF0,0x60, 10121 0x0F,0x00,0x9F,0xAF,0x7C,0x06,0x50,0x14, 10122 0x18,0xD4,0xA1,0x1D,0xCE,0x6D,0x18,0x70, 10123 0x30,0x62,0xDC,0xA5,0x10,0xEE,0x94,0xDF, 10124 0x51,0x62,0x3F,0x97,0xB3,0xE9,0xE2,0xAE, 10125 0xE6,0x3E,0x9D,0xB0,0x0B,0x32,0x8C,0xB3, 10126 0xC0,0x23,0xC0,0xAB,0x39,0xBF,0x20,0x3F, 10127 0x17,0xBF,0x10,0x3C,0x26,0x85,0x78,0x53, 10128 0x7A,0x25,0x36,0xC6,0x93,0x71,0x73,0xB7, 10129 0x62,0x72,0xDE,0x79,0x41,0x36,0xC6,0xD1, 10130 0x44,0x8C,0x72,0x6E,0x0F,0x03,0x91,0x5F, 10131 0x90,0x7D,0x3F,0x79,0x21,0x88,0x18,0xCD, 10132 0x10,0x41,0x9F,0x97,0x8D,0x15,0x28,0xDE, 10133 0x0B,0x32,0x13,0xF8,0x56,0xD0,0xC1,0xC5, 10134 0x17,0x64,0xEC,0xFF,0xFF,0x82,0x0C,0x30, 10135 0xE2,0x64,0x04,0xF8,0x3C,0x71,0xE0,0xCE, 10136 0x35,0x30,0xFE,0xFF,0x97,0x6A,0xD8,0x27, 10137 0x1B,0xC0,0xD9,0xD0,0x7D,0xB2,0x01,0xF7, 10138 0x68,0xE1,0x1D,0x4D,0x10,0x27,0x1B,0x0A, 10139 0xE4,0xE0,0xEB,0xA2,0x70,0x3C,0xF4,0x49, 10140 0x84,0x1E,0x9D,0x7C,0x94,0xC4,0x9D,0x19, 10141 0x3C,0x91,0x77,0x16,0x8F,0xE2,0x65,0xD0, 10142 0xF7,0x82,0x13,0x79,0x7D,0xB0,0x9C,0x63, 10143 0x24,0xA8,0x46,0xE2,0xE3,0x03,0xFC,0xEB, 10144 0x8B,0x8F,0x91,0xF0,0xF9,0xFC,0xC3,0xF2, 10145 0x60,0x0C,0xF9,0xFF,0x7F,0x8A,0xC4,0x80, 10146 0x3C,0xBB,0x3C,0x86,0xF0,0x0B,0x24,0xDC, 10147 0xD3,0xCC,0x01,0x60,0x64,0x5D,0x1E,0xD1, 10148 0x67,0x47,0x8E,0x11,0xD7,0x17,0x45,0x5F, 10149 0x81,0x7D,0x10,0x38,0x9F,0xE7,0x44,0xB0, 10150 0x8E,0x9A,0x1F,0x6D,0xF8,0xF8,0x39,0xF8, 10151 0x5B,0xC1,0x03,0xA5,0x8F,0x45,0x21,0x1E, 10152 0x91,0xF8,0x39,0x11,0x5C,0x26,0xCE,0x89, 10153 0x40,0xE2,0xD0,0x0B,0xE3,0xB4,0x80,0x1B, 10154 0x88,0xCF,0x94,0xD8,0x29,0x9F,0x08,0x3B, 10155 0x97,0x60,0x46,0x07,0xAE,0xCB,0xBD,0x47, 10156 0x07,0xFE,0x93,0x00,0x1E,0xEB,0xFF,0xFF, 10157 0x78,0x07,0xBE,0x93,0xBA,0xEF,0x26,0xBE, 10158 0xC8,0xF8,0x50,0xF4,0x7C,0x07,0xF8,0x0F, 10159 0x77,0xB8,0x43,0xC5,0x39,0xDF,0x01,0xD2, 10160 0xFE,0xFF,0xE7,0x3B,0x60,0x79,0xB6,0x7E, 10161 0xBE,0x03,0xBB,0xC8,0xF3,0x1D,0x40,0xAC, 10162 0xFF,0xFF,0xF9,0x0E,0xB0,0x73,0x46,0xC3, 10163 0x9D,0xEF,0xC0,0x76,0xB4,0x01,0xCC,0x4D, 10164 0xE3,0xD1,0x06,0xDC,0xC3,0x85,0x3D,0x0C, 10165 0xAE,0xD0,0xA6,0x4F,0x8D,0x46,0xAD,0x1A, 10166 0x94,0xA9,0x51,0xE6,0xFF,0xDF,0xA0,0x56, 10167 0x9F,0x4A,0x8D,0x19,0xCB,0x0E,0xA5,0x80, 10168 0x8F,0x0A,0x8D,0xCD,0xF2,0x28,0x04,0x62, 10169 0x31,0xAF,0x06,0x81,0x38,0x2C,0x08,0x8D, 10170 0xF4,0xCA,0x11,0x88,0x25,0x3F,0xFB,0x05, 10171 0x62,0xB9,0x6F,0x06,0x81,0x38,0xE0,0x1B, 10172 0x4C,0xE0,0xE4,0x61,0x25,0x70,0xF2,0x6E, 10173 0x10,0x88,0x23,0x83,0x50,0xA1,0x3A,0x40, 10174 0x58,0x4C,0x10,0x1A,0xCA,0x07,0x08,0x93, 10175 0xFE,0x48,0x10,0x20,0x31,0x02,0xC2,0xC2, 10176 0xBD,0xBF,0x04,0x62,0x69,0xEF,0x09,0x81, 10177 0x58,0x88,0x15,0x10,0x16,0x17,0x84,0x86, 10178 0xD3,0x02,0xC2,0x24,0x99,0x01,0x61,0x81, 10179 0x40,0xA8,0x7C,0x35,0x20,0x4C,0xA4,0x1B, 10180 0x40,0xBA,0x7A,0x81,0x38,0x88,0x1E,0x10, 10181 0x26,0xC3,0x0F,0x08,0x0B,0x0D,0x42,0xA3, 10182 0x3D,0x30,0x04,0x48,0x0C,0x81,0xB0,0xF8, 10183 0x8E,0x40,0x98,0xF8,0x57,0x91,0x40,0x9C, 10184 0xDF,0x12,0xC4,0x4D,0x69,0x88,0x35,0x01, 10185 0x31,0x0D,0x9E,0x80,0x98,0x22,0x10,0x01, 10186 0x39,0xF6,0xD3,0x43,0x40,0xD6,0x60,0x0A, 10187 0x88,0x45,0x07,0x11,0x90,0x85,0xA8,0x02, 10188 0x62,0x79,0x5D,0x01,0xB1,0xF0,0x20,0x02, 10189 0x72,0xE6,0x97,0x9F,0x80,0xAC,0xE0,0xA5, 10190 0xF3,0x10,0xC0,0xDE,0x10,0x81,0x48,0x72, 10191 0x10,0x01,0x39,0xB0,0x2F,0x20,0x16,0x1F, 10192 0x44,0x40,0xCE,0xFA,0x28,0x14,0x90,0x83, 10193 0x83,0x68,0x10,0xE4,0x6B,0x26,0x20,0xA7, 10194 0x07,0x11,0x10,0xF9,0x04,0x05,0x21,0x6A, 10195 0xBD,0x81,0x30,0x3D,0x8F,0x42,0x0D,0x85, 10196 0x80,0x50,0xE5,0xEA,0xCE,0x31,0x2C,0x07, 10197 0x08,0xCD,0x05,0x22,0x30,0xAB,0x70,0x07, 10198 0xC4,0x54,0x81,0x08,0xC8,0x09,0x80,0xC8, 10199 0xFF,0x9F,0x60,0x2A,0x10,0x9A,0x12,0x8C, 10200 0xEA,0x92,0x07,0xC4,0x12,0x80,0xD0,0x54, 10201 0x20,0x34,0x25,0x88,0x00,0xAD,0xCA,0x1E, 10202 0x10,0x53,0x0A,0x42,0x95,0x83,0xD0,0x74, 10203 0x20,0x54,0xB6,0xBE,0xC3,0x02,0x05,0x11, 10204 0x90,0xA3,0x83,0x50,0xE1,0xFE,0x40,0x98, 10205 0xDE,0x97,0x86,0x00,0x9D,0x0E,0x44,0x40, 10206 0x4E,0x0C,0x42,0x15,0x7C,0x32,0x82,0x10, 10207 0xB1,0x20,0x54,0xC1,0x27,0x23,0x28,0xD1, 10208 0xF2,0xB2,0x13,0x90,0xF5,0x81,0x50,0xBD, 10209 0x20,0x02,0x73,0x36,0x20,0x9A,0x17,0x84, 10210 0xE6,0x07,0xA3,0x5A,0x8D,0x02,0x31,0xFD, 10211 0x20,0x34,0x0F,0x88,0xC0,0xAC,0xE0,0xF9, 10212 0x71,0xC0,0x0C,0x84,0xAA,0x04,0x11,0x98, 10213 0x73,0x01,0xD1,0xAC,0x20,0x34,0x3B,0x18, 10214 0xD5,0xFE,0x0F,0xD1,0x00,0x08,0x08,0xCD, 10215 0x07,0xA2,0xC3,0x00,0x79,0x96,0x09,0xC8, 10216 0x1A,0x41,0xA8,0x66,0x10,0x81,0x39,0x27, 10217 0x10,0xCD,0x0E,0x42,0x95,0xFD,0x4D,0x82, 10218 0x91,0x8C,0x0F,0xD0,0x40,0x24,0x37,0x08, 10219 0xD5,0xF1,0x0C,0x0A,0x46,0x74,0x83,0x08, 10220 0xC8,0x59,0x40,0x68,0x36,0x30,0x9A,0x4C, 10221 0xED,0x91,0x80,0xBA,0x05,0x61,0xE9,0x41, 10222 0x68,0x3A,0xBB,0x83,0xA7,0x20,0x54,0x81, 10223 0x5E,0x30,0xA6,0x19,0x44,0x87,0x05,0x02, 10224 0x42,0x73,0x81,0x51,0x1D,0xAF,0x96,0x40, 10225 0x44,0x1B,0x08,0xD5,0x0A,0xA2,0x81,0x93, 10226 0x1F,0x53,0x10,0x92,0x14,0x84,0xFC,0xFF, 10227 0x07,0xAA,0xC7,0x9C,0x40,0xAC,0xFA,0x5B, 10228 0x25,0x50,0x27,0x01,0xA1,0xC9,0x40,0x74, 10229 0x7C,0x20,0x0F,0xB8,0x83,0x64,0x20,0x54, 10230 0x29,0x88,0xC0,0xAC,0xF4,0x63,0xA4,0x23, 10231 0x05,0x51,0x7D,0xBC,0xA0,0x20,0x34,0xD1, 10232 0x3B,0x2C,0x08,0x7B,0xB8,0x69,0xA8,0xE4, 10233 0x59,0xA5,0xA1,0x12,0x10,0x9A,0x0D,0x44, 10234 0xC7,0x04,0xF2,0xAA,0x79,0x4C,0x60,0x20, 10235 0x54,0x2F,0x08,0xCD,0x01,0x42,0x13,0x83, 10236 0x08,0xD4,0xA9,0xBF,0x37,0x1A,0x2A,0xF9, 10237 0x5B,0x09,0xC4,0xCA,0x5E,0x69,0x02,0xB1, 10238 0xDE,0xA7,0x4E,0x20,0xE6,0x1D,0x98,0xA9, 10239 0x05,0xA1,0xEA,0x41,0x04,0xE6,0xB4,0x40, 10240 0x54,0x81,0x78,0x10,0xA6,0x08,0x44,0x60, 10241 0x4E,0x02,0x44,0xD3,0x81,0xD0,0xEC,0x60, 10242 0x54,0xE7,0xA3,0x4D,0x40,0xD6,0x0E,0x42, 10243 0xB3,0x80,0x08,0xCC,0x59,0x1E,0x69,0x02, 10244 0xB1,0x92,0x2F,0x9D,0x0E,0x24,0x04,0x84, 10245 0x26,0xD3,0x7F,0x68,0xA1,0x05,0x80,0x99, 10246 0x84,0x04,0x20,0x4C,0x16,0x88,0x0E,0x27, 10247 0xD6,0x08,0x22,0x40,0xC7,0x01,0xA3,0xD1, 10248 0x40,0x68,0x5C,0x40,0x9A,0x1D,0x90,0x2A, 10249 0x6D,0x00,0xC6,0x54,0x83,0xD0,0x24,0x20, 10250 0x02,0x74,0x2C,0x10,0x01,0x5A,0x74,0x04, 10251 0x30,0x16,0x01,0x84,0x46,0x05,0xA1,0xC9, 10252 0x2A,0x80,0xB2,0x9C,0x20,0x1A,0x20,0xC9, 10253 0x30,0x60,0x0A,0x42,0x33,0x81,0xD0,0x8C, 10254 0x20,0x54,0x7C,0x07,0x10,0x16,0x04,0x84, 10255 0x86,0x03,0xD1,0x00,0xFE,0xFF,0x8F,0x0C, 10256 0x02,0xD1,0x00,0x9C,0x23,0xC4,0x61,0x85, 10257 0x82,0xD0,0xF4,0x20,0x34,0x6C,0x09,0x50, 10258 0x16,0x1D,0x44,0xC7,0x23,0x92,0x02,0x8C, 10259 0x05,0x02,0xA1,0x31,0x41,0x68,0x6C,0x10, 10260 0x1A,0x29,0x06,0x28,0x13,0x54,0xE3,0x50, 10261 0x44,0x7B,0x80,0x31,0x99,0x20,0x54,0x36, 10262 0x88,0xC0,0x1C,0x14,0x88,0x86,0x07,0xA1, 10263 0x62,0x82,0x00,0x52,0x10,0x01,0x12,0x20, 10264 0x1A,0x1E,0x84,0x8A,0x29,0x32,0x74,0x0A, 10265 0x42,0x55,0x24,0x39,0x9A,0x50,0x10,0x1D, 10266 0x4D,0x08,0x08,0xCD,0x07,0x46,0x75,0x35, 10267 0x39,0x6E,0x50,0x10,0xAA,0x1D,0x84,0x06, 10268 0x05,0xA1,0x39,0xA2,0x80,0xB2,0xEC,0x20, 10269 0x02,0xB2,0x9E,0x2A,0x87,0x0A,0x0A,0x22, 10270 0x30,0xA7,0x02,0xA2,0x49,0x41,0xA8,0x8E, 10271 0x2C,0x47,0x0A,0x9A,0x06,0x84,0x25,0x06, 10272 0xA1,0xC9,0xDA,0x80,0xB0,0x0C,0x75,0x0E, 10273 0x24,0x14,0x84,0xE6,0x04,0xA1,0x4A,0xF2, 10274 0x0C,0x8F,0x82,0xE8,0x38,0x42,0x80,0x68, 10275 0x7A,0x10,0xAA,0xA6,0xCF,0x00,0x28,0x88, 10276 0x06,0x40,0x40,0x68,0x4E,0x30,0xAA,0xA8, 10277 0xD1,0xD1,0x84,0x82,0x50,0xDD,0x2F,0x4E, 10278 0x81,0xF8,0xFF,0x0F, 10279 }) // END MBUF 10280 10281} //end DefinitionBlock 10282 10283