| 1 |
/* |
| 2 |
* Some or all of this work - Copyright (c) 2006 - 2021, Intel Corp. |
| 3 |
* All rights reserved. |
| 4 |
* |
| 5 |
* Redistribution and use in source and binary forms, with or without modification, |
| 6 |
* are permitted provided that the following conditions are met: |
| 7 |
* |
| 8 |
* Redistributions of source code must retain the above copyright notice, |
| 9 |
* this list of conditions and the following disclaimer. |
| 10 |
* Redistributions in binary form must reproduce the above copyright notice, |
| 11 |
* this list of conditions and the following disclaimer in the documentation |
| 12 |
* and/or other materials provided with the distribution. |
| 13 |
* Neither the name of Intel Corporation nor the names of its contributors |
| 14 |
* may be used to endorse or promote products derived from this software |
| 15 |
* without specific prior written permission. |
| 16 |
* |
| 17 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 18 |
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 19 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 20 |
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
| 21 |
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 22 |
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 23 |
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 25 |
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
| 26 |
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 |
*/ |
| 28 |
/* |
| 29 |
* External declarations |
| 30 |
*/ |
| 31 |
Name (Z204, 0xCC) |
| 32 |
External (E000, UnknownObj) |
| 33 |
External (E001, IntObj) |
| 34 |
External (E002, StrObj) |
| 35 |
External (E003, BuffObj) |
| 36 |
External (E004, PkgObj) |
| 37 |
External (E005, FieldUnitObj) |
| 38 |
External (E006, DeviceObj) |
| 39 |
External (E007, EventObj) |
| 40 |
External (\E008, MethodObj) |
| 41 |
External (E009, MutexObj) |
| 42 |
External (E010, OpRegionObj) |
| 43 |
External (E011, PowerResObj) |
| 44 |
External (E012, ProcessorObj) |
| 45 |
External (E013, ThermalZoneObj) |
| 46 |
External (E014, BuffFieldObj) |
| 47 |
External (E015, DDBHandleObj) |
| 48 |
Name (NM01, 0x01) |
| 49 |
Name (NM02, "test string") |
| 50 |
Name (NM03, Buffer (0x01) |
| 51 |
{ |
| 52 |
0x00 // . |
| 53 |
}) |
| 54 |
Name (NM04, Package (0x00){}) |
| 55 |
Device (NM06) |
| 56 |
{ |
| 57 |
} |
| 58 |
|
| 59 |
Event (NM07) |
| 60 |
Method (NM08, 0, NotSerialized) |
| 61 |
{ |
| 62 |
Return (0x01F4) |
| 63 |
} |
| 64 |
|
| 65 |
Mutex (NM09, 0x00) |
| 66 |
OperationRegion (NM10, PCI_Config, Zero, 0xFF) |
| 67 |
Field (NM10, AnyAcc, NoLock, Preserve) |
| 68 |
{ |
| 69 |
NM05, 8 |
| 70 |
} |
| 71 |
|
| 72 |
PowerResource (NM11, 0x00, 0x0000){} |
| 73 |
Processor (NM12, 0x00, 0x00000001, 0x02){} |
| 74 |
ThermalZone (NM13) |
| 75 |
{ |
| 76 |
} |
| 77 |
|
| 78 |
CreateBitField (NM03, 0x00, NM14) |
| 79 |
/* |
| 80 |
* Check that arg2 and arg3 have the same type |
| 81 |
* arg0 - diagnostic message |
| 82 |
* arg1 - index of checking |
| 83 |
* arg2 - arg5 of err, "received value" |
| 84 |
* arg3 - arg6 of err, "expected value" |
| 85 |
*/ |
| 86 |
Method (EXT0, 4, NotSerialized) |
| 87 |
{ |
| 88 |
Local1 = ObjectType (Arg2) |
| 89 |
Local2 = ObjectType (Arg3) |
| 90 |
If ((Local1 != Local2)) |
| 91 |
{ |
| 92 |
ERR (DerefOf (Arg0), Z204, __LINE__, Z204, Arg1, Local1, Local2) |
| 93 |
} |
| 94 |
} |
| 95 |
|
| 96 |
/* Run-method */ |
| 97 |
|
| 98 |
Method (EXT1, 0, Serialized) |
| 99 |
{ |
| 100 |
Local1 = ObjectType (E000) |
| 101 |
If ((Local1 != 0x01)) |
| 102 |
{ |
| 103 |
ERR (__METHOD__, Z204, __LINE__, 0x00, 0x00, Local1, 0x01) |
| 104 |
} |
| 105 |
|
| 106 |
EXT0 (__METHOD__, 0x01, E001, NM01) |
| 107 |
EXT0 (__METHOD__, 0x02, E002, NM02) |
| 108 |
EXT0 (__METHOD__, 0x03, E003, NM03) |
| 109 |
EXT0 (__METHOD__, 0x04, E004, NM04) |
| 110 |
EXT0 (__METHOD__, 0x05, E005, NM05) |
| 111 |
EXT0 (__METHOD__, 0x06, E006, NM06) |
| 112 |
EXT0 (__METHOD__, 0x07, E007, NM07) |
| 113 |
EXT0 (__METHOD__, 0x08, E008 (), NM08 ()) |
| 114 |
EXT0 (__METHOD__, 0x09, E009, NM09) |
| 115 |
EXT0 (__METHOD__, 0x0A, E010, NM10) |
| 116 |
EXT0 (__METHOD__, 0x0B, E011, NM11) |
| 117 |
EXT0 (__METHOD__, 0x0C, E012, NM12) |
| 118 |
EXT0 (__METHOD__, 0x0D, E013, NM13) |
| 119 |
EXT0 (__METHOD__, 0x0E, E014, NM14) |
| 120 |
Return (0x00) |
| 121 |
} |