1/* 2 * Some or all of this work - Copyright (c) 2006 - 2016, 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 * References 31 * 32 * TEST, Package total 33 */ 34 35Name(z116, 116) 36 37/* 38 * Flags and values used by m1c3 39 */ 40Name(FL00, 0) // flag of testing of exceptions 41Name(V000, 0) // type of the Standard Data object 42Name(V001, 0) // index of element of Package 43 44/* 45 * Read immediate image element of Package 46 * 47 * Package specified by the immediate 48 * images {Integer, String, Buffer, Package}. 49 * Perform all the ways reading element of 50 * Package passed by ArgX. 51 */ 52Method(m1c1,, Serialized) 53{ 54 Name(ppp0, Package(4) { 55 0x77, 56 "qwer0000", 57 Buffer(4) {1,0x77,3,4}, 58 Package(3) {5,0x77,7}}) 59 60 Store(0, FL00) // flag of testing of exceptions 61 62 Store(c009, V000) // type of the Standard Data object 63 Store(0, V001) // index of element of Package 64 m1c3(ppp0, 0, 0, 0, 0, 0, 0) 65 66 Store(c00a, V000) // type of the Standard Data object 67 Store(1, V001) // index of element of Package 68 m1c3(ppp0, 0, 0, 0, 0, 0, 0) 69 70 Store(c00b, V000) // type of the Standard Data object 71 Store(2, V001) // index of element of Package 72 m1c3(ppp0, 0, 0, 0, 0, 0, 0) 73 74 Store(c00c, V000) // type of the Standard Data object 75 Store(3, V001) // index of element of Package 76 m1c3(ppp0, 0, 0, 0, 0, 0, 0) 77} 78 79/* 80 * Read NamedX element of Package 81 * {Integer, String, Buffer, Package}. 82 */ 83Method(m1c2,, Serialized) 84{ 85 Name(ts, "m1c2") 86 87 Name(i000, 0x77) 88 Name(s000, "qwer0000") 89 Name(b000, Buffer(4) {1,0x77,3,4}) 90 Name(p000, Package(3) {5,0x77,7}) 91 92 Name(ppp0, Package(4) {i000, s000, b000, p000}) 93 94 Store(0, FL00) // flag of testing of exceptions 95 96 Store(c009, V000) // type of the Standard Data object 97 Store(0, V001) // index of element of Package 98 m1c3(ppp0, 0, 0, 0, 0, 0, 0) 99 100 Store(c00a, V000) // type of the Standard Data object 101 Store(1, V001) // index of element of Package 102 m1c3(ppp0, 0, 0, 0, 0, 0, 0) 103 104 Store(c00b, V000) // type of the Standard Data object 105 Store(2, V001) // index of element of Package 106 m1c3(ppp0, 0, 0, 0, 0, 0, 0) 107 108 Store(c00c, V000) // type of the Standard Data object 109 Store(3, V001) // index of element of Package 110 m1c3(ppp0, 0, 0, 0, 0, 0, 0) 111 112 m380(ts, i000, 0, 0) 113 m381(ts, s000, 0, 1) 114 m382(ts, b000, 0, 2) 115 m383(ts, p000, 0, 3) 116} 117 118// All the ways reading element of Package given by ArgX 119// arg0 - Package 120// arg1, 121// arg2, 122// arg3, 123// arg4, 124// arg5, 125// arg6 - auxiliary, for arbitrary use 126Method(m1c3, 7, Serialized) 127{ 128 Name(ts, "m1c3") 129 130 Name(i000, 0) 131 Name(i001, 0) 132 Name(i002, 0) 133 Name(i003, 0) 134 Name(i004, 0) 135 Name(i005, 0) 136 Name(i006, 0) 137 138 Name(p000, Package(2) {}) 139 Name(ppp0, Package(2) {}) 140 141 142 // LocalX 143 144 Store(Index(arg0, V001), Local3) 145 m390(DerefOf(Local3), V000, 0, 4) 146 Store(DerefOf(Local3), Local4) 147 m390(Local4, V000, 0, 5) 148 m390(DerefOf(Index(arg0, V001)), V000, 0, 6) 149 Store(Index(arg0, V001, Local2), Local3) 150 m390(DerefOf(Local3), V000, 0, 7) 151 Store(DerefOf(Local3), Local4) 152 m390(Local4, V000, 0, 8) 153 m390(DerefOf(Local2), V000, 0, 9) 154 Store(DerefOf(Local2), Local4) 155 m390(Local4, V000, 0, 10) 156 157 // ArgX 158 159 Store(Index(arg0, V001), arg3) 160 m390(DerefOf(arg3), V000, 0, 11) 161 Store(DerefOf(arg3), arg4) 162 m390(arg4, V000, 0, 12) 163 m390(DerefOf(Index(arg0, V001)), V000, 0, 13) 164 Store(Index(arg0, V001, arg2), arg3) 165 m390(DerefOf(arg3), V000, 0, 14) 166 Store(DerefOf(arg3), arg4) 167 m390(arg4, V000, 0, 15) 168 m390(DerefOf(arg2), V000, 0, 16) 169 Store(DerefOf(arg2), arg4) 170 m390(arg4, V000, 0, 17) 171 172 // NamedX 173 174 if (y127) { 175 CopyObject(Index(ppp0, 0), i003) 176 Store(Index(arg0, V001), i003) 177 m390(DerefOf(i003), V000, 0, 18) 178 Store(DerefOf(i003), i004) 179 m390(i004, V000, 0, 19) 180 m390(DerefOf(Index(arg0, V001)), V000, 0, 20) 181 Store(Index(arg0, V001, i002), i003) 182 m390(DerefOf(i003), V000, 0, 21) 183 Store(DerefOf(i003), i004) 184 m390(i004, V000, 0, 22) 185 m390(DerefOf(i002), V000, 0, 23) 186 Store(DerefOf(i002), i004) 187 m390(i004, V000, 0, 24) 188 } 189 190 /* 191 * El_of_Package 192 * 193 * Identical to the first checking, but only 194 * store intermediately the references to element 195 * of Package arg0 Index(arg0, x) into Index(p000, y) 196 * but not into LocalX. 197 */ 198 199 Store(Index(arg0, V001, Index(p000, 0)), Index(p000, 1)) 200 201 // DerefOf(DerefOf(Index(x,Destination))) 202 203 m390(DerefOf(DerefOf(Index(p000, 0))), V000, 0, 25) 204 205 // DerefOf(DerefOf(Index(x,Result))) 206 207 m390(DerefOf(DerefOf(Index(p000, 1))), V000, 0, 26) 208 209 // El_of_Package, Destination, LocalX 210 211 /* 212 * After Store(Index(p000, 0), Local5) 213 * Local5 below - reference to element of 214 * Package p000 containing reference to the 215 * 0-th element of Arg0-Package. 216 * 217 * Correspondingly, after Store(DerefOf(Local5), Local3) 218 * Local3 - reference to the 0-th element of Arg0-Package. 219 * 220 * Further, DerefOf(Local3) - 0-th element of Arg0-Package. 221 */ 222 223 if (FL00) { 224 Store(Index(p000, 0), Local5) 225 226 CH03(ts, z116, 0, 0, 0) 227 Add(Local5, 1, Local6) 228 CH04(ts, 0, 0xff, z116, 1, 0, 0) 229 230 CH03(ts, z116, 2, 0, 0) 231 Add(DerefOf(Local5), 1, Local6) 232 CH04(ts, 0, 0xff, z116, 3, 0, 0) 233 234 CH03(ts, z116, 4, 0, 0) 235 m390(Local5, V000, 0, 0) 236 CH04(ts, 0, 0xff, z116, 5, 0, 0) 237 238 CH03(ts, z116, 6, 0, 0) 239 m390(DerefOf(Local5), V000, 0, 0) 240 CH04(ts, 0, 0xff, z116, 7, 0, 0) 241 242 Store(Index(p000, 0, Local2), Local5) 243 244 CH03(ts, z116, 8, 0, 0) 245 Add(Local5, 1, Local6) 246 CH04(ts, 0, 0xff, z116, 9, 0, 0) 247 248 CH03(ts, z116, 10, 0, 0) 249 Add(DerefOf(Local5), 1, Local6) 250 CH04(ts, 0, 0xff, z116, 11, 0, 0) 251 252 CH03(ts, z116, 12, 0, 0) 253 m390(Local5, V000, 0, 0) 254 CH04(ts, 0, 0xff, z116, 13, 0, 0) 255 256 CH03(ts, z116, 14, 0, 0) 257 m390(DerefOf(Local5), V000, 0, 0) 258 CH04(ts, 0, 0xff, z116, 15, 0, 0) 259 260 CH03(ts, z116, 16, 0, 0) 261 Add(Local2, 1, Local6) 262 CH04(ts, 0, 0xff, z116, 17, 0, 0) 263 264 CH03(ts, z116, 18, 0, 0) 265 Add(DerefOf(Local2), 1, Local6) 266 CH04(ts, 0, 0xff, z116, 19, 0, 0) 267 268 CH03(ts, z116, 20, 0, 0) 269 m390(Local2, V000, 0, 0) 270 CH04(ts, 0, 0xff, z116, 21, 0, 0) 271 272 CH03(ts, z116, 22, 0, 0) 273 m390(DerefOf(Local2), V000, 0, 0) 274 CH04(ts, 0, 0xff, z116, 23, 0, 0) 275 } 276 277 if (q001) { 278 279 Store(Index(p000, 0), Local5) 280 281 Store(DerefOf(Local5), Local3) 282 m390(DerefOf(Local3), V000, 0, 27) 283 Store(DerefOf(Local3), Local4) 284 m390(Local4, V000, 0, 28) 285 286 Store(Index(p000, 0, Local2), Local5) 287 288 Store(DerefOf(Local5), Local3) 289 m390(DerefOf(Local3), V000, 0, 29) 290 Store(DerefOf(Local3), Local4) 291 m390(Local4, V000, 0, 30) 292 293 Store(DerefOf(Local2), Local3) 294 m390(DerefOf(Local3), V000, 0, 31) 295 Store(DerefOf(Local3), Local4) 296 m390(Local4, V000, 0, 32) 297 298 } /* if(q001) */ 299 300 // El_of_Package, Result, LocalX 301 302 if (FL00) { 303 Store(Index(p000, 1), Local5) 304 305 CH03(ts, z116, 24, 0, 0) 306 Add(Local5, 1, Local6) 307 CH04(ts, 0, 0xff, z116, 25, 0, 0) 308 309 CH03(ts, z116, 26, 0, 0) 310 Add(DerefOf(Local5), 1, Local6) 311 CH04(ts, 0, 0xff, z116, 27, 0, 0) 312 313 CH03(ts, z116, 28, 0, 0) 314 m390(Local5, V000, 0, 33) 315 CH04(ts, 0, 0xff, z116, 29, 0, 0) 316 317 CH03(ts, z116, 30, 0, 0) 318 m390(DerefOf(Local5), V000, 0, 34) 319 CH04(ts, 0, 0xff, z116, 31, 0, 0) 320 321 Store(Index(p000, 1, Local2), Local5) 322 323 CH03(ts, z116, 32, 0, 0) 324 Add(Local5, 1, Local6) 325 CH04(ts, 0, 0xff, z116, 33, 0, 0) 326 327 CH03(ts, z116, 34, 0, 0) 328 Add(DerefOf(Local5), 1, Local6) 329 CH04(ts, 0, 0xff, z116, 35, 0, 0) 330 331 CH03(ts, z116, 36, 0, 0) 332 m390(Local5, V000, 0, 35) 333 CH04(ts, 0, 0xff, z116, 37, 0, 0) 334 335 CH03(ts, z116, 38, 0, 0) 336 m390(DerefOf(Local5), V000, 0, 36) 337 CH04(ts, 0, 0xff, z116, 39, 0, 0) 338 339 CH03(ts, z116, 40, 0, 0) 340 Add(Local2, 1, Local6) 341 CH04(ts, 0, 0xff, z116, 41, 0, 0) 342 343 CH03(ts, z116, 42, 0, 0) 344 Add(DerefOf(Local2), 1, Local6) 345 CH04(ts, 0, 0xff, z116, 43, 0, 0) 346 347 CH03(ts, z116, 44, 0, 0) 348 m390(Local2, V000, 0, 37) 349 CH04(ts, 0, 0xff, z116, 45, 0, 0) 350 351 CH03(ts, z116, 46, 0, 0) 352 m390(DerefOf(Local2), V000, 0, 38) 353 CH04(ts, 0, 0xff, z116, 47, 0, 0) 354 } 355 356 if (q001) { 357 358 Store(Index(p000, 1), Local5) 359 360 Store(DerefOf(Local5), Local3) 361 m390(DerefOf(Local3), V000, 0, 39) 362 Store(DerefOf(Local3), Local4) 363 m390(Local4, V000, 0, 40) 364 365 Store(Index(p000, 1, Local2), Local5) 366 367 Store(DerefOf(Local5), Local3) 368 m390(DerefOf(Local3), V000, 0, 41) 369 Store(DerefOf(Local3), Local4) 370 m390(Local4, V000, 0, 42) 371 372 Store(DerefOf(Local2), Local3) 373 m390(DerefOf(Local3), V000, 0, 43) 374 Store(DerefOf(Local3), Local4) 375 m390(Local4, V000, 0, 44) 376 377 } /* if(q001) */ 378 379 // El_of_Package, Destination, argX 380 381 if (FL00) { 382 Store(Index(p000, 0), arg5) 383 384 CH03(ts, z116, 48, 0, 0) 385 Add(arg5, 1, arg6) 386 CH04(ts, 0, 0xff, z116, 49, 0, 0) 387 388 CH03(ts, z116, 50, 0, 0) 389 Add(DerefOf(arg5), 1, arg6) 390 CH04(ts, 0, 0xff, z116, 51, 0, 0) 391 392 CH03(ts, z116, 52, 0, 0) 393 m390(arg5, V000, 0, 45) 394 CH04(ts, 0, 0xff, z116, 53, 0, 0) 395 396 CH03(ts, z116, 54, 0, 0) 397 m390(DerefOf(arg5), V000, 0, 46) 398 CH04(ts, 0, 0xff, z116, 55, 0, 0) 399 400 Store(Index(p000, 0, arg2), arg5) 401 402 CH03(ts, z116, 56, 0, 0) 403 Add(arg5, 1, arg6) 404 CH04(ts, 0, 0xff, z116, 57, 0, 0) 405 406 CH03(ts, z116, 58, 0, 0) 407 Add(DerefOf(arg5), 1, arg6) 408 CH04(ts, 0, 0xff, z116, 59, 0, 0) 409 410 CH03(ts, z116, 60, 0, 0) 411 m390(arg5, V000, 0, 47) 412 CH04(ts, 0, 0xff, z116, 61, 0, 0) 413 414 CH03(ts, z116, 62, 0, 0) 415 m390(DerefOf(arg5), V000, 0, 48) 416 CH04(ts, 0, 0xff, z116, 63, 0, 0) 417 418 CH03(ts, z116, 64, 0, 0) 419 Add(arg2, 1, arg6) 420 CH04(ts, 0, 0xff, z116, 65, 0, 0) 421 422 CH03(ts, z116, 66, 0, 0) 423 Add(DerefOf(arg2), 1, arg6) 424 CH04(ts, 0, 0xff, z116, 67, 0, 0) 425 426 CH03(ts, z116, 68, 0, 0) 427 m390(arg2, V000, 0, 49) 428 CH04(ts, 0, 0xff, z116, 69, 0, 0) 429 430 CH03(ts, z116, 70, 0, 0) 431 m390(DerefOf(arg2), V000, 0, 50) 432 CH04(ts, 0, 0xff, z116, 71, 0, 0) 433 } 434 435 if (q001) { 436 437 Store(Index(p000, 0), arg5) 438 439 Store(DerefOf(arg5), arg3) 440 m390(DerefOf(arg3), V000, 0, 51) 441 Store(DerefOf(arg3), arg4) 442 m390(arg4, V000, 0, 52) 443 444 Store(Index(p000, 0, arg2), arg5) 445 446 Store(DerefOf(arg5), arg3) 447 m390(DerefOf(arg3), V000, 0, 53) 448 Store(DerefOf(arg3), arg4) 449 m390(arg4, V000, 0, 54) 450 451 Store(DerefOf(arg2), arg3) 452 m390(DerefOf(arg3), V000, 0, 55) 453 Store(DerefOf(arg3), arg4) 454 m390(arg4, V000, 0, 56) 455 456 } /* if(q001) */ 457 458 // El_of_Package, Result, argX 459 460 if (FL00) { 461 Store(Index(p000, 1), arg5) 462 463 CH03(ts, z116, 72, 0, 0) 464 Add(arg5, 1, arg6) 465 CH04(ts, 0, 0xff, z116, 73, 0, 0) 466 467 CH03(ts, z116, 74, 0, 0) 468 Add(DerefOf(arg5), 1, arg6) 469 CH04(ts, 0, 0xff, z116, 75, 0, 0) 470 471 CH03(ts, z116, 76, 0, 0) 472 m390(arg5, V000, 0, 57) 473 CH04(ts, 0, 0xff, z116, 77, 0, 0) 474 475 CH03(ts, z116, 78, 0, 0) 476 m390(DerefOf(arg5), V000, 0, 58) 477 CH04(ts, 0, 0xff, z116, 79, 0, 0) 478 479 Store(Index(p000, 1, arg2), arg5) 480 481 CH03(ts, z116, 80, 0, 0) 482 Add(arg5, 1, arg6) 483 CH04(ts, 0, 0xff, z116, 81, 0, 0) 484 485 CH03(ts, z116, 82, 0, 0) 486 Add(DerefOf(arg5), 1, arg6) 487 CH04(ts, 0, 0xff, z116, 83, 0, 0) 488 489 CH03(ts, z116, 84, 0, 0) 490 m390(arg5, V000, 0, 59) 491 CH04(ts, 0, 0xff, z116, 85, 0, 0) 492 493 CH03(ts, z116, 86, 0, 0) 494 m390(DerefOf(arg5), V000, 0, 60) 495 CH04(ts, 0, 0xff, z116, 87, 0, 0) 496 497 CH03(ts, z116, 88, 0, 0) 498 Add(arg2, 1, arg6) 499 CH04(ts, 0, 0xff, z116, 89, 0, 0) 500 501 CH03(ts, z116, 90, 0, 0) 502 Add(DerefOf(arg2), 1, arg6) 503 CH04(ts, 0, 0xff, z116, 91, 0, 0) 504 505 CH03(ts, z116, 92, 0, 0) 506 m390(arg2, V000, 0, 61) 507 CH04(ts, 0, 0xff, z116, 93, 0, 0) 508 509 CH03(ts, z116, 94, 0, 0) 510 m390(DerefOf(arg2), V000, 0, 62) 511 CH04(ts, 0, 0xff, z116, 95, 0, 0) 512 } 513 514 if (q001) { 515 516 Store(Index(p000, 1), arg5) 517 518 Store(DerefOf(arg5), arg3) 519 m390(DerefOf(arg3), V000, 0, 63) 520 Store(DerefOf(arg3), arg4) 521 m390(arg4, V000, 0, 64) 522 523 Store(Index(p000, 1, arg2), arg5) 524 525 Store(DerefOf(arg5), arg3) 526 m390(DerefOf(arg3), V000, 0, 65) 527 Store(DerefOf(arg3), arg4) 528 m390(arg4, V000, 0, 66) 529 530 Store(DerefOf(arg2), arg3) 531 m390(DerefOf(arg3), V000, 0, 67) 532 Store(DerefOf(arg3), arg4) 533 m390(arg4, V000, 0, 68) 534 535 } /* if(q001) */ 536 537 if (y127) { 538 539 // El_of_Package, Destination, NamedX 540 541 if (FL00) { 542 CopyObject(Index(ppp0, 0), i005) 543 Store(Index(p000, 0), i005) 544 545 CH03(ts, z116, 96, 0, 0) 546 Add(i005, 1, i006) 547 CH04(ts, 0, 0xff, z116, 97, 0, 0) 548 549 CH03(ts, z116, 98, 0, 0) 550 Add(DerefOf(i005), 1, i006) 551 CH04(ts, 0, 0xff, z116, 99, 0, 0) 552 553 CH03(ts, z116, 100, 0, 0) 554 m390(i005, V000, 0, 69) 555 CH04(ts, 0, 0xff, z116, 101, 0, 0) 556 557 CH03(ts, z116, 102, 0, 0) 558 m390(DerefOf(i005), V000, 0, 70) 559 CH04(ts, 0, 0xff, z116, 103, 0, 0) 560 561 Store(Index(p000, 0, i002), i005) 562 563 CH03(ts, z116, 104, 0, 0) 564 Add(i005, 1, i006) 565 CH04(ts, 0, 0xff, z116, 105, 0, 0) 566 567 CH03(ts, z116, 106, 0, 0) 568 Add(DerefOf(i005), 1, i006) 569 CH04(ts, 0, 0xff, z116, 107, 0, 0) 570 571 CH03(ts, z116, 108, 0, 0) 572 m390(i005, V000, 0, 71) 573 CH04(ts, 0, 0xff, z116, 109, 0, 0) 574 575 CH03(ts, z116, 110, 0, 0) 576 m390(DerefOf(i005), V000, 0, 72) 577 CH04(ts, 0, 0xff, z116, 111, 0, 0) 578 579 CH03(ts, z116, 112, 0, 0) 580 Add(i002, 1, i006) 581 CH04(ts, 0, 0xff, z116, 113, 0, 0) 582 583 CH03(ts, z116, 114, 0, 0) 584 Add(DerefOf(i002), 1, i006) 585 CH04(ts, 0, 0xff, z116, 115, 0, 0) 586 587 CH03(ts, z116, 116, 0, 0) 588 m390(i002, V000, 0, 73) 589 CH04(ts, 0, 0xff, z116, 117, 0, 0) 590 591 CH03(ts, z116, 118, 0, 0) 592 m390(DerefOf(i002), V000, 0, 74) 593 CH04(ts, 0, 0xff, z116, 119, 0, 0) 594 } 595 596 if (q001) { 597 598 Store(Index(p000, 0), i005) 599 600 Store(DerefOf(i005), i003) 601 m390(DerefOf(i003), V000, 0, 75) 602 Store(DerefOf(i003), i004) 603 m390(i004, V000, 0, 76) 604 605 Store(Index(p000, 0, i002), i005) 606 607 Store(DerefOf(i005), i003) 608 m390(DerefOf(i003), V000, 0, 77) 609 Store(DerefOf(i003), i004) 610 m390(i004, V000, 0, 78) 611 612 Store(DerefOf(i002), i003) 613 m390(DerefOf(i003), V000, 0, 79) 614 Store(DerefOf(i003), i004) 615 m390(i004, V000, 0, 80) 616 617 } /* if(q001) */ 618 619 // El_of_Package, Result, NamedX 620 621 if (FL00) { 622 Store(Index(p000, 1), i005) 623 624 CH03(ts, z116, 120, 0, 0) 625 Add(i005, 1, i006) 626 CH04(ts, 0, 0xff, z116, 121, 0, 0) 627 628 CH03(ts, z116, 122, 0, 0) 629 Add(DerefOf(i005), 1, i006) 630 CH04(ts, 0, 0xff, z116, 123, 0, 0) 631 632 CH03(ts, z116, 124, 0, 0) 633 m390(i005, V000, 0, 81) 634 CH04(ts, 0, 0xff, z116, 125, 0, 0) 635 636 CH03(ts, z116, 126, 0, 0) 637 m390(DerefOf(i005), V000, 0, 82) 638 CH04(ts, 0, 0xff, z116, 127, 0, 0) 639 640 Store(Index(p000, 1, i002), i005) 641 642 CH03(ts, z116, 128, 0, 0) 643 Add(i005, 1, i006) 644 CH04(ts, 0, 0xff, z116, 129, 0, 0) 645 646 CH03(ts, z116, 130, 0, 0) 647 Add(DerefOf(i005), 1, i006) 648 CH04(ts, 0, 0xff, z116, 131, 0, 0) 649 650 CH03(ts, z116, 132, 0, 0) 651 m390(i005, V000, 0, 83) 652 CH04(ts, 0, 0xff, z116, 133, 0, 0) 653 654 CH03(ts, z116, 134, 0, 0) 655 m390(DerefOf(i005), V000, 0, 84) 656 CH04(ts, 0, 0xff, z116, 135, 0, 0) 657 658 CH03(ts, z116, 136, 0, 0) 659 Add(i002, 1, i006) 660 CH04(ts, 0, 0xff, z116, 137, 0, 0) 661 662 CH03(ts, z116, 138, 0, 0) 663 Add(DerefOf(i002), 1, i006) 664 CH04(ts, 0, 0xff, z116, 139, 0, 0) 665 666 CH03(ts, z116, 140, 0, 0) 667 m390(i002, V000, 0, 85) 668 CH04(ts, 0, 0xff, z116, 141, 0, 0) 669 670 CH03(ts, z116, 142, 0, 0) 671 m390(DerefOf(i002), V000, 0, 86) 672 CH04(ts, 0, 0xff, z116, 143, 0, 0) 673 } 674 675 if (q001) { 676 677 Store(Index(p000, 1), i005) 678 679 Store(DerefOf(i005), i003) 680 m390(DerefOf(i003), V000, 0, 87) 681 Store(DerefOf(i003), i004) 682 m390(i004, V000, 0, 88) 683 684 Store(Index(p000, 1, i002), i005) 685 686 Store(DerefOf(i005), i003) 687 m390(DerefOf(i003), V000, 0, 89) 688 Store(DerefOf(i003), i004) 689 m390(i004, V000, 0, 90) 690 691 Store(DerefOf(i002), i003) 692 m390(DerefOf(i003), V000, 0, 91) 693 Store(DerefOf(i003), i004) 694 m390(i004, V000, 0, 92) 695 696 } /* if(q001) */ 697 } /* if(y127) */ 698} 699 700// Check Uninitialized element of Package 701Method(m1c4,, Serialized) 702{ 703 Name(ppp0, Package(10) { 704 0x77, 705 "qwer0000", 706 Buffer(4) {1,0x77,3,4}, 707 Package(3) {5,0x77,7}}) 708 709 Method(m000, 2) 710 { 711 Store(Index(arg0, arg1), Local0) 712 m1a3(Local0, c008, z116, "m1c4", 93) 713 } 714 715 m000(ppp0, 4) 716 m000(ppp0, 5) 717 m000(ppp0, 6) 718 m000(ppp0, 7) 719 m000(ppp0, 8) 720 m000(ppp0, 9) 721} 722 723// The chain of Index_References 724Method(m1c5,, Serialized) 725{ 726 Name(ppp0, Package(4) { 727 0x77, 728 "qwer0000", 729 Buffer(4) {1,0x77,3,4}, 730 Package(3) {5,0x77,7}}) 731 732 Name(p000, Package(20) {}) 733 734 Store(Index(ppp0, 0), Index(p000, 0)) 735 m390(DerefOf(DerefOf(Index(p000, 0))), c009, z116, 94) 736 737 if (q002) { 738 Store(Index(p000, 0), Index(p000, 1)) 739 m390(DerefOf(DerefOf(DerefOf(Index(p000, 1)))), c009, z116, 95) 740 741 Store(Index(p000, 1), Index(p000, 2)) 742 m390(DerefOf(DerefOf(DerefOf(DerefOf(Index(p000, 2))))), c009, z116, 96) 743 744 Store(Index(p000, 2), Index(p000, 3)) 745 m390(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(Index(p000, 3)))))), c009, z116, 97) 746 747 Store(Index(p000, 3), Index(p000, 4)) 748 m390(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(Index(p000, 4))))))), c009, z116, 98) 749 750 Store(Index(p000, 4), Index(p000, 5)) 751 m390(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(Index(p000, 5)))))))), c009, z116, 99) 752 753 Store(Index(p000, 5), Index(p000, 6)) 754 m390(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(Index(p000, 6))))))))), c009, z116, 100) 755 756 Store(Index(p000, 6), Index(p000, 7)) 757 m390(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(Index(p000, 7)))))))))), c009, z116, 101) 758 } 759 760 m390(DerefOf(DerefOf(Index(p000, 0))), c009, z116, 102) 761 762 if (q002) { 763 m390(DerefOf(DerefOf(DerefOf(Index(p000, 1)))), c009, z116, 103) 764 m390(DerefOf(DerefOf(DerefOf(DerefOf(Index(p000, 2))))), c009, z116, 104) 765 m390(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(Index(p000, 3)))))), c009, z116, 105) 766 m390(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(Index(p000, 4))))))), c009, z116, 106) 767 m390(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(Index(p000, 5)))))))), c009, z116, 107) 768 m390(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(Index(p000, 6))))))))), c009, z116, 108) 769 m390(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(DerefOf(Index(p000, 7)))))))))), c009, z116, 109) 770 } 771} 772 773// Access to the Method named object element of Package 774 775// Methods without parameters 776Method(m1c7,, Serialized) 777{ 778 Name(ts, "m1c7") 779 780 Name(i000, 0x77) 781 Method(m000) { 782 Store(0, i000) 783 } 784 Method(m001) { 785 Store(1, i000) 786 return (0x12345678) 787 } 788 789 Method(m002) { 790 Store(0, i000) 791 } 792 Method(m003) { 793 Store(1, i000) 794 return (0x12345678) 795 } 796 797 Name(p000, Package() {m000, m001, m002, m003, 798 m000, m001, m002, m003, 799 i000, i000}) 800 801 802 Store(Index(p000, 0), Local0) 803 m1a3(Local0, c010, z116, ts, 110) 804 805 Store(Index(p000, 1), Local0) 806 m1a3(Local0, c010, z116, ts, 111) 807 808 Store(Index(p000, 2), Local0) 809 m1a3(Local0, c010, z116, ts, 112) 810 811 Store(Index(p000, 3), Local0) 812 m1a3(Local0, c010, z116, ts, 113) 813 814 Store(Index(p000, 4), Local0) 815 m1a3(Local0, c010, z116, ts, 114) 816 817 Store(Index(p000, 5), Local0) 818 m1a3(Local0, c010, z116, ts, 115) 819 820 Store(Index(p000, 6), Local0) 821 m1a3(Local0, c010, z116, ts, 116) 822 823 Store(Index(p000, 7), Local0) 824 m1a3(Local0, c010, z116, ts, 117) 825 826 Store(Index(p000, 8), Local0) 827 m1a3(Local0, c009, z116, ts, 118) 828 829 Store(Index(p000, 9), Local0) 830 m1a3(Local0, c009, z116, ts, 119) 831 832 m380(ts, i000, 0, 0) 833} 834 835// CURRENTLY: compiler failed, Too few arguments (M002 requires X) 836// Methods with parameters 837Method(m1c8,, Serialized) 838{ 839 Name(ts, "m1c8") 840 841/* 842 Name(i000, 0x77) 843 Method(m000) { 844 Store(0, i000) 845 } 846 Method(m001) { 847 Store(1, i000) 848 return (0x12345678) 849 } 850 851 Method(m002, 1) { 852 Store(arg0, i000) 853 Store(0, i000) 854 } 855 Method(m003, 7) { 856 Store(arg0, i000) 857 Store(arg1, i000) 858 Store(arg2, i000) 859 Store(arg3, i000) 860 Store(arg4, i000) 861 Store(arg5, i000) 862 Store(arg6, i000) 863 Store(1, i000) 864 return (0x12345678) 865 } 866 867 868 Name(p000, Package() {m000, m001, m002, m003, 869 m000, m001, m002, m003, 870 i000, i000}) 871 872 873 Store(Index(p000, 0), Local0) 874 m1a3(Local0, c010, z116, ts, `120) 875 876 Store(Index(p000, 1), Local0) 877 m1a3(Local0, c010, z116, ts, 121) 878 879 Store(Index(p000, 2), Local0) 880 m1a3(Local0, c010, z116, ts, 122) 881 882 Store(Index(p000, 3), Local0) 883 m1a3(Local0, c010, z116, ts, 123) 884 885 Store(Index(p000, 4), Local0) 886 m1a3(Local0, c010, z116, ts, 124) 887 888 Store(Index(p000, 5), Local0) 889 m1a3(Local0, c010, z116, ts, 125) 890 891 Store(Index(p000, 6), Local0) 892 m1a3(Local0, c010, z116, ts, 126) 893 894 Store(Index(p000, 7), Local0) 895 m1a3(Local0, c010, z116, ts, 127) 896 897 Store(Index(p000, 8), Local0) 898 m1a3(Local0, c009, z116, ts, 128) 899 900 Store(Index(p000, 9), Local0) 901 m1a3(Local0, c009, z116, ts, 129) 902 903 m380(ts, i000, 0, 130) 904*/ 905} 906 907// DerefOf of the Method named object element of Package 908Method(m1c9,, Serialized) 909{ 910 Name(ts, "m1c9") 911 912 Name(i000, 0x77) 913 Method(m000) { 914 Store(0, i000) 915 } 916 Method(m001) { 917 Store(1, i000) 918 return (0x12345678) 919 } 920 921 Method(m002) { 922 Store(0, i000) 923 } 924 Method(m003) { 925 Store(1, i000) 926 return (0x12345678) 927 } 928 929 Name(p000, Package() {m000, m001, m002, m003, 930 m000, m001, m002, m003, 931 i000, i000}) 932 933 934 Store(Index(p000, 0), Local0) 935 m1a3(Local0, c010, z116, ts, 131) 936 CH03(ts, z116, 144, 0, 0) 937 Store(DerefOf(Local0), Local1) 938 CH04(ts, 0, 0xff, z116, 145, 0, 0) 939 940 Store(Index(p000, 1), Local0) 941 m1a3(Local0, c010, z116, ts, 132) 942 CH03(ts, z116, 146, 0, 0) 943 Store(DerefOf(Local0), Local1) 944 CH04(ts, 0, 0xff, z116, 147, 0, 0) 945 946 Store(Index(p000, 2), Local0) 947 m1a3(Local0, c010, z116, ts, 133) 948 CH03(ts, z116, 148, 0, 0) 949 Store(DerefOf(Local0), Local1) 950 CH04(ts, 0, 0xff, z116, 149, 0, 0) 951 952 Store(Index(p000, 3), Local0) 953 m1a3(Local0, c010, z116, ts, 134) 954 CH03(ts, z116, 150, 0, 0) 955 Store(DerefOf(Local0), Local1) 956 CH04(ts, 0, 0xff, z116, 151, 0, 0) 957 958 Store(Index(p000, 4), Local0) 959 m1a3(Local0, c010, z116, ts, 135) 960 CH03(ts, z116, 152, 0, 0) 961 Store(DerefOf(Local0), Local1) 962 CH04(ts, 0, 0xff, z116, 153, 0, 0) 963 964 Store(Index(p000, 5), Local0) 965 m1a3(Local0, c010, z116, ts, 136) 966 CH03(ts, z116, 154, 0, 0) 967 Store(DerefOf(Local0), Local1) 968 CH04(ts, 0, 0xff, z116, 155, 0, 0) 969 970 Store(Index(p000, 6), Local0) 971 m1a3(Local0, c010, z116, ts, 137) 972 CH03(ts, z116, 156, 0, 0) 973 Store(DerefOf(Local0), Local1) 974 CH04(ts, 0, 0xff, z116, 157, 0, 0) 975 976 Store(Index(p000, 7), Local0) 977 m1a3(Local0, c010, z116, ts, 138) 978 CH03(ts, z116, 158, 0, 0) 979 Store(DerefOf(Local0), Local1) 980 CH04(ts, 0, 0xff, z116, 159, 0, 0) 981 982 m380(ts, i000, 0, 139) 983} 984 985// Size of Package 986Method(m1ca,, Serialized) 987{ 988 Name(ts, "m1ca") 989 990 Method(m000, 1, Serialized) 991 { 992 Name(p000, Package(arg0) {}) 993 994 CH03(ts, z116, 160, 0, 0) 995 Store(Index(p000, arg0), Local0) 996 CH04(ts, 0, 0xff, z116, 161, 0, 0) 997 } 998 999 Method(m001, 1, Serialized) 1000 { 1001 Name(p000, Package(Arg0) {}) 1002 1003 Name(lpN0, 0) 1004 Name(lpC0, 0) 1005 1006 // Write each element of Package with its index 1007 1008 Store(arg0, lpN0) 1009 Store(0, lpC0) 1010 1011 While (lpN0) { 1012 Store(lpC0, Index(p000, lpC0)) 1013 Decrement(lpN0) 1014 Increment(lpC0) 1015 } 1016 1017 // Verify each element of Package 1018 1019 Store(arg0, lpN0) 1020 Store(0, lpC0) 1021 1022 While (lpN0) { 1023 Store(Index(p000, lpC0), Local0) 1024 Store(DerefOf(Local0), Local1) 1025 if (LNotEqual(Local1, lpC0)) { 1026 err(ts, z116, 0, z116, 0, Local1, lpC0) 1027 break 1028 } 1029 Decrement(lpN0) 1030 Increment(lpC0) 1031 } 1032 } 1033 1034 Method(m003,, Serialized) 1035 { 1036 Name(p000, Package(2) {}) 1037 1038 CH03(ts, z116, 162, 0, 0) 1039 Store(Index(p000, 2), Local0) 1040 CH04(ts, 0, 0xff, z116, 163, 0, 0) 1041 } 1042 1043 Method(m004,, Serialized) 1044 { 1045 Name(p000, Package(255) {}) 1046 1047 CH03(ts, z116, 164, 0, 0) 1048 Store(Index(p000, 255), Local0) 1049 CH04(ts, 0, 0xff, z116, 165, 0, 0) 1050 } 1051 1052 // Size not greater than 255 1053 1054 m000(1) 1055 m000(8) 1056 m000(127) 1057 m000(255) 1058 1059 m003() 1060 m004() 1061 1062 // VarPackage: size of Package greater than 255 1063 // (bug 129, not a bug) 1064 1065 m001(256) 1066} 1067 1068// Size of Package, see comma "6,})" 1069Method(m1cb,, Serialized) 1070{ 1071 Name(ts, "m1cb") 1072 1073 Name(p000, Package() {1,2,3,4,5,6,}) 1074 1075 Store(SizeOf(p000), Local0) 1076 if (LNotEqual(Local0, 6)) { 1077 err(ts, z116, 1, 0, 0, Local0, 6) 1078 } 1079} 1080 1081// Check the read automatic dereference 1082// arg0 - name of Method initiating the checking 1083// arg1 - Oref or IRef 1084// arg2 - expected value 1085// arg3 - exception is expected 1086Method(m1cc, 4) 1087{ 1088 CH03(arg0, z116, 166, 0, 0) 1089 1090 Store(arg1, Local0) 1091 Add(Local0, 1, Local7) 1092 1093 if (LNotEqual(Local7, arg2)) { 1094 err(arg0, z116, 2, 0, 0, Local7, arg2) 1095 } 1096 1097 CH03(arg0, z116, 167, 0, 0) 1098} 1099 1100// Check the read automatic dereference 1101// arg0 - name of Method initiating the checking 1102// arg1 - Oref or IRef 1103// arg2 - expected value 1104// arg3 - exception is expected 1105Method(m1cd, 4) 1106{ 1107 CH03(arg0, z116, 168, 0, 0) 1108 1109 Add(arg1, 1, Local7) 1110 1111 if (LNotEqual(Local7, arg2)) { 1112 err(arg0, z116, 3, 0, 0, Local7, arg2) 1113 } 1114 1115 CH03(arg0, z116, 169, 0, 0) 1116} 1117 1118// Check the read automatic dereference 1119// when accessing element of Package. 1120 1121Method(m1ce,, Serialized) 1122{ 1123 Name(ts, "m1ce") 1124 1125 Name(p000, Package(1) {0x77}) 1126 1127 m1cc(ts, Index(p000, 0, Local0), 0x78, 0) 1128 m1cd(ts, Index(p000, 0), 0x78, 0) 1129} 1130 1131Method(m1cf,, Serialized) 1132{ 1133 Name(ts, "m1cf") 1134 1135 Name(p000, Package(1) {0x77}) 1136 1137 Index(p000, 0, Local0) 1138 m1cc(ts, Local0, 0x78, 0) 1139 m1cd(ts, Local0, 0x78, 0) 1140 1141 Store(Index(p000, 0, Local0), Local1) 1142 m1cc(ts, Local0, 0x78, 0) 1143 m1cd(ts, Local0, 0x78, 0) 1144 1145 m1cc(ts, Local1, 0x78, 0) 1146 m1cd(ts, Local1, 0x78, 0) 1147} 1148 1149Method(m1d0,, Serialized) 1150{ 1151 Name(ts, "m1d0") 1152 1153 Name(p000, Package(1) {0x77}) 1154 1155 CopyObject(Index(p000, 0, Local0), Local1) 1156 m1cc(ts, Local0, 0x78, 0) 1157 m1cd(ts, Local0, 0x78, 0) 1158 1159 m1cc(ts, Local1, 0x78, 0) 1160 m1cd(ts, Local1, 0x78, 0) 1161} 1162 1163 1164// EXCEPTIONS 1165 1166 1167// ref07.asl 1093: Add(Index(p000, 0, Local0), 1, Local7) 1168// Error 1035 - Invalid type ^ ([Reference] found, 1169// Add operator requires [Integer|String|Buffer]) 1170/* 1171 * Method(m1d1) 1172 * { 1173 * Name(p000, Package(1) {0x77}) 1174 * CH03(ts, z116, 170, 0, 0) 1175 * Add(Index(p000, 0, Local0), 1, Local7) 1176 * CH04(ts, 0, 0xff, z116, 171, 0, 0) 1177 * } 1178 */ 1179 1180// LocalX 1181 1182Method(m1d1,, Serialized) 1183{ 1184 Name(ts, "m1d1") 1185 1186 Name(p000, Package(1) {0x77}) 1187 1188 Store(Index(p000, 0, Local0), Local1) 1189 1190 CH03(ts, z116, 172, 0, 0) 1191 1192 Add(Local0, 1, Local7) 1193 1194 CH04(ts, 0, 0xff, z116, 173, 0, 0) 1195 1196 Add(Local1, 1, Local7) 1197 1198 CH04(ts, 0, 0xff, z116, 174, 0, 0) 1199} 1200 1201Method(m1d2,, Serialized) 1202{ 1203 Name(ts, "m1d2") 1204 1205 Name(p000, Package(1) {0x77}) 1206 1207 CopyObject(Index(p000, 0, Local0), Local1) 1208 1209 CH03(ts, z116, 175, 0, 0) 1210 1211 Add(Local0, 1, Local7) 1212 1213 CH04(ts, 0, 0xff, z116, 176, 0, 0) 1214 1215 Add(Local1, 1, Local7) 1216 1217 CH04(ts, 0, 0xff, z116, 177, 0, 0) 1218} 1219 1220// ArgX 1221 1222Method(m1d3, 2, Serialized) 1223{ 1224 Name(ts, "m1d3") 1225 1226 Name(p000, Package(1) {0x77}) 1227 1228 Store(Index(p000, 0, Arg0), Arg1) 1229 1230 CH03(ts, z116, 178, 0, 0) 1231 1232 Add(Arg0, 1, Local7) 1233 1234 CH04(ts, 0, 0xff, z116, 179, 0, 0) 1235 1236 Add(Arg1, 1, Local7) 1237 1238 CH04(ts, 0, 0xff, z116, 180, 0, 0) 1239} 1240 1241Method(m1d4, 2, Serialized) 1242{ 1243 Name(ts, "m1d4") 1244 1245 Name(p000, Package(1) {0x77}) 1246 1247 CopyObject(Index(p000, 0, Arg0), Arg1) 1248 1249 CH03(ts, z116, 181, 0, 0) 1250 1251 Add(Arg0, 1, Local7) 1252 1253 CH04(ts, 0, 0xff, z116, 182, 0, 0) 1254 1255 // Type of Arg1 should be IRef here, 1256 // so, exception is expected. 1257 1258 Add(Arg1, 1, Local7) 1259 1260 CH04(ts, 0, 0xff, z116, 183, 0, 0) 1261} 1262 1263// NamedX 1264 1265Method(m1d5,, Serialized) 1266{ 1267 Name(ts, "m1d5") 1268 Name(i001, 0) 1269 Name(p000, Package(2) {0x77, 0x88}) 1270 1271 Name(sw00, 1) 1272 1273 Name(hg00, 0) // if non-zero - the test hangs 1274 Name(hg01, 0) // if non-zero - the test hangs 1275 Name(hg02, 0) // if non-zero - the test hangs 1276 1277 CH03(ts, z116, 184, 0, 0) 1278 1279 CopyObject(Index(p000, 1, Local0), i001) 1280 1281 CH03(ts, z116, 185, 0, 0) 1282 1283 // Type of i001 should be already IRef here, 1284 // so, don't expect exception. 1285 1286 Store(Index(p000, 0, Local0), i001) 1287 1288 CH03(ts, z116, 186, 0, 0) 1289 1290 Add(Local0, 1, Local7) 1291 1292 if (y248) { 1293 Store(1, hg00) 1294 Store(1, hg01) 1295 Store(1, hg02) 1296 } 1297 1298 /* 1299 * To show visually the consequences of the anomaly 1300 * run one of code below. They cause hang. 1301 */ 1302 if (hg00) { 1303 // Infinite loop of printing 1304 Store(0, Local1) 1305 Store(Local0, debug) 1306 } 1307 if (hg01) { 1308 // Infinite loop of printing 1309 Store(Local0, debug) 1310 Store(Local0, debug) 1311 } 1312 if (hg02) { 1313 Store(0, Local1) 1314 1315 Store("============== sit 2:", debug) 1316 1317 Store(ObjectType(Local0), Local7) 1318 Store(Local7, debug) 1319 } 1320 1321 CH04(ts, 0, 0xff, z116, 187, 0, 0) 1322 1323 Add(i001, 1, Local7) 1324 1325 CH04(ts, 0, 0xff, z116, 188, 0, 0) 1326 1327 /* 1328 * Looks identical to b248: "Incorrect ReferenceCount on Switch operation": 1329 * 1330 * Reference count of Local0 is mistakenly zeroed there too. 1331 * 1332 * [ACPI Debug] String: [0x0F] "<-------- 0000>" 1333 * [ACPI Debug] Reference: [Debug] 1334 * [ACPI Debug] String: [0x0F] "<-------- 1111>" 1335 * 1336 * [ACPI Debug] String: [0x0F] "<-------- 0000>" 1337 * [ACPI Debug] [ACPI Debug] String: [0x0F] "<-------- 1111>" 1338 */ 1339 Store("<-------- 0000>", debug) 1340 Store(Local0, debug) 1341 Store("<-------- 1111>", debug) 1342} 1343 1344Method(m1d6,, Serialized) 1345{ 1346 Name(ts, "m1d6") 1347 1348 Name(i001, 0) 1349 1350 Name(p000, Package(1) {0x77}) 1351 1352 CH03(ts, z116, 189, 0, 0) 1353 1354 CopyObject(Index(p000, 0, Local0), i001) 1355 1356 CH03(ts, z116, 190, 0, 0) 1357 1358 Add(i001, 1, Local7) 1359 1360 CH04(ts, 0, 0xff, z116, 192, 0, 0) 1361} 1362 1363// Out of Package 1364 1365Method(m1d7,, Serialized) 1366{ 1367 Name(ts, "m1d7") 1368 1369 Name(p000, Package(1) {0x77}) 1370 1371 CH03(ts, z116, 193, 0, 0) 1372 1373 Store(Index(p000, 1), Local0) 1374 1375 CH04(ts, 0, 0xff, z116, 194, 0, 0) 1376 1377 Store(Index(p000, 1, Local0), Local1) 1378 1379 CH04(ts, 0, 0xff, z116, 195, 0, 0) 1380} 1381 1382Method(m1d8,, Serialized) 1383{ 1384 Name(ts, "m1d8") 1385 1386 Name(p000, Package(1) {0x77}) 1387 1388 CH03(ts, z116, 196, 0, 0) 1389 1390 CopyObject(Index(p000, 1), Local0) 1391 1392 CH04(ts, 0, 0xff, z116, 197, 0, 0) 1393 1394 CopyObject(Index(p000, 1, Local0), Local1) 1395 1396 CH04(ts, 0, 0xff, z116, 198, 0, 0) 1397} 1398 1399Method(m1db,, Serialized) 1400{ 1401 Name(ts, "m1db") 1402 1403 Name(i001, 0) 1404 1405 Name(p000, Package(2) {0x77, 0x88}) 1406 1407 CH03(ts, z116, 199, 0, 0) 1408 1409 CopyObject(Index(p000, 1), i001) 1410 1411 CH03(ts, z116, 200, 0, 0) 1412 1413 // Type of i001 should be already IRef here, 1414 // so, don't expect exception. Writing to i001 1415 // is here identical to Store into it. 1416 1417 Index(p000, 0, i001) 1418 1419 CH03(ts, z116, 201, 0, 0) 1420 1421 Add(i001, 1, Local7) 1422 1423 CH04(ts, 0, 0xff, z116, 202, 0, 0) 1424} 1425 1426 1427// WRITE 1428 1429 1430Method(m1d9,, Serialized) 1431{ 1432 Name(p000, Package(3) {5,0,7}) 1433 1434 Method(m000, 1) 1435 { 1436 Add(0x76, 1, Local0) 1437 Store(Local0, arg0) 1438 } 1439 1440 m000(Index(p000, 1)) 1441 m383("m1d9", p000, z116, 140) 1442} 1443 1444Method(m1da,, Serialized) 1445{ 1446 Name(p000, Package(3) {5,0,7}) 1447 1448 Method(m000, 1) 1449 { 1450 Add(0x76, 1, arg0) 1451 } 1452 1453 m000(Index(p000, 1)) 1454 m383("m1da", p000, z116, 141) 1455} 1456 1457 1458