| 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 |
|
| 30 |
/* |
| 31 |
* Store Integer/String/Buffer/Package to Processor |
| 32 |
*/ |
| 33 |
|
| 34 |
// Integer |
| 35 |
|
| 36 |
Method(md3b,, Serialized) |
| 37 |
{ |
| 38 |
Name(i000, 0xe0385bcd) |
| 39 |
Processor(OOO2, 0, 0xFFFFFFFF, 0) {} |
| 40 |
|
| 41 |
Store(i000, OOO2) |
| 42 |
Store (0x61, OOO2) |
| 43 |
|
| 44 |
Store(DeRefof(Refof(OOO2)), Local1) |
| 45 |
|
| 46 |
if (LNotEqual(Local1, 0x61)) { |
| 47 |
err("", zFFF, __LINE__, 0, 0, Local1, 0x61) |
| 48 |
} |
| 49 |
if (LNotEqual(i000, 0xe0385bcd)) { |
| 50 |
err("", zFFF, __LINE__, 0, 0, i000, 0xe0385bcd) |
| 51 |
} |
| 52 |
} |
| 53 |
|
| 54 |
// String |
| 55 |
|
| 56 |
Method(md3c,, Serialized) |
| 57 |
{ |
| 58 |
Name(s000, "String") |
| 59 |
Processor(OOO2, 0, 0xFFFFFFFF, 0) {} |
| 60 |
|
| 61 |
Store(s000, OOO2) |
| 62 |
Store(Refof(OOO2), Local0) |
| 63 |
Store (0x61, Index(DeRefof(Local0), 3)) |
| 64 |
|
| 65 |
Store(Refof(OOO2), Local0) |
| 66 |
Store(DeRefof(Local0), Local1) |
| 67 |
|
| 68 |
if (LNotEqual(Local1, "Strang")) { |
| 69 |
err("", zFFF, __LINE__, 0, 0, Local1, "Strang") |
| 70 |
} |
| 71 |
if (LNotEqual(s000, "String")) { |
| 72 |
err("", zFFF, __LINE__, 0, 0, s000, "String") |
| 73 |
} |
| 74 |
} |
| 75 |
|
| 76 |
// Buffer |
| 77 |
|
| 78 |
Method(md3d,, Serialized) |
| 79 |
{ |
| 80 |
Name(b000, Buffer() {1,2,3,4}) |
| 81 |
Processor(OOO2, 0, 0xFFFFFFFF, 0) {} |
| 82 |
|
| 83 |
Store(b000, OOO2) |
| 84 |
|
| 85 |
Store(Refof(OOO2), Local0) |
| 86 |
Store (0x61, Index(DeRefof(Local0), 3)) |
| 87 |
Store(DeRefof(Local0), Local1) |
| 88 |
|
| 89 |
if (LNotEqual(Local1, Buffer() {1,2,3,0x61})) { |
| 90 |
err("", zFFF, __LINE__, 0, 0, Local1, Buffer() {1,2,3,0x61}) |
| 91 |
} |
| 92 |
if (LNotEqual(b000, Buffer() {1,2,3,4})) { |
| 93 |
err("", zFFF, __LINE__, 0, 0, b000, Buffer() {1,2,3,4}) |
| 94 |
} |
| 95 |
} |
| 96 |
|
| 97 |
// Package |
| 98 |
|
| 99 |
Method(md3e,, Serialized) |
| 100 |
{ |
| 101 |
Name(pppp, Package(1){Buffer() {1,2,3,4}}) |
| 102 |
Processor(OOO2, 0, 0xFFFFFFFF, 0) {} |
| 103 |
|
| 104 |
Store(pppp, OOO2) |
| 105 |
Store(Refof(OOO2), Local0) |
| 106 |
Store (0x61, Index(DerefOf(Index(DeRefof(Local0), 0)), 3)) |
| 107 |
|
| 108 |
// OOO2 |
| 109 |
|
| 110 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 0)), Local1) |
| 111 |
if (LNotEqual(Local1, 1)) { |
| 112 |
err("", zFFF, __LINE__, 0, 0, Local1, 1) |
| 113 |
} |
| 114 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 1)), Local1) |
| 115 |
if (LNotEqual(Local1, 2)) { |
| 116 |
err("", zFFF, __LINE__, 0, 0, Local1, 2) |
| 117 |
} |
| 118 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 2)), Local1) |
| 119 |
if (LNotEqual(Local1, 3)) { |
| 120 |
err("", zFFF, __LINE__, 0, 0, Local1, 3) |
| 121 |
} |
| 122 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 3)), Local1) |
| 123 |
if (LNotEqual(Local1, 0x61)) { |
| 124 |
err("", zFFF, __LINE__, 0, 0, Local1, 0x61) |
| 125 |
} |
| 126 |
|
| 127 |
// pppp |
| 128 |
|
| 129 |
Store(DeRefof(Index(DerefOf(Index(pppp, 0)), 0)), Local0) |
| 130 |
if (LNotEqual(Local0, 1)) { |
| 131 |
err("", zFFF, __LINE__, 0, 0, Local0, 1) |
| 132 |
} |
| 133 |
Store(DeRefof(Index(DerefOf(Index(pppp, 0)), 1)), Local0) |
| 134 |
if (LNotEqual(Local0, 2)) { |
| 135 |
err("", zFFF, __LINE__, 0, 0, Local0, 2) |
| 136 |
} |
| 137 |
Store(DeRefof(Index(DerefOf(Index(pppp, 0)), 2)), Local0) |
| 138 |
if (LNotEqual(Local0, 3)) { |
| 139 |
err("", zFFF, __LINE__, 0, 0, Local0, 3) |
| 140 |
} |
| 141 |
Store(DeRefof(Index(DerefOf(Index(pppp, 0)), 3)), Local0) |
| 142 |
if (LNotEqual(Local0, 4)) { |
| 143 |
err("", zFFF, __LINE__, 0, 0, Local0, 4) |
| 144 |
} |
| 145 |
} |
| 146 |
|
| 147 |
/* Constant */ |
| 148 |
|
| 149 |
// Integer |
| 150 |
|
| 151 |
Method(md3f,, Serialized) |
| 152 |
{ |
| 153 |
Processor(OOO2, 0, 0xFFFFFFFF, 0) {} |
| 154 |
|
| 155 |
Store(0xe0385bcd, OOO2) |
| 156 |
Store (0x61, OOO2) |
| 157 |
|
| 158 |
Store(DeRefof(Refof(OOO2)), Local1) |
| 159 |
|
| 160 |
if (LNotEqual(Local1, 0x61)) { |
| 161 |
err("", zFFF, __LINE__, 0, 0, Local1, 0x61) |
| 162 |
} |
| 163 |
} |
| 164 |
|
| 165 |
// String |
| 166 |
|
| 167 |
Method(md40,, Serialized) |
| 168 |
{ |
| 169 |
Processor(OOO2, 0, 0xFFFFFFFF, 0) {} |
| 170 |
|
| 171 |
Store("String", OOO2) |
| 172 |
Store(Refof(OOO2), Local0) |
| 173 |
Store (0x61, Index(DeRefof(Local0), 3)) |
| 174 |
|
| 175 |
Store(Refof(OOO2), Local0) |
| 176 |
Store(DeRefof(Local0), Local1) |
| 177 |
|
| 178 |
if (LNotEqual(Local1, "Strang")) { |
| 179 |
err("", zFFF, __LINE__, 0, 0, Local1, "Strang") |
| 180 |
} |
| 181 |
} |
| 182 |
|
| 183 |
// Buffer |
| 184 |
|
| 185 |
Method(md41,, Serialized) |
| 186 |
{ |
| 187 |
Processor(OOO2, 0, 0xFFFFFFFF, 0) {} |
| 188 |
|
| 189 |
Store(Buffer() {1,2,3,4}, OOO2) |
| 190 |
|
| 191 |
Store(Refof(OOO2), Local0) |
| 192 |
Store (0x61, Index(DeRefof(Local0), 3)) |
| 193 |
Store(DeRefof(Local0), Local1) |
| 194 |
|
| 195 |
if (LNotEqual(Local1, Buffer() {1,2,3,0x61})) { |
| 196 |
err("", zFFF, __LINE__, 0, 0, Local1, Buffer() {1,2,3,0x61}) |
| 197 |
} |
| 198 |
} |
| 199 |
|
| 200 |
// Package |
| 201 |
|
| 202 |
Method(md42,, Serialized) |
| 203 |
{ |
| 204 |
Processor(OOO2, 0, 0xFFFFFFFF, 0) {} |
| 205 |
|
| 206 |
Store(Package(1){Buffer() {1,2,3,4}}, OOO2) |
| 207 |
Store(Refof(OOO2), Local0) |
| 208 |
Store (0x61, Index(DerefOf(Index(DeRefof(Local0), 0)), 3)) |
| 209 |
|
| 210 |
// OOO2 |
| 211 |
|
| 212 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 0)), Local1) |
| 213 |
if (LNotEqual(Local1, 1)) { |
| 214 |
err("", zFFF, __LINE__, 0, 0, Local1, 1) |
| 215 |
} |
| 216 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 1)), Local1) |
| 217 |
if (LNotEqual(Local1, 2)) { |
| 218 |
err("", zFFF, __LINE__, 0, 0, Local1, 2) |
| 219 |
} |
| 220 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 2)), Local1) |
| 221 |
if (LNotEqual(Local1, 3)) { |
| 222 |
err("", zFFF, __LINE__, 0, 0, Local1, 3) |
| 223 |
} |
| 224 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 3)), Local1) |
| 225 |
if (LNotEqual(Local1, 0x61)) { |
| 226 |
err("", zFFF, __LINE__, 0, 0, Local1, 0x61) |
| 227 |
} |
| 228 |
} |
| 229 |
|
| 230 |
Method(md43) |
| 231 |
{ |
| 232 |
CH03("", 0, 0xf14, __LINE__, 0) |
| 233 |
md3b() |
| 234 |
md3c() |
| 235 |
md3d() |
| 236 |
md3e() |
| 237 |
md3f() |
| 238 |
md40() |
| 239 |
md41() |
| 240 |
md42() |
| 241 |
CH03("", 0, 0xf15, __LINE__, 0) |
| 242 |
} |