summaryrefslogtreecommitdiff
path: root/source/compiler/asldefine.h
Commit message (Collapse)AuthorAgeFilesLines
* Update all copyrights/signons to 2023Robert Moore2023-02-071-1/+1
| | | | Copyright updates to 2023.
* Update copyright notices to the year 2022Robert Moore2022-02-171-1/+1
| | | | Affects all source modules and utility signons.
* Updated all copyrights to 2021. This affects all ACPICA source codeRobert Moore2021-01-051-1/+1
| | | | modules.
* iASL: implement custom iASL macro for expected errorsErik Kaneda2020-03-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each type of iASL error is associate with a 4-digit error ID. This is done in order to ignore or expect entire classes of remarks/warnings/errors. However, there is a desire to expect these compiler messages on a line-based granularity. This allows finer-grained testing of iASL compiler messages. The following example illustrates the use of this feature: DefinitionBlock ("", "DSDT", 2, "", "", 0x1) { Device (ABCD) { } } Compiling the above code will result in a warning like this: dsdt.asl 3: Device (ABCD) Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) The following tells iASL to expect error code 3141 on line 3: DefinitionBlock ("", "DSDT", 2, "", "", 0x1) { Device (ABCD) __EXPECT__(3141) { } } Compiling this will expect the warning to be raised and result in a successful compilation: ASL Input: dsdt.asl - 97 bytes 1 keywords 9 source lines AML Output: dsdt.aml - 43 bytes 0 opcodes 1 named objects Compilation successful. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations However, if the warning does not appear, compilation will result in an error. This code snippet does not exhibit warning 3141 but still expects this error code on line 3: DefinitionBlock ("", "DSDT", 2, "", "", 0x1) { Device (ABCD) __EXPECT__(3141) { Name (_ADR, 0x12345678) } } This code will result in the following compiler error because error code 3141 was not generated during compilation. dsdt.asl 3: Device (ABCD) __EXPECT__(3141) Error 6149 - ^ Expected remark, warning, or error did not occur. Message ID: (3141) ASL Input: dsdt.asl - 129 bytes 2 keywords 10 source lines Compilation failed. 1 Errors, 0 Warnings, 0 Remarks Telling iASL about expected errors inline as a part of ASL code allows us to contain all expected error information as a part of the ASL codebase rather than requiring -vx flags to be placed inside of makefiles. Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
* All acpica: Update copyrights to 2020Robert Moore2020-01-091-1/+1
| | | | Including tool signons.
* iASL: save parameter count of external control method calls for analysisErik Schmauss2019-11-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | As of now, iASL does not keep track of parameter counts for external declarations of methods. In order to determine the parameter count of external control methods, iASL looks at the first method and saves the parameter count in AML. However, this information is not present during namespace cross reference. This allows code like this to compile without errors: DefinitionBlock ("", "DSDT", 2, "", "", 0x01) { External (DS01, MethodObj) DS01(0x2,0x2) // DS01 is called with 2 parameters DS01() // DS01 is called with 0 parameters } This change saves the parameter count of the first method call and uses it to analyze subsequent method calls. This ensure that a method that is declared external is called with the same amount of parameters each time. Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* Fully deploy ACPI_PRINTF_LIKE macroRobert Moore2019-08-141-1/+1
| | | | | | | Macro was not being used across all "printf-like" functions. Also, cleanup all calls to such functions now that they are analyzed by the compiler (gcc). Both in 32-bit mode and 64-bit mode.
* Fix some coverity-found issuesRobert Moore2019-07-311-1/+1
| | | | Mostly with arg types within printf format strings.
* iASL: ensure that certain named objects are declared only at the root scopeErik Schmauss2019-05-201-0/+16
| | | | | | _WAK, _PTS, _TTS, and _Sx in any other scope will not be invoked by OS. Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* iASL: perform analysis and code generation after parsing all tablesErik Schmauss2019-04-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Performing parse tree analysis on all definition blocks simultaneously results in more effective namespace cross-reference. This enables iASL static analysis to determine unresolved external declarations and namespace collisions during compilation. In order to take advantage of this, compile definition blocks with the following command: iasl dsdt.asl ssdt1.asl ssdt2.asl ... *** Changes related to multiple files: Keep track of all files in a global list that is persistent throughout compilation of both files. This is done in order to compile multiple ASL files in the same namespace and parse tree. This also resulted in moving the file handle assignment for the -vi option during file initialization rather than commandline processing. As each definition block is parsed, it is connected as a sibling node to the previous definiton block. *** Changes related to iASL error reporting: Also, more error messages were added by replacing the fprintf to stderr with AslError. By doing so, an error can be logged properly and AML output files will be cleaned if there is a compiler error. Adds the ability to print the correct source line by logging the .src filename in each error node. This is necessary for errors that point to an include file. New iASL error: emitting an error when compiling duplicate files. Ignore max error count when compiling with -f because compilation needs to continue. Fix parser error path to correctly abort compilation rather than trying to proceed with more compilation. *** Changes related to codegen behavior: Seek to the end of the AML output file after codegen in case multiple definition blocks need to be encoded in the same AML file. This makes other parts of the codebase a little more convinent since it doesn't have to seek to the correct place in the AML. *** Misc changes: Remove a call to ACPI_FREE. We should never be calling ACPI_FREE in memory allocated in caches. Display compilation summaries for multiple input files. Files that have parser errors are reported as having parser errors. The summary is based on the global file list. Encapsulate global variables in global file nodes used for summary reporting. Final cleanup functions for iASL has been consolidated to the main() function for simplicity. Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* iASL: update supported ACPI specification revisionErik Schmauss2019-03-111-1/+1
| | | | Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* All acpica: Update copyrights to 2019Robert Moore2019-01-081-1/+1
| | | | including tool signons.
* iASL: Standardize names for all global variablesRobert Moore2018-09-201-2/+2
| | | | For consistency, all iASL global names forced to AslGbl*
* All acpica: Update copyrights to 2018Robert Moore2018-01-041-1/+1
| | | | including tool signons.
* iASL: Update supported ACPI version number to 6.2ARobert Moore2017-10-161-1/+1
| | | | Add a new subtable to the NFIT table.
* iASL: Resolve some naming inconsistenciesRobert Moore2017-06-021-1/+1
| | | | | | | | | Fix some confusion between "parse op" and "parse node". Adds a new file, aslparseop.c Consistently use "parse op" to describe the elements of the parse tree data structure. An "Op" is the primary data structure element, even though it sounds odd.
* iASL: Update ACPI support levelRobert Moore2017-05-311-1/+1
| | | | Bump to 6.2
* iASL: Update internal signal handlingRobert Moore2017-05-301-1/+1
| | | | | Handle SIGSEGV in addition to SIGINT. Handle unknown signals.
* Update legal header in all source modulesRobert Moore2017-03-021-0/+36
| | | | | | Adds the dual GNU/BSD dual license to the existing Intel license. Provides all licensing information in each source module. Affects all ACPICA source modules.
* iASL: add ASL conversion toolRobert Moore2017-02-241-1/+7
| | | | | | | The key feature of this utility is that the original comments within the input ASL files are preserved during the conversion process, and included within the converted ASL+ file -- thus creating a transparent conversion of existing ASL files to ASL+ (ASL 2.0)
* Tools: Update common signon, remove compilation bit widthRobert Moore2017-01-191-1/+1
| | | | | | | Remove the bit width of the compiler that generated the tool from the tool signon. This was confusing and unnecessary. Changed the iASL signon to add "disassembler" to the name.
* Source tree: Update copyright notices to 2017Robert Moore2017-01-061-1/+1
| | | | Affects all files.
* ACPI 6.1: Add full support for this version of ACPI specRobert Moore2016-02-031-1/+1
| | | | | | | Small changes: 1) A couple new predefined names 2) New _HID values 3) New subtable for HEST
* iASL/Preprocessor: Fix a build failure under gcc 6Robert Moore2016-01-251-2/+1
| | | | | | Caused by essentially a duplicate #define. Reported by Colin Ian King. ACPICA BZ 1241.
* iASL: Update for parse tree debug outputRobert Moore2016-01-221-0/+30
| | | | | | 1) Cleanup output 2) Enhance output with additional data (namestrings, etc.) 3) Adds a new file: asldebug.c
* Source tree: Update copyright notices to 2016Robert Moore2016-01-061-1/+1
| | | | Affects all files.
* iASL/AcpiExec: Update input file handling and verification.Robert Moore2015-12-171-4/+4
| | | | | Improve and cleanup verification of ACPI tables within input files. Share more code between the disassembler and AcpiExec.
* Update source file permissions (2)Robert Moore2015-09-231-0/+0
| | | | Reset user execute bit, set other permissions read-only.
* Update source file permissions (1)Robert Moore2015-09-231-0/+0
| | | | Set user execute bit to force git to commit the files.
* iASL: General cleanup of the file suffix #definesRobert Moore2015-09-181-20/+0
| | | | Removed some extraneous defines, reordered others.
* iASL: Fix suffix for preprocessor output file (.i)Robert Moore2015-09-181-1/+1
| | | | | Had two trailing blanks in the suffix, causing problems on some systems.
* iASL: Add __IASL__ symbol to preprocessor.Robert Moore2015-07-011-0/+1
| | | | | Symbol would be of use for iASL-specific ASL code or preprocessor directives.
* Cleanup use of NEGATIVE and POSITIVE defines.Robert Moore2015-06-261-6/+0
| | | | | These were defined in two places. Changed to ACPI_SIGN* names and define them once in acmacros.h
* iASL: Preprocessor updates.Robert Moore2015-06-021-1/+3
| | | | | | | | 1) Create the .i file without any #line directives. These directives are passed to the compiler via the new .pre file. #line is used to keep the line numbers in sync with any include files. ACPICA BZ 1160. 2) Pass through the original comments in the code. ACPICA BZ 968.
* iASL: Add second preprocessor file, the user file (via -li)Robert Moore2015-05-201-1/+2
| | | | | | | The user preprocessor file (*.i) now contains only ASL text and no #line directives. A second preprocessor file (*.tmp) contains such directives which are used by the compiler to keep the line numbers correct across #include files. ACPICA BZ 1160.
* iASL: Update supported ACPI version to 6.0.Robert Moore2015-05-081-1/+1
| | | | ACPI specification 6.0, April 2015.
* Permanently set _REV to the value '2'.Robert Moore2015-03-311-1/+0
| | | | | | | | | | | | | | Windows uses a value of 2, and has no plans to ever change this. So, _REV is essentially useless for its primary purpose. Worse, some BIOS vendors have used the difference in _REV values between Windows and ACPICA to indicate which one is running. It has been decided by the ACPI community to deprecate this method, and return 1 for ACPI 1.0 (32-bit integers) and 2 for ACPI 2.0 and greater (both 32-bit and 64-bit integers. ACPICA is changed to reflect this.
* Update Copyright headers to 2015.David E. Box2015-01-271-1/+1
|
* Revert "source and test: update copyright notices to 2015"David E. Box2015-01-271-254/+254
| | | | | | This reverts commit 28a95326289ca5ee7cd95f8e8e809dc5564d9509. Commit mistakenly changes file format to CRLF from default LF.
* source and test: update copyright notices to 2015David E. Box2015-01-231-254/+254
|
* iASL: Update compiler signon and disassembler signon.Robert Moore2014-10-311-2/+2
| | | | Add support for C-style operators (ASL+)
* iASL/Disassembler: Add support for hardware summary mapfiles.Robert Moore2014-09-191-0/+1
| | | | | Adds support for both iASL and the disassembler to create a hardware and connection summary mapfile (via the -lm option.)
* Standardize one blank line after copyright header, no functional change.Robert Moore2014-08-141-1/+0
| | | | | From acpisrc execution -- the utility now ensures that there is exactly one blank line after the header.
* iASL/TableCompiler: Add object caching, cleanup memory leaks.Robert Moore2014-08-141-2/+2
| | | | | Add object caches for the field and subtable objects, to improve performance and to simplify memory management.
* iASL: Improve cacheing, reduce memory leaks.Robert Moore2014-08-131-2/+2
| | | | | | | | Ensure that the parse tree is deleted for each compile. Fix other miscellaneous memory leaks per-compile. Consistently deploy the use of the string cache. Add tracking for multiple buffers within caches. Ensure the cache buffers are always deleted.
* ACPI 5.1: Update iASL supported ACPI revision to 5.1Robert Moore2014-07-231-1/+1
| | | | Emitted for compiler signon.
* Update ACPICA copyrights to 2014.Robert Moore2014-01-061-1/+1
| | | | | Update ACPICA copyrights to 2014. Includes all source headers and signons for the various tools.
* iASL: Update ACPI compliance string to "ACPI 5.0A".Robert Moore2013-12-101-1/+1
| | | | | | ACPI 5.0A is dated November 13, 2013 (released December 9, 2013). No known changes required to support the new specification, it is errata only.
* iASL: Add support for an "offset table" output file.Robert Moore2013-03-151-0/+6
| | | | | | The -so option will create a C table containing offsets of various named objects so that BIOS code can modifiy them easily at boot time. Simplifies BIOS code and provides greater reliability.
* iASL: Auto-detect binary ACPI tables for disassembly.Robert Moore2013-02-061-2/+3
| | | | | | | Detect a binary file with a valid ACPI table header and invoke the disassembler automatically. Ease-of-use feature. Also fixes a problem where the -dc option (disassemble and then compile) was broken.