acpica/source/compiler
Robert Moore a46683c938 Debugger/Apps: Add safe versions of common string functions.
This change adds and deploys "safe" versions of strcpy and strcat that
ensure that the target buffer does not overflow. These safe functions
are only helpful for processing user input and command lines. For most
ACPICA code however, the required buffer length is precisely calculated
before buffer allocation, so the use of these functions is unnecessary.
ACPICA BZ 1043.
2013-09-18 08:41:48 -07:00
..
aslanalyze.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
aslbtypes.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
aslcodegen.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
aslcompile.c iASL: Abort immediately upon serious unrecoverable parse errors. 2013-08-01 09:37:48 -07:00
aslcompiler.h iASL: Implement wildcard support for -e option (get external tables). 2013-08-30 13:05:16 -07:00
aslcompiler.l iASL/Disassembler: Add option to ignore NOOP opcodes/operators. 2013-01-11 13:18:52 -08:00
aslcompiler.y Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
asldefine.h iASL: Add support for an "offset table" output file. 2013-03-15 09:27:23 -07:00
aslerror.c Debugger/Apps: Add safe versions of common string functions. 2013-09-18 08:41:48 -07:00
aslfileio.c Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
aslfiles.c iASL: Add support for an "offset table" output file. 2013-03-15 09:27:23 -07:00
aslfold.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
aslglobal.h iASL/disassembler: Add support for external method reference file. 2013-07-26 09:46:13 -07:00
aslhex.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
asllength.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
asllisting.c iASL: If a non-serialized method creates named objects, issue remark. 2013-05-03 09:14:52 -07:00
asllistsup.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
aslload.c iASL: Fix possible segfault for "too many parent prefixes" condition. 2013-07-26 12:23:20 -07:00
asllookup.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
aslmain.c iASL: Implement wildcard support for -e option (get external tables). 2013-08-30 13:05:16 -07:00
aslmap.c Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
aslmessages.h iASL/Preprocessor: Add proper message for #warning directive. 2013-05-30 13:03:54 -07:00
aslmethod.c iASL: If a non-serialized method creates named objects, issue remark. 2013-05-03 09:14:52 -07:00
aslnamesp.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
asloffset.c iASL: Add some new requested features for the -so option. 2013-07-25 08:48:42 -07:00
aslopcodes.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
asloperands.c iASL: Ensure valid C identifiers in output files. 2013-07-19 08:54:20 -07:00
aslopt.c Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
asloptions.c iASL: Implement wildcard support for -e option (get external tables). 2013-08-30 13:05:16 -07:00
aslpredef.c iASL: Fix for too-strict package object validation. 2013-05-08 13:20:38 -07:00
aslprepkg.c iASL: Update for new argument list format for predefined names. 2013-04-12 14:15:49 -07:00
aslresource.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
aslrestype1.c Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
aslrestype1i.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
aslrestype2.c Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
aslrestype2d.c Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
aslrestype2e.c Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
aslrestype2q.c Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
aslrestype2s.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
aslrestype2w.c Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
aslstartup.c iASL: Additional fix for wildcard support. 2013-09-12 12:50:35 -07:00
aslstubs.c Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
aslsupport.l Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
asltransform.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
asltree.c iASL: Ensure va_end is always called before function return. 2013-05-21 11:27:49 -07:00
asltypes.h iASL: If a non-serialized method creates named objects, issue remark. 2013-05-03 09:14:52 -07:00
aslutils.c iASL: Ensure va_end is always called before function return. 2013-05-21 11:27:49 -07:00
asluuid.c Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
aslwalks.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
aslxref.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
dtcompile.c AcpiDump: Add RSDP/RSDT/XSDT table extraction support. 2013-08-22 09:21:36 -07:00
dtcompiler.h iASL/Disassembler: Add support for MTMR table. 2013-01-22 11:32:47 -08:00
dtexpress.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
dtfield.c iASL/Disassembler: Fix some possible memory leaks. 2013-06-04 13:17:45 -07:00
dtio.c iASL/Disassembler: Fix some possible memory leaks. 2013-06-04 13:17:45 -07:00
dtparser.l Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
dtparser.y Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
dtsubtable.c Standardize all switch() blocks. 2013-04-23 14:04:40 -07:00
dttable.c iASL/TableCompiler: Fix form DMAR compilation problems. 2013-05-21 12:55:04 -07:00
dttemplate.c iASL: Make argument to -T optional (default is DSDT template) 2013-06-28 12:54:06 -07:00
dttemplate.h iASL: Update template for DMAR table. 2013-06-05 13:30:54 -07:00
dtutils.c iASL/TableCompiler: Fix form DMAR compilation problems. 2013-05-21 12:55:04 -07:00
new_table.txt Add two new readme files. 2012-10-18 10:44:44 -07:00
preprocess.h iASL/Preprocessor: Fix two issues with preprocessor errors. 2013-05-30 12:53:29 -07:00
prexpress.c Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
prmacros.c Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
prparser.l Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
prparser.y Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
prscan.c iASL/Preprocessor: Add proper message for #warning directive. 2013-05-30 13:03:54 -07:00
prutils.c Update ACPICA copyrights to 2013. 2013-01-08 09:23:11 -08:00
readme.txt iASL: Update readme file for new versions of bison/flex. 2012-10-25 08:51:44 -07:00

