Iasl: acpi source Language Optimizing Compiler and Disassembler



Download 357.69 Kb.
Page1/8
Date conversion29.04.2016
Size357.69 Kb.
  1   2   3   4   5   6   7   8



iASL: ACPI Source Language Optimizing Compiler and Disassembler

User Guide

iASL Overview and Compiler Operation

Revision 6.2

July 17, 2015

Information in this document is provided in connection with Intel® products. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. Except as provided in Intel’s Terms and Conditions of Sale for such products, Intel assumes no liability whatsoever, and Intel disclaims any express or implied warranty, relating to sale and/or use of Intel products including liability or warranties relating to fitness for a particular purpose, merchantability, or infringement of any patent, copyright or other intellectual property right. Intel products are not intended for use in medical, life saving, or life sustaining applications.

Intel may make changes to specifications and product descriptions at any time, without notice.

Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them.

The iASL compiler may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request.

Copyright © 2000 - 2015 Intel Corporation

*Other brands and names are the property of their respective owners.

Contents


1 Introduction 6

1.1 Document Structure 7

1.2 Reference Documents 7

1.3 Document History 8

1.4 Definition of Terms 9

2 Compiler/Disassembler Overview 10

2.1 Supported Execution Environments 10

2.2 ASL Compiler 10

2.2.1 Input Files 10

2.2.2 Output File Options 10

2.3 AML Disassembler 11

2.3.1 Input Files 11

2.3.2 Output 11

2.4 Data Table Compiler 11

2.4.1 Input Files 12

2.4.2 Output 12

2.5 Data Table Disassembler 12

2.5.1 Input Files 12

2.5.2 Output 12

2.6 Template Generator 12

3 Preprocessor 13

3.1 Command Line Options 13

3.2 Integer Expressions 13

3.3 Supported Directives 13

3.3.1 Text Substitution and Macros 14

3.3.1.1 #define 14

3.3.1.2 #undef 14

3.3.2 Conditional Compilation 14

3.3.2.1 #if - 14

3.3.2.2 #ifdef 14

3.3.2.3 #ifndef 14

3.3.2.4 #else 15

3.3.2.5 #elif 15

3.3.2.6 #endif 15

3.3.3 Include Files 15

3.3.3.1 #include vs. ASL Include() 15

3.3.3.2 #include 15

3.3.3.3 #includebuffer 15

3.3.3.4 #line 16

3.3.4 Miscellaneous Directives 16

3.3.4.1 #error 16

3.3.4.2 #pragma 16

3.3.4.3 #warning 16

4 ASL-AML Subsystem 18

4.1 ASL Compiler 18

4.1.1 Support for Symbolic Operators and Expressions (ASL+) 18

4.1.1.1 Binary AML Considerations 20

4.1.1.2 AML Disassembler Notes 20

4.1.2 Built-in ASL Macros 21

4.1.3 Compiler Analysis Phases 21

4.1.3.1 General ASL Syntax Analysis 21

4.1.3.2 General Semantic Analysis 21

4.1.3.3 Control Method Semantic Analysis 22

4.1.3.4 Control Method Invocation Analysis 22

4.1.3.5 Predefined ACPI Names 22

4.1.3.6 Resource Descriptors 22

4.1.4 Compiler Optimizations 22

4.1.4.1 Named References 23

4.1.4.2 Integers 23

4.1.4.3 Constant Folding 23

4.2 ASL-to-AML Disassembler 23

4.2.1 Multiple Table Disassembly 23

4.2.2 External Declarations 24



5 ACPI Data Table Subsystem 25

5.1 Data Table Compiler 25

5.1.1 Input Format 25

5.1.1.1 Ignored Fields/Comments 26

5.1.2 Data Table Definition Language 26

5.1.3 Input Example 28

5.1.4 Data Types for User-Entered Fields 28

5.1.4.1 Integers 28

5.1.4.2 Integer Expressions 28

5.1.4.3 Flags 29

5.1.4.4 Strings 29

5.1.4.5 Buffers 30

5.1.5 Fields Set Automatically 30

5.1.6 Special Fields 30

5.1.7 Generic Fields / Generic Data Types 31

5.2 Data Table Disassembler 33

5.2.1 Example Output 33

5.3 ACPI Table Template Generator 36



6 Compiler/Disassembler Operation 37

6.1 Command Line Invocation 37

6.2 Wildcard Support 37

6.3 Command Line Options 38

6.3.1 General Options 39

6.3.2 Help 39

6.3.3 Preprocessor 40

6.3.4 Errors, Warnings, and Remarks 40

6.3.5 AML Bytecode Generation 40

6.3.6 AML Text Output Files 41

6.3.6.1 Source Code Files (-s) 41

6.3.6.2 Source External Declaration Files (-i) 41

6.3.6.3 Hex Source Code Files (-t) 41

6.3.6.4 C Offset Table (-so) 41

6.3.7 Listings 42

6.3.8 ACPI Data Tables 42

6.3.9 AML Disassembler 42

6.3.10 Compiler Debug Options 43

6.4 Compiler Output Examples 43

6.4.1 Input ASL 43

6.4.2 Output of –tc (make C hex table) Option 44

6.4.3 Output of –sc (make C source) Option 45

6.4.4 Output of –ic (make include file) Option 46

6.4.5 Output of –l (Listing) Option 46

6.4.6 Output of –lm (Hardware Mapfile) Option 47

6.4.7 Output of –ln (Namespace Listing) Option 47

6.5 Using the Disassembler 48

6.5.1 Resolving External Control Methods 48

6.5.1.1 Standard Disassembly 49

6.5.1.2 Disassembly with –e option 49

6.5.1.3 Disassembly with both –e and –fe options 50

6.6 Integration Into MS VC++ Environment 51

6.6.1 Integration as a Custom Tool 51

6.6.2 Integration into a Project Build 51



7 Generating iASL from Source Code 52

7.1 Required Tools 52

7.2 Required Source Code 52




  1   2   3   4   5   6   7   8


The database is protected by copyright ©essaydocs.org 2016
send message

    Main page