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