/*
 * Miscellaneous instructions for building and using the iASL compiler.
 */

Last update: 24 October 2012


1) Generating iASL from source
------------------------------

Generation of the ASL compiler from source code requires these items:

    1) The ACPICA source code tree.
    2) An ANSI C compiler.
    3) The Flex (or Lex) lexical analyzer generator.
    4) The Bison (or Yacc) parser generator.

There are three major ACPICA source code components that are required to
generate the compiler (Basically, the entire ACPICA source tree should
be installed):

    1) The ASL compiler source.
    2) The ACPICA Core Subsystem source. In particular, the Namespace
        Manager component is used to create an internal ACPI namespace
        and symbol table, and the AML Interpreter is used to evaluate
        constant expressions.
    3) The "common" source directory that is used for all ACPI components.


1a) Notes for Linux/Unix generation
-----------------------------------

On Linux/Unix systems, the following commands will build the compiler:

    cd acpica (or cd acpica/generate/unix)
    make clean
    make iasl

iASL has been generated with these versions of Flex/Bison:

    Flex:  Version 2.5.32
    Bison: Version 2.6.2


1b) Notes for Windows generation
--------------------------------

On Windows, the Visual Studio 2008 project file appears in this directory:

    generate/msvc9/AcpiComponents.sln

The Windows versions of GNU Flex/Bison must be installed, and they must
be installed in a directory that contains no embedded spaces in the
pathname. They cannot be installed in the default "c:\Program Files"
directory. This is a bug in Bison. The default Windows project file for
iASL assumes that these tools are installed at this location:

    c:\GnuWin32

Once the tools are installed, ensure that this path is added to the
default system $PATH environment variable:

    c:\GnuWin32\bin

At this point, you will need to reboot Windows to make system aware of
the updated $PATH.

iASL has been generated with these versions of Flex/Bison for Windows:

    Flex for Windows:  V2.5.4a
    Bison for Windows: V2.4.1

Flex is available at:  http://gnuwin32.sourceforge.net/packages/flex.htm
Bison is available at: http://gnuwin32.sourceforge.net/packages/bison.htm



2) Integration as a custom tool for Visual Studio
-------------------------------------------------

This procedure adds the iASL compiler as a custom tool that can be used
to compile ASL source files. The output is sent to the VC output 
window.

a) Select Tools->Customize.

b) Select the "Tools" tab.

c) Scroll down to the bottom of the "Menu Contents" window. There you
   will see an empty rectangle. Click in the rectangle to enter a 
   name for this tool.

d) Type "iASL Compiler" in the box and hit enter. You can now edit
   the other fields for this new custom tool.

e) Enter the following into the fields:

   Command:             C:\Acpi\iasl.exe
   Arguments:           -vi "$(FilePath)"
   Initial Directory    "$(FileDir)"
   Use Output Window    <Check this option>

   "Command" must be the path to wherever you copied the compiler.
   "-vi" instructs the compiler to produce messages appropriate for VC.
   Quotes around FilePath and FileDir enable spaces in filenames.

f) Select "Close".

These steps will add the compiler to the tools menu as a custom tool.
By enabling "Use Output Window", you can click on error messages in
the output window and the source file and source line will be
automatically displayed by VC. Also, you can use F4 to step through
the messages and the corresponding source line(s).



3) Integrating iASL into a Visual Studio ASL project build
----------------------------------------------------------

This procedure creates a project that compiles ASL files to AML.

a) Create a new, empty project and add your .ASL files to the project

b) For all ASL files in the project, specify a custom build (under
Project/Settings/CustomBuild with the following settings (or similar):

Commands:
    c:\acpi\libraries\iasl.exe -vs -vi "$(InputPath)"

Output:
    $(InputDir)\$(InputPath).aml