1 2 /****************************************************************************** 3 * 4 * Module Name: aslcompiler.h - common include file for iASL 5 * 6 *****************************************************************************/ 7 8 /****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. 13 * All rights reserved. 14 * 15 * 2. License 16 * 17 * 2.1. This is your license from Intel Corp. under its intellectual property 18 * rights. You may have additional license terms from the party that provided 19 * you this software, covering your right to use that party's intellectual 20 * property rights. 21 * 22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 23 * copy of the source code appearing in this file ("Covered Code") an 24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 25 * base code distributed originally by Intel ("Original Intel Code") to copy, 26 * make derivatives, distribute, use and display any portion of the Covered 27 * Code in any form, with the right to sublicense such rights; and 28 * 29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 30 * license (with the right to sublicense), under only those claims of Intel 31 * patents that are infringed by the Original Intel Code, to make, use, sell, 32 * offer to sell, and import the Covered Code and derivative works thereof 33 * solely to the minimum extent necessary to exercise the above copyright 34 * license, and in no event shall the patent license extend to any additions 35 * to or modifications of the Original Intel Code. No other license or right 36 * is granted directly or by implication, estoppel or otherwise; 37 * 38 * The above copyright and patent license is granted only if the following 39 * conditions are met: 40 * 41 * 3. Conditions 42 * 43 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 44 * Redistribution of source code of any substantial portion of the Covered 45 * Code or modification with rights to further distribute source must include 46 * the above Copyright Notice, the above License, this list of Conditions, 47 * and the following Disclaimer and Export Compliance provision. In addition, 48 * Licensee must cause all Covered Code to which Licensee contributes to 49 * contain a file documenting the changes Licensee made to create that Covered 50 * Code and the date of any change. Licensee must include in that file the 51 * documentation of any changes made by any predecessor Licensee. Licensee 52 * must include a prominent statement that the modification is derived, 53 * directly or indirectly, from Original Intel Code. 54 * 55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 56 * Redistribution of source code of any substantial portion of the Covered 57 * Code or modification without rights to further distribute source must 58 * include the following Disclaimer and Export Compliance provision in the 59 * documentation and/or other materials provided with distribution. In 60 * addition, Licensee may not authorize further sublicense of source of any 61 * portion of the Covered Code, and must include terms to the effect that the 62 * license from Licensee to its licensee is limited to the intellectual 63 * property embodied in the software Licensee provides to its licensee, and 64 * not to intellectual property embodied in modifications its licensee may 65 * make. 66 * 67 * 3.3. Redistribution of Executable. Redistribution in executable form of any 68 * substantial portion of the Covered Code or modification must reproduce the 69 * above Copyright Notice, and the following Disclaimer and Export Compliance 70 * provision in the documentation and/or other materials provided with the 71 * distribution. 72 * 73 * 3.4. Intel retains all right, title, and interest in and to the Original 74 * Intel Code. 75 * 76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 77 * Intel shall be used in advertising or otherwise to promote the sale, use or 78 * other dealings in products derived from or relating to the Covered Code 79 * without prior written authorization from Intel. 80 * 81 * 4. Disclaimer and Export Compliance 82 * 83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 84 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 86 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 87 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 89 * PARTICULAR PURPOSE. 90 * 91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 98 * LIMITED REMEDY. 99 * 100 * 4.3. Licensee shall not export, either directly or indirectly, any of this 101 * software or system incorporating such software without first obtaining any 102 * required license or other approval from the U. S. Department of Commerce or 103 * any other agency or department of the United States Government. In the 104 * event Licensee exports any such software from the United States or 105 * re-exports any such software from a foreign destination, Licensee shall 106 * ensure that the distribution and export/re-export of the software is in 107 * compliance with all laws, regulations, orders, or other restrictions of the 108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 109 * any of its subsidiaries will export/re-export any technical data, process, 110 * software, or service, directly or indirectly, to any country for which the 111 * United States government or any agency thereof requires an export license, 112 * other governmental approval, or letter of assurance, without first obtaining 113 * such license, approval or letter. 114 * 115 *****************************************************************************/ 116 117 118 #ifndef __ASLCOMPILER_H 119 #define __ASLCOMPILER_H 120 121 122 /* Microsoft-specific */ 123 124 #if (defined WIN32 || defined WIN64) 125 126 /* warn : used #pragma pack */ 127 #pragma warning(disable:4103) 128 129 /* warn : named type definition in parentheses */ 130 #pragma warning(disable:4115) 131 #endif 132 133 #include <stdio.h> 134 #include <stdlib.h> 135 #include <stdarg.h> 136 #include <string.h> 137 #include <errno.h> 138 #include <ctype.h> 139 140 141 #include <contrib/dev/acpica/include/acpi.h> 142 #include <contrib/dev/acpica/include/accommon.h> 143 #include <contrib/dev/acpica/include/amlresrc.h> 144 #include <contrib/dev/acpica/include/acdebug.h> 145 146 /* Compiler headers */ 147 148 #include <contrib/dev/acpica/compiler/asldefine.h> 149 #include <contrib/dev/acpica/compiler/asltypes.h> 150 #include <contrib/dev/acpica/compiler/aslglobal.h> 151 152 153 /******************************************************************************* 154 * 155 * Compiler prototypes 156 * 157 ******************************************************************************/ 158 159 /* 160 * parser - generated from flex/bison, lex/yacc, etc. 161 */ 162 int 163 AslCompilerparse( 164 void); 165 166 ACPI_PARSE_OBJECT * 167 AslDoError ( 168 void); 169 170 int 171 AslCompilerlex( 172 void); 173 174 void 175 ResetCurrentLineBuffer ( 176 void); 177 178 void 179 InsertLineBuffer ( 180 int SourceChar); 181 182 int 183 AslPopInputFileStack ( 184 void); 185 186 void 187 AslPushInputFileStack ( 188 FILE *InputFile, 189 char *Filename); 190 191 /* 192 * aslstartup - entered from main() 193 */ 194 void 195 AslInitializeGlobals ( 196 void); 197 198 typedef 199 ACPI_STATUS (*ASL_PATHNAME_CALLBACK) ( 200 char *); 201 202 ACPI_STATUS 203 AslDoOnePathname ( 204 char *Pathname, 205 ASL_PATHNAME_CALLBACK Callback); 206 207 ACPI_STATUS 208 AslDoOneFile ( 209 char *Filename); 210 211 /* 212 * aslcompile - compile mainline 213 */ 214 void 215 AslCompilerSignon ( 216 UINT32 FileId); 217 218 void 219 AslCompilerFileHeader ( 220 UINT32 FileId); 221 222 int 223 CmDoCompile ( 224 void); 225 226 void 227 CmDoOutputFiles ( 228 void); 229 230 void 231 CmCleanupAndExit ( 232 void); 233 234 ACPI_STATUS 235 FlCheckForAscii ( 236 ASL_FILE_INFO *FileInfo); 237 238 239 /* 240 * aslanalyze - semantic analysis 241 */ 242 ACPI_STATUS 243 AnOtherSemanticAnalysisWalkBegin ( 244 ACPI_PARSE_OBJECT *Op, 245 UINT32 Level, 246 void *Context); 247 248 ACPI_STATUS 249 AnOtherSemanticAnalysisWalkEnd ( 250 ACPI_PARSE_OBJECT *Op, 251 UINT32 Level, 252 void *Context); 253 254 ACPI_STATUS 255 AnOperandTypecheckWalkBegin ( 256 ACPI_PARSE_OBJECT *Op, 257 UINT32 Level, 258 void *Context); 259 260 ACPI_STATUS 261 AnOperandTypecheckWalkEnd ( 262 ACPI_PARSE_OBJECT *Op, 263 UINT32 Level, 264 void *Context); 265 266 ACPI_STATUS 267 AnMethodAnalysisWalkBegin ( 268 ACPI_PARSE_OBJECT *Op, 269 UINT32 Level, 270 void *Context); 271 272 ACPI_STATUS 273 AnMethodAnalysisWalkEnd ( 274 ACPI_PARSE_OBJECT *Op, 275 UINT32 Level, 276 void *Context); 277 278 ACPI_STATUS 279 AnMethodTypingWalkBegin ( 280 ACPI_PARSE_OBJECT *Op, 281 UINT32 Level, 282 void *Context); 283 284 ACPI_STATUS 285 AnMethodTypingWalkEnd ( 286 ACPI_PARSE_OBJECT *Op, 287 UINT32 Level, 288 void *Context); 289 290 291 /* 292 * aslerror - error handling/reporting 293 */ 294 void 295 AslError ( 296 UINT8 Level, 297 UINT8 MessageId, 298 ACPI_PARSE_OBJECT *Op, 299 char *ExtraMessage); 300 301 void 302 AslCoreSubsystemError ( 303 ACPI_PARSE_OBJECT *Op, 304 ACPI_STATUS Status, 305 char *ExtraMessage, 306 BOOLEAN Abort); 307 308 int 309 AslCompilererror( 310 char *s); 311 312 void 313 AslCommonError ( 314 UINT8 Level, 315 UINT8 MessageId, 316 UINT32 CurrentLineNumber, 317 UINT32 LogicalLineNumber, 318 UINT32 LogicalByteOffset, 319 UINT32 Column, 320 char *Filename, 321 char *ExtraMessage); 322 323 void 324 AePrintException ( 325 UINT32 FileId, 326 ASL_ERROR_MSG *Enode, 327 char *Header); 328 329 void 330 AePrintErrorLog ( 331 UINT32 FileId); 332 333 void 334 AeClearErrorLog ( 335 void); 336 337 ACPI_PHYSICAL_ADDRESS 338 AeLocalGetRootPointer ( 339 void); 340 341 342 /* 343 * asllisting - generate all "listing" type files 344 */ 345 void 346 LsDoListings ( 347 void); 348 349 void 350 LsWriteNodeToAsmListing ( 351 ACPI_PARSE_OBJECT *Op); 352 353 void 354 LsWriteNode ( 355 ACPI_PARSE_OBJECT *Op, 356 UINT32 FileId); 357 358 void 359 LsDoHexOutput ( 360 void); 361 362 void 363 LsDumpParseTree ( 364 void); 365 366 /* 367 * aslfold - constant folding 368 */ 369 ACPI_STATUS 370 OpcAmlConstantWalk ( 371 ACPI_PARSE_OBJECT *Op, 372 UINT32 Level, 373 void *Context); 374 375 376 /* 377 * aslopcodes - generate AML opcodes 378 */ 379 ACPI_STATUS 380 OpcAmlOpcodeWalk ( 381 ACPI_PARSE_OBJECT *Op, 382 UINT32 Level, 383 void *Context); 384 385 ACPI_STATUS 386 OpcAmlOpcodeUpdateWalk ( 387 ACPI_PARSE_OBJECT *Op, 388 UINT32 Level, 389 void *Context); 390 391 void 392 OpcGenerateAmlOpcode ( 393 ACPI_PARSE_OBJECT *Op); 394 395 UINT32 396 OpcSetOptimalIntegerSize ( 397 ACPI_PARSE_OBJECT *Op); 398 399 void 400 OpcGetIntegerWidth ( 401 ACPI_PARSE_OBJECT *Op); 402 403 404 /* 405 * asloperands - generate AML operands for the AML opcodes 406 */ 407 ACPI_PARSE_OBJECT * 408 UtGetArg ( 409 ACPI_PARSE_OBJECT *Op, 410 UINT32 Argn); 411 412 void 413 OpnGenerateAmlOperands ( 414 ACPI_PARSE_OBJECT *Op); 415 416 void 417 OpnDoPackage ( 418 ACPI_PARSE_OBJECT *Op); 419 420 421 /* 422 * aslopt - optmization 423 */ 424 void 425 OptOptimizeNamePath ( 426 ACPI_PARSE_OBJECT *Op, 427 UINT32 Flags, 428 ACPI_WALK_STATE *WalkState, 429 char *AmlNameString, 430 ACPI_NAMESPACE_NODE *TargetNode); 431 432 433 /* 434 * aslcodegen - code generation 435 */ 436 void 437 CgGenerateAmlOutput ( 438 void); 439 440 441 /* 442 * aslfile 443 */ 444 void 445 FlOpenFile ( 446 UINT32 FileId, 447 char *Filename, 448 char *Mode); 449 450 451 /* 452 * asllength - calculate/adjust AML package lengths 453 */ 454 ACPI_STATUS 455 LnPackageLengthWalk ( 456 ACPI_PARSE_OBJECT *Op, 457 UINT32 Level, 458 void *Context); 459 460 ACPI_STATUS 461 LnInitLengthsWalk ( 462 ACPI_PARSE_OBJECT *Op, 463 UINT32 Level, 464 void *Context); 465 466 void 467 CgGenerateAmlLengths ( 468 ACPI_PARSE_OBJECT *Op); 469 470 471 /* 472 * aslmap - opcode mappings and reserved method names 473 */ 474 ACPI_OBJECT_TYPE 475 AslMapNamedOpcodeToDataType ( 476 UINT16 Opcode); 477 478 479 /* 480 * aslpredef - ACPI predefined names support 481 */ 482 void 483 ApCheckForPredefinedMethod ( 484 ACPI_PARSE_OBJECT *Op, 485 ASL_METHOD_INFO *MethodInfo); 486 487 void 488 ApCheckPredefinedReturnValue ( 489 ACPI_PARSE_OBJECT *Op, 490 ASL_METHOD_INFO *MethodInfo); 491 492 UINT32 493 ApCheckForPredefinedName ( 494 ACPI_PARSE_OBJECT *Op, 495 char *Name); 496 497 void 498 ApCheckForPredefinedObject ( 499 ACPI_PARSE_OBJECT *Op, 500 char *Name); 501 502 void 503 ApDisplayReservedNames ( 504 void); 505 506 507 /* 508 * asltransform - parse tree transformations 509 */ 510 ACPI_STATUS 511 TrAmlTransformWalk ( 512 ACPI_PARSE_OBJECT *Op, 513 UINT32 Level, 514 void *Context); 515 516 517 /* 518 * asltree - parse tree support 519 */ 520 ACPI_STATUS 521 TrWalkParseTree ( 522 ACPI_PARSE_OBJECT *Op, 523 UINT32 Visitation, 524 ASL_WALK_CALLBACK DescendingCallback, 525 ASL_WALK_CALLBACK AscendingCallback, 526 void *Context); 527 528 /* Values for "Visitation" parameter above */ 529 530 #define ASL_WALK_VISIT_DOWNWARD 0x01 531 #define ASL_WALK_VISIT_UPWARD 0x02 532 #define ASL_WALK_VISIT_TWICE (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD) 533 534 535 ACPI_PARSE_OBJECT * 536 TrAllocateNode ( 537 UINT32 ParseOpcode); 538 539 void 540 TrReleaseNode ( 541 ACPI_PARSE_OBJECT *Op); 542 543 ACPI_PARSE_OBJECT * 544 TrUpdateNode ( 545 UINT32 ParseOpcode, 546 ACPI_PARSE_OBJECT *Op); 547 548 ACPI_PARSE_OBJECT * 549 TrCreateNode ( 550 UINT32 ParseOpcode, 551 UINT32 NumChildren, 552 ...); 553 554 ACPI_PARSE_OBJECT * 555 TrCreateLeafNode ( 556 UINT32 ParseOpcode); 557 558 ACPI_PARSE_OBJECT * 559 TrCreateValuedLeafNode ( 560 UINT32 ParseOpcode, 561 UINT64 Value); 562 563 ACPI_PARSE_OBJECT * 564 TrLinkChildren ( 565 ACPI_PARSE_OBJECT *Op, 566 UINT32 NumChildren, 567 ...); 568 569 void 570 TrSetEndLineNumber ( 571 ACPI_PARSE_OBJECT *Op); 572 573 void 574 TrWalkTree ( 575 void); 576 577 ACPI_PARSE_OBJECT * 578 TrLinkPeerNode ( 579 ACPI_PARSE_OBJECT *Op1, 580 ACPI_PARSE_OBJECT *Op2); 581 582 ACPI_PARSE_OBJECT * 583 TrLinkChildNode ( 584 ACPI_PARSE_OBJECT *Op1, 585 ACPI_PARSE_OBJECT *Op2); 586 587 ACPI_PARSE_OBJECT * 588 TrSetNodeFlags ( 589 ACPI_PARSE_OBJECT *Op, 590 UINT32 Flags); 591 592 ACPI_PARSE_OBJECT * 593 TrLinkPeerNodes ( 594 UINT32 NumPeers, 595 ...); 596 597 598 /* 599 * aslfiles - File I/O support 600 */ 601 void 602 AslAbort ( 603 void); 604 605 void 606 FlAddIncludeDirectory ( 607 char *Dir); 608 609 void 610 FlOpenIncludeFile ( 611 ACPI_PARSE_OBJECT *Op); 612 613 void 614 FlFileError ( 615 UINT32 FileId, 616 UINT8 ErrorId); 617 618 UINT32 619 FlGetFileSize ( 620 UINT32 FileId); 621 622 ACPI_STATUS 623 FlReadFile ( 624 UINT32 FileId, 625 void *Buffer, 626 UINT32 Length); 627 628 void 629 FlWriteFile ( 630 UINT32 FileId, 631 void *Buffer, 632 UINT32 Length); 633 634 void 635 FlSeekFile ( 636 UINT32 FileId, 637 long Offset); 638 639 void 640 FlCloseFile ( 641 UINT32 FileId); 642 643 void 644 FlPrintFile ( 645 UINT32 FileId, 646 char *Format, 647 ...); 648 649 void 650 FlSetLineNumber ( 651 ACPI_PARSE_OBJECT *Op); 652 653 ACPI_STATUS 654 FlOpenInputFile ( 655 char *InputFilename); 656 657 ACPI_STATUS 658 FlOpenAmlOutputFile ( 659 char *InputFilename); 660 661 ACPI_STATUS 662 FlOpenMiscOutputFiles ( 663 char *InputFilename); 664 665 666 /* 667 * asload - load namespace in prep for cross reference 668 */ 669 ACPI_STATUS 670 LdLoadNamespace ( 671 ACPI_PARSE_OBJECT *RootOp); 672 673 674 /* 675 * asllookup - namespace cross reference 676 */ 677 ACPI_STATUS 678 LkCrossReferenceNamespace ( 679 void); 680 681 void 682 LkFindUnreferencedObjects ( 683 void); 684 685 ACPI_STATUS 686 LsDisplayNamespace ( 687 void); 688 689 690 /* 691 * aslutils - common compiler utilites 692 */ 693 void 694 DbgPrint ( 695 UINT32 Type, 696 char *Format, 697 ...); 698 699 /* Type values for above */ 700 701 #define ASL_DEBUG_OUTPUT 0 702 #define ASL_PARSE_OUTPUT 1 703 #define ASL_TREE_OUTPUT 2 704 705 void 706 UtDisplaySupportedTables ( 707 void); 708 709 void 710 UtDisplayConstantOpcodes ( 711 void); 712 713 UINT8 714 UtBeginEvent ( 715 char *Name); 716 717 void 718 UtEndEvent ( 719 UINT8 Event); 720 721 void * 722 UtLocalCalloc ( 723 UINT32 Size); 724 725 void 726 UtPrintFormattedName ( 727 UINT16 ParseOpcode, 728 UINT32 Level); 729 730 void 731 UtDisplaySummary ( 732 UINT32 FileId); 733 734 UINT8 735 UtHexCharToValue ( 736 int HexChar); 737 738 void 739 UtConvertByteToHex ( 740 UINT8 RawByte, 741 UINT8 *Buffer); 742 743 void 744 UtConvertByteToAsmHex ( 745 UINT8 RawByte, 746 UINT8 *Buffer); 747 748 char * 749 UtGetOpName ( 750 UINT32 ParseOpcode); 751 752 void 753 UtSetParseOpName ( 754 ACPI_PARSE_OBJECT *Op); 755 756 char * 757 UtGetStringBuffer ( 758 UINT32 Length); 759 760 ACPI_STATUS 761 UtInternalizeName ( 762 char *ExternalName, 763 char **ConvertedName); 764 765 void 766 UtAttachNamepathToOwner ( 767 ACPI_PARSE_OBJECT *Op, 768 ACPI_PARSE_OBJECT *NameNode); 769 770 ACPI_PARSE_OBJECT * 771 UtCheckIntegerRange ( 772 ACPI_PARSE_OBJECT *Op, 773 UINT32 LowValue, 774 UINT32 HighValue); 775 776 UINT64 777 UtDoConstant ( 778 char *String); 779 780 781 /* 782 * aslresource - Resource template generation utilities 783 */ 784 void 785 RsSmallAddressCheck ( 786 UINT8 Type, 787 UINT32 Minimum, 788 UINT32 Maximum, 789 UINT32 Length, 790 UINT32 Alignment, 791 ACPI_PARSE_OBJECT *MinOp, 792 ACPI_PARSE_OBJECT *MaxOp, 793 ACPI_PARSE_OBJECT *LengthOp, 794 ACPI_PARSE_OBJECT *AlignOp); 795 796 void 797 RsLargeAddressCheck ( 798 UINT64 Minimum, 799 UINT64 Maximum, 800 UINT64 Length, 801 UINT64 Granularity, 802 UINT8 Flags, 803 ACPI_PARSE_OBJECT *MinOp, 804 ACPI_PARSE_OBJECT *MaxOp, 805 ACPI_PARSE_OBJECT *LengthOp, 806 ACPI_PARSE_OBJECT *GranOp); 807 808 UINT16 809 RsGetStringDataLength ( 810 ACPI_PARSE_OBJECT *InitializerOp); 811 812 ASL_RESOURCE_NODE * 813 RsAllocateResourceNode ( 814 UINT32 Size); 815 816 void 817 RsCreateBitField ( 818 ACPI_PARSE_OBJECT *Op, 819 char *Name, 820 UINT32 ByteOffset, 821 UINT32 BitOffset); 822 823 void 824 RsCreateByteField ( 825 ACPI_PARSE_OBJECT *Op, 826 char *Name, 827 UINT32 ByteOffset); 828 829 void 830 RsSetFlagBits ( 831 UINT8 *Flags, 832 ACPI_PARSE_OBJECT *Op, 833 UINT8 Position, 834 UINT8 DefaultBit); 835 836 ACPI_PARSE_OBJECT * 837 RsCompleteNodeAndGetNext ( 838 ACPI_PARSE_OBJECT *Op); 839 840 void 841 RsCheckListForDuplicates ( 842 ACPI_PARSE_OBJECT *Op); 843 844 ASL_RESOURCE_NODE * 845 RsDoOneResourceDescriptor ( 846 ACPI_PARSE_OBJECT *DescriptorTypeOp, 847 UINT32 CurrentByteOffset, 848 UINT8 *State); 849 850 /* Values for State above */ 851 852 #define ACPI_RSTATE_NORMAL 0 853 #define ACPI_RSTATE_START_DEPENDENT 1 854 #define ACPI_RSTATE_DEPENDENT_LIST 2 855 856 UINT32 857 RsLinkDescriptorChain ( 858 ASL_RESOURCE_NODE **PreviousRnode, 859 ASL_RESOURCE_NODE *Rnode); 860 861 void 862 RsDoResourceTemplate ( 863 ACPI_PARSE_OBJECT *Op); 864 865 866 /* 867 * aslrestype1 - Miscellaneous Small descriptors 868 */ 869 ASL_RESOURCE_NODE * 870 RsDoEndTagDescriptor ( 871 ACPI_PARSE_OBJECT *Op, 872 UINT32 CurrentByteOffset); 873 874 ASL_RESOURCE_NODE * 875 RsDoEndDependentDescriptor ( 876 ACPI_PARSE_OBJECT *Op, 877 UINT32 CurrentByteOffset); 878 879 ASL_RESOURCE_NODE * 880 RsDoMemory24Descriptor ( 881 ACPI_PARSE_OBJECT *Op, 882 UINT32 CurrentByteOffset); 883 884 ASL_RESOURCE_NODE * 885 RsDoMemory32Descriptor ( 886 ACPI_PARSE_OBJECT *Op, 887 UINT32 CurrentByteOffset); 888 889 ASL_RESOURCE_NODE * 890 RsDoMemory32FixedDescriptor ( 891 ACPI_PARSE_OBJECT *Op, 892 UINT32 CurrentByteOffset); 893 894 ASL_RESOURCE_NODE * 895 RsDoStartDependentDescriptor ( 896 ACPI_PARSE_OBJECT *Op, 897 UINT32 CurrentByteOffset); 898 899 ASL_RESOURCE_NODE * 900 RsDoStartDependentNoPriDescriptor ( 901 ACPI_PARSE_OBJECT *Op, 902 UINT32 CurrentByteOffset); 903 904 ASL_RESOURCE_NODE * 905 RsDoVendorSmallDescriptor ( 906 ACPI_PARSE_OBJECT *Op, 907 UINT32 CurrentByteOffset); 908 909 910 /* 911 * aslrestype1i - I/O-related Small descriptors 912 */ 913 ASL_RESOURCE_NODE * 914 RsDoDmaDescriptor ( 915 ACPI_PARSE_OBJECT *Op, 916 UINT32 CurrentByteOffset); 917 918 ASL_RESOURCE_NODE * 919 RsDoFixedIoDescriptor ( 920 ACPI_PARSE_OBJECT *Op, 921 UINT32 CurrentByteOffset); 922 923 ASL_RESOURCE_NODE * 924 RsDoIoDescriptor ( 925 ACPI_PARSE_OBJECT *Op, 926 UINT32 CurrentByteOffset); 927 928 ASL_RESOURCE_NODE * 929 RsDoIrqDescriptor ( 930 ACPI_PARSE_OBJECT *Op, 931 UINT32 CurrentByteOffset); 932 933 ASL_RESOURCE_NODE * 934 RsDoIrqNoFlagsDescriptor ( 935 ACPI_PARSE_OBJECT *Op, 936 UINT32 CurrentByteOffset); 937 938 939 /* 940 * aslrestype2 - Large resource descriptors 941 */ 942 ASL_RESOURCE_NODE * 943 RsDoInterruptDescriptor ( 944 ACPI_PARSE_OBJECT *Op, 945 UINT32 CurrentByteOffset); 946 947 ASL_RESOURCE_NODE * 948 RsDoVendorLargeDescriptor ( 949 ACPI_PARSE_OBJECT *Op, 950 UINT32 CurrentByteOffset); 951 952 ASL_RESOURCE_NODE * 953 RsDoGeneralRegisterDescriptor ( 954 ACPI_PARSE_OBJECT *Op, 955 UINT32 CurrentByteOffset); 956 957 958 /* 959 * aslrestype2d - DWord address descriptors 960 */ 961 ASL_RESOURCE_NODE * 962 RsDoDwordIoDescriptor ( 963 ACPI_PARSE_OBJECT *Op, 964 UINT32 CurrentByteOffset); 965 966 ASL_RESOURCE_NODE * 967 RsDoDwordMemoryDescriptor ( 968 ACPI_PARSE_OBJECT *Op, 969 UINT32 CurrentByteOffset); 970 971 ASL_RESOURCE_NODE * 972 RsDoDwordSpaceDescriptor ( 973 ACPI_PARSE_OBJECT *Op, 974 UINT32 CurrentByteOffset); 975 976 977 /* 978 * aslrestype2e - Extended address descriptors 979 */ 980 ASL_RESOURCE_NODE * 981 RsDoExtendedIoDescriptor ( 982 ACPI_PARSE_OBJECT *Op, 983 UINT32 CurrentByteOffset); 984 985 ASL_RESOURCE_NODE * 986 RsDoExtendedMemoryDescriptor ( 987 ACPI_PARSE_OBJECT *Op, 988 UINT32 CurrentByteOffset); 989 990 ASL_RESOURCE_NODE * 991 RsDoExtendedSpaceDescriptor ( 992 ACPI_PARSE_OBJECT *Op, 993 UINT32 CurrentByteOffset); 994 995 996 /* 997 * aslrestype2q - QWord address descriptors 998 */ 999 ASL_RESOURCE_NODE * 1000 RsDoQwordIoDescriptor ( 1001 ACPI_PARSE_OBJECT *Op, 1002 UINT32 CurrentByteOffset); 1003 1004 ASL_RESOURCE_NODE * 1005 RsDoQwordMemoryDescriptor ( 1006 ACPI_PARSE_OBJECT *Op, 1007 UINT32 CurrentByteOffset); 1008 1009 ASL_RESOURCE_NODE * 1010 RsDoQwordSpaceDescriptor ( 1011 ACPI_PARSE_OBJECT *Op, 1012 UINT32 CurrentByteOffset); 1013 1014 1015 /* 1016 * aslrestype2w - Word address descriptors 1017 */ 1018 ASL_RESOURCE_NODE * 1019 RsDoWordIoDescriptor ( 1020 ACPI_PARSE_OBJECT *Op, 1021 UINT32 CurrentByteOffset); 1022 1023 ASL_RESOURCE_NODE * 1024 RsDoWordSpaceDescriptor ( 1025 ACPI_PARSE_OBJECT *Op, 1026 UINT32 CurrentByteOffset); 1027 1028 ASL_RESOURCE_NODE * 1029 RsDoWordBusNumberDescriptor ( 1030 ACPI_PARSE_OBJECT *Op, 1031 UINT32 CurrentByteOffset); 1032 1033 /* 1034 * Entry to data table compiler subsystem 1035 */ 1036 ACPI_STATUS 1037 DtDoCompile( 1038 void); 1039 1040 ACPI_STATUS 1041 DtCreateTemplates ( 1042 char *Signature); 1043 1044 #endif /* __ASLCOMPILER_H */ 1045 1046