153289f6aSNate Lawson 253289f6aSNate Lawson /****************************************************************************** 353289f6aSNate Lawson * 4fba7fc7eSJung-uk Kim * Module Name: aslcompiler.h - common include file for iASL 553289f6aSNate Lawson * 653289f6aSNate Lawson *****************************************************************************/ 753289f6aSNate Lawson 8d244b227SJung-uk Kim /* 9ec3fc72fSJung-uk Kim * Copyright (C) 2000 - 2012, Intel Corp. 1053289f6aSNate Lawson * All rights reserved. 1153289f6aSNate Lawson * 12d244b227SJung-uk Kim * Redistribution and use in source and binary forms, with or without 13d244b227SJung-uk Kim * modification, are permitted provided that the following conditions 14d244b227SJung-uk Kim * are met: 15d244b227SJung-uk Kim * 1. Redistributions of source code must retain the above copyright 16d244b227SJung-uk Kim * notice, this list of conditions, and the following disclaimer, 17d244b227SJung-uk Kim * without modification. 18d244b227SJung-uk Kim * 2. Redistributions in binary form must reproduce at minimum a disclaimer 19d244b227SJung-uk Kim * substantially similar to the "NO WARRANTY" disclaimer below 20d244b227SJung-uk Kim * ("Disclaimer") and any redistribution must be conditioned upon 21d244b227SJung-uk Kim * including a substantially similar Disclaimer requirement for further 22d244b227SJung-uk Kim * binary redistribution. 23d244b227SJung-uk Kim * 3. Neither the names of the above-listed copyright holders nor the names 24d244b227SJung-uk Kim * of any contributors may be used to endorse or promote products derived 25d244b227SJung-uk Kim * from this software without specific prior written permission. 2653289f6aSNate Lawson * 27d244b227SJung-uk Kim * Alternatively, this software may be distributed under the terms of the 28d244b227SJung-uk Kim * GNU General Public License ("GPL") version 2 as published by the Free 29d244b227SJung-uk Kim * Software Foundation. 3053289f6aSNate Lawson * 31d244b227SJung-uk Kim * NO WARRANTY 32d244b227SJung-uk Kim * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 33d244b227SJung-uk Kim * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 34d244b227SJung-uk Kim * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 35d244b227SJung-uk Kim * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 36d244b227SJung-uk Kim * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 37d244b227SJung-uk Kim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 38d244b227SJung-uk Kim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 39d244b227SJung-uk Kim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 40d244b227SJung-uk Kim * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 41d244b227SJung-uk Kim * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 42d244b227SJung-uk Kim * POSSIBILITY OF SUCH DAMAGES. 43d244b227SJung-uk Kim */ 4453289f6aSNate Lawson 4553289f6aSNate Lawson 4653289f6aSNate Lawson #ifndef __ASLCOMPILER_H 4753289f6aSNate Lawson #define __ASLCOMPILER_H 4853289f6aSNate Lawson 49d244b227SJung-uk Kim #include <contrib/dev/acpica/include/acpi.h> 50d244b227SJung-uk Kim #include <contrib/dev/acpica/include/accommon.h> 51d244b227SJung-uk Kim #include <contrib/dev/acpica/include/amlresrc.h> 52d244b227SJung-uk Kim #include <contrib/dev/acpica/include/acdebug.h> 5353289f6aSNate Lawson 5453289f6aSNate Lawson /* Microsoft-specific */ 5553289f6aSNate Lawson 5653289f6aSNate Lawson #if (defined WIN32 || defined WIN64) 5753289f6aSNate Lawson 5853289f6aSNate Lawson /* warn : used #pragma pack */ 5953289f6aSNate Lawson #pragma warning(disable:4103) 6053289f6aSNate Lawson 6153289f6aSNate Lawson /* warn : named type definition in parentheses */ 6253289f6aSNate Lawson #pragma warning(disable:4115) 6353289f6aSNate Lawson #endif 6453289f6aSNate Lawson 6553289f6aSNate Lawson #include <stdio.h> 6653289f6aSNate Lawson #include <stdlib.h> 6753289f6aSNate Lawson #include <stdarg.h> 6853289f6aSNate Lawson #include <string.h> 6953289f6aSNate Lawson #include <errno.h> 7053289f6aSNate Lawson #include <ctype.h> 7153289f6aSNate Lawson 72fba7fc7eSJung-uk Kim /* Compiler headers */ 7353289f6aSNate Lawson 74ab6f3bf9SJung-uk Kim #include <contrib/dev/acpica/compiler/asldefine.h> 75ab6f3bf9SJung-uk Kim #include <contrib/dev/acpica/compiler/asltypes.h> 763c1812acSJung-uk Kim #include <contrib/dev/acpica/compiler/aslmessages.h> 77ab6f3bf9SJung-uk Kim #include <contrib/dev/acpica/compiler/aslglobal.h> 78*4c52cad2SJung-uk Kim #include <contrib/dev/acpica/compiler/preprocess.h> 7953289f6aSNate Lawson 8053289f6aSNate Lawson 8153289f6aSNate Lawson /******************************************************************************* 8253289f6aSNate Lawson * 8353289f6aSNate Lawson * Compiler prototypes 8453289f6aSNate Lawson * 8553289f6aSNate Lawson ******************************************************************************/ 8653289f6aSNate Lawson 87fba7fc7eSJung-uk Kim /* 88*4c52cad2SJung-uk Kim * Main ASL parser - generated from flex/bison, lex/yacc, etc. 89fba7fc7eSJung-uk Kim */ 9053289f6aSNate Lawson int 9153289f6aSNate Lawson AslCompilerparse( 9253289f6aSNate Lawson void); 9353289f6aSNate Lawson 9453289f6aSNate Lawson ACPI_PARSE_OBJECT * 9553289f6aSNate Lawson AslDoError ( 9653289f6aSNate Lawson void); 9753289f6aSNate Lawson 9853289f6aSNate Lawson int 9953289f6aSNate Lawson AslCompilerlex( 10053289f6aSNate Lawson void); 10153289f6aSNate Lawson 10253289f6aSNate Lawson void 10353289f6aSNate Lawson ResetCurrentLineBuffer ( 10453289f6aSNate Lawson void); 10553289f6aSNate Lawson 10653289f6aSNate Lawson void 10753289f6aSNate Lawson InsertLineBuffer ( 10853289f6aSNate Lawson int SourceChar); 10953289f6aSNate Lawson 11053289f6aSNate Lawson int 11153289f6aSNate Lawson AslPopInputFileStack ( 11253289f6aSNate Lawson void); 11353289f6aSNate Lawson 11453289f6aSNate Lawson void 11553289f6aSNate Lawson AslPushInputFileStack ( 11653289f6aSNate Lawson FILE *InputFile, 11753289f6aSNate Lawson char *Filename); 11853289f6aSNate Lawson 119a9f12690SJung-uk Kim /* 120a88e22b7SJung-uk Kim * aslstartup - entered from main() 121a9f12690SJung-uk Kim */ 122a88e22b7SJung-uk Kim void 123a88e22b7SJung-uk Kim AslInitializeGlobals ( 124a88e22b7SJung-uk Kim void); 125a88e22b7SJung-uk Kim 126709fac06SJung-uk Kim typedef 127709fac06SJung-uk Kim ACPI_STATUS (*ASL_PATHNAME_CALLBACK) ( 128709fac06SJung-uk Kim char *); 129709fac06SJung-uk Kim 130a9f12690SJung-uk Kim ACPI_STATUS 131a9f12690SJung-uk Kim AslDoOnePathname ( 132709fac06SJung-uk Kim char *Pathname, 133709fac06SJung-uk Kim ASL_PATHNAME_CALLBACK Callback); 134a9f12690SJung-uk Kim 135a9f12690SJung-uk Kim ACPI_STATUS 136a9f12690SJung-uk Kim AslDoOneFile ( 137a9f12690SJung-uk Kim char *Filename); 13853289f6aSNate Lawson 139fba7fc7eSJung-uk Kim /* 140fba7fc7eSJung-uk Kim * aslcompile - compile mainline 141fba7fc7eSJung-uk Kim */ 14253289f6aSNate Lawson void 14353289f6aSNate Lawson AslCompilerSignon ( 14453289f6aSNate Lawson UINT32 FileId); 14553289f6aSNate Lawson 14653289f6aSNate Lawson void 14753289f6aSNate Lawson AslCompilerFileHeader ( 14853289f6aSNate Lawson UINT32 FileId); 14953289f6aSNate Lawson 15053289f6aSNate Lawson int 151fba7fc7eSJung-uk Kim CmDoCompile ( 15253289f6aSNate Lawson void); 15353289f6aSNate Lawson 15453289f6aSNate Lawson void 155fba7fc7eSJung-uk Kim CmDoOutputFiles ( 15653289f6aSNate Lawson void); 15753289f6aSNate Lawson 15853289f6aSNate Lawson void 159fba7fc7eSJung-uk Kim CmCleanupAndExit ( 16053289f6aSNate Lawson void); 16153289f6aSNate Lawson 162a88e22b7SJung-uk Kim ACPI_STATUS 163a88e22b7SJung-uk Kim FlCheckForAscii ( 164a88e22b7SJung-uk Kim ASL_FILE_INFO *FileInfo); 165a88e22b7SJung-uk Kim 16653289f6aSNate Lawson 16753289f6aSNate Lawson /* 1680b94ba42SJung-uk Kim * aslwalks - semantic analysis and parse tree walks 16953289f6aSNate Lawson */ 17053289f6aSNate Lawson ACPI_STATUS 17153289f6aSNate Lawson AnOtherSemanticAnalysisWalkBegin ( 17253289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 17353289f6aSNate Lawson UINT32 Level, 17453289f6aSNate Lawson void *Context); 17553289f6aSNate Lawson 17653289f6aSNate Lawson ACPI_STATUS 17753289f6aSNate Lawson AnOtherSemanticAnalysisWalkEnd ( 17853289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 17953289f6aSNate Lawson UINT32 Level, 18053289f6aSNate Lawson void *Context); 18153289f6aSNate Lawson 18253289f6aSNate Lawson ACPI_STATUS 18353289f6aSNate Lawson AnOperandTypecheckWalkEnd ( 18453289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 18553289f6aSNate Lawson UINT32 Level, 18653289f6aSNate Lawson void *Context); 18753289f6aSNate Lawson 18853289f6aSNate Lawson ACPI_STATUS 18953289f6aSNate Lawson AnMethodAnalysisWalkBegin ( 19053289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 19153289f6aSNate Lawson UINT32 Level, 19253289f6aSNate Lawson void *Context); 19353289f6aSNate Lawson 19453289f6aSNate Lawson ACPI_STATUS 19553289f6aSNate Lawson AnMethodAnalysisWalkEnd ( 19653289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 19753289f6aSNate Lawson UINT32 Level, 19853289f6aSNate Lawson void *Context); 19953289f6aSNate Lawson 20053289f6aSNate Lawson ACPI_STATUS 20153289f6aSNate Lawson AnMethodTypingWalkEnd ( 20253289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 20353289f6aSNate Lawson UINT32 Level, 20453289f6aSNate Lawson void *Context); 20553289f6aSNate Lawson 20653289f6aSNate Lawson 20753289f6aSNate Lawson /* 2080b94ba42SJung-uk Kim * aslbtypes - bitfield data types 2090b94ba42SJung-uk Kim */ 2100b94ba42SJung-uk Kim UINT32 2110b94ba42SJung-uk Kim AnMapObjTypeToBtype ( 2120b94ba42SJung-uk Kim ACPI_PARSE_OBJECT *Op); 2130b94ba42SJung-uk Kim 2140b94ba42SJung-uk Kim UINT32 2150b94ba42SJung-uk Kim AnMapArgTypeToBtype ( 2160b94ba42SJung-uk Kim UINT32 ArgType); 2170b94ba42SJung-uk Kim 2180b94ba42SJung-uk Kim UINT32 2190b94ba42SJung-uk Kim AnGetBtype ( 2200b94ba42SJung-uk Kim ACPI_PARSE_OBJECT *Op); 2210b94ba42SJung-uk Kim 2220b94ba42SJung-uk Kim void 2230b94ba42SJung-uk Kim AnFormatBtype ( 2240b94ba42SJung-uk Kim char *Buffer, 2250b94ba42SJung-uk Kim UINT32 Btype); 2260b94ba42SJung-uk Kim 2270b94ba42SJung-uk Kim 2280b94ba42SJung-uk Kim /* 2290b94ba42SJung-uk Kim * aslanalyze - Support functions for parse tree walks 2300b94ba42SJung-uk Kim */ 2310b94ba42SJung-uk Kim void 2320b94ba42SJung-uk Kim AnCheckId ( 2330b94ba42SJung-uk Kim ACPI_PARSE_OBJECT *Op, 2340b94ba42SJung-uk Kim ACPI_NAME Type); 2350b94ba42SJung-uk Kim 2360b94ba42SJung-uk Kim /* Values for Type argument above */ 2370b94ba42SJung-uk Kim 2380b94ba42SJung-uk Kim #define ASL_TYPE_HID 0 2390b94ba42SJung-uk Kim #define ASL_TYPE_CID 1 2400b94ba42SJung-uk Kim 2410b94ba42SJung-uk Kim BOOLEAN 2420b94ba42SJung-uk Kim AnIsInternalMethod ( 2430b94ba42SJung-uk Kim ACPI_PARSE_OBJECT *Op); 2440b94ba42SJung-uk Kim 2450b94ba42SJung-uk Kim UINT32 2460b94ba42SJung-uk Kim AnGetInternalMethodReturnType ( 2470b94ba42SJung-uk Kim ACPI_PARSE_OBJECT *Op); 2480b94ba42SJung-uk Kim 2490b94ba42SJung-uk Kim BOOLEAN 2500b94ba42SJung-uk Kim AnLastStatementIsReturn ( 2510b94ba42SJung-uk Kim ACPI_PARSE_OBJECT *Op); 2520b94ba42SJung-uk Kim 2530b94ba42SJung-uk Kim void 2540b94ba42SJung-uk Kim AnCheckMethodReturnValue ( 2550b94ba42SJung-uk Kim ACPI_PARSE_OBJECT *Op, 2560b94ba42SJung-uk Kim const ACPI_OPCODE_INFO *OpInfo, 2570b94ba42SJung-uk Kim ACPI_PARSE_OBJECT *ArgOp, 2580b94ba42SJung-uk Kim UINT32 RequiredBtypes, 2590b94ba42SJung-uk Kim UINT32 ThisNodeBtype); 2600b94ba42SJung-uk Kim 2610b94ba42SJung-uk Kim BOOLEAN 2620b94ba42SJung-uk Kim AnIsResultUsed ( 2630b94ba42SJung-uk Kim ACPI_PARSE_OBJECT *Op); 2640b94ba42SJung-uk Kim 2650b94ba42SJung-uk Kim void 2660b94ba42SJung-uk Kim ApCheckForGpeNameConflict ( 2670b94ba42SJung-uk Kim ACPI_PARSE_OBJECT *Op); 2680b94ba42SJung-uk Kim 269d052a1ccSJung-uk Kim void 270d052a1ccSJung-uk Kim ApCheckRegMethod ( 271d052a1ccSJung-uk Kim ACPI_PARSE_OBJECT *Op); 272d052a1ccSJung-uk Kim 2730b94ba42SJung-uk Kim 2740b94ba42SJung-uk Kim /* 275fba7fc7eSJung-uk Kim * aslerror - error handling/reporting 27653289f6aSNate Lawson */ 277fba7fc7eSJung-uk Kim void 278fba7fc7eSJung-uk Kim AslError ( 279fba7fc7eSJung-uk Kim UINT8 Level, 280fba7fc7eSJung-uk Kim UINT8 MessageId, 281fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 282fba7fc7eSJung-uk Kim char *ExtraMessage); 28353289f6aSNate Lawson 28453289f6aSNate Lawson void 285fba7fc7eSJung-uk Kim AslCoreSubsystemError ( 286fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 287fba7fc7eSJung-uk Kim ACPI_STATUS Status, 288fba7fc7eSJung-uk Kim char *ExtraMessage, 289fba7fc7eSJung-uk Kim BOOLEAN Abort); 29053289f6aSNate Lawson 291fba7fc7eSJung-uk Kim int 292fba7fc7eSJung-uk Kim AslCompilererror( 2933f0275a0SJung-uk Kim const char *s); 294fba7fc7eSJung-uk Kim 295fba7fc7eSJung-uk Kim void 296fba7fc7eSJung-uk Kim AslCommonError ( 297fba7fc7eSJung-uk Kim UINT8 Level, 298fba7fc7eSJung-uk Kim UINT8 MessageId, 299fba7fc7eSJung-uk Kim UINT32 CurrentLineNumber, 300fba7fc7eSJung-uk Kim UINT32 LogicalLineNumber, 301fba7fc7eSJung-uk Kim UINT32 LogicalByteOffset, 302fba7fc7eSJung-uk Kim UINT32 Column, 303fba7fc7eSJung-uk Kim char *Filename, 304fba7fc7eSJung-uk Kim char *ExtraMessage); 305fba7fc7eSJung-uk Kim 306fba7fc7eSJung-uk Kim void 307*4c52cad2SJung-uk Kim AslCommonError2 ( 308*4c52cad2SJung-uk Kim UINT8 Level, 309*4c52cad2SJung-uk Kim UINT8 MessageId, 310*4c52cad2SJung-uk Kim UINT32 LineNumber, 311*4c52cad2SJung-uk Kim UINT32 Column, 312*4c52cad2SJung-uk Kim char *SourceLine, 313*4c52cad2SJung-uk Kim char *Filename, 314*4c52cad2SJung-uk Kim char *ExtraMessage); 315*4c52cad2SJung-uk Kim 316*4c52cad2SJung-uk Kim void 317fba7fc7eSJung-uk Kim AePrintException ( 318fba7fc7eSJung-uk Kim UINT32 FileId, 319fba7fc7eSJung-uk Kim ASL_ERROR_MSG *Enode, 320fba7fc7eSJung-uk Kim char *Header); 321fba7fc7eSJung-uk Kim 322fba7fc7eSJung-uk Kim void 323fba7fc7eSJung-uk Kim AePrintErrorLog ( 324fba7fc7eSJung-uk Kim UINT32 FileId); 325fba7fc7eSJung-uk Kim 326a9f12690SJung-uk Kim void 327a9f12690SJung-uk Kim AeClearErrorLog ( 328a9f12690SJung-uk Kim void); 329a9f12690SJung-uk Kim 3301a39cfb0SJung-uk Kim ACPI_PHYSICAL_ADDRESS 331fba7fc7eSJung-uk Kim AeLocalGetRootPointer ( 3321a39cfb0SJung-uk Kim void); 333fba7fc7eSJung-uk Kim 334fba7fc7eSJung-uk Kim 335fba7fc7eSJung-uk Kim /* 336fba7fc7eSJung-uk Kim * asllisting - generate all "listing" type files 337fba7fc7eSJung-uk Kim */ 338fba7fc7eSJung-uk Kim void 339fba7fc7eSJung-uk Kim LsDoListings ( 340fba7fc7eSJung-uk Kim void); 341fba7fc7eSJung-uk Kim 342fba7fc7eSJung-uk Kim void 343fba7fc7eSJung-uk Kim LsWriteNodeToAsmListing ( 344fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 345fba7fc7eSJung-uk Kim 346fba7fc7eSJung-uk Kim void 347fba7fc7eSJung-uk Kim LsWriteNode ( 348fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 349fba7fc7eSJung-uk Kim UINT32 FileId); 350fba7fc7eSJung-uk Kim 351fba7fc7eSJung-uk Kim void 352fba7fc7eSJung-uk Kim LsDoHexOutput ( 353fba7fc7eSJung-uk Kim void); 354fba7fc7eSJung-uk Kim 3551a39cfb0SJung-uk Kim void 3561a39cfb0SJung-uk Kim LsDumpParseTree ( 3571a39cfb0SJung-uk Kim void); 358fba7fc7eSJung-uk Kim 359fba7fc7eSJung-uk Kim /* 360fba7fc7eSJung-uk Kim * aslfold - constant folding 361fba7fc7eSJung-uk Kim */ 362fba7fc7eSJung-uk Kim ACPI_STATUS 363fba7fc7eSJung-uk Kim OpcAmlConstantWalk ( 364fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 365fba7fc7eSJung-uk Kim UINT32 Level, 366fba7fc7eSJung-uk Kim void *Context); 367fba7fc7eSJung-uk Kim 368fba7fc7eSJung-uk Kim 369fba7fc7eSJung-uk Kim /* 370fba7fc7eSJung-uk Kim * aslopcodes - generate AML opcodes 371fba7fc7eSJung-uk Kim */ 372fba7fc7eSJung-uk Kim ACPI_STATUS 373fba7fc7eSJung-uk Kim OpcAmlOpcodeWalk ( 374fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 375fba7fc7eSJung-uk Kim UINT32 Level, 376fba7fc7eSJung-uk Kim void *Context); 377fba7fc7eSJung-uk Kim 378fba7fc7eSJung-uk Kim ACPI_STATUS 379fba7fc7eSJung-uk Kim OpcAmlOpcodeUpdateWalk ( 380fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 381fba7fc7eSJung-uk Kim UINT32 Level, 382fba7fc7eSJung-uk Kim void *Context); 383fba7fc7eSJung-uk Kim 384fba7fc7eSJung-uk Kim void 385fba7fc7eSJung-uk Kim OpcGenerateAmlOpcode ( 386fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 387fba7fc7eSJung-uk Kim 388fba7fc7eSJung-uk Kim UINT32 389fba7fc7eSJung-uk Kim OpcSetOptimalIntegerSize ( 390fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 391fba7fc7eSJung-uk Kim 392fba7fc7eSJung-uk Kim void 393fba7fc7eSJung-uk Kim OpcGetIntegerWidth ( 394fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 395fba7fc7eSJung-uk Kim 396fba7fc7eSJung-uk Kim 397fba7fc7eSJung-uk Kim /* 398fba7fc7eSJung-uk Kim * asloperands - generate AML operands for the AML opcodes 399fba7fc7eSJung-uk Kim */ 400fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 401fba7fc7eSJung-uk Kim UtGetArg ( 402fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 403fba7fc7eSJung-uk Kim UINT32 Argn); 404fba7fc7eSJung-uk Kim 405fba7fc7eSJung-uk Kim void 406fba7fc7eSJung-uk Kim OpnGenerateAmlOperands ( 407fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 408fba7fc7eSJung-uk Kim 409fba7fc7eSJung-uk Kim void 410fba7fc7eSJung-uk Kim OpnDoPackage ( 411fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 412fba7fc7eSJung-uk Kim 413fba7fc7eSJung-uk Kim 414fba7fc7eSJung-uk Kim /* 415fba7fc7eSJung-uk Kim * aslopt - optmization 416fba7fc7eSJung-uk Kim */ 417fba7fc7eSJung-uk Kim void 418fba7fc7eSJung-uk Kim OptOptimizeNamePath ( 419fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 420fba7fc7eSJung-uk Kim UINT32 Flags, 421fba7fc7eSJung-uk Kim ACPI_WALK_STATE *WalkState, 422fba7fc7eSJung-uk Kim char *AmlNameString, 423fba7fc7eSJung-uk Kim ACPI_NAMESPACE_NODE *TargetNode); 424fba7fc7eSJung-uk Kim 425fba7fc7eSJung-uk Kim 426fba7fc7eSJung-uk Kim /* 427fba7fc7eSJung-uk Kim * aslcodegen - code generation 428fba7fc7eSJung-uk Kim */ 429fba7fc7eSJung-uk Kim void 430fba7fc7eSJung-uk Kim CgGenerateAmlOutput ( 431fba7fc7eSJung-uk Kim void); 432fba7fc7eSJung-uk Kim 433fba7fc7eSJung-uk Kim 434fba7fc7eSJung-uk Kim /* 435a88e22b7SJung-uk Kim * aslfile 436a88e22b7SJung-uk Kim */ 437a88e22b7SJung-uk Kim void 438a88e22b7SJung-uk Kim FlOpenFile ( 439a88e22b7SJung-uk Kim UINT32 FileId, 440a88e22b7SJung-uk Kim char *Filename, 441a88e22b7SJung-uk Kim char *Mode); 442a88e22b7SJung-uk Kim 443a88e22b7SJung-uk Kim 444a88e22b7SJung-uk Kim /* 445fba7fc7eSJung-uk Kim * asllength - calculate/adjust AML package lengths 446fba7fc7eSJung-uk Kim */ 447fba7fc7eSJung-uk Kim ACPI_STATUS 448fba7fc7eSJung-uk Kim LnPackageLengthWalk ( 449fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 450fba7fc7eSJung-uk Kim UINT32 Level, 451fba7fc7eSJung-uk Kim void *Context); 452fba7fc7eSJung-uk Kim 453fba7fc7eSJung-uk Kim ACPI_STATUS 454fba7fc7eSJung-uk Kim LnInitLengthsWalk ( 455fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 456fba7fc7eSJung-uk Kim UINT32 Level, 457fba7fc7eSJung-uk Kim void *Context); 458fba7fc7eSJung-uk Kim 459fba7fc7eSJung-uk Kim void 460fba7fc7eSJung-uk Kim CgGenerateAmlLengths ( 461fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 462fba7fc7eSJung-uk Kim 463fba7fc7eSJung-uk Kim 464fba7fc7eSJung-uk Kim /* 465fba7fc7eSJung-uk Kim * aslmap - opcode mappings and reserved method names 466fba7fc7eSJung-uk Kim */ 467fba7fc7eSJung-uk Kim ACPI_OBJECT_TYPE 468fba7fc7eSJung-uk Kim AslMapNamedOpcodeToDataType ( 469fba7fc7eSJung-uk Kim UINT16 Opcode); 470fba7fc7eSJung-uk Kim 471ca3cf4faSJung-uk Kim 472ca3cf4faSJung-uk Kim /* 473ca3cf4faSJung-uk Kim * aslpredef - ACPI predefined names support 474ca3cf4faSJung-uk Kim */ 475d052a1ccSJung-uk Kim BOOLEAN 476ca3cf4faSJung-uk Kim ApCheckForPredefinedMethod ( 477ca3cf4faSJung-uk Kim ACPI_PARSE_OBJECT *Op, 478ca3cf4faSJung-uk Kim ASL_METHOD_INFO *MethodInfo); 479ca3cf4faSJung-uk Kim 4808c8be05fSJung-uk Kim void 4818c8be05fSJung-uk Kim ApCheckPredefinedReturnValue ( 4828c8be05fSJung-uk Kim ACPI_PARSE_OBJECT *Op, 4838c8be05fSJung-uk Kim ASL_METHOD_INFO *MethodInfo); 4848c8be05fSJung-uk Kim 485ca3cf4faSJung-uk Kim UINT32 486ca3cf4faSJung-uk Kim ApCheckForPredefinedName ( 487ca3cf4faSJung-uk Kim ACPI_PARSE_OBJECT *Op, 488ca3cf4faSJung-uk Kim char *Name); 489ca3cf4faSJung-uk Kim 490ca3cf4faSJung-uk Kim void 491ca3cf4faSJung-uk Kim ApCheckForPredefinedObject ( 492ca3cf4faSJung-uk Kim ACPI_PARSE_OBJECT *Op, 493ca3cf4faSJung-uk Kim char *Name); 494ca3cf4faSJung-uk Kim 495ca3cf4faSJung-uk Kim void 496ca3cf4faSJung-uk Kim ApDisplayReservedNames ( 497fba7fc7eSJung-uk Kim void); 498fba7fc7eSJung-uk Kim 499fba7fc7eSJung-uk Kim 500fba7fc7eSJung-uk Kim /* 501fba7fc7eSJung-uk Kim * asltransform - parse tree transformations 502fba7fc7eSJung-uk Kim */ 503fba7fc7eSJung-uk Kim ACPI_STATUS 504fba7fc7eSJung-uk Kim TrAmlTransformWalk ( 505fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 506fba7fc7eSJung-uk Kim UINT32 Level, 507fba7fc7eSJung-uk Kim void *Context); 508fba7fc7eSJung-uk Kim 509fba7fc7eSJung-uk Kim 510fba7fc7eSJung-uk Kim /* 511fba7fc7eSJung-uk Kim * asltree - parse tree support 512fba7fc7eSJung-uk Kim */ 513fba7fc7eSJung-uk Kim ACPI_STATUS 514fba7fc7eSJung-uk Kim TrWalkParseTree ( 515fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 516fba7fc7eSJung-uk Kim UINT32 Visitation, 517fba7fc7eSJung-uk Kim ASL_WALK_CALLBACK DescendingCallback, 518fba7fc7eSJung-uk Kim ASL_WALK_CALLBACK AscendingCallback, 519fba7fc7eSJung-uk Kim void *Context); 520fba7fc7eSJung-uk Kim 521fba7fc7eSJung-uk Kim /* Values for "Visitation" parameter above */ 522fba7fc7eSJung-uk Kim 523fba7fc7eSJung-uk Kim #define ASL_WALK_VISIT_DOWNWARD 0x01 524fba7fc7eSJung-uk Kim #define ASL_WALK_VISIT_UPWARD 0x02 525fba7fc7eSJung-uk Kim #define ASL_WALK_VISIT_TWICE (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD) 526fba7fc7eSJung-uk Kim 527fba7fc7eSJung-uk Kim 528fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 529fba7fc7eSJung-uk Kim TrAllocateNode ( 530fba7fc7eSJung-uk Kim UINT32 ParseOpcode); 531fba7fc7eSJung-uk Kim 532fba7fc7eSJung-uk Kim void 533fba7fc7eSJung-uk Kim TrReleaseNode ( 534fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 535fba7fc7eSJung-uk Kim 536fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 537fba7fc7eSJung-uk Kim TrUpdateNode ( 538fba7fc7eSJung-uk Kim UINT32 ParseOpcode, 539fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 540fba7fc7eSJung-uk Kim 541fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 542fba7fc7eSJung-uk Kim TrCreateNode ( 543fba7fc7eSJung-uk Kim UINT32 ParseOpcode, 544fba7fc7eSJung-uk Kim UINT32 NumChildren, 545fba7fc7eSJung-uk Kim ...); 546fba7fc7eSJung-uk Kim 547fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 548fba7fc7eSJung-uk Kim TrCreateLeafNode ( 549fba7fc7eSJung-uk Kim UINT32 ParseOpcode); 550fba7fc7eSJung-uk Kim 551fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 552fba7fc7eSJung-uk Kim TrCreateValuedLeafNode ( 553fba7fc7eSJung-uk Kim UINT32 ParseOpcode, 5549a179dd8SJung-uk Kim UINT64 Value); 555fba7fc7eSJung-uk Kim 556fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 5570b94ba42SJung-uk Kim TrCreateConstantLeafNode ( 5580b94ba42SJung-uk Kim UINT32 ParseOpcode); 5590b94ba42SJung-uk Kim 5600b94ba42SJung-uk Kim ACPI_PARSE_OBJECT * 561fba7fc7eSJung-uk Kim TrLinkChildren ( 562fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 563fba7fc7eSJung-uk Kim UINT32 NumChildren, 564fba7fc7eSJung-uk Kim ...); 565fba7fc7eSJung-uk Kim 566fba7fc7eSJung-uk Kim void 567fba7fc7eSJung-uk Kim TrSetEndLineNumber ( 568fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 569fba7fc7eSJung-uk Kim 570fba7fc7eSJung-uk Kim void 571fba7fc7eSJung-uk Kim TrWalkTree ( 572fba7fc7eSJung-uk Kim void); 573fba7fc7eSJung-uk Kim 574fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 575fba7fc7eSJung-uk Kim TrLinkPeerNode ( 576fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op1, 577fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op2); 578fba7fc7eSJung-uk Kim 579fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 580fba7fc7eSJung-uk Kim TrLinkChildNode ( 581fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op1, 582fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op2); 583fba7fc7eSJung-uk Kim 584fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 585fba7fc7eSJung-uk Kim TrSetNodeFlags ( 586fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 587fba7fc7eSJung-uk Kim UINT32 Flags); 588fba7fc7eSJung-uk Kim 589fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT * 590fba7fc7eSJung-uk Kim TrLinkPeerNodes ( 591fba7fc7eSJung-uk Kim UINT32 NumPeers, 592fba7fc7eSJung-uk Kim ...); 593fba7fc7eSJung-uk Kim 594fba7fc7eSJung-uk Kim 595fba7fc7eSJung-uk Kim /* 596fba7fc7eSJung-uk Kim * aslfiles - File I/O support 597fba7fc7eSJung-uk Kim */ 598fba7fc7eSJung-uk Kim void 599fba7fc7eSJung-uk Kim AslAbort ( 600fba7fc7eSJung-uk Kim void); 60153289f6aSNate Lawson 60253289f6aSNate Lawson void 603d6dd1baeSJung-uk Kim FlAddIncludeDirectory ( 604d6dd1baeSJung-uk Kim char *Dir); 605d6dd1baeSJung-uk Kim 606d6dd1baeSJung-uk Kim void 60753289f6aSNate Lawson FlOpenIncludeFile ( 60853289f6aSNate Lawson ACPI_PARSE_OBJECT *Op); 60953289f6aSNate Lawson 61053289f6aSNate Lawson void 61153289f6aSNate Lawson FlFileError ( 61253289f6aSNate Lawson UINT32 FileId, 61353289f6aSNate Lawson UINT8 ErrorId); 61453289f6aSNate Lawson 6153f5e024cSJung-uk Kim UINT32 6163f5e024cSJung-uk Kim FlGetFileSize ( 6173f5e024cSJung-uk Kim UINT32 FileId); 6183f5e024cSJung-uk Kim 61953289f6aSNate Lawson ACPI_STATUS 62053289f6aSNate Lawson FlReadFile ( 62153289f6aSNate Lawson UINT32 FileId, 62253289f6aSNate Lawson void *Buffer, 62353289f6aSNate Lawson UINT32 Length); 62453289f6aSNate Lawson 62553289f6aSNate Lawson void 62653289f6aSNate Lawson FlWriteFile ( 62753289f6aSNate Lawson UINT32 FileId, 62853289f6aSNate Lawson void *Buffer, 62953289f6aSNate Lawson UINT32 Length); 63053289f6aSNate Lawson 63153289f6aSNate Lawson void 63253289f6aSNate Lawson FlSeekFile ( 63353289f6aSNate Lawson UINT32 FileId, 63453289f6aSNate Lawson long Offset); 63553289f6aSNate Lawson 63653289f6aSNate Lawson void 63753289f6aSNate Lawson FlCloseFile ( 63853289f6aSNate Lawson UINT32 FileId); 63953289f6aSNate Lawson 64053289f6aSNate Lawson void 64153289f6aSNate Lawson FlPrintFile ( 64253289f6aSNate Lawson UINT32 FileId, 64353289f6aSNate Lawson char *Format, 64453289f6aSNate Lawson ...); 64553289f6aSNate Lawson 64653289f6aSNate Lawson void 64753289f6aSNate Lawson FlSetLineNumber ( 64853289f6aSNate Lawson ACPI_PARSE_OBJECT *Op); 64953289f6aSNate Lawson 65053289f6aSNate Lawson ACPI_STATUS 65153289f6aSNate Lawson FlOpenInputFile ( 65253289f6aSNate Lawson char *InputFilename); 65353289f6aSNate Lawson 65453289f6aSNate Lawson ACPI_STATUS 65553289f6aSNate Lawson FlOpenAmlOutputFile ( 65653289f6aSNate Lawson char *InputFilename); 65753289f6aSNate Lawson 65853289f6aSNate Lawson ACPI_STATUS 65953289f6aSNate Lawson FlOpenMiscOutputFiles ( 66053289f6aSNate Lawson char *InputFilename); 66153289f6aSNate Lawson 66253289f6aSNate Lawson 663fba7fc7eSJung-uk Kim /* 664fba7fc7eSJung-uk Kim * asload - load namespace in prep for cross reference 665fba7fc7eSJung-uk Kim */ 66653289f6aSNate Lawson ACPI_STATUS 66753289f6aSNate Lawson LdLoadNamespace ( 66853289f6aSNate Lawson ACPI_PARSE_OBJECT *RootOp); 66953289f6aSNate Lawson 67053289f6aSNate Lawson 671fba7fc7eSJung-uk Kim /* 672fba7fc7eSJung-uk Kim * asllookup - namespace cross reference 673fba7fc7eSJung-uk Kim */ 67453289f6aSNate Lawson ACPI_STATUS 675fba7fc7eSJung-uk Kim LkCrossReferenceNamespace ( 676fba7fc7eSJung-uk Kim void); 67753289f6aSNate Lawson 6781a39cfb0SJung-uk Kim void 6791a39cfb0SJung-uk Kim LkFindUnreferencedObjects ( 6801a39cfb0SJung-uk Kim void); 6811a39cfb0SJung-uk Kim 68253289f6aSNate Lawson ACPI_STATUS 68353289f6aSNate Lawson LsDisplayNamespace ( 68453289f6aSNate Lawson void); 68553289f6aSNate Lawson 68642fecd12SJung-uk Kim void 68742fecd12SJung-uk Kim LsSetupNsList ( 68842fecd12SJung-uk Kim void *Handle); 68942fecd12SJung-uk Kim 69053289f6aSNate Lawson 691fba7fc7eSJung-uk Kim /* 692fba7fc7eSJung-uk Kim * aslutils - common compiler utilites 693fba7fc7eSJung-uk Kim */ 694fba7fc7eSJung-uk Kim void 695fba7fc7eSJung-uk Kim DbgPrint ( 696fba7fc7eSJung-uk Kim UINT32 Type, 697fba7fc7eSJung-uk Kim char *Format, 698fba7fc7eSJung-uk Kim ...); 69953289f6aSNate Lawson 700fba7fc7eSJung-uk Kim /* Type values for above */ 701fba7fc7eSJung-uk Kim 702fba7fc7eSJung-uk Kim #define ASL_DEBUG_OUTPUT 0 703fba7fc7eSJung-uk Kim #define ASL_PARSE_OUTPUT 1 704fba7fc7eSJung-uk Kim #define ASL_TREE_OUTPUT 2 70553289f6aSNate Lawson 70653289f6aSNate Lawson void 707a88e22b7SJung-uk Kim UtDisplaySupportedTables ( 708a88e22b7SJung-uk Kim void); 709a88e22b7SJung-uk Kim 710a88e22b7SJung-uk Kim void 71153289f6aSNate Lawson UtDisplayConstantOpcodes ( 71253289f6aSNate Lawson void); 71353289f6aSNate Lawson 714fba7fc7eSJung-uk Kim UINT8 71553289f6aSNate Lawson UtBeginEvent ( 71653289f6aSNate Lawson char *Name); 71753289f6aSNate Lawson 71853289f6aSNate Lawson void 71953289f6aSNate Lawson UtEndEvent ( 720fba7fc7eSJung-uk Kim UINT8 Event); 72153289f6aSNate Lawson 72253289f6aSNate Lawson void * 72353289f6aSNate Lawson UtLocalCalloc ( 72453289f6aSNate Lawson UINT32 Size); 72553289f6aSNate Lawson 72653289f6aSNate Lawson void 72753289f6aSNate Lawson UtPrintFormattedName ( 72853289f6aSNate Lawson UINT16 ParseOpcode, 72953289f6aSNate Lawson UINT32 Level); 73053289f6aSNate Lawson 73153289f6aSNate Lawson void 73253289f6aSNate Lawson UtDisplaySummary ( 73353289f6aSNate Lawson UINT32 FileId); 73453289f6aSNate Lawson 73553289f6aSNate Lawson UINT8 73653289f6aSNate Lawson UtHexCharToValue ( 737fba7fc7eSJung-uk Kim int HexChar); 73853289f6aSNate Lawson 73953289f6aSNate Lawson void 74053289f6aSNate Lawson UtConvertByteToHex ( 74153289f6aSNate Lawson UINT8 RawByte, 74253289f6aSNate Lawson UINT8 *Buffer); 74353289f6aSNate Lawson 74453289f6aSNate Lawson void 74553289f6aSNate Lawson UtConvertByteToAsmHex ( 74653289f6aSNate Lawson UINT8 RawByte, 74753289f6aSNate Lawson UINT8 *Buffer); 74853289f6aSNate Lawson 74953289f6aSNate Lawson char * 75053289f6aSNate Lawson UtGetOpName ( 75153289f6aSNate Lawson UINT32 ParseOpcode); 75253289f6aSNate Lawson 75353289f6aSNate Lawson void 75453289f6aSNate Lawson UtSetParseOpName ( 75553289f6aSNate Lawson ACPI_PARSE_OBJECT *Op); 75653289f6aSNate Lawson 75753289f6aSNate Lawson char * 75853289f6aSNate Lawson UtGetStringBuffer ( 75953289f6aSNate Lawson UINT32 Length); 76053289f6aSNate Lawson 76153289f6aSNate Lawson ACPI_STATUS 76253289f6aSNate Lawson UtInternalizeName ( 76353289f6aSNate Lawson char *ExternalName, 76453289f6aSNate Lawson char **ConvertedName); 76553289f6aSNate Lawson 76653289f6aSNate Lawson void 76753289f6aSNate Lawson UtAttachNamepathToOwner ( 76853289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 76953289f6aSNate Lawson ACPI_PARSE_OBJECT *NameNode); 77053289f6aSNate Lawson 77153289f6aSNate Lawson ACPI_PARSE_OBJECT * 77253289f6aSNate Lawson UtCheckIntegerRange ( 77353289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 77453289f6aSNate Lawson UINT32 LowValue, 77553289f6aSNate Lawson UINT32 HighValue); 77653289f6aSNate Lawson 7779a179dd8SJung-uk Kim UINT64 77853289f6aSNate Lawson UtDoConstant ( 77953289f6aSNate Lawson char *String); 78053289f6aSNate Lawson 781d052a1ccSJung-uk Kim ACPI_STATUS 782d052a1ccSJung-uk Kim UtStrtoul64 ( 783d052a1ccSJung-uk Kim char *String, 784d052a1ccSJung-uk Kim UINT32 Base, 785d052a1ccSJung-uk Kim UINT64 *RetInteger); 786d052a1ccSJung-uk Kim 787d052a1ccSJung-uk Kim 788d244b227SJung-uk Kim /* 789d244b227SJung-uk Kim * asluuid - UUID support 790d244b227SJung-uk Kim */ 791d244b227SJung-uk Kim ACPI_STATUS 792d244b227SJung-uk Kim AuValidateUuid ( 793d244b227SJung-uk Kim char *InString); 794d244b227SJung-uk Kim 795d244b227SJung-uk Kim ACPI_STATUS 796d244b227SJung-uk Kim AuConvertStringToUuid ( 797d244b227SJung-uk Kim char *InString, 798d244b227SJung-uk Kim char *UuIdBuffer); 799d244b227SJung-uk Kim 800d244b227SJung-uk Kim ACPI_STATUS 801d244b227SJung-uk Kim AuConvertUuidToString ( 802d244b227SJung-uk Kim char *UuIdBuffer, 803d244b227SJung-uk Kim char *OutString); 80453289f6aSNate Lawson 80553289f6aSNate Lawson /* 806fba7fc7eSJung-uk Kim * aslresource - Resource template generation utilities 80753289f6aSNate Lawson */ 8083f5e024cSJung-uk Kim void 8093f5e024cSJung-uk Kim RsSmallAddressCheck ( 8103f5e024cSJung-uk Kim UINT8 Type, 8113f5e024cSJung-uk Kim UINT32 Minimum, 8123f5e024cSJung-uk Kim UINT32 Maximum, 8133f5e024cSJung-uk Kim UINT32 Length, 8143f5e024cSJung-uk Kim UINT32 Alignment, 8153f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *MinOp, 8163f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *MaxOp, 8173f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *LengthOp, 8183c1812acSJung-uk Kim ACPI_PARSE_OBJECT *AlignOp, 8193c1812acSJung-uk Kim ACPI_PARSE_OBJECT *Op); 8203f5e024cSJung-uk Kim 8213f5e024cSJung-uk Kim void 8223f5e024cSJung-uk Kim RsLargeAddressCheck ( 8233f5e024cSJung-uk Kim UINT64 Minimum, 8243f5e024cSJung-uk Kim UINT64 Maximum, 8253f5e024cSJung-uk Kim UINT64 Length, 8263f5e024cSJung-uk Kim UINT64 Granularity, 8273f5e024cSJung-uk Kim UINT8 Flags, 8283f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *MinOp, 8293f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *MaxOp, 8303f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *LengthOp, 8313c1812acSJung-uk Kim ACPI_PARSE_OBJECT *GranOp, 8323c1812acSJung-uk Kim ACPI_PARSE_OBJECT *Op); 8333f5e024cSJung-uk Kim 8343f5e024cSJung-uk Kim UINT16 8353f5e024cSJung-uk Kim RsGetStringDataLength ( 8363f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *InitializerOp); 8373f5e024cSJung-uk Kim 83853289f6aSNate Lawson ASL_RESOURCE_NODE * 83953289f6aSNate Lawson RsAllocateResourceNode ( 84053289f6aSNate Lawson UINT32 Size); 84153289f6aSNate Lawson 84253289f6aSNate Lawson void 8433f0275a0SJung-uk Kim RsCreateResourceField ( 84453289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 84553289f6aSNate Lawson char *Name, 84653289f6aSNate Lawson UINT32 ByteOffset, 8473f0275a0SJung-uk Kim UINT32 BitOffset, 8483f0275a0SJung-uk Kim UINT32 BitLength); 84953289f6aSNate Lawson 85053289f6aSNate Lawson void 85153289f6aSNate Lawson RsSetFlagBits ( 85253289f6aSNate Lawson UINT8 *Flags, 85353289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 85453289f6aSNate Lawson UINT8 Position, 85553289f6aSNate Lawson UINT8 DefaultBit); 85653289f6aSNate Lawson 8573f0275a0SJung-uk Kim void 8583f0275a0SJung-uk Kim RsSetFlagBits16 ( 8593f0275a0SJung-uk Kim UINT16 *Flags, 8603f0275a0SJung-uk Kim ACPI_PARSE_OBJECT *Op, 8613f0275a0SJung-uk Kim UINT8 Position, 8623f0275a0SJung-uk Kim UINT8 DefaultBit); 8633f0275a0SJung-uk Kim 86453289f6aSNate Lawson ACPI_PARSE_OBJECT * 86553289f6aSNate Lawson RsCompleteNodeAndGetNext ( 86653289f6aSNate Lawson ACPI_PARSE_OBJECT *Op); 86753289f6aSNate Lawson 868fba7fc7eSJung-uk Kim void 869fba7fc7eSJung-uk Kim RsCheckListForDuplicates ( 870fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 871fba7fc7eSJung-uk Kim 87253289f6aSNate Lawson ASL_RESOURCE_NODE * 87353289f6aSNate Lawson RsDoOneResourceDescriptor ( 87453289f6aSNate Lawson ACPI_PARSE_OBJECT *DescriptorTypeOp, 87553289f6aSNate Lawson UINT32 CurrentByteOffset, 87653289f6aSNate Lawson UINT8 *State); 87753289f6aSNate Lawson 878fba7fc7eSJung-uk Kim /* Values for State above */ 879fba7fc7eSJung-uk Kim 88053289f6aSNate Lawson #define ACPI_RSTATE_NORMAL 0 88153289f6aSNate Lawson #define ACPI_RSTATE_START_DEPENDENT 1 88253289f6aSNate Lawson #define ACPI_RSTATE_DEPENDENT_LIST 2 88353289f6aSNate Lawson 88453289f6aSNate Lawson UINT32 88553289f6aSNate Lawson RsLinkDescriptorChain ( 88653289f6aSNate Lawson ASL_RESOURCE_NODE **PreviousRnode, 88753289f6aSNate Lawson ASL_RESOURCE_NODE *Rnode); 88853289f6aSNate Lawson 889fba7fc7eSJung-uk Kim void 890fba7fc7eSJung-uk Kim RsDoResourceTemplate ( 891fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op); 892fba7fc7eSJung-uk Kim 89353289f6aSNate Lawson 89453289f6aSNate Lawson /* 8953f5e024cSJung-uk Kim * aslrestype1 - Miscellaneous Small descriptors 89653289f6aSNate Lawson */ 89753289f6aSNate Lawson ASL_RESOURCE_NODE * 8981a39cfb0SJung-uk Kim RsDoEndTagDescriptor ( 8991a39cfb0SJung-uk Kim ACPI_PARSE_OBJECT *Op, 9001a39cfb0SJung-uk Kim UINT32 CurrentByteOffset); 9011a39cfb0SJung-uk Kim 9021a39cfb0SJung-uk Kim ASL_RESOURCE_NODE * 90353289f6aSNate Lawson RsDoEndDependentDescriptor ( 90453289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 90553289f6aSNate Lawson UINT32 CurrentByteOffset); 90653289f6aSNate Lawson 90753289f6aSNate Lawson ASL_RESOURCE_NODE * 90853289f6aSNate Lawson RsDoMemory24Descriptor ( 90953289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 91053289f6aSNate Lawson UINT32 CurrentByteOffset); 91153289f6aSNate Lawson 91253289f6aSNate Lawson ASL_RESOURCE_NODE * 91353289f6aSNate Lawson RsDoMemory32Descriptor ( 91453289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 91553289f6aSNate Lawson UINT32 CurrentByteOffset); 91653289f6aSNate Lawson 91753289f6aSNate Lawson ASL_RESOURCE_NODE * 91853289f6aSNate Lawson RsDoMemory32FixedDescriptor ( 91953289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 92053289f6aSNate Lawson UINT32 CurrentByteOffset); 92153289f6aSNate Lawson 92253289f6aSNate Lawson ASL_RESOURCE_NODE * 92353289f6aSNate Lawson RsDoStartDependentDescriptor ( 92453289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 92553289f6aSNate Lawson UINT32 CurrentByteOffset); 92653289f6aSNate Lawson 92753289f6aSNate Lawson ASL_RESOURCE_NODE * 92853289f6aSNate Lawson RsDoStartDependentNoPriDescriptor ( 92953289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 93053289f6aSNate Lawson UINT32 CurrentByteOffset); 93153289f6aSNate Lawson 93253289f6aSNate Lawson ASL_RESOURCE_NODE * 93353289f6aSNate Lawson RsDoVendorSmallDescriptor ( 93453289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 93553289f6aSNate Lawson UINT32 CurrentByteOffset); 93653289f6aSNate Lawson 93753289f6aSNate Lawson 93853289f6aSNate Lawson /* 9393f5e024cSJung-uk Kim * aslrestype1i - I/O-related Small descriptors 9403f5e024cSJung-uk Kim */ 9413f5e024cSJung-uk Kim ASL_RESOURCE_NODE * 9423f5e024cSJung-uk Kim RsDoDmaDescriptor ( 9433f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *Op, 9443f5e024cSJung-uk Kim UINT32 CurrentByteOffset); 9453f5e024cSJung-uk Kim 9463f5e024cSJung-uk Kim ASL_RESOURCE_NODE * 9473f0275a0SJung-uk Kim RsDoFixedDmaDescriptor ( 9483f0275a0SJung-uk Kim ACPI_PARSE_OBJECT *Op, 9493f0275a0SJung-uk Kim UINT32 CurrentByteOffset); 9503f0275a0SJung-uk Kim 9513f0275a0SJung-uk Kim ASL_RESOURCE_NODE * 9523f5e024cSJung-uk Kim RsDoFixedIoDescriptor ( 9533f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *Op, 9543f5e024cSJung-uk Kim UINT32 CurrentByteOffset); 9553f5e024cSJung-uk Kim 9563f5e024cSJung-uk Kim ASL_RESOURCE_NODE * 9573f5e024cSJung-uk Kim RsDoIoDescriptor ( 9583f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *Op, 9593f5e024cSJung-uk Kim UINT32 CurrentByteOffset); 9603f5e024cSJung-uk Kim 9613f5e024cSJung-uk Kim ASL_RESOURCE_NODE * 9623f5e024cSJung-uk Kim RsDoIrqDescriptor ( 9633f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *Op, 9643f5e024cSJung-uk Kim UINT32 CurrentByteOffset); 9653f5e024cSJung-uk Kim 9663f5e024cSJung-uk Kim ASL_RESOURCE_NODE * 9673f5e024cSJung-uk Kim RsDoIrqNoFlagsDescriptor ( 9683f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *Op, 9693f5e024cSJung-uk Kim UINT32 CurrentByteOffset); 9703f5e024cSJung-uk Kim 9713f5e024cSJung-uk Kim 9723f5e024cSJung-uk Kim /* 9733f5e024cSJung-uk Kim * aslrestype2 - Large resource descriptors 97453289f6aSNate Lawson */ 975fba7fc7eSJung-uk Kim ASL_RESOURCE_NODE * 976fba7fc7eSJung-uk Kim RsDoInterruptDescriptor ( 977fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 978fba7fc7eSJung-uk Kim UINT32 CurrentByteOffset); 97953289f6aSNate Lawson 98053289f6aSNate Lawson ASL_RESOURCE_NODE * 9813f5e024cSJung-uk Kim RsDoVendorLargeDescriptor ( 9823f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *Op, 9833f5e024cSJung-uk Kim UINT32 CurrentByteOffset); 9843f5e024cSJung-uk Kim 9853f5e024cSJung-uk Kim ASL_RESOURCE_NODE * 9863f5e024cSJung-uk Kim RsDoGeneralRegisterDescriptor ( 9873f5e024cSJung-uk Kim ACPI_PARSE_OBJECT *Op, 9883f5e024cSJung-uk Kim UINT32 CurrentByteOffset); 9893f5e024cSJung-uk Kim 9903f0275a0SJung-uk Kim ASL_RESOURCE_NODE * 9913f0275a0SJung-uk Kim RsDoGpioIntDescriptor ( 9923f0275a0SJung-uk Kim ACPI_PARSE_OBJECT *Op, 9933f0275a0SJung-uk Kim UINT32 CurrentByteOffset); 9943f0275a0SJung-uk Kim 9953f0275a0SJung-uk Kim ASL_RESOURCE_NODE * 9963f0275a0SJung-uk Kim RsDoGpioIoDescriptor ( 9973f0275a0SJung-uk Kim ACPI_PARSE_OBJECT *Op, 9983f0275a0SJung-uk Kim UINT32 CurrentByteOffset); 9993f0275a0SJung-uk Kim 10003f0275a0SJung-uk Kim ASL_RESOURCE_NODE * 10013f0275a0SJung-uk Kim RsDoI2cSerialBusDescriptor ( 10023f0275a0SJung-uk Kim ACPI_PARSE_OBJECT *Op, 10033f0275a0SJung-uk Kim UINT32 CurrentByteOffset); 10043f0275a0SJung-uk Kim 10053f0275a0SJung-uk Kim ASL_RESOURCE_NODE * 10063f0275a0SJung-uk Kim RsDoSpiSerialBusDescriptor ( 10073f0275a0SJung-uk Kim ACPI_PARSE_OBJECT *Op, 10083f0275a0SJung-uk Kim UINT32 CurrentByteOffset); 10093f0275a0SJung-uk Kim 10103f0275a0SJung-uk Kim ASL_RESOURCE_NODE * 10113f0275a0SJung-uk Kim RsDoUartSerialBusDescriptor ( 10123f0275a0SJung-uk Kim ACPI_PARSE_OBJECT *Op, 10133f0275a0SJung-uk Kim UINT32 CurrentByteOffset); 10143f5e024cSJung-uk Kim 10153f5e024cSJung-uk Kim /* 10163f5e024cSJung-uk Kim * aslrestype2d - DWord address descriptors 10173f5e024cSJung-uk Kim */ 10183f5e024cSJung-uk Kim ASL_RESOURCE_NODE * 101953289f6aSNate Lawson RsDoDwordIoDescriptor ( 102053289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 102153289f6aSNate Lawson UINT32 CurrentByteOffset); 102253289f6aSNate Lawson 102353289f6aSNate Lawson ASL_RESOURCE_NODE * 102453289f6aSNate Lawson RsDoDwordMemoryDescriptor ( 102553289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 102653289f6aSNate Lawson UINT32 CurrentByteOffset); 102753289f6aSNate Lawson 102853289f6aSNate Lawson ASL_RESOURCE_NODE * 1029fba7fc7eSJung-uk Kim RsDoDwordSpaceDescriptor ( 1030fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 1031fba7fc7eSJung-uk Kim UINT32 CurrentByteOffset); 1032fba7fc7eSJung-uk Kim 10333f5e024cSJung-uk Kim 10343f5e024cSJung-uk Kim /* 10353f5e024cSJung-uk Kim * aslrestype2e - Extended address descriptors 10363f5e024cSJung-uk Kim */ 1037fba7fc7eSJung-uk Kim ASL_RESOURCE_NODE * 1038fba7fc7eSJung-uk Kim RsDoExtendedIoDescriptor ( 1039fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 1040fba7fc7eSJung-uk Kim UINT32 CurrentByteOffset); 1041fba7fc7eSJung-uk Kim 1042fba7fc7eSJung-uk Kim ASL_RESOURCE_NODE * 1043fba7fc7eSJung-uk Kim RsDoExtendedMemoryDescriptor ( 1044fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 1045fba7fc7eSJung-uk Kim UINT32 CurrentByteOffset); 1046fba7fc7eSJung-uk Kim 1047fba7fc7eSJung-uk Kim ASL_RESOURCE_NODE * 1048fba7fc7eSJung-uk Kim RsDoExtendedSpaceDescriptor ( 1049fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 1050fba7fc7eSJung-uk Kim UINT32 CurrentByteOffset); 1051fba7fc7eSJung-uk Kim 10523f5e024cSJung-uk Kim 10533f5e024cSJung-uk Kim /* 10543f5e024cSJung-uk Kim * aslrestype2q - QWord address descriptors 10553f5e024cSJung-uk Kim */ 1056fba7fc7eSJung-uk Kim ASL_RESOURCE_NODE * 105753289f6aSNate Lawson RsDoQwordIoDescriptor ( 105853289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 105953289f6aSNate Lawson UINT32 CurrentByteOffset); 106053289f6aSNate Lawson 106153289f6aSNate Lawson ASL_RESOURCE_NODE * 106253289f6aSNate Lawson RsDoQwordMemoryDescriptor ( 106353289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 106453289f6aSNate Lawson UINT32 CurrentByteOffset); 106553289f6aSNate Lawson 106653289f6aSNate Lawson ASL_RESOURCE_NODE * 1067fba7fc7eSJung-uk Kim RsDoQwordSpaceDescriptor ( 1068fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 1069fba7fc7eSJung-uk Kim UINT32 CurrentByteOffset); 1070fba7fc7eSJung-uk Kim 10713f5e024cSJung-uk Kim 10723f5e024cSJung-uk Kim /* 10733f5e024cSJung-uk Kim * aslrestype2w - Word address descriptors 10743f5e024cSJung-uk Kim */ 1075fba7fc7eSJung-uk Kim ASL_RESOURCE_NODE * 107653289f6aSNate Lawson RsDoWordIoDescriptor ( 107753289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 107853289f6aSNate Lawson UINT32 CurrentByteOffset); 107953289f6aSNate Lawson 108053289f6aSNate Lawson ASL_RESOURCE_NODE * 1081fba7fc7eSJung-uk Kim RsDoWordSpaceDescriptor ( 1082fba7fc7eSJung-uk Kim ACPI_PARSE_OBJECT *Op, 1083fba7fc7eSJung-uk Kim UINT32 CurrentByteOffset); 1084fba7fc7eSJung-uk Kim 1085fba7fc7eSJung-uk Kim ASL_RESOURCE_NODE * 108653289f6aSNate Lawson RsDoWordBusNumberDescriptor ( 108753289f6aSNate Lawson ACPI_PARSE_OBJECT *Op, 108853289f6aSNate Lawson UINT32 CurrentByteOffset); 108953289f6aSNate Lawson 1090a88e22b7SJung-uk Kim /* 1091a88e22b7SJung-uk Kim * Entry to data table compiler subsystem 1092a88e22b7SJung-uk Kim */ 1093a88e22b7SJung-uk Kim ACPI_STATUS 1094a88e22b7SJung-uk Kim DtDoCompile( 1095a88e22b7SJung-uk Kim void); 1096a88e22b7SJung-uk Kim 1097a88e22b7SJung-uk Kim ACPI_STATUS 1098a88e22b7SJung-uk Kim DtCreateTemplates ( 1099a88e22b7SJung-uk Kim char *Signature); 1100a88e22b7SJung-uk Kim 110153289f6aSNate Lawson #endif /* __ASLCOMPILER_H */ 110253289f6aSNate Lawson 1103