1 /****************************************************************************** 2 * 3 * Module Name: aslcompiler.h - common include file for iASL 4 * 5 *****************************************************************************/ 6 7 /* 8 * Copyright (C) 2000 - 2012, Intel Corp. 9 * All rights reserved. 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions, and the following disclaimer, 16 * without modification. 17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer 18 * substantially similar to the "NO WARRANTY" disclaimer below 19 * ("Disclaimer") and any redistribution must be conditioned upon 20 * including a substantially similar Disclaimer requirement for further 21 * binary redistribution. 22 * 3. Neither the names of the above-listed copyright holders nor the names 23 * of any contributors may be used to endorse or promote products derived 24 * from this software without specific prior written permission. 25 * 26 * Alternatively, this software may be distributed under the terms of the 27 * GNU General Public License ("GPL") version 2 as published by the Free 28 * Software Foundation. 29 * 30 * NO WARRANTY 31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 * POSSIBILITY OF SUCH DAMAGES. 42 */ 43 44 45 #ifndef __ASLCOMPILER_H 46 #define __ASLCOMPILER_H 47 48 #include <contrib/dev/acpica/include/acpi.h> 49 #include <contrib/dev/acpica/include/accommon.h> 50 #include <contrib/dev/acpica/include/amlresrc.h> 51 #include <contrib/dev/acpica/include/acdebug.h> 52 53 /* Microsoft-specific */ 54 55 #if (defined WIN32 || defined WIN64) 56 57 /* warn : used #pragma pack */ 58 #pragma warning(disable:4103) 59 60 /* warn : named type definition in parentheses */ 61 #pragma warning(disable:4115) 62 #endif 63 64 #include <stdio.h> 65 #include <stdlib.h> 66 #include <stdarg.h> 67 #include <string.h> 68 #include <errno.h> 69 #include <ctype.h> 70 71 /* Compiler headers */ 72 73 #include <contrib/dev/acpica/compiler/asldefine.h> 74 #include <contrib/dev/acpica/compiler/asltypes.h> 75 #include <contrib/dev/acpica/compiler/aslmessages.h> 76 #include <contrib/dev/acpica/compiler/aslglobal.h> 77 #include <contrib/dev/acpica/compiler/preprocess.h> 78 79 80 /******************************************************************************* 81 * 82 * Compiler prototypes 83 * 84 ******************************************************************************/ 85 86 /* 87 * Main ASL parser - generated from flex/bison, lex/yacc, etc. 88 */ 89 ACPI_PARSE_OBJECT * 90 AslDoError ( 91 void); 92 93 int 94 AslCompilerlex( 95 void); 96 97 void 98 AslResetCurrentLineBuffer ( 99 void); 100 101 void 102 AslInsertLineBuffer ( 103 int SourceChar); 104 105 int 106 AslPopInputFileStack ( 107 void); 108 109 void 110 AslPushInputFileStack ( 111 FILE *InputFile, 112 char *Filename); 113 114 /* 115 * aslstartup - entered from main() 116 */ 117 void 118 AslInitializeGlobals ( 119 void); 120 121 typedef 122 ACPI_STATUS (*ASL_PATHNAME_CALLBACK) ( 123 char *); 124 125 ACPI_STATUS 126 AslDoOnePathname ( 127 char *Pathname, 128 ASL_PATHNAME_CALLBACK Callback); 129 130 ACPI_STATUS 131 AslDoOneFile ( 132 char *Filename); 133 134 ACPI_STATUS 135 AslCheckForErrorExit ( 136 void); 137 138 139 /* 140 * aslcompile - compile mainline 141 */ 142 void 143 AslCompilerSignon ( 144 UINT32 FileId); 145 146 void 147 AslCompilerFileHeader ( 148 UINT32 FileId); 149 150 int 151 CmDoCompile ( 152 void); 153 154 void 155 CmDoOutputFiles ( 156 void); 157 158 void 159 CmCleanupAndExit ( 160 void); 161 162 ACPI_STATUS 163 FlCheckForAscii ( 164 FILE *Handle, 165 char *Filename, 166 BOOLEAN DisplayErrors); 167 168 169 /* 170 * aslwalks - semantic analysis and parse tree walks 171 */ 172 ACPI_STATUS 173 AnOtherSemanticAnalysisWalkBegin ( 174 ACPI_PARSE_OBJECT *Op, 175 UINT32 Level, 176 void *Context); 177 178 ACPI_STATUS 179 AnOtherSemanticAnalysisWalkEnd ( 180 ACPI_PARSE_OBJECT *Op, 181 UINT32 Level, 182 void *Context); 183 184 ACPI_STATUS 185 AnOperandTypecheckWalkEnd ( 186 ACPI_PARSE_OBJECT *Op, 187 UINT32 Level, 188 void *Context); 189 190 ACPI_STATUS 191 AnMethodAnalysisWalkBegin ( 192 ACPI_PARSE_OBJECT *Op, 193 UINT32 Level, 194 void *Context); 195 196 ACPI_STATUS 197 AnMethodAnalysisWalkEnd ( 198 ACPI_PARSE_OBJECT *Op, 199 UINT32 Level, 200 void *Context); 201 202 ACPI_STATUS 203 AnMethodTypingWalkEnd ( 204 ACPI_PARSE_OBJECT *Op, 205 UINT32 Level, 206 void *Context); 207 208 209 /* 210 * aslbtypes - bitfield data types 211 */ 212 UINT32 213 AnMapObjTypeToBtype ( 214 ACPI_PARSE_OBJECT *Op); 215 216 UINT32 217 AnMapArgTypeToBtype ( 218 UINT32 ArgType); 219 220 UINT32 221 AnGetBtype ( 222 ACPI_PARSE_OBJECT *Op); 223 224 void 225 AnFormatBtype ( 226 char *Buffer, 227 UINT32 Btype); 228 229 230 /* 231 * aslanalyze - Support functions for parse tree walks 232 */ 233 void 234 AnCheckId ( 235 ACPI_PARSE_OBJECT *Op, 236 ACPI_NAME Type); 237 238 /* Values for Type argument above */ 239 240 #define ASL_TYPE_HID 0 241 #define ASL_TYPE_CID 1 242 243 BOOLEAN 244 AnIsInternalMethod ( 245 ACPI_PARSE_OBJECT *Op); 246 247 UINT32 248 AnGetInternalMethodReturnType ( 249 ACPI_PARSE_OBJECT *Op); 250 251 BOOLEAN 252 AnLastStatementIsReturn ( 253 ACPI_PARSE_OBJECT *Op); 254 255 void 256 AnCheckMethodReturnValue ( 257 ACPI_PARSE_OBJECT *Op, 258 const ACPI_OPCODE_INFO *OpInfo, 259 ACPI_PARSE_OBJECT *ArgOp, 260 UINT32 RequiredBtypes, 261 UINT32 ThisNodeBtype); 262 263 BOOLEAN 264 AnIsResultUsed ( 265 ACPI_PARSE_OBJECT *Op); 266 267 void 268 ApCheckForGpeNameConflict ( 269 ACPI_PARSE_OBJECT *Op); 270 271 void 272 ApCheckRegMethod ( 273 ACPI_PARSE_OBJECT *Op); 274 275 276 /* 277 * aslerror - error handling/reporting 278 */ 279 void 280 AslError ( 281 UINT8 Level, 282 UINT8 MessageId, 283 ACPI_PARSE_OBJECT *Op, 284 char *ExtraMessage); 285 286 void 287 AslCoreSubsystemError ( 288 ACPI_PARSE_OBJECT *Op, 289 ACPI_STATUS Status, 290 char *ExtraMessage, 291 BOOLEAN Abort); 292 293 int 294 AslCompilererror( 295 const char *s); 296 297 void 298 AslCommonError ( 299 UINT8 Level, 300 UINT8 MessageId, 301 UINT32 CurrentLineNumber, 302 UINT32 LogicalLineNumber, 303 UINT32 LogicalByteOffset, 304 UINT32 Column, 305 char *Filename, 306 char *ExtraMessage); 307 308 void 309 AslCommonError2 ( 310 UINT8 Level, 311 UINT8 MessageId, 312 UINT32 LineNumber, 313 UINT32 Column, 314 char *SourceLine, 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 BOOLEAN 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 TrCreateConstantLeafNode ( 560 UINT32 ParseOpcode); 561 562 ACPI_PARSE_OBJECT * 563 TrLinkChildren ( 564 ACPI_PARSE_OBJECT *Op, 565 UINT32 NumChildren, 566 ...); 567 568 void 569 TrSetEndLineNumber ( 570 ACPI_PARSE_OBJECT *Op); 571 572 void 573 TrWalkTree ( 574 void); 575 576 ACPI_PARSE_OBJECT * 577 TrLinkPeerNode ( 578 ACPI_PARSE_OBJECT *Op1, 579 ACPI_PARSE_OBJECT *Op2); 580 581 ACPI_PARSE_OBJECT * 582 TrLinkChildNode ( 583 ACPI_PARSE_OBJECT *Op1, 584 ACPI_PARSE_OBJECT *Op2); 585 586 ACPI_PARSE_OBJECT * 587 TrSetNodeFlags ( 588 ACPI_PARSE_OBJECT *Op, 589 UINT32 Flags); 590 591 ACPI_PARSE_OBJECT * 592 TrSetNodeAmlLength ( 593 ACPI_PARSE_OBJECT *Op, 594 UINT32 Length); 595 596 ACPI_PARSE_OBJECT * 597 TrLinkPeerNodes ( 598 UINT32 NumPeers, 599 ...); 600 601 602 /* 603 * aslfiles - File I/O support 604 */ 605 void 606 AslAbort ( 607 void); 608 609 void 610 FlAddIncludeDirectory ( 611 char *Dir); 612 613 char * 614 FlMergePathnames ( 615 char *PrefixDir, 616 char *FilePathname); 617 618 void 619 FlOpenIncludeFile ( 620 ACPI_PARSE_OBJECT *Op); 621 622 void 623 FlFileError ( 624 UINT32 FileId, 625 UINT8 ErrorId); 626 627 UINT32 628 FlGetFileSize ( 629 UINT32 FileId); 630 631 ACPI_STATUS 632 FlReadFile ( 633 UINT32 FileId, 634 void *Buffer, 635 UINT32 Length); 636 637 void 638 FlWriteFile ( 639 UINT32 FileId, 640 void *Buffer, 641 UINT32 Length); 642 643 void 644 FlSeekFile ( 645 UINT32 FileId, 646 long Offset); 647 648 void 649 FlCloseFile ( 650 UINT32 FileId); 651 652 void 653 FlPrintFile ( 654 UINT32 FileId, 655 char *Format, 656 ...); 657 658 void 659 FlDeleteFile ( 660 UINT32 FileId); 661 662 void 663 FlSetLineNumber ( 664 UINT32 LineNumber); 665 666 void 667 FlSetFilename ( 668 char *Filename); 669 670 ACPI_STATUS 671 FlOpenInputFile ( 672 char *InputFilename); 673 674 ACPI_STATUS 675 FlOpenAmlOutputFile ( 676 char *InputFilename); 677 678 ACPI_STATUS 679 FlOpenMiscOutputFiles ( 680 char *InputFilename); 681 682 683 /* 684 * asload - load namespace in prep for cross reference 685 */ 686 ACPI_STATUS 687 LdLoadNamespace ( 688 ACPI_PARSE_OBJECT *RootOp); 689 690 691 /* 692 * asllookup - namespace cross reference 693 */ 694 ACPI_STATUS 695 LkCrossReferenceNamespace ( 696 void); 697 698 void 699 LkFindUnreferencedObjects ( 700 void); 701 702 ACPI_STATUS 703 LsDisplayNamespace ( 704 void); 705 706 void 707 LsSetupNsList ( 708 void *Handle); 709 710 711 /* 712 * aslutils - common compiler utilites 713 */ 714 void 715 DbgPrint ( 716 UINT32 Type, 717 char *Format, 718 ...); 719 720 /* Type values for above */ 721 722 #define ASL_DEBUG_OUTPUT 0 723 #define ASL_PARSE_OUTPUT 1 724 #define ASL_TREE_OUTPUT 2 725 726 void 727 UtDisplaySupportedTables ( 728 void); 729 730 void 731 UtDisplayConstantOpcodes ( 732 void); 733 734 UINT8 735 UtBeginEvent ( 736 char *Name); 737 738 void 739 UtEndEvent ( 740 UINT8 Event); 741 742 void * 743 UtLocalCalloc ( 744 UINT32 Size); 745 746 void 747 UtPrintFormattedName ( 748 UINT16 ParseOpcode, 749 UINT32 Level); 750 751 void 752 UtDisplaySummary ( 753 UINT32 FileId); 754 755 UINT8 756 UtHexCharToValue ( 757 int HexChar); 758 759 void 760 UtConvertByteToHex ( 761 UINT8 RawByte, 762 UINT8 *Buffer); 763 764 void 765 UtConvertByteToAsmHex ( 766 UINT8 RawByte, 767 UINT8 *Buffer); 768 769 char * 770 UtGetOpName ( 771 UINT32 ParseOpcode); 772 773 void 774 UtSetParseOpName ( 775 ACPI_PARSE_OBJECT *Op); 776 777 char * 778 UtGetStringBuffer ( 779 UINT32 Length); 780 781 void 782 UtExpandLineBuffers ( 783 void); 784 785 ACPI_STATUS 786 UtInternalizeName ( 787 char *ExternalName, 788 char **ConvertedName); 789 790 void 791 UtAttachNamepathToOwner ( 792 ACPI_PARSE_OBJECT *Op, 793 ACPI_PARSE_OBJECT *NameNode); 794 795 ACPI_PARSE_OBJECT * 796 UtCheckIntegerRange ( 797 ACPI_PARSE_OBJECT *Op, 798 UINT32 LowValue, 799 UINT32 HighValue); 800 801 UINT64 802 UtDoConstant ( 803 char *String); 804 805 ACPI_STATUS 806 UtStrtoul64 ( 807 char *String, 808 UINT32 Base, 809 UINT64 *RetInteger); 810 811 812 /* 813 * asluuid - UUID support 814 */ 815 ACPI_STATUS 816 AuValidateUuid ( 817 char *InString); 818 819 ACPI_STATUS 820 AuConvertStringToUuid ( 821 char *InString, 822 char *UuIdBuffer); 823 824 ACPI_STATUS 825 AuConvertUuidToString ( 826 char *UuIdBuffer, 827 char *OutString); 828 829 /* 830 * aslresource - Resource template generation utilities 831 */ 832 void 833 RsSmallAddressCheck ( 834 UINT8 Type, 835 UINT32 Minimum, 836 UINT32 Maximum, 837 UINT32 Length, 838 UINT32 Alignment, 839 ACPI_PARSE_OBJECT *MinOp, 840 ACPI_PARSE_OBJECT *MaxOp, 841 ACPI_PARSE_OBJECT *LengthOp, 842 ACPI_PARSE_OBJECT *AlignOp, 843 ACPI_PARSE_OBJECT *Op); 844 845 void 846 RsLargeAddressCheck ( 847 UINT64 Minimum, 848 UINT64 Maximum, 849 UINT64 Length, 850 UINT64 Granularity, 851 UINT8 Flags, 852 ACPI_PARSE_OBJECT *MinOp, 853 ACPI_PARSE_OBJECT *MaxOp, 854 ACPI_PARSE_OBJECT *LengthOp, 855 ACPI_PARSE_OBJECT *GranOp, 856 ACPI_PARSE_OBJECT *Op); 857 858 UINT16 859 RsGetStringDataLength ( 860 ACPI_PARSE_OBJECT *InitializerOp); 861 862 ASL_RESOURCE_NODE * 863 RsAllocateResourceNode ( 864 UINT32 Size); 865 866 void 867 RsCreateResourceField ( 868 ACPI_PARSE_OBJECT *Op, 869 char *Name, 870 UINT32 ByteOffset, 871 UINT32 BitOffset, 872 UINT32 BitLength); 873 874 void 875 RsSetFlagBits ( 876 UINT8 *Flags, 877 ACPI_PARSE_OBJECT *Op, 878 UINT8 Position, 879 UINT8 DefaultBit); 880 881 void 882 RsSetFlagBits16 ( 883 UINT16 *Flags, 884 ACPI_PARSE_OBJECT *Op, 885 UINT8 Position, 886 UINT8 DefaultBit); 887 888 ACPI_PARSE_OBJECT * 889 RsCompleteNodeAndGetNext ( 890 ACPI_PARSE_OBJECT *Op); 891 892 void 893 RsCheckListForDuplicates ( 894 ACPI_PARSE_OBJECT *Op); 895 896 ASL_RESOURCE_NODE * 897 RsDoOneResourceDescriptor ( 898 ACPI_PARSE_OBJECT *DescriptorTypeOp, 899 UINT32 CurrentByteOffset, 900 UINT8 *State); 901 902 /* Values for State above */ 903 904 #define ACPI_RSTATE_NORMAL 0 905 #define ACPI_RSTATE_START_DEPENDENT 1 906 #define ACPI_RSTATE_DEPENDENT_LIST 2 907 908 UINT32 909 RsLinkDescriptorChain ( 910 ASL_RESOURCE_NODE **PreviousRnode, 911 ASL_RESOURCE_NODE *Rnode); 912 913 void 914 RsDoResourceTemplate ( 915 ACPI_PARSE_OBJECT *Op); 916 917 918 /* 919 * aslrestype1 - Miscellaneous Small descriptors 920 */ 921 ASL_RESOURCE_NODE * 922 RsDoEndTagDescriptor ( 923 ACPI_PARSE_OBJECT *Op, 924 UINT32 CurrentByteOffset); 925 926 ASL_RESOURCE_NODE * 927 RsDoEndDependentDescriptor ( 928 ACPI_PARSE_OBJECT *Op, 929 UINT32 CurrentByteOffset); 930 931 ASL_RESOURCE_NODE * 932 RsDoMemory24Descriptor ( 933 ACPI_PARSE_OBJECT *Op, 934 UINT32 CurrentByteOffset); 935 936 ASL_RESOURCE_NODE * 937 RsDoMemory32Descriptor ( 938 ACPI_PARSE_OBJECT *Op, 939 UINT32 CurrentByteOffset); 940 941 ASL_RESOURCE_NODE * 942 RsDoMemory32FixedDescriptor ( 943 ACPI_PARSE_OBJECT *Op, 944 UINT32 CurrentByteOffset); 945 946 ASL_RESOURCE_NODE * 947 RsDoStartDependentDescriptor ( 948 ACPI_PARSE_OBJECT *Op, 949 UINT32 CurrentByteOffset); 950 951 ASL_RESOURCE_NODE * 952 RsDoStartDependentNoPriDescriptor ( 953 ACPI_PARSE_OBJECT *Op, 954 UINT32 CurrentByteOffset); 955 956 ASL_RESOURCE_NODE * 957 RsDoVendorSmallDescriptor ( 958 ACPI_PARSE_OBJECT *Op, 959 UINT32 CurrentByteOffset); 960 961 962 /* 963 * aslrestype1i - I/O-related Small descriptors 964 */ 965 ASL_RESOURCE_NODE * 966 RsDoDmaDescriptor ( 967 ACPI_PARSE_OBJECT *Op, 968 UINT32 CurrentByteOffset); 969 970 ASL_RESOURCE_NODE * 971 RsDoFixedDmaDescriptor ( 972 ACPI_PARSE_OBJECT *Op, 973 UINT32 CurrentByteOffset); 974 975 ASL_RESOURCE_NODE * 976 RsDoFixedIoDescriptor ( 977 ACPI_PARSE_OBJECT *Op, 978 UINT32 CurrentByteOffset); 979 980 ASL_RESOURCE_NODE * 981 RsDoIoDescriptor ( 982 ACPI_PARSE_OBJECT *Op, 983 UINT32 CurrentByteOffset); 984 985 ASL_RESOURCE_NODE * 986 RsDoIrqDescriptor ( 987 ACPI_PARSE_OBJECT *Op, 988 UINT32 CurrentByteOffset); 989 990 ASL_RESOURCE_NODE * 991 RsDoIrqNoFlagsDescriptor ( 992 ACPI_PARSE_OBJECT *Op, 993 UINT32 CurrentByteOffset); 994 995 996 /* 997 * aslrestype2 - Large resource descriptors 998 */ 999 ASL_RESOURCE_NODE * 1000 RsDoInterruptDescriptor ( 1001 ACPI_PARSE_OBJECT *Op, 1002 UINT32 CurrentByteOffset); 1003 1004 ASL_RESOURCE_NODE * 1005 RsDoVendorLargeDescriptor ( 1006 ACPI_PARSE_OBJECT *Op, 1007 UINT32 CurrentByteOffset); 1008 1009 ASL_RESOURCE_NODE * 1010 RsDoGeneralRegisterDescriptor ( 1011 ACPI_PARSE_OBJECT *Op, 1012 UINT32 CurrentByteOffset); 1013 1014 ASL_RESOURCE_NODE * 1015 RsDoGpioIntDescriptor ( 1016 ACPI_PARSE_OBJECT *Op, 1017 UINT32 CurrentByteOffset); 1018 1019 ASL_RESOURCE_NODE * 1020 RsDoGpioIoDescriptor ( 1021 ACPI_PARSE_OBJECT *Op, 1022 UINT32 CurrentByteOffset); 1023 1024 ASL_RESOURCE_NODE * 1025 RsDoI2cSerialBusDescriptor ( 1026 ACPI_PARSE_OBJECT *Op, 1027 UINT32 CurrentByteOffset); 1028 1029 ASL_RESOURCE_NODE * 1030 RsDoSpiSerialBusDescriptor ( 1031 ACPI_PARSE_OBJECT *Op, 1032 UINT32 CurrentByteOffset); 1033 1034 ASL_RESOURCE_NODE * 1035 RsDoUartSerialBusDescriptor ( 1036 ACPI_PARSE_OBJECT *Op, 1037 UINT32 CurrentByteOffset); 1038 1039 /* 1040 * aslrestype2d - DWord address descriptors 1041 */ 1042 ASL_RESOURCE_NODE * 1043 RsDoDwordIoDescriptor ( 1044 ACPI_PARSE_OBJECT *Op, 1045 UINT32 CurrentByteOffset); 1046 1047 ASL_RESOURCE_NODE * 1048 RsDoDwordMemoryDescriptor ( 1049 ACPI_PARSE_OBJECT *Op, 1050 UINT32 CurrentByteOffset); 1051 1052 ASL_RESOURCE_NODE * 1053 RsDoDwordSpaceDescriptor ( 1054 ACPI_PARSE_OBJECT *Op, 1055 UINT32 CurrentByteOffset); 1056 1057 1058 /* 1059 * aslrestype2e - Extended address descriptors 1060 */ 1061 ASL_RESOURCE_NODE * 1062 RsDoExtendedIoDescriptor ( 1063 ACPI_PARSE_OBJECT *Op, 1064 UINT32 CurrentByteOffset); 1065 1066 ASL_RESOURCE_NODE * 1067 RsDoExtendedMemoryDescriptor ( 1068 ACPI_PARSE_OBJECT *Op, 1069 UINT32 CurrentByteOffset); 1070 1071 ASL_RESOURCE_NODE * 1072 RsDoExtendedSpaceDescriptor ( 1073 ACPI_PARSE_OBJECT *Op, 1074 UINT32 CurrentByteOffset); 1075 1076 1077 /* 1078 * aslrestype2q - QWord address descriptors 1079 */ 1080 ASL_RESOURCE_NODE * 1081 RsDoQwordIoDescriptor ( 1082 ACPI_PARSE_OBJECT *Op, 1083 UINT32 CurrentByteOffset); 1084 1085 ASL_RESOURCE_NODE * 1086 RsDoQwordMemoryDescriptor ( 1087 ACPI_PARSE_OBJECT *Op, 1088 UINT32 CurrentByteOffset); 1089 1090 ASL_RESOURCE_NODE * 1091 RsDoQwordSpaceDescriptor ( 1092 ACPI_PARSE_OBJECT *Op, 1093 UINT32 CurrentByteOffset); 1094 1095 1096 /* 1097 * aslrestype2w - Word address descriptors 1098 */ 1099 ASL_RESOURCE_NODE * 1100 RsDoWordIoDescriptor ( 1101 ACPI_PARSE_OBJECT *Op, 1102 UINT32 CurrentByteOffset); 1103 1104 ASL_RESOURCE_NODE * 1105 RsDoWordSpaceDescriptor ( 1106 ACPI_PARSE_OBJECT *Op, 1107 UINT32 CurrentByteOffset); 1108 1109 ASL_RESOURCE_NODE * 1110 RsDoWordBusNumberDescriptor ( 1111 ACPI_PARSE_OBJECT *Op, 1112 UINT32 CurrentByteOffset); 1113 1114 /* 1115 * Entry to data table compiler subsystem 1116 */ 1117 ACPI_STATUS 1118 DtDoCompile( 1119 void); 1120 1121 ACPI_STATUS 1122 DtCreateTemplates ( 1123 char *Signature); 1124 1125 #endif /* __ASLCOMPILER_H */ 1126