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