153289f6aSNate Lawson 253289f6aSNate Lawson /****************************************************************************** 353289f6aSNate Lawson * 4fba7fc7eSJung-uk Kim * Module Name: aslcompiler.h - common include file for iASL 553289f6aSNate Lawson * 653289f6aSNate Lawson *****************************************************************************/ 753289f6aSNate Lawson 853289f6aSNate Lawson /****************************************************************************** 953289f6aSNate Lawson * 1053289f6aSNate Lawson * 1. Copyright Notice 1153289f6aSNate Lawson * 129a179dd8SJung-uk Kim * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. 1353289f6aSNate Lawson * All rights reserved. 1453289f6aSNate Lawson * 1553289f6aSNate Lawson * 2. License 1653289f6aSNate Lawson * 1753289f6aSNate Lawson * 2.1. This is your license from Intel Corp. under its intellectual property 1853289f6aSNate Lawson * rights. You may have additional license terms from the party that provided 1953289f6aSNate Lawson * you this software, covering your right to use that party's intellectual 2053289f6aSNate Lawson * property rights. 2153289f6aSNate Lawson * 2253289f6aSNate Lawson * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 2353289f6aSNate Lawson * copy of the source code appearing in this file ("Covered Code") an 2453289f6aSNate Lawson * irrevocable, perpetual, worldwide license under Intel's copyrights in the 2553289f6aSNate Lawson * base code distributed originally by Intel ("Original Intel Code") to copy, 2653289f6aSNate Lawson * make derivatives, distribute, use and display any portion of the Covered 2753289f6aSNate Lawson * Code in any form, with the right to sublicense such rights; and 2853289f6aSNate Lawson * 2953289f6aSNate Lawson * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 3053289f6aSNate Lawson * license (with the right to sublicense), under only those claims of Intel 3153289f6aSNate Lawson * patents that are infringed by the Original Intel Code, to make, use, sell, 3253289f6aSNate Lawson * offer to sell, and import the Covered Code and derivative works thereof 3353289f6aSNate Lawson * solely to the minimum extent necessary to exercise the above copyright 3453289f6aSNate Lawson * license, and in no event shall the patent license extend to any additions 3553289f6aSNate Lawson * to or modifications of the Original Intel Code. No other license or right 3653289f6aSNate Lawson * is granted directly or by implication, estoppel or otherwise; 3753289f6aSNate Lawson * 3853289f6aSNate Lawson * The above copyright and patent license is granted only if the following 3953289f6aSNate Lawson * conditions are met: 4053289f6aSNate Lawson * 4153289f6aSNate Lawson * 3. Conditions 4253289f6aSNate Lawson * 4353289f6aSNate Lawson * 3.1. Redistribution of Source with Rights to Further Distribute Source. 4453289f6aSNate Lawson * Redistribution of source code of any substantial portion of the Covered 4553289f6aSNate Lawson * Code or modification with rights to further distribute source must include 4653289f6aSNate Lawson * the above Copyright Notice, the above License, this list of Conditions, 4753289f6aSNate Lawson * and the following Disclaimer and Export Compliance provision. In addition, 4853289f6aSNate Lawson * Licensee must cause all Covered Code to which Licensee contributes to 4953289f6aSNate Lawson * contain a file documenting the changes Licensee made to create that Covered 5053289f6aSNate Lawson * Code and the date of any change. Licensee must include in that file the 5153289f6aSNate Lawson * documentation of any changes made by any predecessor Licensee. Licensee 5253289f6aSNate Lawson * must include a prominent statement that the modification is derived, 5353289f6aSNate Lawson * directly or indirectly, from Original Intel Code. 5453289f6aSNate Lawson * 5553289f6aSNate Lawson * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 5653289f6aSNate Lawson * Redistribution of source code of any substantial portion of the Covered 5753289f6aSNate Lawson * Code or modification without rights to further distribute source must 5853289f6aSNate Lawson * include the following Disclaimer and Export Compliance provision in the 5953289f6aSNate Lawson * documentation and/or other materials provided with distribution. In 6053289f6aSNate Lawson * addition, Licensee may not authorize further sublicense of source of any 6153289f6aSNate Lawson * portion of the Covered Code, and must include terms to the effect that the 6253289f6aSNate Lawson * license from Licensee to its licensee is limited to the intellectual 6353289f6aSNate Lawson * property embodied in the software Licensee provides to its licensee, and 6453289f6aSNate Lawson * not to intellectual property embodied in modifications its licensee may 6553289f6aSNate Lawson * make. 6653289f6aSNate Lawson * 6753289f6aSNate Lawson * 3.3. Redistribution of Executable. Redistribution in executable form of any 6853289f6aSNate Lawson * substantial portion of the Covered Code or modification must reproduce the 6953289f6aSNate Lawson * above Copyright Notice, and the following Disclaimer and Export Compliance 7053289f6aSNate Lawson * provision in the documentation and/or other materials provided with the 7153289f6aSNate Lawson * distribution. 7253289f6aSNate Lawson * 7353289f6aSNate Lawson * 3.4. Intel retains all right, title, and interest in and to the Original 7453289f6aSNate Lawson * Intel Code. 7553289f6aSNate Lawson * 7653289f6aSNate Lawson * 3.5. Neither the name Intel nor any other trademark owned or controlled by 7753289f6aSNate Lawson * Intel shall be used in advertising or otherwise to promote the sale, use or 7853289f6aSNate Lawson * other dealings in products derived from or relating to the Covered Code 7953289f6aSNate Lawson * without prior written authorization from Intel. 8053289f6aSNate Lawson * 8153289f6aSNate Lawson * 4. Disclaimer and Export Compliance 8253289f6aSNate Lawson * 8353289f6aSNate Lawson * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 8453289f6aSNate Lawson * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 8553289f6aSNate Lawson * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 8653289f6aSNate Lawson * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 8753289f6aSNate Lawson * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 8853289f6aSNate Lawson * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 8953289f6aSNate Lawson * PARTICULAR PURPOSE. 9053289f6aSNate Lawson * 9153289f6aSNate Lawson * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 9253289f6aSNate Lawson * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 9353289f6aSNate Lawson * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 9453289f6aSNate Lawson * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 9553289f6aSNate Lawson * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 9653289f6aSNate Lawson * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 9753289f6aSNate Lawson * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 9853289f6aSNate Lawson * LIMITED REMEDY. 9953289f6aSNate Lawson * 10053289f6aSNate Lawson * 4.3. Licensee shall not export, either directly or indirectly, any of this 10153289f6aSNate Lawson * software or system incorporating such software without first obtaining any 10253289f6aSNate Lawson * required license or other approval from the U. S. Department of Commerce or 10353289f6aSNate Lawson * any other agency or department of the United States Government. In the 10453289f6aSNate Lawson * event Licensee exports any such software from the United States or 10553289f6aSNate Lawson * re-exports any such software from a foreign destination, Licensee shall 10653289f6aSNate Lawson * ensure that the distribution and export/re-export of the software is in 10753289f6aSNate Lawson * compliance with all laws, regulations, orders, or other restrictions of the 10853289f6aSNate Lawson * U.S. Export Administration Regulations. Licensee agrees that neither it nor 10953289f6aSNate Lawson * any of its subsidiaries will export/re-export any technical data, process, 11053289f6aSNate Lawson * software, or service, directly or indirectly, to any country for which the 11153289f6aSNate Lawson * United States government or any agency thereof requires an export license, 11253289f6aSNate Lawson * other governmental approval, or letter of assurance, without first obtaining 11353289f6aSNate Lawson * such license, approval or letter. 11453289f6aSNate Lawson * 11553289f6aSNate Lawson *****************************************************************************/ 11653289f6aSNate Lawson 11753289f6aSNate Lawson 11853289f6aSNate Lawson #ifndef __ASLCOMPILER_H 11953289f6aSNate Lawson #define __ASLCOMPILER_H 12053289f6aSNate Lawson 12153289f6aSNate Lawson 12253289f6aSNate Lawson /* Microsoft-specific */ 12353289f6aSNate Lawson 12453289f6aSNate Lawson #if (defined WIN32 || defined WIN64) 12553289f6aSNate Lawson 12653289f6aSNate Lawson /* warn : used #pragma pack */ 12753289f6aSNate Lawson #pragma warning(disable:4103) 12853289f6aSNate Lawson 12953289f6aSNate Lawson /* warn : named type definition in parentheses */ 13053289f6aSNate Lawson #pragma warning(disable:4115) 13153289f6aSNate Lawson #endif 13253289f6aSNate Lawson 13353289f6aSNate Lawson #include <stdio.h> 13453289f6aSNate Lawson #include <stdlib.h> 13553289f6aSNate Lawson #include <stdarg.h> 13653289f6aSNate Lawson #include <string.h> 13753289f6aSNate Lawson #include <errno.h> 13853289f6aSNate Lawson #include <ctype.h> 13953289f6aSNate Lawson 14053289f6aSNate Lawson 141ab6f3bf9SJung-uk Kim #include <contrib/dev/acpica/include/acpi.h> 142ab6f3bf9SJung-uk Kim #include <contrib/dev/acpica/include/accommon.h> 143ab6f3bf9SJung-uk Kim #include <contrib/dev/acpica/include/amlresrc.h> 144ab6f3bf9SJung-uk Kim #include <contrib/dev/acpica/include/acdebug.h> 14553289f6aSNate Lawson 146fba7fc7eSJung-uk Kim /* Compiler headers */ 14753289f6aSNate Lawson 148ab6f3bf9SJung-uk Kim #include <contrib/dev/acpica/compiler/asldefine.h> 149ab6f3bf9SJung-uk Kim #include <contrib/dev/acpica/compiler/asltypes.h> 150ab6f3bf9SJung-uk Kim #include <contrib/dev/acpica/compiler/aslglobal.h> 15153289f6aSNate Lawson 15253289f6aSNate Lawson 15353289f6aSNate Lawson /******************************************************************************* 15453289f6aSNate Lawson * 15553289f6aSNate Lawson * Compiler prototypes 15653289f6aSNate Lawson * 15753289f6aSNate Lawson ******************************************************************************/ 15853289f6aSNate Lawson 159fba7fc7eSJung-uk Kim /* 160fba7fc7eSJung-uk Kim * parser - generated from flex/bison, lex/yacc, etc. 161fba7fc7eSJung-uk Kim */ 16253289f6aSNate Lawson int 16353289f6aSNate Lawson AslCompilerparse( 16453289f6aSNate Lawson void); 16553289f6aSNate Lawson 16653289f6aSNate Lawson ACPI_PARSE_OBJECT * 16753289f6aSNate Lawson AslDoError ( 16853289f6aSNate Lawson void); 16953289f6aSNate Lawson 17053289f6aSNate Lawson int 17153289f6aSNate Lawson AslCompilerlex( 17253289f6aSNate Lawson void); 17353289f6aSNate Lawson 17453289f6aSNate Lawson void 17553289f6aSNate Lawson ResetCurrentLineBuffer ( 17653289f6aSNate Lawson void); 17753289f6aSNate Lawson 17853289f6aSNate Lawson void 17953289f6aSNate Lawson InsertLineBuffer ( 18053289f6aSNate Lawson int SourceChar); 18153289f6aSNate Lawson 18253289f6aSNate Lawson int 18353289f6aSNate Lawson AslPopInputFileStack ( 18453289f6aSNate Lawson void); 18553289f6aSNate Lawson 18653289f6aSNate Lawson void 18753289f6aSNate Lawson AslPushInputFileStack ( 18853289f6aSNate Lawson FILE *InputFile, 18953289f6aSNate Lawson char *Filename); 19053289f6aSNate Lawson 191a9f12690SJung-uk Kim /* 192*a88e22b7SJung-uk Kim * aslstartup - entered from main() 193a9f12690SJung-uk Kim */ 194*a88e22b7SJung-uk Kim void 195*a88e22b7SJung-uk Kim AslInitializeGlobals ( 196*a88e22b7SJung-uk Kim void); 197*a88e22b7SJung-uk Kim 198a9f12690SJung-uk Kim ACPI_STATUS 199a9f12690SJung-uk Kim AslDoOnePathname ( 200a9f12690SJung-uk Kim char *Pathname); 201a9f12690SJung-uk Kim 202a9f12690SJung-uk Kim ACPI_STATUS 203a9f12690SJung-uk Kim AslDoOneFile ( 204a9f12690SJung-uk Kim char *Filename); 20553289f6aSNate Lawson 206fba7fc7eSJung-uk Kim /* 207fba7fc7eSJung-uk Kim * aslcompile - compile mainline 208fba7fc7eSJung-uk Kim */ 20953289f6aSNate Lawson void 21053289f6aSNate Lawson AslCompilerSignon ( 21153289f6aSNate Lawson UINT32 FileId); 21253289f6aSNate Lawson 21353289f6aSNate Lawson void 21453289f6aSNate Lawson AslCompilerFileHeader ( 21553289f6aSNate Lawson UINT32 FileId); 21653289f6aSNate Lawson 21753289f6aSNate Lawson int 218fba7fc7eSJung-uk Kim CmDoCompile ( 21953289f6aSNate Lawson void); 22053289f6aSNate Lawson 22153289f6aSNate Lawson void 222fba7fc7eSJung-uk Kim CmDoOutputFiles ( 22353289f6aSNate Lawson void); 22453289f6aSNate Lawson 22553289f6aSNate Lawson void 226fba7fc7eSJung-uk Kim CmCleanupAndExit ( 22753289f6aSNate Lawson void); 22853289f6aSNate Lawson 229*a88e22b7SJung-uk Kim ACPI_STATUS 230*a88e22b7SJung-uk Kim FlCheckForAscii ( 231*a88e22b7SJung-uk Kim ASL_FILE_INFO *FileInfo); 232*a88e22b7SJung-uk Kim 23353289f6aSNate Lawson 23453289f6aSNate Lawson /* 235fba7fc7eSJung-uk Kim * aslanalyze - semantic analysis 23653289f6aSNate Lawson */ 23753289f6aSNate Lawson ACPI_STATUS 23853289f6aSNate Lawson AnOtherSemanticAnalysisWalkBegin ( 23953289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 24053289f6aSNate Lawson UINT32 Level, 24153289f6aSNate Lawson void *Context); 24253289f6aSNate Lawson 24353289f6aSNate Lawson ACPI_STATUS 24453289f6aSNate Lawson AnOtherSemanticAnalysisWalkEnd ( 24553289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 24653289f6aSNate Lawson UINT32 Level, 24753289f6aSNate Lawson void *Context); 24853289f6aSNate Lawson 24953289f6aSNate Lawson ACPI_STATUS 25053289f6aSNate Lawson AnOperandTypecheckWalkBegin ( 25153289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 25253289f6aSNate Lawson UINT32 Level, 25353289f6aSNate Lawson void *Context); 25453289f6aSNate Lawson 25553289f6aSNate Lawson ACPI_STATUS 25653289f6aSNate Lawson AnOperandTypecheckWalkEnd ( 25753289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 25853289f6aSNate Lawson UINT32 Level, 25953289f6aSNate Lawson void *Context); 26053289f6aSNate Lawson 26153289f6aSNate Lawson ACPI_STATUS 26253289f6aSNate Lawson AnMethodAnalysisWalkBegin ( 26353289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 26453289f6aSNate Lawson UINT32 Level, 26553289f6aSNate Lawson void *Context); 26653289f6aSNate Lawson 26753289f6aSNate Lawson ACPI_STATUS 26853289f6aSNate Lawson AnMethodAnalysisWalkEnd ( 26953289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 27053289f6aSNate Lawson UINT32 Level, 27153289f6aSNate Lawson void *Context); 27253289f6aSNate Lawson 27353289f6aSNate Lawson ACPI_STATUS 27453289f6aSNate Lawson AnMethodTypingWalkBegin ( 27553289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 27653289f6aSNate Lawson UINT32 Level, 27753289f6aSNate Lawson void *Context); 27853289f6aSNate Lawson 27953289f6aSNate Lawson ACPI_STATUS 28053289f6aSNate Lawson AnMethodTypingWalkEnd ( 28153289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 28253289f6aSNate Lawson UINT32 Level, 28353289f6aSNate Lawson void *Context); 28453289f6aSNate Lawson 28553289f6aSNate Lawson 28653289f6aSNate Lawson /* 287fba7fc7eSJung-uk Kim * aslerror - error handling/reporting 28853289f6aSNate Lawson */ 289fba7fc7eSJung-uk Kim void 290fba7fc7eSJung-uk Kim AslError ( 291fba7fc7eSJung-uk Kim UINT8 Level, 292fba7fc7eSJung-uk Kim UINT8 MessageId, 293fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 294fba7fc7eSJung-uk Kim char *ExtraMessage); 29553289f6aSNate Lawson 29653289f6aSNate Lawson void 297fba7fc7eSJung-uk Kim AslCoreSubsystemError ( 298fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 299fba7fc7eSJung-uk Kim ACPI_STATUS Status, 300fba7fc7eSJung-uk Kim char *ExtraMessage, 301fba7fc7eSJung-uk Kim BOOLEAN Abort); 30253289f6aSNate Lawson 303fba7fc7eSJung-uk Kim int 304fba7fc7eSJung-uk Kim AslCompilererror( 305fba7fc7eSJung-uk Kim char *s); 306fba7fc7eSJung-uk Kim 307fba7fc7eSJung-uk Kim void 308fba7fc7eSJung-uk Kim AslCommonError ( 309fba7fc7eSJung-uk Kim UINT8 Level, 310fba7fc7eSJung-uk Kim UINT8 MessageId, 311fba7fc7eSJung-uk Kim UINT32 CurrentLineNumber, 312fba7fc7eSJung-uk Kim UINT32 LogicalLineNumber, 313fba7fc7eSJung-uk Kim UINT32 LogicalByteOffset, 314fba7fc7eSJung-uk Kim UINT32 Column, 315fba7fc7eSJung-uk Kim char *Filename, 316fba7fc7eSJung-uk Kim char *ExtraMessage); 317fba7fc7eSJung-uk Kim 318fba7fc7eSJung-uk Kim void 319fba7fc7eSJung-uk Kim AePrintException ( 320fba7fc7eSJung-uk Kim UINT32 FileId, 321fba7fc7eSJung-uk Kim ASL_ERROR_MSG *Enode, 322fba7fc7eSJung-uk Kim char *Header); 323fba7fc7eSJung-uk Kim 324fba7fc7eSJung-uk Kim void 325fba7fc7eSJung-uk Kim AePrintErrorLog ( 326fba7fc7eSJung-uk Kim UINT32 FileId); 327fba7fc7eSJung-uk Kim 328a9f12690SJung-uk Kim void 329a9f12690SJung-uk Kim AeClearErrorLog ( 330a9f12690SJung-uk Kim void); 331a9f12690SJung-uk Kim 3321a39cfb0SJung-uk Kim ACPI_PHYSICAL_ADDRESS 333fba7fc7eSJung-uk Kim AeLocalGetRootPointer ( 3341a39cfb0SJung-uk Kim void); 335fba7fc7eSJung-uk Kim 336fba7fc7eSJung-uk Kim 337fba7fc7eSJung-uk Kim /* 338fba7fc7eSJung-uk Kim * asllisting - generate all "listing" type files 339fba7fc7eSJung-uk Kim */ 340fba7fc7eSJung-uk Kim void 341fba7fc7eSJung-uk Kim LsDoListings ( 342fba7fc7eSJung-uk Kim void); 343fba7fc7eSJung-uk Kim 344fba7fc7eSJung-uk Kim void 345fba7fc7eSJung-uk Kim LsWriteNodeToAsmListing ( 346fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 347fba7fc7eSJung-uk Kim 348fba7fc7eSJung-uk Kim void 349fba7fc7eSJung-uk Kim LsWriteNode ( 350fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 351fba7fc7eSJung-uk Kim UINT32 FileId); 352fba7fc7eSJung-uk Kim 353fba7fc7eSJung-uk Kim void 354fba7fc7eSJung-uk Kim LsDoHexOutput ( 355fba7fc7eSJung-uk Kim void); 356fba7fc7eSJung-uk Kim 3571a39cfb0SJung-uk Kim void 3581a39cfb0SJung-uk Kim LsDumpParseTree ( 3591a39cfb0SJung-uk Kim void); 360fba7fc7eSJung-uk Kim 361fba7fc7eSJung-uk Kim /* 362fba7fc7eSJung-uk Kim * aslfold - constant folding 363fba7fc7eSJung-uk Kim */ 364fba7fc7eSJung-uk Kim ACPI_STATUS 365fba7fc7eSJung-uk Kim OpcAmlConstantWalk ( 366fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 367fba7fc7eSJung-uk Kim UINT32 Level, 368fba7fc7eSJung-uk Kim void *Context); 369fba7fc7eSJung-uk Kim 370fba7fc7eSJung-uk Kim 371fba7fc7eSJung-uk Kim /* 372fba7fc7eSJung-uk Kim * aslopcodes - generate AML opcodes 373fba7fc7eSJung-uk Kim */ 374fba7fc7eSJung-uk Kim ACPI_STATUS 375fba7fc7eSJung-uk Kim OpcAmlOpcodeWalk ( 376fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 377fba7fc7eSJung-uk Kim UINT32 Level, 378fba7fc7eSJung-uk Kim void *Context); 379fba7fc7eSJung-uk Kim 380fba7fc7eSJung-uk Kim ACPI_STATUS 381fba7fc7eSJung-uk Kim OpcAmlOpcodeUpdateWalk ( 382fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 383fba7fc7eSJung-uk Kim UINT32 Level, 384fba7fc7eSJung-uk Kim void *Context); 385fba7fc7eSJung-uk Kim 386fba7fc7eSJung-uk Kim void 387fba7fc7eSJung-uk Kim OpcGenerateAmlOpcode ( 388fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 389fba7fc7eSJung-uk Kim 390fba7fc7eSJung-uk Kim UINT32 391fba7fc7eSJung-uk Kim OpcSetOptimalIntegerSize ( 392fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 393fba7fc7eSJung-uk Kim 394fba7fc7eSJung-uk Kim void 395fba7fc7eSJung-uk Kim OpcGetIntegerWidth ( 396fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 397fba7fc7eSJung-uk Kim 398fba7fc7eSJung-uk Kim 399fba7fc7eSJung-uk Kim /* 400fba7fc7eSJung-uk Kim * asloperands - generate AML operands for the AML opcodes 401fba7fc7eSJung-uk Kim */ 402fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 403fba7fc7eSJung-uk Kim UtGetArg ( 404fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 405fba7fc7eSJung-uk Kim UINT32 Argn); 406fba7fc7eSJung-uk Kim 407fba7fc7eSJung-uk Kim void 408fba7fc7eSJung-uk Kim OpnGenerateAmlOperands ( 409fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 410fba7fc7eSJung-uk Kim 411fba7fc7eSJung-uk Kim void 412fba7fc7eSJung-uk Kim OpnDoPackage ( 413fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 414fba7fc7eSJung-uk Kim 415fba7fc7eSJung-uk Kim 416fba7fc7eSJung-uk Kim /* 417fba7fc7eSJung-uk Kim * aslopt - optmization 418fba7fc7eSJung-uk Kim */ 419fba7fc7eSJung-uk Kim void 420fba7fc7eSJung-uk Kim OptOptimizeNamePath ( 421fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 422fba7fc7eSJung-uk Kim UINT32 Flags, 423fba7fc7eSJung-uk Kim ACPI_WALK_STATE *WalkState, 424fba7fc7eSJung-uk Kim char *AmlNameString, 425fba7fc7eSJung-uk Kim ACPI_NAMESPACE_NODE *TargetNode); 426fba7fc7eSJung-uk Kim 427fba7fc7eSJung-uk Kim 428fba7fc7eSJung-uk Kim /* 429fba7fc7eSJung-uk Kim * aslcodegen - code generation 430fba7fc7eSJung-uk Kim */ 431fba7fc7eSJung-uk Kim void 432fba7fc7eSJung-uk Kim CgGenerateAmlOutput ( 433fba7fc7eSJung-uk Kim void); 434fba7fc7eSJung-uk Kim 435fba7fc7eSJung-uk Kim 436fba7fc7eSJung-uk Kim /* 437*a88e22b7SJung-uk Kim * aslfile 438*a88e22b7SJung-uk Kim */ 439*a88e22b7SJung-uk Kim void 440*a88e22b7SJung-uk Kim FlOpenFile ( 441*a88e22b7SJung-uk Kim UINT32 FileId, 442*a88e22b7SJung-uk Kim char *Filename, 443*a88e22b7SJung-uk Kim char *Mode); 444*a88e22b7SJung-uk Kim 445*a88e22b7SJung-uk Kim 446*a88e22b7SJung-uk Kim /* 447fba7fc7eSJung-uk Kim * asllength - calculate/adjust AML package lengths 448fba7fc7eSJung-uk Kim */ 449fba7fc7eSJung-uk Kim ACPI_STATUS 450fba7fc7eSJung-uk Kim LnPackageLengthWalk ( 451fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 452fba7fc7eSJung-uk Kim UINT32 Level, 453fba7fc7eSJung-uk Kim void *Context); 454fba7fc7eSJung-uk Kim 455fba7fc7eSJung-uk Kim ACPI_STATUS 456fba7fc7eSJung-uk Kim LnInitLengthsWalk ( 457fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 458fba7fc7eSJung-uk Kim UINT32 Level, 459fba7fc7eSJung-uk Kim void *Context); 460fba7fc7eSJung-uk Kim 461fba7fc7eSJung-uk Kim void 462fba7fc7eSJung-uk Kim CgGenerateAmlLengths ( 463fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 464fba7fc7eSJung-uk Kim 465fba7fc7eSJung-uk Kim 466fba7fc7eSJung-uk Kim /* 467fba7fc7eSJung-uk Kim * aslmap - opcode mappings and reserved method names 468fba7fc7eSJung-uk Kim */ 469fba7fc7eSJung-uk Kim ACPI_OBJECT_TYPE 470fba7fc7eSJung-uk Kim AslMapNamedOpcodeToDataType ( 471fba7fc7eSJung-uk Kim UINT16 Opcode); 472fba7fc7eSJung-uk Kim 473ca3cf4faSJung-uk Kim 474ca3cf4faSJung-uk Kim /* 475ca3cf4faSJung-uk Kim * aslpredef - ACPI predefined names support 476ca3cf4faSJung-uk Kim */ 477fba7fc7eSJung-uk Kim void 478ca3cf4faSJung-uk Kim ApCheckForPredefinedMethod ( 479ca3cf4faSJung-uk Kim ACPI_PARSE_OBJECT *Op, 480ca3cf4faSJung-uk Kim ASL_METHOD_INFO *MethodInfo); 481ca3cf4faSJung-uk Kim 4828c8be05fSJung-uk Kim void 4838c8be05fSJung-uk Kim ApCheckPredefinedReturnValue ( 4848c8be05fSJung-uk Kim ACPI_PARSE_OBJECT *Op, 4858c8be05fSJung-uk Kim ASL_METHOD_INFO *MethodInfo); 4868c8be05fSJung-uk Kim 487ca3cf4faSJung-uk Kim UINT32 488ca3cf4faSJung-uk Kim ApCheckForPredefinedName ( 489ca3cf4faSJung-uk Kim ACPI_PARSE_OBJECT *Op, 490ca3cf4faSJung-uk Kim char *Name); 491ca3cf4faSJung-uk Kim 492ca3cf4faSJung-uk Kim void 493ca3cf4faSJung-uk Kim ApCheckForPredefinedObject ( 494ca3cf4faSJung-uk Kim ACPI_PARSE_OBJECT *Op, 495ca3cf4faSJung-uk Kim char *Name); 496ca3cf4faSJung-uk Kim 497ca3cf4faSJung-uk Kim void 498ca3cf4faSJung-uk Kim ApDisplayReservedNames ( 499fba7fc7eSJung-uk Kim void); 500fba7fc7eSJung-uk Kim 501fba7fc7eSJung-uk Kim 502fba7fc7eSJung-uk Kim /* 503fba7fc7eSJung-uk Kim * asltransform - parse tree transformations 504fba7fc7eSJung-uk Kim */ 505fba7fc7eSJung-uk Kim ACPI_STATUS 506fba7fc7eSJung-uk Kim TrAmlTransformWalk ( 507fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 508fba7fc7eSJung-uk Kim UINT32 Level, 509fba7fc7eSJung-uk Kim void *Context); 510fba7fc7eSJung-uk Kim 511fba7fc7eSJung-uk Kim 512fba7fc7eSJung-uk Kim /* 513fba7fc7eSJung-uk Kim * asltree - parse tree support 514fba7fc7eSJung-uk Kim */ 515fba7fc7eSJung-uk Kim ACPI_STATUS 516fba7fc7eSJung-uk Kim TrWalkParseTree ( 517fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 518fba7fc7eSJung-uk Kim UINT32 Visitation, 519fba7fc7eSJung-uk Kim ASL_WALK_CALLBACK DescendingCallback, 520fba7fc7eSJung-uk Kim ASL_WALK_CALLBACK AscendingCallback, 521fba7fc7eSJung-uk Kim void *Context); 522fba7fc7eSJung-uk Kim 523fba7fc7eSJung-uk Kim /* Values for "Visitation" parameter above */ 524fba7fc7eSJung-uk Kim 525fba7fc7eSJung-uk Kim #define ASL_WALK_VISIT_DOWNWARD 0x01 526fba7fc7eSJung-uk Kim #define ASL_WALK_VISIT_UPWARD 0x02 527fba7fc7eSJung-uk Kim #define ASL_WALK_VISIT_TWICE (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD) 528fba7fc7eSJung-uk Kim 529fba7fc7eSJung-uk Kim 530fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 531fba7fc7eSJung-uk Kim TrAllocateNode ( 532fba7fc7eSJung-uk Kim UINT32 ParseOpcode); 533fba7fc7eSJung-uk Kim 534fba7fc7eSJung-uk Kim void 535fba7fc7eSJung-uk Kim TrReleaseNode ( 536fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 537fba7fc7eSJung-uk Kim 538fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 539fba7fc7eSJung-uk Kim TrUpdateNode ( 540fba7fc7eSJung-uk Kim UINT32 ParseOpcode, 541fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 542fba7fc7eSJung-uk Kim 543fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 544fba7fc7eSJung-uk Kim TrCreateNode ( 545fba7fc7eSJung-uk Kim UINT32 ParseOpcode, 546fba7fc7eSJung-uk Kim UINT32 NumChildren, 547fba7fc7eSJung-uk Kim ...); 548fba7fc7eSJung-uk Kim 549fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 550fba7fc7eSJung-uk Kim TrCreateLeafNode ( 551fba7fc7eSJung-uk Kim UINT32 ParseOpcode); 552fba7fc7eSJung-uk Kim 553fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 554fba7fc7eSJung-uk Kim TrCreateValuedLeafNode ( 555fba7fc7eSJung-uk Kim UINT32 ParseOpcode, 5569a179dd8SJung-uk Kim UINT64 Value); 557fba7fc7eSJung-uk Kim 558fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 559fba7fc7eSJung-uk Kim TrLinkChildren ( 560fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 561fba7fc7eSJung-uk Kim UINT32 NumChildren, 562fba7fc7eSJung-uk Kim ...); 563fba7fc7eSJung-uk Kim 564fba7fc7eSJung-uk Kim void 565fba7fc7eSJung-uk Kim TrSetEndLineNumber ( 566fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 567fba7fc7eSJung-uk Kim 568fba7fc7eSJung-uk Kim void 569fba7fc7eSJung-uk Kim TrWalkTree ( 570fba7fc7eSJung-uk Kim void); 571fba7fc7eSJung-uk Kim 572fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 573fba7fc7eSJung-uk Kim TrLinkPeerNode ( 574fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op1, 575fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op2); 576fba7fc7eSJung-uk Kim 577fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 578fba7fc7eSJung-uk Kim TrLinkChildNode ( 579fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op1, 580fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op2); 581fba7fc7eSJung-uk Kim 582fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 583fba7fc7eSJung-uk Kim TrSetNodeFlags ( 584fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 585fba7fc7eSJung-uk Kim UINT32 Flags); 586fba7fc7eSJung-uk Kim 587fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 588fba7fc7eSJung-uk Kim TrLinkPeerNodes ( 589fba7fc7eSJung-uk Kim UINT32 NumPeers, 590fba7fc7eSJung-uk Kim ...); 591fba7fc7eSJung-uk Kim 592fba7fc7eSJung-uk Kim 593fba7fc7eSJung-uk Kim /* 594fba7fc7eSJung-uk Kim * aslfiles - File I/O support 595fba7fc7eSJung-uk Kim */ 596fba7fc7eSJung-uk Kim void 597fba7fc7eSJung-uk Kim AslAbort ( 598fba7fc7eSJung-uk Kim void); 59953289f6aSNate Lawson 60053289f6aSNate Lawson void 601d6dd1baeSJung-uk Kim FlAddIncludeDirectory ( 602d6dd1baeSJung-uk Kim char *Dir); 603d6dd1baeSJung-uk Kim 604d6dd1baeSJung-uk Kim void 60553289f6aSNate Lawson FlOpenIncludeFile ( 60653289f6aSNate Lawson ACPI_PARSE_OBJECT *Op); 60753289f6aSNate Lawson 60853289f6aSNate Lawson void 60953289f6aSNate Lawson FlFileError ( 61053289f6aSNate Lawson UINT32 FileId, 61153289f6aSNate Lawson UINT8 ErrorId); 61253289f6aSNate Lawson 6133f5e024cSJung-uk Kim UINT32 6143f5e024cSJung-uk Kim FlGetFileSize ( 6153f5e024cSJung-uk Kim UINT32 FileId); 6163f5e024cSJung-uk Kim 61753289f6aSNate Lawson ACPI_STATUS 61853289f6aSNate Lawson FlReadFile ( 61953289f6aSNate Lawson UINT32 FileId, 62053289f6aSNate Lawson void *Buffer, 62153289f6aSNate Lawson UINT32 Length); 62253289f6aSNate Lawson 62353289f6aSNate Lawson void 62453289f6aSNate Lawson FlWriteFile ( 62553289f6aSNate Lawson UINT32 FileId, 62653289f6aSNate Lawson void *Buffer, 62753289f6aSNate Lawson UINT32 Length); 62853289f6aSNate Lawson 62953289f6aSNate Lawson void 63053289f6aSNate Lawson FlSeekFile ( 63153289f6aSNate Lawson UINT32 FileId, 63253289f6aSNate Lawson long Offset); 63353289f6aSNate Lawson 63453289f6aSNate Lawson void 63553289f6aSNate Lawson FlCloseFile ( 63653289f6aSNate Lawson UINT32 FileId); 63753289f6aSNate Lawson 63853289f6aSNate Lawson void 63953289f6aSNate Lawson FlPrintFile ( 64053289f6aSNate Lawson UINT32 FileId, 64153289f6aSNate Lawson char *Format, 64253289f6aSNate Lawson ...); 64353289f6aSNate Lawson 64453289f6aSNate Lawson void 64553289f6aSNate Lawson FlSetLineNumber ( 64653289f6aSNate Lawson ACPI_PARSE_OBJECT *Op); 64753289f6aSNate Lawson 64853289f6aSNate Lawson ACPI_STATUS 64953289f6aSNate Lawson FlOpenInputFile ( 65053289f6aSNate Lawson char *InputFilename); 65153289f6aSNate Lawson 65253289f6aSNate Lawson ACPI_STATUS 65353289f6aSNate Lawson FlOpenAmlOutputFile ( 65453289f6aSNate Lawson char *InputFilename); 65553289f6aSNate Lawson 65653289f6aSNate Lawson ACPI_STATUS 65753289f6aSNate Lawson FlOpenMiscOutputFiles ( 65853289f6aSNate Lawson char *InputFilename); 65953289f6aSNate Lawson 66053289f6aSNate Lawson 661fba7fc7eSJung-uk Kim /* 662fba7fc7eSJung-uk Kim * asload - load namespace in prep for cross reference 663fba7fc7eSJung-uk Kim */ 66453289f6aSNate Lawson ACPI_STATUS 66553289f6aSNate Lawson LdLoadNamespace ( 66653289f6aSNate Lawson ACPI_PARSE_OBJECT *RootOp); 66753289f6aSNate Lawson 66853289f6aSNate Lawson 669fba7fc7eSJung-uk Kim /* 670fba7fc7eSJung-uk Kim * asllookup - namespace cross reference 671fba7fc7eSJung-uk Kim */ 67253289f6aSNate Lawson ACPI_STATUS 673fba7fc7eSJung-uk Kim LkCrossReferenceNamespace ( 674fba7fc7eSJung-uk Kim void); 67553289f6aSNate Lawson 6761a39cfb0SJung-uk Kim void 6771a39cfb0SJung-uk Kim LkFindUnreferencedObjects ( 6781a39cfb0SJung-uk Kim void); 6791a39cfb0SJung-uk Kim 68053289f6aSNate Lawson ACPI_STATUS 68153289f6aSNate Lawson LsDisplayNamespace ( 68253289f6aSNate Lawson void); 68353289f6aSNate Lawson 68453289f6aSNate Lawson 685fba7fc7eSJung-uk Kim /* 686fba7fc7eSJung-uk Kim * aslutils - common compiler utilites 687fba7fc7eSJung-uk Kim */ 688fba7fc7eSJung-uk Kim void 689fba7fc7eSJung-uk Kim DbgPrint ( 690fba7fc7eSJung-uk Kim UINT32 Type, 691fba7fc7eSJung-uk Kim char *Format, 692fba7fc7eSJung-uk Kim ...); 69353289f6aSNate Lawson 694fba7fc7eSJung-uk Kim /* Type values for above */ 695fba7fc7eSJung-uk Kim 696fba7fc7eSJung-uk Kim #define ASL_DEBUG_OUTPUT 0 697fba7fc7eSJung-uk Kim #define ASL_PARSE_OUTPUT 1 698fba7fc7eSJung-uk Kim #define ASL_TREE_OUTPUT 2 69953289f6aSNate Lawson 70053289f6aSNate Lawson void 701*a88e22b7SJung-uk Kim UtDisplaySupportedTables ( 702*a88e22b7SJung-uk Kim void); 703*a88e22b7SJung-uk Kim 704*a88e22b7SJung-uk Kim void 70553289f6aSNate Lawson UtDisplayConstantOpcodes ( 70653289f6aSNate Lawson void); 70753289f6aSNate Lawson 708fba7fc7eSJung-uk Kim UINT8 70953289f6aSNate Lawson UtBeginEvent ( 71053289f6aSNate Lawson char *Name); 71153289f6aSNate Lawson 71253289f6aSNate Lawson void 71353289f6aSNate Lawson UtEndEvent ( 714fba7fc7eSJung-uk Kim UINT8 Event); 71553289f6aSNate Lawson 71653289f6aSNate Lawson void * 71753289f6aSNate Lawson UtLocalCalloc ( 71853289f6aSNate Lawson UINT32 Size); 71953289f6aSNate Lawson 72053289f6aSNate Lawson void 72153289f6aSNate Lawson UtPrintFormattedName ( 72253289f6aSNate Lawson UINT16 ParseOpcode, 72353289f6aSNate Lawson UINT32 Level); 72453289f6aSNate Lawson 72553289f6aSNate Lawson void 72653289f6aSNate Lawson UtDisplaySummary ( 72753289f6aSNate Lawson UINT32 FileId); 72853289f6aSNate Lawson 72953289f6aSNate Lawson UINT8 73053289f6aSNate Lawson UtHexCharToValue ( 731fba7fc7eSJung-uk Kim int HexChar); 73253289f6aSNate Lawson 73353289f6aSNate Lawson void 73453289f6aSNate Lawson UtConvertByteToHex ( 73553289f6aSNate Lawson UINT8 RawByte, 73653289f6aSNate Lawson UINT8 *Buffer); 73753289f6aSNate Lawson 73853289f6aSNate Lawson void 73953289f6aSNate Lawson UtConvertByteToAsmHex ( 74053289f6aSNate Lawson UINT8 RawByte, 74153289f6aSNate Lawson UINT8 *Buffer); 74253289f6aSNate Lawson 74353289f6aSNate Lawson char * 74453289f6aSNate Lawson UtGetOpName ( 74553289f6aSNate Lawson UINT32 ParseOpcode); 74653289f6aSNate Lawson 74753289f6aSNate Lawson void 74853289f6aSNate Lawson UtSetParseOpName ( 74953289f6aSNate Lawson ACPI_PARSE_OBJECT *Op); 75053289f6aSNate Lawson 75153289f6aSNate Lawson char * 75253289f6aSNate Lawson UtGetStringBuffer ( 75353289f6aSNate Lawson UINT32 Length); 75453289f6aSNate Lawson 75553289f6aSNate Lawson ACPI_STATUS 75653289f6aSNate Lawson UtInternalizeName ( 75753289f6aSNate Lawson char *ExternalName, 75853289f6aSNate Lawson char **ConvertedName); 75953289f6aSNate Lawson 76053289f6aSNate Lawson void 76153289f6aSNate Lawson UtAttachNamepathToOwner ( 76253289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 76353289f6aSNate Lawson ACPI_PARSE_OBJECT *NameNode); 76453289f6aSNate Lawson 76553289f6aSNate Lawson ACPI_PARSE_OBJECT * 76653289f6aSNate Lawson UtCheckIntegerRange ( 76753289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 76853289f6aSNate Lawson UINT32 LowValue, 76953289f6aSNate Lawson UINT32 HighValue); 77053289f6aSNate Lawson 7719a179dd8SJung-uk Kim UINT64 77253289f6aSNate Lawson UtDoConstant ( 77353289f6aSNate Lawson char *String); 77453289f6aSNate Lawson 77553289f6aSNate Lawson 77653289f6aSNate Lawson /* 777fba7fc7eSJung-uk Kim * aslresource - Resource template generation utilities 77853289f6aSNate Lawson */ 7793f5e024cSJung-uk Kim void 7803f5e024cSJung-uk Kim RsSmallAddressCheck ( 7813f5e024cSJung-uk Kim UINT8 Type, 7823f5e024cSJung-uk Kim UINT32 Minimum, 7833f5e024cSJung-uk Kim UINT32 Maximum, 7843f5e024cSJung-uk Kim UINT32 Length, 7853f5e024cSJung-uk Kim UINT32 Alignment, 7863f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *MinOp, 7873f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *MaxOp, 7883f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *LengthOp, 7893f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *AlignOp); 7903f5e024cSJung-uk Kim 7913f5e024cSJung-uk Kim void 7923f5e024cSJung-uk Kim RsLargeAddressCheck ( 7933f5e024cSJung-uk Kim UINT64 Minimum, 7943f5e024cSJung-uk Kim UINT64 Maximum, 7953f5e024cSJung-uk Kim UINT64 Length, 7963f5e024cSJung-uk Kim UINT64 Granularity, 7973f5e024cSJung-uk Kim UINT8 Flags, 7983f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *MinOp, 7993f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *MaxOp, 8003f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *LengthOp, 8013f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *GranOp); 8023f5e024cSJung-uk Kim 8033f5e024cSJung-uk Kim UINT16 8043f5e024cSJung-uk Kim RsGetStringDataLength ( 8053f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *InitializerOp); 8063f5e024cSJung-uk Kim 80753289f6aSNate Lawson ASL_RESOURCE_NODE * 80853289f6aSNate Lawson RsAllocateResourceNode ( 80953289f6aSNate Lawson UINT32 Size); 81053289f6aSNate Lawson 81153289f6aSNate Lawson void 81253289f6aSNate Lawson RsCreateBitField ( 81353289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 81453289f6aSNate Lawson char *Name, 81553289f6aSNate Lawson UINT32 ByteOffset, 81653289f6aSNate Lawson UINT32 BitOffset); 81753289f6aSNate Lawson 81853289f6aSNate Lawson void 81953289f6aSNate Lawson RsCreateByteField ( 82053289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 82153289f6aSNate Lawson char *Name, 82253289f6aSNate Lawson UINT32 ByteOffset); 82353289f6aSNate Lawson 82453289f6aSNate Lawson void 82553289f6aSNate Lawson RsSetFlagBits ( 82653289f6aSNate Lawson UINT8 *Flags, 82753289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 82853289f6aSNate Lawson UINT8 Position, 82953289f6aSNate Lawson UINT8 DefaultBit); 83053289f6aSNate Lawson 83153289f6aSNate Lawson ACPI_PARSE_OBJECT * 83253289f6aSNate Lawson RsCompleteNodeAndGetNext ( 83353289f6aSNate Lawson ACPI_PARSE_OBJECT *Op); 83453289f6aSNate Lawson 835fba7fc7eSJung-uk Kim void 836fba7fc7eSJung-uk Kim RsCheckListForDuplicates ( 837fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 838fba7fc7eSJung-uk Kim 83953289f6aSNate Lawson ASL_RESOURCE_NODE * 84053289f6aSNate Lawson RsDoOneResourceDescriptor ( 84153289f6aSNate Lawson ACPI_PARSE_OBJECT *DescriptorTypeOp, 84253289f6aSNate Lawson UINT32 CurrentByteOffset, 84353289f6aSNate Lawson UINT8 *State); 84453289f6aSNate Lawson 845fba7fc7eSJung-uk Kim /* Values for State above */ 846fba7fc7eSJung-uk Kim 84753289f6aSNate Lawson #define ACPI_RSTATE_NORMAL 0 84853289f6aSNate Lawson #define ACPI_RSTATE_START_DEPENDENT 1 84953289f6aSNate Lawson #define ACPI_RSTATE_DEPENDENT_LIST 2 85053289f6aSNate Lawson 85153289f6aSNate Lawson UINT32 85253289f6aSNate Lawson RsLinkDescriptorChain ( 85353289f6aSNate Lawson ASL_RESOURCE_NODE **PreviousRnode, 85453289f6aSNate Lawson ASL_RESOURCE_NODE *Rnode); 85553289f6aSNate Lawson 856fba7fc7eSJung-uk Kim void 857fba7fc7eSJung-uk Kim RsDoResourceTemplate ( 858fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 859fba7fc7eSJung-uk Kim 86053289f6aSNate Lawson 86153289f6aSNate Lawson /* 8623f5e024cSJung-uk Kim * aslrestype1 - Miscellaneous Small descriptors 86353289f6aSNate Lawson */ 86453289f6aSNate Lawson ASL_RESOURCE_NODE * 8651a39cfb0SJung-uk Kim RsDoEndTagDescriptor ( 8661a39cfb0SJung-uk Kim ACPI_PARSE_OBJECT *Op, 8671a39cfb0SJung-uk Kim UINT32 CurrentByteOffset); 8681a39cfb0SJung-uk Kim 8691a39cfb0SJung-uk Kim ASL_RESOURCE_NODE * 87053289f6aSNate Lawson RsDoEndDependentDescriptor ( 87153289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 87253289f6aSNate Lawson UINT32 CurrentByteOffset); 87353289f6aSNate Lawson 87453289f6aSNate Lawson ASL_RESOURCE_NODE * 87553289f6aSNate Lawson RsDoMemory24Descriptor ( 87653289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 87753289f6aSNate Lawson UINT32 CurrentByteOffset); 87853289f6aSNate Lawson 87953289f6aSNate Lawson ASL_RESOURCE_NODE * 88053289f6aSNate Lawson RsDoMemory32Descriptor ( 88153289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 88253289f6aSNate Lawson UINT32 CurrentByteOffset); 88353289f6aSNate Lawson 88453289f6aSNate Lawson ASL_RESOURCE_NODE * 88553289f6aSNate Lawson RsDoMemory32FixedDescriptor ( 88653289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 88753289f6aSNate Lawson UINT32 CurrentByteOffset); 88853289f6aSNate Lawson 88953289f6aSNate Lawson ASL_RESOURCE_NODE * 89053289f6aSNate Lawson RsDoStartDependentDescriptor ( 89153289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 89253289f6aSNate Lawson UINT32 CurrentByteOffset); 89353289f6aSNate Lawson 89453289f6aSNate Lawson ASL_RESOURCE_NODE * 89553289f6aSNate Lawson RsDoStartDependentNoPriDescriptor ( 89653289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 89753289f6aSNate Lawson UINT32 CurrentByteOffset); 89853289f6aSNate Lawson 89953289f6aSNate Lawson ASL_RESOURCE_NODE * 90053289f6aSNate Lawson RsDoVendorSmallDescriptor ( 90153289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 90253289f6aSNate Lawson UINT32 CurrentByteOffset); 90353289f6aSNate Lawson 90453289f6aSNate Lawson 90553289f6aSNate Lawson /* 9063f5e024cSJung-uk Kim * aslrestype1i - I/O-related Small descriptors 9073f5e024cSJung-uk Kim */ 9083f5e024cSJung-uk Kim ASL_RESOURCE_NODE * 9093f5e024cSJung-uk Kim RsDoDmaDescriptor ( 9103f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *Op, 9113f5e024cSJung-uk Kim UINT32 CurrentByteOffset); 9123f5e024cSJung-uk Kim 9133f5e024cSJung-uk Kim ASL_RESOURCE_NODE * 9143f5e024cSJung-uk Kim RsDoFixedIoDescriptor ( 9153f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *Op, 9163f5e024cSJung-uk Kim UINT32 CurrentByteOffset); 9173f5e024cSJung-uk Kim 9183f5e024cSJung-uk Kim ASL_RESOURCE_NODE * 9193f5e024cSJung-uk Kim RsDoIoDescriptor ( 9203f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *Op, 9213f5e024cSJung-uk Kim UINT32 CurrentByteOffset); 9223f5e024cSJung-uk Kim 9233f5e024cSJung-uk Kim ASL_RESOURCE_NODE * 9243f5e024cSJung-uk Kim RsDoIrqDescriptor ( 9253f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *Op, 9263f5e024cSJung-uk Kim UINT32 CurrentByteOffset); 9273f5e024cSJung-uk Kim 9283f5e024cSJung-uk Kim ASL_RESOURCE_NODE * 9293f5e024cSJung-uk Kim RsDoIrqNoFlagsDescriptor ( 9303f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *Op, 9313f5e024cSJung-uk Kim UINT32 CurrentByteOffset); 9323f5e024cSJung-uk Kim 9333f5e024cSJung-uk Kim 9343f5e024cSJung-uk Kim /* 9353f5e024cSJung-uk Kim * aslrestype2 - Large resource descriptors 93653289f6aSNate Lawson */ 937fba7fc7eSJung-uk Kim ASL_RESOURCE_NODE * 938fba7fc7eSJung-uk Kim RsDoInterruptDescriptor ( 939fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 940fba7fc7eSJung-uk Kim UINT32 CurrentByteOffset); 94153289f6aSNate Lawson 94253289f6aSNate Lawson ASL_RESOURCE_NODE * 9433f5e024cSJung-uk Kim RsDoVendorLargeDescriptor ( 9443f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *Op, 9453f5e024cSJung-uk Kim UINT32 CurrentByteOffset); 9463f5e024cSJung-uk Kim 9473f5e024cSJung-uk Kim ASL_RESOURCE_NODE * 9483f5e024cSJung-uk Kim RsDoGeneralRegisterDescriptor ( 9493f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *Op, 9503f5e024cSJung-uk Kim UINT32 CurrentByteOffset); 9513f5e024cSJung-uk Kim 9523f5e024cSJung-uk Kim 9533f5e024cSJung-uk Kim /* 9543f5e024cSJung-uk Kim * aslrestype2d - DWord address descriptors 9553f5e024cSJung-uk Kim */ 9563f5e024cSJung-uk Kim ASL_RESOURCE_NODE * 95753289f6aSNate Lawson RsDoDwordIoDescriptor ( 95853289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 95953289f6aSNate Lawson UINT32 CurrentByteOffset); 96053289f6aSNate Lawson 96153289f6aSNate Lawson ASL_RESOURCE_NODE * 96253289f6aSNate Lawson RsDoDwordMemoryDescriptor ( 96353289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 96453289f6aSNate Lawson UINT32 CurrentByteOffset); 96553289f6aSNate Lawson 96653289f6aSNate Lawson ASL_RESOURCE_NODE * 967fba7fc7eSJung-uk Kim RsDoDwordSpaceDescriptor ( 968fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 969fba7fc7eSJung-uk Kim UINT32 CurrentByteOffset); 970fba7fc7eSJung-uk Kim 9713f5e024cSJung-uk Kim 9723f5e024cSJung-uk Kim /* 9733f5e024cSJung-uk Kim * aslrestype2e - Extended address descriptors 9743f5e024cSJung-uk Kim */ 975fba7fc7eSJung-uk Kim ASL_RESOURCE_NODE * 976fba7fc7eSJung-uk Kim RsDoExtendedIoDescriptor ( 977fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 978fba7fc7eSJung-uk Kim UINT32 CurrentByteOffset); 979fba7fc7eSJung-uk Kim 980fba7fc7eSJung-uk Kim ASL_RESOURCE_NODE * 981fba7fc7eSJung-uk Kim RsDoExtendedMemoryDescriptor ( 982fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 983fba7fc7eSJung-uk Kim UINT32 CurrentByteOffset); 984fba7fc7eSJung-uk Kim 985fba7fc7eSJung-uk Kim ASL_RESOURCE_NODE * 986fba7fc7eSJung-uk Kim RsDoExtendedSpaceDescriptor ( 987fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 988fba7fc7eSJung-uk Kim UINT32 CurrentByteOffset); 989fba7fc7eSJung-uk Kim 9903f5e024cSJung-uk Kim 9913f5e024cSJung-uk Kim /* 9923f5e024cSJung-uk Kim * aslrestype2q - QWord address descriptors 9933f5e024cSJung-uk Kim */ 994fba7fc7eSJung-uk Kim ASL_RESOURCE_NODE * 99553289f6aSNate Lawson RsDoQwordIoDescriptor ( 99653289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 99753289f6aSNate Lawson UINT32 CurrentByteOffset); 99853289f6aSNate Lawson 99953289f6aSNate Lawson ASL_RESOURCE_NODE * 100053289f6aSNate Lawson RsDoQwordMemoryDescriptor ( 100153289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 100253289f6aSNate Lawson UINT32 CurrentByteOffset); 100353289f6aSNate Lawson 100453289f6aSNate Lawson ASL_RESOURCE_NODE * 1005fba7fc7eSJung-uk Kim RsDoQwordSpaceDescriptor ( 1006fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 1007fba7fc7eSJung-uk Kim UINT32 CurrentByteOffset); 1008fba7fc7eSJung-uk Kim 10093f5e024cSJung-uk Kim 10103f5e024cSJung-uk Kim /* 10113f5e024cSJung-uk Kim * aslrestype2w - Word address descriptors 10123f5e024cSJung-uk Kim */ 1013fba7fc7eSJung-uk Kim ASL_RESOURCE_NODE * 101453289f6aSNate Lawson RsDoWordIoDescriptor ( 101553289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 101653289f6aSNate Lawson UINT32 CurrentByteOffset); 101753289f6aSNate Lawson 101853289f6aSNate Lawson ASL_RESOURCE_NODE * 1019fba7fc7eSJung-uk Kim RsDoWordSpaceDescriptor ( 1020fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 1021fba7fc7eSJung-uk Kim UINT32 CurrentByteOffset); 1022fba7fc7eSJung-uk Kim 1023fba7fc7eSJung-uk Kim ASL_RESOURCE_NODE * 102453289f6aSNate Lawson RsDoWordBusNumberDescriptor ( 102553289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 102653289f6aSNate Lawson UINT32 CurrentByteOffset); 102753289f6aSNate Lawson 1028*a88e22b7SJung-uk Kim /* 1029*a88e22b7SJung-uk Kim * Entry to data table compiler subsystem 1030*a88e22b7SJung-uk Kim */ 1031*a88e22b7SJung-uk Kim ACPI_STATUS 1032*a88e22b7SJung-uk Kim DtDoCompile( 1033*a88e22b7SJung-uk Kim void); 1034*a88e22b7SJung-uk Kim 1035*a88e22b7SJung-uk Kim ACPI_STATUS 1036*a88e22b7SJung-uk Kim DtCreateTemplates ( 1037*a88e22b7SJung-uk Kim char *Signature); 1038*a88e22b7SJung-uk Kim 103953289f6aSNate Lawson #endif /* __ASLCOMPILER_H */ 104053289f6aSNate Lawson 1041