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 ACPI_STATUS 199 AslDoOnePathname ( 200 char *Pathname); 201 202 ACPI_STATUS 203 AslDoOneFile ( 204 char *Filename); 205 206 /* 207 * aslcompile - compile mainline 208 */ 209 void 210 AslCompilerSignon ( 211 UINT32 FileId); 212 213 void 214 AslCompilerFileHeader ( 215 UINT32 FileId); 216 217 int 218 CmDoCompile ( 219 void); 220 221 void 222 CmDoOutputFiles ( 223 void); 224 225 void 226 CmCleanupAndExit ( 227 void); 228 229 ACPI_STATUS 230 FlCheckForAscii ( 231 ASL_FILE_INFO *FileInfo); 232 233 234 /* 235 * aslanalyze - semantic analysis 236 */ 237 ACPI_STATUS 238 AnOtherSemanticAnalysisWalkBegin ( 239 ACPI_PARSE_OBJECT *Op, 240 UINT32 Level, 241 void *Context); 242 243 ACPI_STATUS 244 AnOtherSemanticAnalysisWalkEnd ( 245 ACPI_PARSE_OBJECT *Op, 246 UINT32 Level, 247 void *Context); 248 249 ACPI_STATUS 250 AnOperandTypecheckWalkBegin ( 251 ACPI_PARSE_OBJECT *Op, 252 UINT32 Level, 253 void *Context); 254 255 ACPI_STATUS 256 AnOperandTypecheckWalkEnd ( 257 ACPI_PARSE_OBJECT *Op, 258 UINT32 Level, 259 void *Context); 260 261 ACPI_STATUS 262 AnMethodAnalysisWalkBegin ( 263 ACPI_PARSE_OBJECT *Op, 264 UINT32 Level, 265 void *Context); 266 267 ACPI_STATUS 268 AnMethodAnalysisWalkEnd ( 269 ACPI_PARSE_OBJECT *Op, 270 UINT32 Level, 271 void *Context); 272 273 ACPI_STATUS 274 AnMethodTypingWalkBegin ( 275 ACPI_PARSE_OBJECT *Op, 276 UINT32 Level, 277 void *Context); 278 279 ACPI_STATUS 280 AnMethodTypingWalkEnd ( 281 ACPI_PARSE_OBJECT *Op, 282 UINT32 Level, 283 void *Context); 284 285 286 /* 287 * aslerror - error handling/reporting 288 */ 289 void 290 AslError ( 291 UINT8 Level, 292 UINT8 MessageId, 293 ACPI_PARSE_OBJECT *Op, 294 char *ExtraMessage); 295 296 void 297 AslCoreSubsystemError ( 298 ACPI_PARSE_OBJECT *Op, 299 ACPI_STATUS Status, 300 char *ExtraMessage, 301 BOOLEAN Abort); 302 303 int 304 AslCompilererror( 305 char *s); 306 307 void 308 AslCommonError ( 309 UINT8 Level, 310 UINT8 MessageId, 311 UINT32 CurrentLineNumber, 312 UINT32 LogicalLineNumber, 313 UINT32 LogicalByteOffset, 314 UINT32 Column, 315 char *Filename, 316 char *ExtraMessage); 317 318 void 319 AePrintException ( 320 UINT32 FileId, 321 ASL_ERROR_MSG *Enode, 322 char *Header); 323 324 void 325 AePrintErrorLog ( 326 UINT32 FileId); 327 328 void 329 AeClearErrorLog ( 330 void); 331 332 ACPI_PHYSICAL_ADDRESS 333 AeLocalGetRootPointer ( 334 void); 335 336 337 /* 338 * asllisting - generate all "listing" type files 339 */ 340 void 341 LsDoListings ( 342 void); 343 344 void 345 LsWriteNodeToAsmListing ( 346 ACPI_PARSE_OBJECT *Op); 347 348 void 349 LsWriteNode ( 350 ACPI_PARSE_OBJECT *Op, 351 UINT32 FileId); 352 353 void 354 LsDoHexOutput ( 355 void); 356 357 void 358 LsDumpParseTree ( 359 void); 360 361 /* 362 * aslfold - constant folding 363 */ 364 ACPI_STATUS 365 OpcAmlConstantWalk ( 366 ACPI_PARSE_OBJECT *Op, 367 UINT32 Level, 368 void *Context); 369 370 371 /* 372 * aslopcodes - generate AML opcodes 373 */ 374 ACPI_STATUS 375 OpcAmlOpcodeWalk ( 376 ACPI_PARSE_OBJECT *Op, 377 UINT32 Level, 378 void *Context); 379 380 ACPI_STATUS 381 OpcAmlOpcodeUpdateWalk ( 382 ACPI_PARSE_OBJECT *Op, 383 UINT32 Level, 384 void *Context); 385 386 void 387 OpcGenerateAmlOpcode ( 388 ACPI_PARSE_OBJECT *Op); 389 390 UINT32 391 OpcSetOptimalIntegerSize ( 392 ACPI_PARSE_OBJECT *Op); 393 394 void 395 OpcGetIntegerWidth ( 396 ACPI_PARSE_OBJECT *Op); 397 398 399 /* 400 * asloperands - generate AML operands for the AML opcodes 401 */ 402 ACPI_PARSE_OBJECT * 403 UtGetArg ( 404 ACPI_PARSE_OBJECT *Op, 405 UINT32 Argn); 406 407 void 408 OpnGenerateAmlOperands ( 409 ACPI_PARSE_OBJECT *Op); 410 411 void 412 OpnDoPackage ( 413 ACPI_PARSE_OBJECT *Op); 414 415 416 /* 417 * aslopt - optmization 418 */ 419 void 420 OptOptimizeNamePath ( 421 ACPI_PARSE_OBJECT *Op, 422 UINT32 Flags, 423 ACPI_WALK_STATE *WalkState, 424 char *AmlNameString, 425 ACPI_NAMESPACE_NODE *TargetNode); 426 427 428 /* 429 * aslcodegen - code generation 430 */ 431 void 432 CgGenerateAmlOutput ( 433 void); 434 435 436 /* 437 * aslfile 438 */ 439 void 440 FlOpenFile ( 441 UINT32 FileId, 442 char *Filename, 443 char *Mode); 444 445 446 /* 447 * asllength - calculate/adjust AML package lengths 448 */ 449 ACPI_STATUS 450 LnPackageLengthWalk ( 451 ACPI_PARSE_OBJECT *Op, 452 UINT32 Level, 453 void *Context); 454 455 ACPI_STATUS 456 LnInitLengthsWalk ( 457 ACPI_PARSE_OBJECT *Op, 458 UINT32 Level, 459 void *Context); 460 461 void 462 CgGenerateAmlLengths ( 463 ACPI_PARSE_OBJECT *Op); 464 465 466 /* 467 * aslmap - opcode mappings and reserved method names 468 */ 469 ACPI_OBJECT_TYPE 470 AslMapNamedOpcodeToDataType ( 471 UINT16 Opcode); 472 473 474 /* 475 * aslpredef - ACPI predefined names support 476 */ 477 void 478 ApCheckForPredefinedMethod ( 479 ACPI_PARSE_OBJECT *Op, 480 ASL_METHOD_INFO *MethodInfo); 481 482 void 483 ApCheckPredefinedReturnValue ( 484 ACPI_PARSE_OBJECT *Op, 485 ASL_METHOD_INFO *MethodInfo); 486 487 UINT32 488 ApCheckForPredefinedName ( 489 ACPI_PARSE_OBJECT *Op, 490 char *Name); 491 492 void 493 ApCheckForPredefinedObject ( 494 ACPI_PARSE_OBJECT *Op, 495 char *Name); 496 497 void 498 ApDisplayReservedNames ( 499 void); 500 501 502 /* 503 * asltransform - parse tree transformations 504 */ 505 ACPI_STATUS 506 TrAmlTransformWalk ( 507 ACPI_PARSE_OBJECT *Op, 508 UINT32 Level, 509 void *Context); 510 511 512 /* 513 * asltree - parse tree support 514 */ 515 ACPI_STATUS 516 TrWalkParseTree ( 517 ACPI_PARSE_OBJECT *Op, 518 UINT32 Visitation, 519 ASL_WALK_CALLBACK DescendingCallback, 520 ASL_WALK_CALLBACK AscendingCallback, 521 void *Context); 522 523 /* Values for "Visitation" parameter above */ 524 525 #define ASL_WALK_VISIT_DOWNWARD 0x01 526 #define ASL_WALK_VISIT_UPWARD 0x02 527 #define ASL_WALK_VISIT_TWICE (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD) 528 529 530 ACPI_PARSE_OBJECT * 531 TrAllocateNode ( 532 UINT32 ParseOpcode); 533 534 void 535 TrReleaseNode ( 536 ACPI_PARSE_OBJECT *Op); 537 538 ACPI_PARSE_OBJECT * 539 TrUpdateNode ( 540 UINT32 ParseOpcode, 541 ACPI_PARSE_OBJECT *Op); 542 543 ACPI_PARSE_OBJECT * 544 TrCreateNode ( 545 UINT32 ParseOpcode, 546 UINT32 NumChildren, 547 ...); 548 549 ACPI_PARSE_OBJECT * 550 TrCreateLeafNode ( 551 UINT32 ParseOpcode); 552 553 ACPI_PARSE_OBJECT * 554 TrCreateValuedLeafNode ( 555 UINT32 ParseOpcode, 556 UINT64 Value); 557 558 ACPI_PARSE_OBJECT * 559 TrLinkChildren ( 560 ACPI_PARSE_OBJECT *Op, 561 UINT32 NumChildren, 562 ...); 563 564 void 565 TrSetEndLineNumber ( 566 ACPI_PARSE_OBJECT *Op); 567 568 void 569 TrWalkTree ( 570 void); 571 572 ACPI_PARSE_OBJECT * 573 TrLinkPeerNode ( 574 ACPI_PARSE_OBJECT *Op1, 575 ACPI_PARSE_OBJECT *Op2); 576 577 ACPI_PARSE_OBJECT * 578 TrLinkChildNode ( 579 ACPI_PARSE_OBJECT *Op1, 580 ACPI_PARSE_OBJECT *Op2); 581 582 ACPI_PARSE_OBJECT * 583 TrSetNodeFlags ( 584 ACPI_PARSE_OBJECT *Op, 585 UINT32 Flags); 586 587 ACPI_PARSE_OBJECT * 588 TrLinkPeerNodes ( 589 UINT32 NumPeers, 590 ...); 591 592 593 /* 594 * aslfiles - File I/O support 595 */ 596 void 597 AslAbort ( 598 void); 599 600 void 601 FlAddIncludeDirectory ( 602 char *Dir); 603 604 void 605 FlOpenIncludeFile ( 606 ACPI_PARSE_OBJECT *Op); 607 608 void 609 FlFileError ( 610 UINT32 FileId, 611 UINT8 ErrorId); 612 613 UINT32 614 FlGetFileSize ( 615 UINT32 FileId); 616 617 ACPI_STATUS 618 FlReadFile ( 619 UINT32 FileId, 620 void *Buffer, 621 UINT32 Length); 622 623 void 624 FlWriteFile ( 625 UINT32 FileId, 626 void *Buffer, 627 UINT32 Length); 628 629 void 630 FlSeekFile ( 631 UINT32 FileId, 632 long Offset); 633 634 void 635 FlCloseFile ( 636 UINT32 FileId); 637 638 void 639 FlPrintFile ( 640 UINT32 FileId, 641 char *Format, 642 ...); 643 644 void 645 FlSetLineNumber ( 646 ACPI_PARSE_OBJECT *Op); 647 648 ACPI_STATUS 649 FlOpenInputFile ( 650 char *InputFilename); 651 652 ACPI_STATUS 653 FlOpenAmlOutputFile ( 654 char *InputFilename); 655 656 ACPI_STATUS 657 FlOpenMiscOutputFiles ( 658 char *InputFilename); 659 660 661 /* 662 * asload - load namespace in prep for cross reference 663 */ 664 ACPI_STATUS 665 LdLoadNamespace ( 666 ACPI_PARSE_OBJECT *RootOp); 667 668 669 /* 670 * asllookup - namespace cross reference 671 */ 672 ACPI_STATUS 673 LkCrossReferenceNamespace ( 674 void); 675 676 void 677 LkFindUnreferencedObjects ( 678 void); 679 680 ACPI_STATUS 681 LsDisplayNamespace ( 682 void); 683 684 685 /* 686 * aslutils - common compiler utilites 687 */ 688 void 689 DbgPrint ( 690 UINT32 Type, 691 char *Format, 692 ...); 693 694 /* Type values for above */ 695 696 #define ASL_DEBUG_OUTPUT 0 697 #define ASL_PARSE_OUTPUT 1 698 #define ASL_TREE_OUTPUT 2 699 700 void 701 UtDisplaySupportedTables ( 702 void); 703 704 void 705 UtDisplayConstantOpcodes ( 706 void); 707 708 UINT8 709 UtBeginEvent ( 710 char *Name); 711 712 void 713 UtEndEvent ( 714 UINT8 Event); 715 716 void * 717 UtLocalCalloc ( 718 UINT32 Size); 719 720 void 721 UtPrintFormattedName ( 722 UINT16 ParseOpcode, 723 UINT32 Level); 724 725 void 726 UtDisplaySummary ( 727 UINT32 FileId); 728 729 UINT8 730 UtHexCharToValue ( 731 int HexChar); 732 733 void 734 UtConvertByteToHex ( 735 UINT8 RawByte, 736 UINT8 *Buffer); 737 738 void 739 UtConvertByteToAsmHex ( 740 UINT8 RawByte, 741 UINT8 *Buffer); 742 743 char * 744 UtGetOpName ( 745 UINT32 ParseOpcode); 746 747 void 748 UtSetParseOpName ( 749 ACPI_PARSE_OBJECT *Op); 750 751 char * 752 UtGetStringBuffer ( 753 UINT32 Length); 754 755 ACPI_STATUS 756 UtInternalizeName ( 757 char *ExternalName, 758 char **ConvertedName); 759 760 void 761 UtAttachNamepathToOwner ( 762 ACPI_PARSE_OBJECT *Op, 763 ACPI_PARSE_OBJECT *NameNode); 764 765 ACPI_PARSE_OBJECT * 766 UtCheckIntegerRange ( 767 ACPI_PARSE_OBJECT *Op, 768 UINT32 LowValue, 769 UINT32 HighValue); 770 771 UINT64 772 UtDoConstant ( 773 char *String); 774 775 776 /* 777 * aslresource - Resource template generation utilities 778 */ 779 void 780 RsSmallAddressCheck ( 781 UINT8 Type, 782 UINT32 Minimum, 783 UINT32 Maximum, 784 UINT32 Length, 785 UINT32 Alignment, 786 ACPI_PARSE_OBJECT *MinOp, 787 ACPI_PARSE_OBJECT *MaxOp, 788 ACPI_PARSE_OBJECT *LengthOp, 789 ACPI_PARSE_OBJECT *AlignOp); 790 791 void 792 RsLargeAddressCheck ( 793 UINT64 Minimum, 794 UINT64 Maximum, 795 UINT64 Length, 796 UINT64 Granularity, 797 UINT8 Flags, 798 ACPI_PARSE_OBJECT *MinOp, 799 ACPI_PARSE_OBJECT *MaxOp, 800 ACPI_PARSE_OBJECT *LengthOp, 801 ACPI_PARSE_OBJECT *GranOp); 802 803 UINT16 804 RsGetStringDataLength ( 805 ACPI_PARSE_OBJECT *InitializerOp); 806 807 ASL_RESOURCE_NODE * 808 RsAllocateResourceNode ( 809 UINT32 Size); 810 811 void 812 RsCreateBitField ( 813 ACPI_PARSE_OBJECT *Op, 814 char *Name, 815 UINT32 ByteOffset, 816 UINT32 BitOffset); 817 818 void 819 RsCreateByteField ( 820 ACPI_PARSE_OBJECT *Op, 821 char *Name, 822 UINT32 ByteOffset); 823 824 void 825 RsSetFlagBits ( 826 UINT8 *Flags, 827 ACPI_PARSE_OBJECT *Op, 828 UINT8 Position, 829 UINT8 DefaultBit); 830 831 ACPI_PARSE_OBJECT * 832 RsCompleteNodeAndGetNext ( 833 ACPI_PARSE_OBJECT *Op); 834 835 void 836 RsCheckListForDuplicates ( 837 ACPI_PARSE_OBJECT *Op); 838 839 ASL_RESOURCE_NODE * 840 RsDoOneResourceDescriptor ( 841 ACPI_PARSE_OBJECT *DescriptorTypeOp, 842 UINT32 CurrentByteOffset, 843 UINT8 *State); 844 845 /* Values for State above */ 846 847 #define ACPI_RSTATE_NORMAL 0 848 #define ACPI_RSTATE_START_DEPENDENT 1 849 #define ACPI_RSTATE_DEPENDENT_LIST 2 850 851 UINT32 852 RsLinkDescriptorChain ( 853 ASL_RESOURCE_NODE **PreviousRnode, 854 ASL_RESOURCE_NODE *Rnode); 855 856 void 857 RsDoResourceTemplate ( 858 ACPI_PARSE_OBJECT *Op); 859 860 861 /* 862 * aslrestype1 - Miscellaneous Small descriptors 863 */ 864 ASL_RESOURCE_NODE * 865 RsDoEndTagDescriptor ( 866 ACPI_PARSE_OBJECT *Op, 867 UINT32 CurrentByteOffset); 868 869 ASL_RESOURCE_NODE * 870 RsDoEndDependentDescriptor ( 871 ACPI_PARSE_OBJECT *Op, 872 UINT32 CurrentByteOffset); 873 874 ASL_RESOURCE_NODE * 875 RsDoMemory24Descriptor ( 876 ACPI_PARSE_OBJECT *Op, 877 UINT32 CurrentByteOffset); 878 879 ASL_RESOURCE_NODE * 880 RsDoMemory32Descriptor ( 881 ACPI_PARSE_OBJECT *Op, 882 UINT32 CurrentByteOffset); 883 884 ASL_RESOURCE_NODE * 885 RsDoMemory32FixedDescriptor ( 886 ACPI_PARSE_OBJECT *Op, 887 UINT32 CurrentByteOffset); 888 889 ASL_RESOURCE_NODE * 890 RsDoStartDependentDescriptor ( 891 ACPI_PARSE_OBJECT *Op, 892 UINT32 CurrentByteOffset); 893 894 ASL_RESOURCE_NODE * 895 RsDoStartDependentNoPriDescriptor ( 896 ACPI_PARSE_OBJECT *Op, 897 UINT32 CurrentByteOffset); 898 899 ASL_RESOURCE_NODE * 900 RsDoVendorSmallDescriptor ( 901 ACPI_PARSE_OBJECT *Op, 902 UINT32 CurrentByteOffset); 903 904 905 /* 906 * aslrestype1i - I/O-related Small descriptors 907 */ 908 ASL_RESOURCE_NODE * 909 RsDoDmaDescriptor ( 910 ACPI_PARSE_OBJECT *Op, 911 UINT32 CurrentByteOffset); 912 913 ASL_RESOURCE_NODE * 914 RsDoFixedIoDescriptor ( 915 ACPI_PARSE_OBJECT *Op, 916 UINT32 CurrentByteOffset); 917 918 ASL_RESOURCE_NODE * 919 RsDoIoDescriptor ( 920 ACPI_PARSE_OBJECT *Op, 921 UINT32 CurrentByteOffset); 922 923 ASL_RESOURCE_NODE * 924 RsDoIrqDescriptor ( 925 ACPI_PARSE_OBJECT *Op, 926 UINT32 CurrentByteOffset); 927 928 ASL_RESOURCE_NODE * 929 RsDoIrqNoFlagsDescriptor ( 930 ACPI_PARSE_OBJECT *Op, 931 UINT32 CurrentByteOffset); 932 933 934 /* 935 * aslrestype2 - Large resource descriptors 936 */ 937 ASL_RESOURCE_NODE * 938 RsDoInterruptDescriptor ( 939 ACPI_PARSE_OBJECT *Op, 940 UINT32 CurrentByteOffset); 941 942 ASL_RESOURCE_NODE * 943 RsDoVendorLargeDescriptor ( 944 ACPI_PARSE_OBJECT *Op, 945 UINT32 CurrentByteOffset); 946 947 ASL_RESOURCE_NODE * 948 RsDoGeneralRegisterDescriptor ( 949 ACPI_PARSE_OBJECT *Op, 950 UINT32 CurrentByteOffset); 951 952 953 /* 954 * aslrestype2d - DWord address descriptors 955 */ 956 ASL_RESOURCE_NODE * 957 RsDoDwordIoDescriptor ( 958 ACPI_PARSE_OBJECT *Op, 959 UINT32 CurrentByteOffset); 960 961 ASL_RESOURCE_NODE * 962 RsDoDwordMemoryDescriptor ( 963 ACPI_PARSE_OBJECT *Op, 964 UINT32 CurrentByteOffset); 965 966 ASL_RESOURCE_NODE * 967 RsDoDwordSpaceDescriptor ( 968 ACPI_PARSE_OBJECT *Op, 969 UINT32 CurrentByteOffset); 970 971 972 /* 973 * aslrestype2e - Extended address descriptors 974 */ 975 ASL_RESOURCE_NODE * 976 RsDoExtendedIoDescriptor ( 977 ACPI_PARSE_OBJECT *Op, 978 UINT32 CurrentByteOffset); 979 980 ASL_RESOURCE_NODE * 981 RsDoExtendedMemoryDescriptor ( 982 ACPI_PARSE_OBJECT *Op, 983 UINT32 CurrentByteOffset); 984 985 ASL_RESOURCE_NODE * 986 RsDoExtendedSpaceDescriptor ( 987 ACPI_PARSE_OBJECT *Op, 988 UINT32 CurrentByteOffset); 989 990 991 /* 992 * aslrestype2q - QWord address descriptors 993 */ 994 ASL_RESOURCE_NODE * 995 RsDoQwordIoDescriptor ( 996 ACPI_PARSE_OBJECT *Op, 997 UINT32 CurrentByteOffset); 998 999 ASL_RESOURCE_NODE * 1000 RsDoQwordMemoryDescriptor ( 1001 ACPI_PARSE_OBJECT *Op, 1002 UINT32 CurrentByteOffset); 1003 1004 ASL_RESOURCE_NODE * 1005 RsDoQwordSpaceDescriptor ( 1006 ACPI_PARSE_OBJECT *Op, 1007 UINT32 CurrentByteOffset); 1008 1009 1010 /* 1011 * aslrestype2w - Word address descriptors 1012 */ 1013 ASL_RESOURCE_NODE * 1014 RsDoWordIoDescriptor ( 1015 ACPI_PARSE_OBJECT *Op, 1016 UINT32 CurrentByteOffset); 1017 1018 ASL_RESOURCE_NODE * 1019 RsDoWordSpaceDescriptor ( 1020 ACPI_PARSE_OBJECT *Op, 1021 UINT32 CurrentByteOffset); 1022 1023 ASL_RESOURCE_NODE * 1024 RsDoWordBusNumberDescriptor ( 1025 ACPI_PARSE_OBJECT *Op, 1026 UINT32 CurrentByteOffset); 1027 1028 /* 1029 * Entry to data table compiler subsystem 1030 */ 1031 ACPI_STATUS 1032 DtDoCompile( 1033 void); 1034 1035 ACPI_STATUS 1036 DtCreateTemplates ( 1037 char *Signature); 1038 1039 #endif /* __ASLCOMPILER_H */ 1040 1041