aslcompiler.h revision 199767f8919635c4928607450d9e0abb932109ce
/******************************************************************************
*
* Module Name: aslcompiler.h - common include file for iASL
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*/
#ifndef __ASLCOMPILER_H
#define __ASLCOMPILER_H
/* Microsoft-specific */
/* warn : used #pragma pack */
/* warn : named type definition in parentheses */
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
/* Compiler headers */
/*******************************************************************************
*
* Compiler prototypes
*
******************************************************************************/
/*
*/
void);
int
void);
void
void);
void
int SourceChar);
int
void);
void
char *Filename);
void
void);
/*
* aslstartup - entered from main()
*/
void
void);
typedef
char *);
char *Filename);
void);
/*
* aslcompile - compile mainline
*/
void
void
int
void);
void
void);
void
void);
void
void);
/*
* aslascii - ascii support
*/
char *Filename,
/*
* aslwalks - semantic analysis and parse tree walks
*/
void *Context);
void *Context);
void *Context);
void *Context);
/*
* aslmethod - Control method analysis walk
*/
void *Context);
void *Context);
/*
* aslbtypes - bitfield data types
*/
void
char *Buffer,
/*
* aslanalyze - Support functions for parse tree walks
*/
void
/* Values for Type argument above */
#define ASL_TYPE_HID 0
#define ASL_TYPE_CID 1
void
const ACPI_OPCODE_INFO *OpInfo,
void
void
char *Name,
/*
*/
void
AslAbort (
void);
void
AslError (
char *ExtraMessage);
char *MessageIdString);
void
char *ExtraMessage,
int
const char *s);
void
char *Filename,
char *ExtraMessage);
void
char *SourceLine,
char *Filename,
char *ExtraMessage);
void
char *Header);
void
void
void);
/*
* asllisting - generate all "listing" type files
*/
void
void);
void
void
void
void);
/*
* asllistsup - Listing file support utilities
*/
void
void
void
void
void
void
void
char *Filename);
void);
/*
* aslhex - generate all "hex" output files (C, ASM, ASL)
*/
void
void);
/*
* aslfold - constant folding
*/
void *Context);
/*
* aslmessages - exception strings
*/
const char *
const char *
/*
* asloffset - generate C offset file for BIOS support
*/
void *Context);
void
void
/*
* aslopcodes - generate AML opcodes
*/
void *Context);
void *Context);
void
void
/*
* asloperands - generate AML operands for the AML opcodes
*/
UtGetArg (
void
void
/*
* aslopt - optmization
*/
void
char *AmlNameString,
/*
*/
void
void
/*
* aslprune - parse tree pruner
*/
void
/*
* aslcodegen - code generation
*/
void
void);
/*
* aslfile
*/
void
char *Filename,
char *Mode);
/*
*/
void *Context);
void *Context);
void
/*
* aslmap - opcode mappings and reserved method names
*/
/*
* aslpredef - ACPI predefined names support
*/
void
char *Name);
void
char *Name);
const char *PredefinedName,
void
void);
/*
* aslprepkg - ACPI predefined names support for packages
*/
void
const ACPI_PREDEFINED_INFO *Predefined);
/*
* asltransform - parse tree transformations
*/
void *Context);
/*
* asltree - parse tree support
*/
void *Context);
/* Values for "Visitation" parameter above */
#define ASL_WALK_VISIT_DOWNWARD 0x01
#define ASL_WALK_VISIT_UPWARD 0x02
void
void
...);
void);
...);
void
void
void);
...);
/*
* aslfiles - File I/O support
*/
void
char *Dir);
char *
char *PrefixDir,
char *FilePathname);
void
void
void *Buffer,
void
void *Buffer,
void
long Offset);
void
void
char *Format,
...);
void
void
void
char *Filename);
char *InputFilename);
char *InputFilename);
char *InputFilename);
/*
* aslhwmap - hardware map summary
*/
void
void);
/*
* asload - load namespace in prep for cross reference
*/
/*
* asllookup - namespace lookup functions
*/
void
void);
/*
* aslmain - startup
*/
void
Usage (
void);
void
void);
/*
* aslnamesp - namespace output file generation
*/
void);
void
void *Handle);
/*
* asloptions - command line processing
*/
int
int argc,
char **argv);
/*
* aslxref - namespace cross reference
*/
void);
/*
* aslutils - common compiler utilites
*/
void
DbgPrint (
char *Format,
...);
/* Type values for above */
#define ASL_DEBUG_OUTPUT 0
#define ASL_PARSE_OUTPUT 1
#define ASL_TREE_OUTPUT 2
void
void);
void
void);
char *Name);
void
void *
void
void
void
void
char *
void
char *
void
void);
void
void);
char *ExternalName,
char **ConvertedName);
void
char *String);
stroul64 (
char *String,
UINT64 *RetInteger);
/*
* asluuid - UUID support
*/
char *InString);
char *UuIdBuffer,
char *OutString);
/*
* aslresource - Resource template generation utilities
*/
void
void
void
char *Name,
void
void
void
/* Values for State above */
#define ACPI_RSTATE_NORMAL 0
#define ACPI_RSTATE_START_DEPENDENT 1
#define ACPI_RSTATE_DEPENDENT_LIST 2
void
/*
* aslrestype1 - Miscellaneous Small descriptors
*/
/*
*/
/*
* aslrestype2 - Large resource descriptors
*/
/*
* aslrestype2d - DWord address descriptors
*/
/*
* aslrestype2e - Extended address descriptors
*/
/*
* aslrestype2q - QWord address descriptors
*/
/*
* aslrestype2w - Word address descriptors
*/
/*
* Entry to data table compiler subsystem
*/
void);
char *Signature);
#endif /* __ASLCOMPILER_H */