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 IT IS IN PROGRESS !!!!!!!!!! 32 !!!!!!!!!!!!!!!!!!!!!!!!!!!! 33 ============================ 34 */ 35 /* Implicit Result Object Conversion, complex test */ 36 Name (Z067, 0x43) 37 /* Integers */ 38 39 Name (II00, 0x00) 40 Name (II10, 0x00) 41 /* Strings */ 42 43 Name (SS00, "") 44 Name (SS10, "!@#$%^&*()_+=-[]{}") 45 /* Buffers */ 46 47 Name (BB00, Buffer (0x01){}) 48 Name (BB80, Buffer (0x01){}) 49 /* Inside 32-bit Integer */ 50 51 Name (BB01, Buffer (0x03){}) 52 Name (BB81, Buffer (0x03){}) 53 /* 32-bit Integer */ 54 55 Name (BB02, Buffer (0x04){}) 56 Name (BB82, Buffer (0x04){}) 57 /* Inside 64-bit Integer */ 58 59 Name (BB03, Buffer (0x05){}) 60 Name (BB83, Buffer (0x05){}) 61 /* Inside 64-bit Integer */ 62 63 Name (BB04, Buffer (0x08){}) 64 Name (BB84, Buffer (0x08){}) 65 /* Size exceeding result */ 66 67 Name (BB05, Buffer (0x14){}) 68 Name (BB85, Buffer (0x14){}) 69 /* Buffer Fields */ 70 71 Name (BBFF, Buffer (0xA0){}) 72 CreateField (BBFF, 0x05, 0x1B, BF00) 73 CreateField (BBFF, 0x20, 0x2F, BF01) 74 CreateField (BBFF, 0x4F, 0x1B, BF10) 75 CreateField (BBFF, 0x6A, 0x2F, BF11) 76 /* Incomplete last byte */ 77 78 CreateField (BBFF, 0x99, 0x6F, BF02) 79 CreateField (BBFF, 0x0108, 0x6F, BF12) 80 /* Incomplete extra byte */ 81 82 CreateField (BBFF, 0x0177, 0x77, BF03) 83 CreateField (BBFF, 0x01EE, 0x77, BF13) 84 /* Size exceeding result */ 85 86 CreateField (BBFF, 0x028E, 0xA0, BF04) 87 CreateField (BBFF, 0x032E, 0xA0, BF14) 88 /* 32-bit Integer */ 89 90 CreateField (BBFF, 0x03CE, 0x20, BF05) 91 CreateField (BBFF, 0x03EE, 0x20, BF15) 92 /* 64-bit Integer */ 93 94 CreateField (BBFF, 0x040E, 0x40, BF06) 95 CreateField (BBFF, 0x044E, 0x40, BF16) 96 /* Set all bytes of Buffer bbff to 0xff */ 97 98 Method (M565, 0, Serialized) 99 { 100 Name (LPN0, 0xA0) 101 Name (LPC0, 0x00) 102 While (LPN0) 103 { 104 BBFF [LPC0] = 0xFF 105 LPN0-- 106 LPC0++ 107 } 108 } 109 110 /* Acquire (mux, wrd) => Boolean */ 111 112 Method (M500, 1, Serialized) 113 { 114 Name (TS, "m500") 115 TS00 (TS) 116 Mutex (MT00, 0x00) 117 Name (B000, Buffer (0x01) 118 { 119 0x00 // . 120 }) 121 II10 = Acquire (MT00, 0x0000) 122 M4C0 (TS, II10, Zero, Zero) 123 SS10 = Acquire (MT00, 0x0010) 124 M4C0 (TS, SS10, "0000000000000000", "00000000") 125 BB80 = Acquire (MT00, 0x0020) 126 M4C0 (TS, BB80, B000, B000) 127 } 128 129 /* Add (int, int, Result) => Integer */ 130 131 Method (M501, 1, Serialized) 132 { 133 Name (TS, "m501") 134 TS00 (TS) 135 Name (B000, Buffer (0x01) 136 { 137 0x63 // c 138 }) 139 Name (B001, Buffer (0x01) 140 { 141 0x63 // c 142 }) 143 Name (B002, Buffer (0x10) 144 { 145 /* 0000 */ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // ........ 146 /* 0008 */ 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F // ........ 147 }) 148 Name (B003, Buffer (0x10) 149 { 150 /* 0000 */ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, // !"#$%&' 151 /* 0008 */ 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F // ()*+,-./ 152 }) 153 Name (B004, Buffer (0x10) 154 { 155 /* 0000 */ 0x63, 0xF4, 0x9C, 0x52, 0x13, 0xCF, 0x8A, 0x00, // c..R.... 156 /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // ........ 157 }) 158 Name (B005, Buffer (0x10) 159 { 160 /* 0000 */ 0x63, 0xF4, 0x9C, 0x52, 0x00, 0x00, 0x00, 0x00, // c..R.... 161 /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // ........ 162 }) 163 /* Integers */ 164 165 II10 = II00 = (0x00123456789ABCDA + 0x00789ABCDA023789) 166 M4C0 (TS, II00, 0x008ACF13529CF463, 0x529CF463) 167 M4C0 (TS, II10, 0x008ACF13529CF463, 0x529CF463) 168 /* Strings */ 169 170 SS10 = SS00 = (0x00123456789ABCDA + 0x00789ABCDA023789) 171 M4C0 (TS, SS00, "008ACF13529CF463", "529CF463") 172 M4C0 (TS, SS10, "008ACF13529CF463", "529CF463") 173 /* Buffers smaller than result */ 174 175 BB80 = BB00 = (0x00123456789ABCDA + 0x00789ABCDA023789) 176 M4C0 (TS, BB00, B000, B001) 177 M4C0 (TS, BB80, B000, B001) 178 /* Buffers greater than result */ 179 180 B003 = B002 = (0x00123456789ABCDA + 0x00789ABCDA023789) 181 M4C0 (TS, B002, B004, B005) 182 M4C0 (TS, B003, B004, B005) 183 /* Set fields (their source buffer) to zero */ 184 /* Store(bbff, Debug) */ 185 M565 () 186 BF10 = BF00 = (0x00123456789ABCDA + 0x00789ABCDA023789) 187 M4C0 (TS, BF00, B004, B005) 188 M4C0 (TS, BF10, B004, B005) 189 /* !!! check the contents of bbff !!!!!!!!! */ 190 /* Store(bbff, Debug) */ 191 } 192 193 /* And (int, int, Result) => Integer */ 194 195 Method (M502, 1, Serialized) 196 { 197 Name (TS, "m502") 198 TS00 (TS) 199 } 200 201 /* Concatenate ({int|str|buf}, {int|str|buf}, Result) => ComputationalData */ 202 203 Method (M503, 1, NotSerialized) 204 { 205 M563 () 206 M564 () 207 } 208 209 Method (M563, 0, Serialized) 210 { 211 Name (TS, "m503,s+s") 212 /* s+s -->> s -->> all combinations of Result and ComputationalData */ 213 /* Result 64-bit, 32-bit, ComputationalData 64-bit, 32-bit */ 214 Name (P000, Package (0xAC) 215 { 216 /* ============= With Result */ 217 218 0x00ABCDEF12345678, 219 0x12345678, 220 0x00ABCDEF12345678, 221 0x12345678, 222 0x00ABCDEF12345678, 223 0x12345678, 224 "abcdef12345678", 225 "abcdef12345678", 226 0x00ABCDEF12345678, 227 0x12345678, 228 Buffer (0x01) 229 { 230 0x61 // a 231 }, 232 233 Buffer (0x01) 234 { 235 0x61 // a 236 }, 237 238 0x00ABCDEF12345678, 239 0x12345678, 240 0x04636261, 241 0x04636261, 242 0x00ABCDEF12345678, 243 0x12345678, 244 0x0000666564636261, 245 Buffer (0x06) 246 { 247 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 248 }, 249 250 "abcdef12345678", 251 "abcdef12345678", 252 0x00ABCDEF12345678, 253 0x12345678, 254 "abcdef12345678", 255 "abcdef12345678", 256 "abcdef12345678", 257 "abcdef12345678", 258 "abcdef12345678", 259 "abcdef12345678", 260 Buffer (0x01) 261 { 262 0x61 // a 263 }, 264 265 Buffer (0x01) 266 { 267 0x61 // a 268 }, 269 270 "abcdef12345678", 271 "abcdef12345678", 272 0x04636261, 273 0x04636261, 274 "abcdef12345678", 275 "abcdef12345678", 276 0x0000666564636261, 277 Buffer (0x06) 278 { 279 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 280 }, 281 282 Buffer (0x01) 283 { 284 0x61 // a 285 }, 286 287 Buffer (0x01) 288 { 289 0x61 // a 290 }, 291 292 0x00ABCDEF12345678, 293 0x12345678, 294 Buffer (0x01) 295 { 296 0x61 // a 297 }, 298 299 Buffer (0x01) 300 { 301 0x61 // a 302 }, 303 304 "abcdef12345678", 305 "abcdef12345678", 306 Buffer (0x01) 307 { 308 0x61 // a 309 }, 310 311 Buffer (0x01) 312 { 313 0x61 // a 314 }, 315 316 Buffer (0x01) 317 { 318 0x61 // a 319 }, 320 321 Buffer (0x01) 322 { 323 0x61 // a 324 }, 325 326 Buffer (0x01) 327 { 328 0x61 // a 329 }, 330 331 Buffer (0x01) 332 { 333 0x61 // a 334 }, 335 336 0x04636261, 337 0x04636261, 338 Buffer (0x01) 339 { 340 0x61 // a 341 }, 342 343 Buffer (0x01) 344 { 345 0x61 // a 346 }, 347 348 0x0000666564636261, 349 Buffer (0x06) 350 { 351 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 352 }, 353 354 0x04636261, 355 0x04636261, 356 0x00ABCDEF12345678, 357 0x12345678, 358 0x04636261, 359 0x04636261, 360 "abcdef12345678", 361 "abcdef12345678", 362 0x04636261, 363 0x04636261, 364 Buffer (0x01) 365 { 366 0x61 // a 367 }, 368 369 Buffer (0x01) 370 { 371 0x61 // a 372 }, 373 374 0x04636261, 375 0x04636261, 376 0x04636261, 377 0x04636261, 378 0x04636261, 379 0x04636261, 380 0x0000666564636261, 381 Buffer (0x06) 382 { 383 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 384 }, 385 386 0x0000666564636261, 387 Buffer (0x06) 388 { 389 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 390 }, 391 392 0x00ABCDEF12345678, 393 0x12345678, 394 0x0000666564636261, 395 Buffer (0x06) 396 { 397 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 398 }, 399 400 "abcdef12345678", 401 "abcdef12345678", 402 0x0000666564636261, 403 Buffer (0x06) 404 { 405 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 406 }, 407 408 Buffer (0x01) 409 { 410 0x61 // a 411 }, 412 413 Buffer (0x01) 414 { 415 0x61 // a 416 }, 417 418 0x0000666564636261, 419 Buffer (0x06) 420 { 421 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 422 }, 423 424 0x04636261, 425 0x04636261, 426 0x0000666564636261, 427 Buffer (0x06) 428 { 429 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 430 }, 431 432 0x0000666564636261, 433 Buffer (0x06) 434 { 435 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 436 }, 437 438 /* ============= Result omitted */ 439 440 0x00, 441 0x00, 442 0x00ABCDEF12345678, 443 0x12345678, 444 0x00, 445 0x00, 446 "abcdef12345678", 447 "abcdef12345678", 448 0x00, 449 0x00, 450 Buffer (0x01) 451 { 452 0x61 // a 453 }, 454 455 Buffer (0x01) 456 { 457 0x61 // a 458 }, 459 460 0x00, 461 0x00, 462 0x04636261, 463 0x04636261, 464 0x00, 465 0x00, 466 0x0000666564636261, 467 Buffer (0x06) 468 { 469 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 470 }, 471 472 /* ============= Store omitted */ 473 474 0x00ABCDEF12345678, 475 0x12345678, 476 0x00, 477 0x00, 478 "abcdef12345678", 479 "abcdef12345678", 480 0x00, 481 0x00, 482 Buffer (0x01) 483 { 484 0x61 // a 485 }, 486 487 Buffer (0x01) 488 { 489 0x61 // a 490 }, 491 492 0x00, 493 0x00, 494 0x04636261, 495 0x04636261, 496 0x00, 497 0x00, 498 0x0000666564636261, 499 Buffer (0x06) 500 { 501 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 502 }, 503 504 0x00, 505 0x00, 506 /* ============= Particular additional cases */ 507 508 Buffer (0x0E) 509 { 510 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 511 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38 // 345678 512 }, 513 514 Buffer (0x0E) 515 { 516 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 517 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38 // 345678 518 }, 519 520 Buffer (0x0E) 521 { 522 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 523 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38 // 345678 524 }, 525 526 Buffer (0x0E) 527 { 528 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 529 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38 // 345678 530 }, 531 532 Buffer (0x0F) 533 { 534 "abcdef12345678" 535 }, 536 537 Buffer (0x0F) 538 { 539 "abcdef12345678" 540 }, 541 542 Buffer (0x0F) 543 { 544 "abcdef12345678" 545 }, 546 547 Buffer (0x0F) 548 { 549 "abcdef12345678" 550 }, 551 552 Buffer (0x14) 553 { 554 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 555 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, // 345678.. 556 /* 0010 */ 0x00, 0x00, 0x00, 0x00 // .... 557 }, 558 559 Buffer (0x14) 560 { 561 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 562 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, // 345678.. 563 /* 0010 */ 0x00, 0x00, 0x00, 0x00 // .... 564 }, 565 566 Buffer (0x14) 567 { 568 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 569 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, // 345678.. 570 /* 0010 */ 0x00, 0x00, 0x00, 0x00 // .... 571 }, 572 573 Buffer (0x14) 574 { 575 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 576 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, // 345678.. 577 /* 0010 */ 0x00, 0x00, 0x00, 0x00 // .... 578 }, 579 580 Buffer (0x03) 581 { 582 0x61, 0x62, 0x63 // abc 583 }, 584 585 Buffer (0x03) 586 { 587 0x61, 0x62, 0x63 // abc 588 }, 589 590 Buffer (0x03) 591 { 592 0x61, 0x62, 0x63 // abc 593 }, 594 595 Buffer (0x03) 596 { 597 0x61, 0x62, 0x63 // abc 598 }, 599 600 Buffer (0x04) 601 { 602 0x61, 0x62, 0x63, 0x64 // abcd 603 }, 604 605 Buffer (0x04) 606 { 607 0x61, 0x62, 0x63, 0x64 // abcd 608 }, 609 610 Buffer (0x04) 611 { 612 0x61, 0x62, 0x63, 0x64 // abcd 613 }, 614 615 Buffer (0x04) 616 { 617 0x61, 0x62, 0x63, 0x64 // abcd 618 }, 619 620 Buffer (0x05) 621 { 622 0x61, 0x62, 0x63, 0x64, 0x65 // abcde 623 }, 624 625 Buffer (0x05) 626 { 627 0x61, 0x62, 0x63, 0x64, 0x65 // abcde 628 }, 629 630 Buffer (0x05) 631 { 632 0x61, 0x62, 0x63, 0x64, 0x65 // abcde 633 }, 634 635 Buffer (0x05) 636 { 637 0x61, 0x62, 0x63, 0x64, 0x65 // abcde 638 }, 639 640 Buffer (0x08) 641 { 642 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32 // abcdef12 643 }, 644 645 Buffer (0x08) 646 { 647 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32 // abcdef12 648 }, 649 650 Buffer (0x08) 651 { 652 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32 // abcdef12 653 }, 654 655 Buffer (0x08) 656 { 657 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32 // abcdef12 658 }, 659 660 Buffer (0x14) 661 { 662 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 663 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, // 345678.. 664 /* 0010 */ 0x00, 0x00, 0x00, 0x00 // .... 665 }, 666 667 Buffer (0x14) 668 { 669 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 670 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, // 345678.. 671 /* 0010 */ 0x00, 0x00, 0x00, 0x00 // .... 672 }, 673 674 Buffer (0x14) 675 { 676 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 677 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, // 345678.. 678 /* 0010 */ 0x00, 0x00, 0x00, 0x00 // .... 679 }, 680 681 Buffer (0x14) 682 { 683 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 684 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, // 345678.. 685 /* 0010 */ 0x00, 0x00, 0x00, 0x00 // .... 686 } 687 }) 688 Local0 = "abcdef" 689 Local1 = "12345678" 690 M562 (TS, Local0, Local1, P000) 691 /* Source values are not corrupted */ 692 693 Local2 = ObjectType (Local0) 694 If ((Local2 != 0x02)) 695 { 696 ERR (TS, Z067, __LINE__, 0x00, 0x00, Local2, 0x02) 697 } 698 ElseIf ((Local0 != "abcdef")) 699 { 700 ERR (TS, Z067, __LINE__, 0x00, 0x00, Local0, "abcdef") 701 } 702 703 Local2 = ObjectType (Local1) 704 If ((Local2 != 0x02)) 705 { 706 ERR (TS, Z067, __LINE__, 0x00, 0x00, Local2, 0x02) 707 } 708 ElseIf ((Local1 != "12345678")) 709 { 710 ERR (TS, Z067, __LINE__, 0x00, 0x00, Local1, "12345678") 711 } 712 } 713 714 Method (M564, 0, Serialized) 715 { 716 Name (TS, "m503,b+b") 717 /* b+b -->> b -->> all combinations of Result and ComputationalData */ 718 /* Result 64-bit, 32-bit, ComputationalData 64-bit, 32-bit */ 719 Name (P000, Package (0xAC) 720 { 721 /* ============= With Result */ 722 /* i,i */ 723 0x3231666564636261, 724 0x64636261, 725 0x3231666564636261, 726 0x64636261, 727 /* i,s */ 728 729 0x3231666564636261, 730 0x64636261, 731 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 732 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 733 /* i,b */ 734 735 0x3231666564636261, 736 0x64636261, 737 Buffer (0x01) 738 { 739 0x61 // a 740 }, 741 742 Buffer (0x01) 743 { 744 0x61 // a 745 }, 746 747 /* i,bf(i,i) */ 748 749 0x3231666564636261, 750 0x64636261, 751 0x04636261, 752 0x04636261, 753 /* i,bf(i,b) */ 754 755 0x3231666564636261, 756 0x64636261, 757 0x0000666564636261, 758 Buffer (0x06) 759 { 760 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 761 }, 762 763 /* s,i */ 764 765 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 766 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 767 0x3231666564636261, 768 0x64636261, 769 /* s,s */ 770 771 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 772 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 773 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 774 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 775 /* s,b */ 776 777 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 778 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 779 Buffer (0x01) 780 { 781 0x61 // a 782 }, 783 784 Buffer (0x01) 785 { 786 0x61 // a 787 }, 788 789 /* s,bf(i,i) */ 790 791 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 792 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 793 0x04636261, 794 0x04636261, 795 /* s,bf(i,b) */ 796 797 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 798 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 799 0x0000666564636261, 800 Buffer (0x06) 801 { 802 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 803 }, 804 805 /* b,i */ 806 807 Buffer (0x01) 808 { 809 0x61 // a 810 }, 811 812 Buffer (0x01) 813 { 814 0x61 // a 815 }, 816 817 0x3231666564636261, 818 0x64636261, 819 /* b,s */ 820 821 Buffer (0x01) 822 { 823 0x61 // a 824 }, 825 826 Buffer (0x01) 827 { 828 0x61 // a 829 }, 830 831 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 832 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 833 /* b,b */ 834 835 Buffer (0x01) 836 { 837 0x61 // a 838 }, 839 840 Buffer (0x01) 841 { 842 0x61 // a 843 }, 844 845 Buffer (0x01) 846 { 847 0x61 // a 848 }, 849 850 Buffer (0x01) 851 { 852 0x61 // a 853 }, 854 855 /* b,bf(i,i) */ 856 857 Buffer (0x01) 858 { 859 0x61 // a 860 }, 861 862 Buffer (0x01) 863 { 864 0x61 // a 865 }, 866 867 0x04636261, 868 0x04636261, 869 /* b,bf(i,b) */ 870 871 Buffer (0x01) 872 { 873 0x61 // a 874 }, 875 876 Buffer (0x01) 877 { 878 0x61 // a 879 }, 880 881 0x0000666564636261, 882 Buffer (0x06) 883 { 884 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 885 }, 886 887 /* bf(i,i),i */ 888 889 0x04636261, 890 0x04636261, 891 0x3231666564636261, 892 0x64636261, 893 /* bf(i,i),s */ 894 895 0x04636261, 896 0x04636261, 897 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 898 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 899 /* bf(i,i),b */ 900 901 0x04636261, 902 0x04636261, 903 Buffer (0x01) 904 { 905 0x61 // a 906 }, 907 908 Buffer (0x01) 909 { 910 0x61 // a 911 }, 912 913 /* bf(i,i),bf(i,i) */ 914 915 0x04636261, 916 0x04636261, 917 0x04636261, 918 0x04636261, 919 /* bf(i,i),bf(i,b) */ 920 921 0x04636261, 922 0x04636261, 923 0x0000666564636261, 924 Buffer (0x06) 925 { 926 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 927 }, 928 929 /* bf(i,b),i */ 930 931 0x0000666564636261, 932 Buffer (0x06) 933 { 934 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 935 }, 936 937 0x3231666564636261, 938 0x64636261, 939 /* bf(i,b),s */ 940 941 0x0000666564636261, 942 Buffer (0x06) 943 { 944 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 945 }, 946 947 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 948 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 949 /* bf(i,b),b */ 950 951 0x0000666564636261, 952 Buffer (0x06) 953 { 954 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 955 }, 956 957 Buffer (0x01) 958 { 959 0x61 // a 960 }, 961 962 Buffer (0x01) 963 { 964 0x61 // a 965 }, 966 967 /* bf(i,b),bf(i,i) */ 968 969 0x0000666564636261, 970 Buffer (0x06) 971 { 972 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 973 }, 974 975 0x04636261, 976 0x04636261, 977 /* bf(i,b),bf(i,b) */ 978 979 0x0000666564636261, 980 Buffer (0x06) 981 { 982 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 983 }, 984 985 0x0000666564636261, 986 Buffer (0x06) 987 { 988 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 989 }, 990 991 /* ============= Result omitted */ 992 /* ,i */ 993 0x00, 994 0x00, 995 0x3231666564636261, 996 0x64636261, 997 /* ,s */ 998 999 0x00, 1000 0x00, 1001 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 1002 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 1003 /* ,b */ 1004 1005 0x00, 1006 0x00, 1007 Buffer (0x01) 1008 { 1009 0x61 // a 1010 }, 1011 1012 Buffer (0x01) 1013 { 1014 0x61 // a 1015 }, 1016 1017 /* ,bf(i,i) */ 1018 1019 0x00, 1020 0x00, 1021 0x04636261, 1022 0x04636261, 1023 /* b,bf(i,b) */ 1024 1025 0x00, 1026 0x00, 1027 0x0000666564636261, 1028 Buffer (0x06) 1029 { 1030 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 1031 }, 1032 1033 /* ============= Store omitted */ 1034 /* i, */ 1035 0x3231666564636261, 1036 0x64636261, 1037 0x00, 1038 0x00, 1039 /* s, */ 1040 1041 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 1042 "61 62 63 64 65 66 31 32 33 34 35 36 37 38", 1043 0x00, 1044 0x00, 1045 /* b, */ 1046 1047 Buffer (0x01) 1048 { 1049 0x61 // a 1050 }, 1051 1052 Buffer (0x01) 1053 { 1054 0x61 // a 1055 }, 1056 1057 0x00, 1058 0x00, 1059 /* bf(i,i), */ 1060 1061 0x04636261, 1062 0x04636261, 1063 0x00, 1064 0x00, 1065 /* bf(i,b), */ 1066 1067 0x0000666564636261, 1068 Buffer (0x06) 1069 { 1070 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 1071 }, 1072 1073 0x00, 1074 0x00, 1075 /* ============= Particular additional cases */ 1076 /* Buffer Field, incomplete last byte */ 1077 Buffer (0x0E) 1078 { 1079 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 1080 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38 // 345678 1081 }, 1082 1083 Buffer (0x0E) 1084 { 1085 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 1086 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38 // 345678 1087 }, 1088 1089 Buffer (0x0E) 1090 { 1091 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 1092 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38 // 345678 1093 }, 1094 1095 Buffer (0x0E) 1096 { 1097 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 1098 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38 // 345678 1099 }, 1100 1101 /* Buffer Field, incomplete extra byte */ 1102 1103 Buffer (0x0F) 1104 { 1105 "abcdef12345678" 1106 }, 1107 1108 Buffer (0x0F) 1109 { 1110 "abcdef12345678" 1111 }, 1112 1113 Buffer (0x0F) 1114 { 1115 "abcdef12345678" 1116 }, 1117 1118 Buffer (0x0F) 1119 { 1120 "abcdef12345678" 1121 }, 1122 1123 /* Buffer Field, size exceeding result */ 1124 1125 Buffer (0x14) 1126 { 1127 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 1128 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, // 345678.. 1129 /* 0010 */ 0x00, 0x00, 0x00, 0x00 // .... 1130 }, 1131 1132 Buffer (0x14) 1133 { 1134 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 1135 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, // 345678.. 1136 /* 0010 */ 0x00, 0x00, 0x00, 0x00 // .... 1137 }, 1138 1139 Buffer (0x14) 1140 { 1141 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 1142 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, // 345678.. 1143 /* 0010 */ 0x00, 0x00, 0x00, 0x00 // .... 1144 }, 1145 1146 Buffer (0x14) 1147 { 1148 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 1149 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, // 345678.. 1150 /* 0010 */ 0x00, 0x00, 0x00, 0x00 // .... 1151 }, 1152 1153 /* Buffer, inside 32-bit Integer */ 1154 1155 Buffer (0x03) 1156 { 1157 0x61, 0x62, 0x63 // abc 1158 }, 1159 1160 Buffer (0x03) 1161 { 1162 0x61, 0x62, 0x63 // abc 1163 }, 1164 1165 Buffer (0x03) 1166 { 1167 0x61, 0x62, 0x63 // abc 1168 }, 1169 1170 Buffer (0x03) 1171 { 1172 0x61, 0x62, 0x63 // abc 1173 }, 1174 1175 /* Buffer, 32-bit Integer */ 1176 1177 Buffer (0x04) 1178 { 1179 0x61, 0x62, 0x63, 0x64 // abcd 1180 }, 1181 1182 Buffer (0x04) 1183 { 1184 0x61, 0x62, 0x63, 0x64 // abcd 1185 }, 1186 1187 Buffer (0x04) 1188 { 1189 0x61, 0x62, 0x63, 0x64 // abcd 1190 }, 1191 1192 Buffer (0x04) 1193 { 1194 0x61, 0x62, 0x63, 0x64 // abcd 1195 }, 1196 1197 /* Buffer, inside 64-bit Integer */ 1198 1199 Buffer (0x05) 1200 { 1201 0x61, 0x62, 0x63, 0x64, 0x65 // abcde 1202 }, 1203 1204 Buffer (0x05) 1205 { 1206 0x61, 0x62, 0x63, 0x64, 0x65 // abcde 1207 }, 1208 1209 Buffer (0x05) 1210 { 1211 0x61, 0x62, 0x63, 0x64, 0x65 // abcde 1212 }, 1213 1214 Buffer (0x05) 1215 { 1216 0x61, 0x62, 0x63, 0x64, 0x65 // abcde 1217 }, 1218 1219 /* Buffer, 64-bit Integer */ 1220 1221 Buffer (0x08) 1222 { 1223 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32 // abcdef12 1224 }, 1225 1226 Buffer (0x08) 1227 { 1228 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32 // abcdef12 1229 }, 1230 1231 Buffer (0x08) 1232 { 1233 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32 // abcdef12 1234 }, 1235 1236 Buffer (0x08) 1237 { 1238 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32 // abcdef12 1239 }, 1240 1241 /* Buffer, size exceeding result */ 1242 1243 Buffer (0x14) 1244 { 1245 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 1246 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, // 345678.. 1247 /* 0010 */ 0x00, 0x00, 0x00, 0x00 // .... 1248 }, 1249 1250 Buffer (0x14) 1251 { 1252 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 1253 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, // 345678.. 1254 /* 0010 */ 0x00, 0x00, 0x00, 0x00 // .... 1255 }, 1256 1257 Buffer (0x14) 1258 { 1259 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 1260 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, // 345678.. 1261 /* 0010 */ 0x00, 0x00, 0x00, 0x00 // .... 1262 }, 1263 1264 Buffer (0x14) 1265 { 1266 /* 0000 */ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x31, 0x32, // abcdef12 1267 /* 0008 */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, // 345678.. 1268 /* 0010 */ 0x00, 0x00, 0x00, 0x00 // .... 1269 } 1270 }) 1271 Name (B000, Buffer (0x06) 1272 { 1273 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 // abcdef 1274 }) 1275 Name (B001, Buffer (0x08) 1276 { 1277 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38 // 12345678 1278 }) 1279 Local0 = B000 /* \M564.B000 */ 1280 Local1 = B001 /* \M564.B001 */ 1281 M562 (TS, Local0, Local1, P000) 1282 /* Source values are not corrupted */ 1283 1284 Local2 = ObjectType (Local0) 1285 If ((Local2 != 0x03)) 1286 { 1287 ERR (TS, Z067, __LINE__, 0x00, 0x00, Local2, 0x03) 1288 } 1289 ElseIf ((Local0 != B000)) 1290 { 1291 ERR (TS, Z067, __LINE__, 0x00, 0x00, Local0, B000) 1292 } 1293 1294 Local2 = ObjectType (Local1) 1295 If ((Local2 != 0x03)) 1296 { 1297 ERR (TS, Z067, __LINE__, 0x00, 0x00, Local2, 0x03) 1298 } 1299 ElseIf ((Local1 != B001)) 1300 { 1301 ERR (TS, Z067, __LINE__, 0x00, 0x00, Local1, B001) 1302 } 1303 } 1304 1305 /* arg0 - name of test */ 1306 /* arg1 - Source1 */ 1307 /* arg2 - Source2 */ 1308 /* arg3 - results */ 1309 Method (M562, 4, NotSerialized) 1310 { 1311 TS00 (Arg0) 1312 /* ============= With Result */ 1313 /* ii,is,ib,ibf */ 1314 /* si,ss,sb,sbf */ 1315 /* bi,bs,bb,bbf */ 1316 /* bfi,bfs,bfb,bfbf */ 1317 /* i,i */ 1318 II10 = Concatenate (Arg1, Arg2, II00) /* \II00 */ 1319 M4C1 (Arg0, Arg3, 0x00, 0x01, 0x01, II00, II10) 1320 /* i,s */ 1321 1322 SS10 = Concatenate (Arg1, Arg2, II00) /* \II00 */ 1323 M4C1 (Arg0, Arg3, 0x01, 0x01, 0x01, II00, SS10) 1324 /* i,b */ 1325 1326 BB80 = Concatenate (Arg1, Arg2, II00) /* \II00 */ 1327 M4C1 (Arg0, Arg3, 0x02, 0x01, 0x01, II00, BB80) 1328 /* i,bf(i,i) */ 1329 1330 BF10 = Concatenate (Arg1, Arg2, II00) /* \II00 */ 1331 M4C1 (Arg0, Arg3, 0x03, 0x01, 0x01, II00, BF10) 1332 /* i,bf(i,b) */ 1333 1334 BF11 = Concatenate (Arg1, Arg2, II00) /* \II00 */ 1335 M4C1 (Arg0, Arg3, 0x04, 0x01, 0x01, II00, BF11) 1336 /* s,i */ 1337 1338 II10 = Concatenate (Arg1, Arg2, SS00) /* \SS00 */ 1339 M4C1 (Arg0, Arg3, 0x05, 0x01, 0x01, SS00, II10) 1340 /* s,s */ 1341 1342 SS10 = Concatenate (Arg1, Arg2, SS00) /* \SS00 */ 1343 M4C1 (Arg0, Arg3, 0x06, 0x01, 0x01, SS00, SS10) 1344 /* s,b */ 1345 1346 BB80 = Concatenate (Arg1, Arg2, SS00) /* \SS00 */ 1347 M4C1 (Arg0, Arg3, 0x07, 0x01, 0x01, SS00, BB80) 1348 /* s,bf(i,i) */ 1349 1350 BF10 = Concatenate (Arg1, Arg2, SS00) /* \SS00 */ 1351 M4C1 (Arg0, Arg3, 0x08, 0x01, 0x01, SS00, BF10) 1352 /* s,bf(i,b) */ 1353 1354 BF11 = Concatenate (Arg1, Arg2, SS00) /* \SS00 */ 1355 M4C1 (Arg0, Arg3, 0x09, 0x01, 0x01, SS00, BF11) 1356 /* b,i */ 1357 1358 II10 = Concatenate (Arg1, Arg2, BB00) /* \BB00 */ 1359 M4C1 (Arg0, Arg3, 0x0A, 0x01, 0x01, BB00, II10) 1360 /* b,s */ 1361 1362 SS10 = Concatenate (Arg1, Arg2, BB00) /* \BB00 */ 1363 M4C1 (Arg0, Arg3, 0x0B, 0x01, 0x01, BB00, SS10) 1364 /* b,b */ 1365 1366 BB80 = Concatenate (Arg1, Arg2, BB00) /* \BB00 */ 1367 M4C1 (Arg0, Arg3, 0x0C, 0x01, 0x01, BB00, BB80) 1368 /* b,bf(i,i) */ 1369 1370 BF10 = Concatenate (Arg1, Arg2, BB00) /* \BB00 */ 1371 M4C1 (Arg0, Arg3, 0x0D, 0x01, 0x01, BB00, BF10) 1372 /* b,bf(i,b) */ 1373 1374 BF11 = Concatenate (Arg1, Arg2, BB00) /* \BB00 */ 1375 M4C1 (Arg0, Arg3, 0x0E, 0x01, 0x01, BB00, BF11) 1376 /* bf(i,i),i */ 1377 1378 II10 = Concatenate (Arg1, Arg2, BF00) /* \BF00 */ 1379 M4C1 (Arg0, Arg3, 0x0F, 0x01, 0x01, BF00, II10) 1380 /* bf(i,i),s */ 1381 1382 SS10 = Concatenate (Arg1, Arg2, BF00) /* \BF00 */ 1383 M4C1 (Arg0, Arg3, 0x10, 0x01, 0x01, BF00, SS10) 1384 /* bf(i,i),b */ 1385 1386 BB80 = Concatenate (Arg1, Arg2, BF00) /* \BF00 */ 1387 M4C1 (Arg0, Arg3, 0x11, 0x01, 0x01, BF00, BB80) 1388 /* bf(i,i),bf(i,i) */ 1389 1390 BF10 = Concatenate (Arg1, Arg2, BF00) /* \BF00 */ 1391 M4C1 (Arg0, Arg3, 0x12, 0x01, 0x01, BF00, BF10) 1392 /* bf(i,i),bf(i,b) */ 1393 1394 BF11 = Concatenate (Arg1, Arg2, BF00) /* \BF00 */ 1395 M4C1 (Arg0, Arg3, 0x13, 0x01, 0x01, BF00, BF11) 1396 /* bf(i,b),i */ 1397 1398 II10 = Concatenate (Arg1, Arg2, BF01) /* \BF01 */ 1399 M4C1 (Arg0, Arg3, 0x14, 0x01, 0x01, BF01, II10) 1400 /* bf(i,b),s */ 1401 1402 SS10 = Concatenate (Arg1, Arg2, BF01) /* \BF01 */ 1403 M4C1 (Arg0, Arg3, 0x15, 0x01, 0x01, BF01, SS10) 1404 /* bf(i,b),b */ 1405 1406 BB80 = Concatenate (Arg1, Arg2, BF01) /* \BF01 */ 1407 M4C1 (Arg0, Arg3, 0x16, 0x01, 0x01, BF01, BB80) 1408 /* bf(i,b),bf(i,i) */ 1409 1410 BF10 = Concatenate (Arg1, Arg2, BF01) /* \BF01 */ 1411 M4C1 (Arg0, Arg3, 0x17, 0x01, 0x01, BF01, BF10) 1412 /* bf(i,b),bf(i,b) */ 1413 1414 BF11 = Concatenate (Arg1, Arg2, BF01) /* \BF01 */ 1415 M4C1 (Arg0, Arg3, 0x18, 0x01, 0x01, BF01, BF11) 1416 /* ============= Result omitted */ 1417 /* ,i,s,b,bf */ 1418 /* ,i */ 1419 II10 = Concatenate (Arg1, Arg2) 1420 M4C1 (Arg0, Arg3, 0x19, 0x00, 0x01, 0x00, II10) 1421 /* ,s */ 1422 1423 SS10 = Concatenate (Arg1, Arg2) 1424 M4C1 (Arg0, Arg3, 0x1A, 0x00, 0x01, 0x00, SS10) 1425 /* ,b */ 1426 1427 BB80 = Concatenate (Arg1, Arg2) 1428 M4C1 (Arg0, Arg3, 0x1B, 0x00, 0x01, 0x00, BB80) 1429 /* ,bf(i,i) */ 1430 1431 BF10 = Concatenate (Arg1, Arg2) 1432 M4C1 (Arg0, Arg3, 0x1C, 0x00, 0x01, 0x00, BF10) 1433 /* b,bf(i,b) */ 1434 1435 BF11 = Concatenate (Arg1, Arg2) 1436 M4C1 (Arg0, Arg3, 0x1D, 0x00, 0x01, 0x00, BF11) 1437 /* ============= Store omitted */ 1438 /* i,s,b,bf, */ 1439 /* i, */ 1440 Concatenate (Arg1, Arg2, II00) /* \II00 */ 1441 M4C1 (Arg0, Arg3, 0x1E, 0x01, 0x00, II00, 0x00) 1442 /* s, */ 1443 1444 Concatenate (Arg1, Arg2, SS00) /* \SS00 */ 1445 M4C1 (Arg0, Arg3, 0x1F, 0x01, 0x00, SS00, 0x00) 1446 /* b, */ 1447 1448 Concatenate (Arg1, Arg2, BB00) /* \BB00 */ 1449 M4C1 (Arg0, Arg3, 0x20, 0x01, 0x00, BB00, 0x00) 1450 /* bf(i,i), */ 1451 1452 Concatenate (Arg1, Arg2, BF00) /* \BF00 */ 1453 M4C1 (Arg0, Arg3, 0x21, 0x01, 0x00, BF00, 0x00) 1454 /* bf(i,b), */ 1455 1456 Concatenate (Arg1, Arg2, BF01) /* \BF01 */ 1457 M4C1 (Arg0, Arg3, 0x22, 0x01, 0x00, BF01, 0x00) 1458 /* ============= Particular additional cases */ 1459 /* Buffer Field, incomplete last byte */ 1460 BF12 = Concatenate (Arg1, Arg2, BF02) /* \BF02 */ 1461 M4C1 (Arg0, Arg3, 0x23, 0x01, 0x01, BF02, BF12) 1462 /* Buffer Field, incomplete extra byte */ 1463 1464 BF13 = Concatenate (Arg1, Arg2, BF03) /* \BF03 */ 1465 M4C1 (Arg0, Arg3, 0x24, 0x01, 0x01, BF03, BF13) 1466 /* Buffer Field, size exceeding result */ 1467 1468 BF14 = Concatenate (Arg1, Arg2, BF04) /* \BF04 */ 1469 M4C1 (Arg0, Arg3, 0x25, 0x01, 0x01, BF04, BF14) 1470 /* Buffer, inside 32-bit Integer */ 1471 1472 BB81 = Concatenate (Arg1, Arg2, BB01) /* \BB01 */ 1473 M4C1 (Arg0, Arg3, 0x26, 0x01, 0x01, BB01, BB81) 1474 /* Buffer, 32-bit Integer */ 1475 1476 BB82 = Concatenate (Arg1, Arg2, BB02) /* \BB02 */ 1477 M4C1 (Arg0, Arg3, 0x27, 0x01, 0x01, BB02, BB82) 1478 /* Buffer, inside 64-bit Integer */ 1479 1480 BB83 = Concatenate (Arg1, Arg2, BB03) /* \BB03 */ 1481 M4C1 (Arg0, Arg3, 0x28, 0x01, 0x01, BB03, BB83) 1482 /* Buffer, 64-bit Integer */ 1483 1484 BB84 = Concatenate (Arg1, Arg2, BB04) /* \BB04 */ 1485 M4C1 (Arg0, Arg3, 0x29, 0x01, 0x01, BB04, BB84) 1486 /* Buffer, size exceeding result */ 1487 1488 BB85 = Concatenate (Arg1, Arg2, BB05) /* \BB05 */ 1489 M4C1 (Arg0, Arg3, 0x2A, 0x01, 0x01, BB05, BB85) 1490 } 1491 1492 /* ConcatenateResTemplate (rtb, rtb, Result) => Buffer */ 1493 1494 Method (M504, 1, Serialized) 1495 { 1496 Name (OP, 0x04) 1497 Name (TS, "m504") 1498 TS00 (TS) 1499 If (Arg0){} 1500 Else 1501 { 1502 } 1503 } 1504 1505 /* CondRefOf (any, Result) => Boolean */ 1506 1507 Method (M505, 1, Serialized) 1508 { 1509 Name (OP, 0x00) 1510 Name (TS, "m505") 1511 TS00 (TS) 1512 If (Arg0){} 1513 Else 1514 { 1515 } 1516 } 1517 1518 /* CopyObject (any, Destination) => DataRefObject */ 1519 1520 Method (M506, 1, Serialized) 1521 { 1522 Name (OP, 0x00) 1523 Name (TS, "m506") 1524 TS00 (TS) 1525 If (Arg0){} 1526 Else 1527 { 1528 } 1529 } 1530 1531 /* Decrement (int) => Integer */ 1532 1533 Method (M507, 1, Serialized) 1534 { 1535 Name (OP, 0x00) 1536 Name (TS, "m507") 1537 TS00 (TS) 1538 If (Arg0){} 1539 Else 1540 { 1541 } 1542 } 1543 1544 /* DerefOf ({ref|str}) => Object */ 1545 1546 Method (M508, 1, Serialized) 1547 { 1548 Name (OP, 0x00) 1549 Name (TS, "m508") 1550 TS00 (TS) 1551 If (Arg0){} 1552 Else 1553 { 1554 } 1555 } 1556 1557 /* Divide (int, int, Remainder, Result) => Integer */ 1558 1559 Method (M509, 1, Serialized) 1560 { 1561 Name (OP, 0x00) 1562 Name (TS, "m509") 1563 TS00 (TS) 1564 If (Arg0){} 1565 Else 1566 { 1567 } 1568 } 1569 1570 /* FindSetLeftBit (int, Result) => Integer */ 1571 1572 Method (M511, 1, Serialized) 1573 { 1574 Name (OP, 0x00) 1575 Name (TS, "m511") 1576 TS00 (TS) 1577 If (Arg0){} 1578 Else 1579 { 1580 } 1581 } 1582 1583 /* FindSetRightBit (int, Result) => Integer */ 1584 1585 Method (M512, 1, Serialized) 1586 { 1587 Name (OP, 0x00) 1588 Name (TS, "m512") 1589 TS00 (TS) 1590 If (Arg0){} 1591 Else 1592 { 1593 } 1594 } 1595 1596 /* FromBCD (int, Result) => Integer */ 1597 1598 Method (M513, 1, Serialized) 1599 { 1600 Name (OP, 0x00) 1601 Name (TS, "m513") 1602 TS00 (TS) 1603 If (Arg0){} 1604 Else 1605 { 1606 } 1607 } 1608 1609 /* Increment (int) => Integer */ 1610 1611 Method (M514, 1, Serialized) 1612 { 1613 Name (OP, 0x00) 1614 Name (TS, "m514") 1615 TS00 (TS) 1616 If (Arg0){} 1617 Else 1618 { 1619 } 1620 } 1621 1622 /* Index ({str|buf|pkg}, int, Destination) => ObjectReference */ 1623 1624 Method (M515, 1, Serialized) 1625 { 1626 Name (OP, 0x00) 1627 Name (TS, "m515") 1628 TS00 (TS) 1629 If (Arg0){} 1630 Else 1631 { 1632 } 1633 } 1634 1635 /* LAnd (int, int) => Boolean */ 1636 1637 Method (M516, 1, Serialized) 1638 { 1639 Name (OP, 0x00) 1640 Name (TS, "m516") 1641 TS00 (TS) 1642 If (Arg0){} 1643 Else 1644 { 1645 } 1646 } 1647 1648 /* LEqual ({int|str|buf}, {int|str|buf}) => Boolean */ 1649 1650 Method (M517, 1, Serialized) 1651 { 1652 Name (OP, 0x00) 1653 Name (TS, "m517") 1654 TS00 (TS) 1655 If (Arg0){} 1656 Else 1657 { 1658 } 1659 } 1660 1661 /* LGreater ({int|str|buf}, {int|str|buf}) => Boolean */ 1662 1663 Method (M518, 1, Serialized) 1664 { 1665 Name (OP, 0x00) 1666 Name (TS, "m518") 1667 TS00 (TS) 1668 If (Arg0){} 1669 Else 1670 { 1671 } 1672 } 1673 1674 /* LGreaterEqual ({int|str|buf}, {int|str|buf}) => Boolean */ 1675 1676 Method (M519, 1, Serialized) 1677 { 1678 Name (OP, 0x00) 1679 Name (TS, "m519") 1680 TS00 (TS) 1681 If (Arg0){} 1682 Else 1683 { 1684 } 1685 } 1686 1687 /* LLess ({int|str|buf}, {int|str|buf}) => Boolean */ 1688 1689 Method (M520, 1, Serialized) 1690 { 1691 Name (OP, 0x00) 1692 Name (TS, "m520") 1693 TS00 (TS) 1694 If (Arg0){} 1695 Else 1696 { 1697 } 1698 } 1699 1700 /* LLessEqual ({int|str|buf}, {int|str|buf}) => Boolean */ 1701 1702 Method (M521, 1, Serialized) 1703 { 1704 Name (OP, 0x00) 1705 Name (TS, "m521") 1706 TS00 (TS) 1707 If (Arg0){} 1708 Else 1709 { 1710 } 1711 } 1712 1713 /* LNot (int) => Boolean */ 1714 1715 Method (M522, 1, Serialized) 1716 { 1717 Name (OP, 0x00) 1718 Name (TS, "m522") 1719 TS00 (TS) 1720 If (Arg0){} 1721 Else 1722 { 1723 } 1724 } 1725 1726 /* LNotEqual ({int|str|buf}, {int|str|buf}) => Boolean */ 1727 1728 Method (M523, 1, Serialized) 1729 { 1730 Name (OP, 0x00) 1731 Name (TS, "m523") 1732 TS00 (TS) 1733 If (Arg0){} 1734 Else 1735 { 1736 } 1737 } 1738 1739 /* LOr (int, int) => Boolean */ 1740 1741 Method (M524, 1, Serialized) 1742 { 1743 Name (OP, 0x00) 1744 Name (TS, "m524") 1745 TS00 (TS) 1746 If (Arg0){} 1747 Else 1748 { 1749 } 1750 } 1751 1752 /* Match (pkg, byt, int, byt, int, int) => Ones | Integer */ 1753 1754 Method (M525, 1, Serialized) 1755 { 1756 Name (OP, 0x00) 1757 Name (TS, "m525") 1758 TS00 (TS) 1759 If (Arg0){} 1760 Else 1761 { 1762 } 1763 } 1764 1765 /* Mid ({str|buf}, int, int, Result) => Buffer or String */ 1766 1767 Method (M526, 1, Serialized) 1768 { 1769 Name (OP, 0x00) 1770 Name (TS, "m526") 1771 TS00 (TS) 1772 If (Arg0){} 1773 Else 1774 { 1775 } 1776 } 1777 1778 /* Mod (int, int, Result) => Integer */ 1779 1780 Method (M527, 1, Serialized) 1781 { 1782 Name (OP, 0x00) 1783 Name (TS, "m527") 1784 TS00 (TS) 1785 If (Arg0){} 1786 Else 1787 { 1788 } 1789 } 1790 1791 /* Multiply (int, int, Result) => Integer */ 1792 1793 Method (M528, 1, Serialized) 1794 { 1795 Name (OP, 0x00) 1796 Name (TS, "m528") 1797 TS00 (TS) 1798 If (Arg0){} 1799 Else 1800 { 1801 } 1802 } 1803 1804 /* NAnd (int, int, Result) => Integer */ 1805 1806 Method (M529, 1, Serialized) 1807 { 1808 Name (OP, 0x00) 1809 Name (TS, "m529") 1810 TS00 (TS) 1811 If (Arg0){} 1812 Else 1813 { 1814 } 1815 } 1816 1817 /* NOr (int, int, Result) => Integer */ 1818 1819 Method (M530, 1, Serialized) 1820 { 1821 Name (OP, 0x00) 1822 Name (TS, "m530") 1823 TS00 (TS) 1824 If (Arg0){} 1825 Else 1826 { 1827 } 1828 } 1829 1830 /* Not (int, Result) => Integer */ 1831 1832 Method (M531, 1, Serialized) 1833 { 1834 Name (OP, 0x00) 1835 Name (TS, "m531") 1836 TS00 (TS) 1837 If (Arg0){} 1838 Else 1839 { 1840 } 1841 } 1842 1843 /* ObjectType (any) => Integer */ 1844 1845 Method (M532, 1, Serialized) 1846 { 1847 Name (OP, 0x00) 1848 Name (TS, "m532") 1849 TS00 (TS) 1850 If (Arg0){} 1851 Else 1852 { 1853 } 1854 } 1855 1856 /* Or (int, int, Result) => Integer */ 1857 1858 Method (M533, 1, Serialized) 1859 { 1860 Name (OP, 0x00) 1861 Name (TS, "m533") 1862 TS00 (TS) 1863 If (Arg0){} 1864 Else 1865 { 1866 } 1867 } 1868 1869 /* RefOf (any) => ObjectReference */ 1870 1871 Method (M534, 1, Serialized) 1872 { 1873 Name (OP, 0x00) 1874 Name (TS, "m534") 1875 TS00 (TS) 1876 If (Arg0){} 1877 Else 1878 { 1879 } 1880 } 1881 1882 /* Return ({any|ref}) */ 1883 1884 Method (M537, 1, Serialized) 1885 { 1886 Name (OP, 0x00) 1887 Name (TS, "m537") 1888 TS00 (TS) 1889 If (Arg0){} 1890 Else 1891 { 1892 } 1893 } 1894 1895 /* ShiftLeft (int, int, Result) => Integer */ 1896 1897 Method (M538, 1, Serialized) 1898 { 1899 Name (OP, 0x00) 1900 Name (TS, "m538") 1901 TS00 (TS) 1902 If (Arg0){} 1903 Else 1904 { 1905 } 1906 } 1907 1908 /* ShiftRight (int, int, Result) => Integer */ 1909 1910 Method (M539, 1, Serialized) 1911 { 1912 Name (OP, 0x00) 1913 Name (TS, "m539") 1914 TS00 (TS) 1915 If (Arg0){} 1916 Else 1917 { 1918 } 1919 } 1920 1921 /* SizeOf ({int|str|buf|pkg}) => Integer */ 1922 1923 Method (M541, 1, Serialized) 1924 { 1925 Name (OP, 0x00) 1926 Name (TS, "m541") 1927 TS00 (TS) 1928 If (Arg0){} 1929 Else 1930 { 1931 } 1932 } 1933 1934 /* Store (any, Destination) => DataRefObject */ 1935 1936 Method (M544, 1, Serialized) 1937 { 1938 Name (TS, "m544") 1939 TS00 (TS) 1940 Name (SS00, "DEF") 1941 SS00 = "ABC" 1942 Local0 = ObjectType (SS00) 1943 If ((Local0 != 0x02)) 1944 { 1945 ERR (TS, Z067, __LINE__, 0x00, 0x00, Local0, 0x02) 1946 } 1947 ElseIf ((SS00 != "ABC")) 1948 { 1949 ERR (TS, Z067, __LINE__, 0x00, 0x00, SS00, "ABC") 1950 } 1951 1952 Name (B000, Buffer (0xC8){}) 1953 Name (B001, Buffer (0x06) 1954 { 1955 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 // ABCDEF 1956 }) 1957 B000 = "ABCDEF" 1958 Local0 = ObjectType (B000) 1959 Local1 = SizeOf (B000) 1960 If ((Local0 != 0x03)) 1961 { 1962 ERR (TS, Z067, __LINE__, 0x00, 0x00, Local0, 0x03) 1963 } 1964 ElseIf ((Local1 != 0x06)) 1965 { 1966 ERR (TS, Z067, __LINE__, 0x00, 0x00, Local1, 0x06) 1967 } 1968 ElseIf ((B000 != B001)) 1969 { 1970 ERR (TS, Z067, __LINE__, 0x00, 0x00, B000, B001) 1971 } 1972 } 1973 1974 /* Subtract (int, int, Result) => Integer */ 1975 1976 Method (M545, 1, Serialized) 1977 { 1978 Name (OP, 0x00) 1979 Name (TS, "m545") 1980 TS00 (TS) 1981 If (Arg0){} 1982 Else 1983 { 1984 } 1985 } 1986 1987 /* ToBCD (int, Result) => Integer */ 1988 1989 Method (M546, 1, Serialized) 1990 { 1991 Name (OP, 0x00) 1992 Name (TS, "m546") 1993 TS00 (TS) 1994 If (Arg0){} 1995 Else 1996 { 1997 } 1998 } 1999 2000 /* ToBuffer ({int|str|buf}, Result) => Buffer */ 2001 2002 Method (M547, 1, Serialized) 2003 { 2004 Name (OP, 0x00) 2005 Name (TS, "m547") 2006 TS00 (TS) 2007 If (Arg0){} 2008 Else 2009 { 2010 } 2011 } 2012 2013 /* ToDecimalString ({int|str|buf}, Result) => String */ 2014 2015 Method (M548, 1, Serialized) 2016 { 2017 Name (OP, 0x00) 2018 Name (TS, "m548") 2019 TS00 (TS) 2020 If (Arg0){} 2021 Else 2022 { 2023 } 2024 } 2025 2026 /* ToHexString ({int|str|buf}, Result) => String */ 2027 2028 Method (M549, 1, Serialized) 2029 { 2030 Name (OP, 0x00) 2031 Name (TS, "m549") 2032 TS00 (TS) 2033 If (Arg0){} 2034 Else 2035 { 2036 } 2037 } 2038 2039 /* ToInteger ({int|str|buf}, Result) => Integer */ 2040 2041 Method (M550, 1, Serialized) 2042 { 2043 Name (OP, 0x00) 2044 Name (TS, "m550") 2045 TS00 (TS) 2046 If (Arg0){} 2047 Else 2048 { 2049 } 2050 } 2051 2052 /* ToString (buf, int, Result) => String */ 2053 2054 Method (M551, 1, Serialized) 2055 { 2056 Name (OP, 0x00) 2057 Name (TS, "m551") 2058 TS00 (TS) 2059 If (Arg0){} 2060 Else 2061 { 2062 } 2063 } 2064 2065 /* Wait (evt, int) => Boolean */ 2066 2067 Method (M552, 1, Serialized) 2068 { 2069 Name (OP, 0x00) 2070 Name (TS, "m552") 2071 TS00 (TS) 2072 If (Arg0){} 2073 Else 2074 { 2075 } 2076 } 2077 2078 /* XOr (int, int, Result) => Integer */ 2079 2080 Method (M553, 1, Serialized) 2081 { 2082 Name (OP, 0x00) 2083 Name (TS, "m553") 2084 TS00 (TS) 2085 If (Arg0){} 2086 Else 2087 { 2088 } 2089 } 2090 2091 Method (M560, 1, NotSerialized) 2092 { 2093 /* 2094 m500(arg0) 2095 m501(arg0) 2096 m502(arg0) 2097 m503(arg0) 2098 m504(arg0) 2099 m505(arg0) 2100 m506(arg0) 2101 m507(arg0) 2102 m508(arg0) 2103 m509(arg0) 2104 m511(arg0) 2105 m512(arg0) 2106 m513(arg0) 2107 m514(arg0) 2108 m515(arg0) 2109 m516(arg0) 2110 m517(arg0) 2111 m518(arg0) 2112 m519(arg0) 2113 m520(arg0) 2114 m521(arg0) 2115 m522(arg0) 2116 m523(arg0) 2117 m524(arg0) 2118 m525(arg0) 2119 m526(arg0) 2120 m527(arg0) 2121 m528(arg0) 2122 m529(arg0) 2123 m530(arg0) 2124 m531(arg0) 2125 m532(arg0) 2126 m533(arg0) 2127 m534(arg0) 2128 m537(arg0) 2129 m538(arg0) 2130 m539(arg0) 2131 m541(arg0) 2132 m544(arg0) 2133 m545(arg0) 2134 m546(arg0) 2135 m547(arg0) 2136 m548(arg0) 2137 m549(arg0) 2138 m550(arg0) 2139 m551(arg0) 2140 m552(arg0) 2141 m553(arg0) 2142 */ 2143 M500 (Arg0) 2144 M501 (Arg0) 2145 M502 (Arg0) 2146 M503 (Arg0) 2147 M544 (Arg0) 2148 } 2149