| 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 Device (global objects) |
| 32 |
*/ |
| 33 |
|
| 34 |
// Glob to Loc |
| 35 |
|
| 36 |
// Integer |
| 37 |
|
| 38 |
Method(md5b,, Serialized) |
| 39 |
{ |
| 40 |
Device(OOO2) { Name(i900, 0xabcd0017) } |
| 41 |
|
| 42 |
Store(id00, OOO2) |
| 43 |
Store (0x61, OOO2) |
| 44 |
|
| 45 |
Store(DeRefof(Refof(OOO2)), Local1) |
| 46 |
|
| 47 |
if (LNotEqual(Local1, 0x61)) { |
| 48 |
err("", zFFF, __LINE__, 0, 0, Local1, 0x61) |
| 49 |
} |
| 50 |
if (LNotEqual(id00, 0xe0385bcd)) { |
| 51 |
err("", zFFF, __LINE__, 0, 0, id00, 0xe0385bcd) |
| 52 |
} |
| 53 |
} |
| 54 |
|
| 55 |
// String |
| 56 |
|
| 57 |
Method(md5c,, Serialized) |
| 58 |
{ |
| 59 |
Device(OOO2) { Name(i900, 0xabcd0017) } |
| 60 |
|
| 61 |
Store(sd00, 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(sd00, "String")) { |
| 72 |
err("", zFFF, __LINE__, 0, 0, sd00, "String") |
| 73 |
} |
| 74 |
} |
| 75 |
|
| 76 |
// Buffer |
| 77 |
|
| 78 |
Method(md5d,, Serialized) |
| 79 |
{ |
| 80 |
Device(OOO2) { Name(i900, 0xabcd0017) } |
| 81 |
|
| 82 |
Store(bd00, OOO2) |
| 83 |
|
| 84 |
Store(Refof(OOO2), Local0) |
| 85 |
Store (0x61, Index(DeRefof(Local0), 3)) |
| 86 |
Store(DeRefof(Local0), Local1) |
| 87 |
|
| 88 |
if (LNotEqual(Local1, Buffer(32) {1,2,3,0x61})) { |
| 89 |
err("", zFFF, __LINE__, 0, 0, Local1, Buffer() {1,2,3,0x61}) |
| 90 |
} |
| 91 |
if (LNotEqual(bd00, Buffer(32) {1,2,3,4})) { |
| 92 |
err("", zFFF, __LINE__, 0, 0, bd00, Buffer() {1,2,3,4}) |
| 93 |
} |
| 94 |
} |
| 95 |
|
| 96 |
// Package |
| 97 |
|
| 98 |
Method(md5e,, Serialized) |
| 99 |
{ |
| 100 |
Device(OOO2) { Name(i900, 0xabcd0017) } |
| 101 |
|
| 102 |
Store(pd00, OOO2) |
| 103 |
Store(Refof(OOO2), Local0) |
| 104 |
Store (0x61, Index(DerefOf(Index(DeRefof(Local0), 0)), 3)) |
| 105 |
|
| 106 |
// OOO2 |
| 107 |
|
| 108 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 0)), Local1) |
| 109 |
if (LNotEqual(Local1, 1)) { |
| 110 |
err("", zFFF, __LINE__, 0, 0, Local1, 1) |
| 111 |
} |
| 112 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 1)), Local1) |
| 113 |
if (LNotEqual(Local1, 2)) { |
| 114 |
err("", zFFF, __LINE__, 0, 0, Local1, 2) |
| 115 |
} |
| 116 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 2)), Local1) |
| 117 |
if (LNotEqual(Local1, 3)) { |
| 118 |
err("", zFFF, __LINE__, 0, 0, Local1, 3) |
| 119 |
} |
| 120 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 3)), Local1) |
| 121 |
if (LNotEqual(Local1, 0x61)) { |
| 122 |
err("", zFFF, __LINE__, 0, 0, Local1, 0x61) |
| 123 |
} |
| 124 |
|
| 125 |
// pd00 |
| 126 |
|
| 127 |
Store(DeRefof(Index(DerefOf(Index(pd00, 0)), 0)), Local0) |
| 128 |
if (LNotEqual(Local0, 1)) { |
| 129 |
err("", zFFF, __LINE__, 0, 0, Local0, 1) |
| 130 |
} |
| 131 |
Store(DeRefof(Index(DerefOf(Index(pd00, 0)), 1)), Local0) |
| 132 |
if (LNotEqual(Local0, 2)) { |
| 133 |
err("", zFFF, __LINE__, 0, 0, Local0, 2) |
| 134 |
} |
| 135 |
Store(DeRefof(Index(DerefOf(Index(pd00, 0)), 2)), Local0) |
| 136 |
if (LNotEqual(Local0, 3)) { |
| 137 |
err("", zFFF, __LINE__, 0, 0, Local0, 3) |
| 138 |
} |
| 139 |
Store(DeRefof(Index(DerefOf(Index(pd00, 0)), 3)), Local0) |
| 140 |
if (LNotEqual(Local0, 4)) { |
| 141 |
err("", zFFF, __LINE__, 0, 0, Local0, 4) |
| 142 |
} |
| 143 |
} |
| 144 |
|
| 145 |
// All objects are global |
| 146 |
|
| 147 |
// Integer |
| 148 |
|
| 149 |
Method(md5f) |
| 150 |
{ |
| 151 |
Store(id00, dd00) |
| 152 |
Store (0x61, dd00) |
| 153 |
|
| 154 |
Store(DeRefof(Refof(dd00)), Local1) |
| 155 |
|
| 156 |
if (LNotEqual(Local1, 0x61)) { |
| 157 |
err("", zFFF, __LINE__, 0, 0, Local1, 0x61) |
| 158 |
} |
| 159 |
if (LNotEqual(id00, 0xe0385bcd)) { |
| 160 |
err("", zFFF, __LINE__, 0, 0, id00, 0xe0385bcd) |
| 161 |
} |
| 162 |
} |
| 163 |
|
| 164 |
// String |
| 165 |
|
| 166 |
Method(md60,, Serialized) |
| 167 |
{ |
| 168 |
Device(dd01) { Name(i900, 0xabcd0017) } |
| 169 |
|
| 170 |
Store(sd00, dd01) |
| 171 |
Store(Refof(dd01), Local0) |
| 172 |
Store (0x61, Index(DeRefof(Local0), 3)) |
| 173 |
|
| 174 |
Store(Refof(dd01), Local0) |
| 175 |
Store(DeRefof(Local0), Local1) |
| 176 |
|
| 177 |
if (LNotEqual(Local1, "Strang")) { |
| 178 |
err("", zFFF, __LINE__, 0, 0, Local1, "Strang") |
| 179 |
} |
| 180 |
if (LNotEqual(sd00, "String")) { |
| 181 |
err("", zFFF, __LINE__, 0, 0, sd00, "String") |
| 182 |
} |
| 183 |
} |
| 184 |
|
| 185 |
// Buffer |
| 186 |
|
| 187 |
Method(md61,, Serialized) |
| 188 |
{ |
| 189 |
Device(dd02) { Name(i900, 0xabcd0017) } |
| 190 |
|
| 191 |
Store(bd00, dd02) |
| 192 |
|
| 193 |
Store(Refof(dd02), Local0) |
| 194 |
Store (0x61, Index(DeRefof(Local0), 3)) |
| 195 |
Store(DeRefof(Local0), Local1) |
| 196 |
|
| 197 |
if (LNotEqual(Local1, Buffer(32) {1,2,3,0x61})) { |
| 198 |
err("", zFFF, __LINE__, 0, 0, Local1, Buffer() {1,2,3,0x61}) |
| 199 |
} |
| 200 |
if (LNotEqual(bd00, Buffer(32) {1,2,3,4})) { |
| 201 |
err("", zFFF, __LINE__, 0, 0, bd00, Buffer() {1,2,3,4}) |
| 202 |
} |
| 203 |
} |
| 204 |
|
| 205 |
// Package |
| 206 |
|
| 207 |
Method(md62,, Serialized) |
| 208 |
{ |
| 209 |
Device(dd03) { Name(i900, 0xabcd0017) } |
| 210 |
|
| 211 |
Store(pd00, dd03) |
| 212 |
Store(Refof(dd03), Local0) |
| 213 |
Store (0x61, Index(DerefOf(Index(DeRefof(Local0), 0)), 3)) |
| 214 |
|
| 215 |
// dd03 |
| 216 |
|
| 217 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 0)), Local1) |
| 218 |
if (LNotEqual(Local1, 1)) { |
| 219 |
err("", zFFF, __LINE__, 0, 0, Local1, 1) |
| 220 |
} |
| 221 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 1)), Local1) |
| 222 |
if (LNotEqual(Local1, 2)) { |
| 223 |
err("", zFFF, __LINE__, 0, 0, Local1, 2) |
| 224 |
} |
| 225 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 2)), Local1) |
| 226 |
if (LNotEqual(Local1, 3)) { |
| 227 |
err("", zFFF, __LINE__, 0, 0, Local1, 3) |
| 228 |
} |
| 229 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 3)), Local1) |
| 230 |
if (LNotEqual(Local1, 0x61)) { |
| 231 |
err("", zFFF, __LINE__, 0, 0, Local1, 0x61) |
| 232 |
} |
| 233 |
|
| 234 |
// pd00 |
| 235 |
|
| 236 |
Store(DeRefof(Index(DerefOf(Index(pd00, 0)), 0)), Local0) |
| 237 |
if (LNotEqual(Local0, 1)) { |
| 238 |
err("", zFFF, __LINE__, 0, 0, Local0, 1) |
| 239 |
} |
| 240 |
Store(DeRefof(Index(DerefOf(Index(pd00, 0)), 1)), Local0) |
| 241 |
if (LNotEqual(Local0, 2)) { |
| 242 |
err("", zFFF, __LINE__, 0, 0, Local0, 2) |
| 243 |
} |
| 244 |
Store(DeRefof(Index(DerefOf(Index(pd00, 0)), 2)), Local0) |
| 245 |
if (LNotEqual(Local0, 3)) { |
| 246 |
err("", zFFF, __LINE__, 0, 0, Local0, 3) |
| 247 |
} |
| 248 |
Store(DeRefof(Index(DerefOf(Index(pd00, 0)), 3)), Local0) |
| 249 |
if (LNotEqual(Local0, 4)) { |
| 250 |
err("", zFFF, __LINE__, 0, 0, Local0, 4) |
| 251 |
} |
| 252 |
} |
| 253 |
|
| 254 |
// Loc to Glob |
| 255 |
|
| 256 |
// Integer |
| 257 |
|
| 258 |
Method(md63,, Serialized) |
| 259 |
{ |
| 260 |
Name(i000, 0xe0385bcd) |
| 261 |
|
| 262 |
Store(i000, dd04) |
| 263 |
Store (0x61, dd04) |
| 264 |
|
| 265 |
Store(DeRefof(Refof(dd04)), Local1) |
| 266 |
|
| 267 |
if (LNotEqual(Local1, 0x61)) { |
| 268 |
err("", zFFF, __LINE__, 0, 0, Local1, 0x61) |
| 269 |
} |
| 270 |
if (LNotEqual(i000, 0xe0385bcd)) { |
| 271 |
err("", zFFF, __LINE__, 0, 0, i000, 0xe0385bcd) |
| 272 |
} |
| 273 |
} |
| 274 |
|
| 275 |
// String |
| 276 |
|
| 277 |
Method(md64,, Serialized) |
| 278 |
{ |
| 279 |
Name(s000, "String") |
| 280 |
|
| 281 |
Store(s000, dd05) |
| 282 |
Store(Refof(dd05), Local0) |
| 283 |
Store (0x61, Index(DeRefof(Local0), 3)) |
| 284 |
|
| 285 |
Store(Refof(dd05), Local0) |
| 286 |
Store(DeRefof(Local0), Local1) |
| 287 |
|
| 288 |
if (LNotEqual(Local1, "Strang")) { |
| 289 |
err("", zFFF, __LINE__, 0, 0, Local1, "Strang") |
| 290 |
} |
| 291 |
if (LNotEqual(s000, "String")) { |
| 292 |
err("", zFFF, __LINE__, 0, 0, s000, "String") |
| 293 |
} |
| 294 |
} |
| 295 |
|
| 296 |
// Buffer |
| 297 |
|
| 298 |
Method(md65,, Serialized) |
| 299 |
{ |
| 300 |
Name(b000, Buffer() {1,2,3,4}) |
| 301 |
|
| 302 |
Store(b000, dd06) |
| 303 |
|
| 304 |
Store(Refof(dd06), Local0) |
| 305 |
Store (0x61, Index(DeRefof(Local0), 3)) |
| 306 |
Store(DeRefof(Local0), Local1) |
| 307 |
|
| 308 |
if (LNotEqual(Local1, Buffer() {1,2,3,0x61})) { |
| 309 |
err("", zFFF, __LINE__, 0, 0, Local1, Buffer() {1,2,3,0x61}) |
| 310 |
} |
| 311 |
if (LNotEqual(b000, Buffer() {1,2,3,4})) { |
| 312 |
err("", zFFF, __LINE__, 0, 0, b000, Buffer() {1,2,3,4}) |
| 313 |
} |
| 314 |
} |
| 315 |
|
| 316 |
// Package |
| 317 |
|
| 318 |
Method(md66,, Serialized) |
| 319 |
{ |
| 320 |
Name(pppp, Package(1){Buffer() {1,2,3,4}}) |
| 321 |
|
| 322 |
Store(pppp, dd07) |
| 323 |
Store(Refof(dd07), Local0) |
| 324 |
Store (0x61, Index(DerefOf(Index(DeRefof(Local0), 0)), 3)) |
| 325 |
|
| 326 |
// dd07 |
| 327 |
|
| 328 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 0)), Local1) |
| 329 |
if (LNotEqual(Local1, 1)) { |
| 330 |
err("", zFFF, __LINE__, 0, 0, Local1, 1) |
| 331 |
} |
| 332 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 1)), Local1) |
| 333 |
if (LNotEqual(Local1, 2)) { |
| 334 |
err("", zFFF, __LINE__, 0, 0, Local1, 2) |
| 335 |
} |
| 336 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 2)), Local1) |
| 337 |
if (LNotEqual(Local1, 3)) { |
| 338 |
err("", zFFF, __LINE__, 0, 0, Local1, 3) |
| 339 |
} |
| 340 |
Store(DeRefof(Index(DerefOf(Index(DeRefof(Local0), 0)), 3)), Local1) |
| 341 |
if (LNotEqual(Local1, 0x61)) { |
| 342 |
err("", zFFF, __LINE__, 0, 0, Local1, 0x61) |
| 343 |
} |
| 344 |
|
| 345 |
// pppp |
| 346 |
|
| 347 |
Store(DeRefof(Index(DerefOf(Index(pppp, 0)), 0)), Local0) |
| 348 |
if (LNotEqual(Local0, 1)) { |
| 349 |
err("", zFFF, __LINE__, 0, 0, Local0, 1) |
| 350 |
} |
| 351 |
Store(DeRefof(Index(DerefOf(Index(pppp, 0)), 1)), Local0) |
| 352 |
if (LNotEqual(Local0, 2)) { |
| 353 |
err("", zFFF, __LINE__, 0, 0, Local0, 2) |
| 354 |
} |
| 355 |
Store(DeRefof(Index(DerefOf(Index(pppp, 0)), 2)), Local0) |
| 356 |
if (LNotEqual(Local0, 3)) { |
| 357 |
err("", zFFF, __LINE__, 0, 0, Local0, 3) |
| 358 |
} |
| 359 |
Store(DeRefof(Index(DerefOf(Index(pppp, 0)), 3)), Local0) |
| 360 |
if (LNotEqual(Local0, 4)) { |
| 361 |
err("", zFFF, __LINE__, 0, 0, Local0, 4) |
| 362 |
} |
| 363 |
} |
| 364 |
|
| 365 |
Method(md67) |
| 366 |
{ |
| 367 |
CH03("", 0, 0xf08, __LINE__, 0) |
| 368 |
md5b() |
| 369 |
md5c() |
| 370 |
md5d() |
| 371 |
md5e() |
| 372 |
md5f() |
| 373 |
md60() |
| 374 |
md61() |
| 375 |
md62() |
| 376 |
md63() |
| 377 |
md64() |
| 378 |
md65() |
| 379 |
md66() |
| 380 |
CH03("", 0, 0xf09, __LINE__, 0) |
| 381 |
} |