907 Commits

Author SHA1 Message Date
Robert Moore
540b6bfb95 iASL: Add -cr option to disable resource descriptor checks.
Useful for ASLTS. Disable errors from resource descriptors.
ASLTS checks for correct byte-by-byte descriptor construction, thus
errors are unavoidable.
2010-04-28 10:16:26 -07:00
Robert Moore
e211c4a5ac iASL: Allow alignment=0 for IO/Memory32 descriptors.
Means the same as alignment=1 in the field.
Also, fix check for _MAX on _GRA boundary.
2010-04-23 09:13:08 -07:00
Robert Moore
99b080dcde iASL: Implement rules for MIF/MAF flags, address descriptors.
This change implements the rules for LEN/MIF/MAF/MIN/MAX/GRA that come
from the ACPI specification (Table 6-40). Also added a special
case for IO descriptor where MIN/MAX are both start addresses, not
a start and end address. ACPICA BZ 840.
2010-04-22 15:08:47 -07:00
Robert Moore
8e3a28a487 iASL: Split large aslrestype1.c and aslrestype2.c files.
New files are aslrestype1i.c, aslrestype2d.c, aslrestype2e.c,
aslrestype2q.c, and aslrestype2w.c
2010-04-22 09:36:27 -07:00
Robert Moore
0530d6d5cc iASL: Add Min/Max/Len/Gran validation for resource descriptors.
This change implements validation for the address fields that are
common to all address-type resource descriptors. These checks
are implemented: Checks for valid min/max, length within the
min/max window, valid granularity and min/max a multiple of
granularity. ACPICA BZ 840.
2010-04-22 07:55:53 -07:00
Robert Moore
68af6e5482 iASL: Add error for more predefined names that must be methods.
If no return value is expected from this predefined name, then
it follows that it must be implemented as a control method
(with zero args, because the args > 0 case was handled above)
Examples are: _DIS, _INI, _IRC, _OFF, _ON, _PSx
2010-04-20 09:51:00 -07:00
Robert Moore
8cf3f0b4b9 iASL: Add -ts hex output option (emit ASL code).
New option to emit the hex AML code in an ASL buffer.
ACPICA BZ 853.
2010-04-08 13:44:37 -07:00
Robert Moore
f633a5f198 iASL: Add typechecking for _Wxx predefined names.
_Wxx is a GPE method type, similar to the _Lxx/Exx methods.
Adds support for all _Wxx names, which were not previously
recognized as valid predefined names.
2010-04-07 12:58:16 -07:00
Robert Moore
66a0da38e3 iASL: Add error if _Lxx/_Exx/_Qxx/_Wxx names are not methods.
These predefined names must be defined as control methods. They
cannot be defined as any other object type. ACPICA BZ 850.
2010-04-07 12:48:53 -07:00
Robert Moore
b7afb93b2d iASL: Update signon for ACPI 4.0a
Add "a" to output string.
2010-04-07 08:39:25 -07:00
Robert Moore
6afc9c9921 iASL: Update -ta/-tc hex output options.
Add ascii dump for partial last lines.
For C, omit comma after last byte.
Add total AML size in comment.
Update to improve general appearance and usefullness.
2010-04-05 14:55:41 -07:00
Robert Moore
63c14929ca iASL: Add typechecking for Return() values for predefined names.
Implements some typechecking for values returned by any ACPI
predefiend control methods. Only the direct return of static (unnamed)
values are checked. For example, Return(1). ACPICA BZ 786.
2010-03-24 08:40:58 -07:00
Robert Moore
1690062af9 iASL: Fix predefined name object regression.
Fixes a problem introduced in version 20100304. An error is incorrectly
generated if a predefined name is declared as a static named object with
a value defined using the keywords "Zero", "One", or "Ones". Lin Ming.
2010-03-12 10:28:45 -08:00
Robert Moore
eeb88574ee iASL: Add predefined name checking for static names.
Adds typechecking for static (non-control-method) predefined names.
Migrates compiler to use the common predefined name table (acpredef.h).
Adds a single new file, aslpredef.c. ACPICA BZ 832.
2010-03-02 13:43:56 -08:00
Robert Moore
e51c2639b6 Enhance configuration for output of AML Debug Object.
This change will enable debug object output via a global variable,
AcpiGbl_EnableAmlDebugObject. This will help with remote machine
debugging. Also, moved all debug object support code to a new file,
executer/exdebug.c. Entire debug object module can now be configured
out of the ACPICA build if desired. Lin Ming, Bob Moore.
2010-02-26 13:48:18 -08:00
Robert Moore
bce1fbe326 Remove obsolete ACPI_INTEGER (acpi_integer) type.
This type was introduced as the code was migrated from ACPI 1.0 (with 32-bit
AML integers) to ACPI 2.0 (with 64-bit integers). It is now obsolete and
this change removes it from the ACPICA code base, replaced by UINT64.
The original typedef has been retained for now for compatibility with
existing device driver code.
2010-01-19 13:39:26 -08:00
Robert Moore
c7dd20b0d7 Update all ACPICA copyrights and signons to 2010.
Add 2010 copyright to all module headers and signons, including the Linux
header. This affects virtually every file in the ACPICA core subsystem,
iASL compiler, and all utilities.
2010-01-08 08:49:11 -08:00
Robert Moore
cdfcc7cfce Update for new gcc-4 warning options.
Added several new options for the gcc-4 generation, and updated the source
accordingly. This includes some code restructuring to eliminate unreachable
code, elimination of some gotos, elimination of unused return values, and
some additional casting.
2010-01-08 08:14:05 -08:00
Robert Moore
b5e61bc8ab Remove several redundant declarations.
Allows use of -Wredundant-decls flag for gcc-4
2009-12-15 14:08:52 -08:00
Robert Moore
9b0c2d0fa5 iASL: Fix for dangling .src intermediate files.
This fixes a regression introduced in version 20091112. A .src
intermediate file is always created during compilation and should
be deleted at compiler exit.
2009-12-01 14:16:32 -08:00
Robert Moore
35d93031cf iASL: Fix for fault after "max errors exceeded".
Cleanup and exit properly after the maximum number of errors
have been exceeded.
2009-11-06 13:36:41 -08:00
Robert Moore
83eea423d6 iASL: Add msg if initializer list is shorter than package length.
Adds a new remark for a Package() declaration if an initializer
list exists, but is shorter than the declared length of the package.
Although technically legal, this is probably a coding error and
it is seen in the field. ACPICA BZ 815. Lin Ming, Bob Moore.
2009-10-29 12:11:40 -07:00
Robert Moore
581af16a2a Add post-order callback to AcpiWalkNamespace.
The existing interface only has a pre-order callback. This change
adds an additional parameter for a post-order callback which will
be more useful for bus scans. ACPICA BZ 779. Lin Ming.
2009-10-28 12:11:05 -07:00
Robert Moore
e7c910d80a iASL: Implement Switch() with While(1) so that Break works.
This change correctly implements the Switch operator with a surrounding
While(1) so that the Break statement works as expected.
ACPICA BZ 461. Lin Ming.
2009-10-14 13:56:01 -07:00
Robert Moore
31941994cd Fix several rare error messages.
Three error messages contained an extra %s and newline.
2009-09-24 12:12:45 -07:00
Robert Moore
d976daa76b iASL: Fix issue with use of Alias and Resource Templates.
Fixes error if aliasing a resource template. ACPICA BZ 738.
Lin Ming.
2009-09-01 13:22:41 -07:00
Robert Moore
2dfa14e186 iASL: Add support for response files.
Windows-style response files, containing a list of additional
command line options. ACPICA BZ 801.
2009-09-01 13:08:07 -07:00
Robert Moore
64dd41c346 iASL: Add -I option to specify include directories.
Allows multiple additional search paths for include files. Directories
are searched in the order specified on the command line (after the
local directory is searched.)
2009-08-07 12:19:49 -07:00
Robert Moore
80d7951177 Add support for module-level executable AML code.
Add limited support for executable AML code that exists outside of
any control method. This type of code has been illegal since ACPI 2.0.
The code must exist in an If/Else/While block. All AML tables are
supported, including tables that are dynamically loaded.
ACPICA BZ 762. Lin Ming.
2009-07-23 09:53:29 -07:00
Robert Moore
21ea332fa9 ACPI 4.0: Update iASL signon message.
Add ACPI 4.0 to signon message.
2009-07-17 14:12:50 -07:00
Robert Moore
17e7c9672f ACPI 4.0: iASL - Add new predefined/reserved names.
Added 31 new predefined names to the reserved list. Includes the required
number of parameters and whether a value must be returned.
2009-06-18 12:40:47 -07:00
Robert Moore
745f52e0c3 ACPI 4.0: iASL/Disassembler - IPMI keyword support.
Adds support for the new IPMI operation region keyword.
ACPICA BZ 771, 772. Lin Ming.
2009-06-18 09:11:27 -07:00
Robert Moore
b7def3a7cb iASL: Fix for line-terminator transparency.
Ensure that iASL works correctly with both LF and CR/LF terminated files,
on both unix-like and windows platforms.
2009-04-21 14:49:51 -07:00
Robert Moore
4feeacbe2a Remove use of a couple non-ANSI C library functions.
Removed calls to isascii and stricmp/strcasecmp for iASL and acpisrc.
2009-04-16 13:38:00 -07:00
Robert Moore
47481d6ad7 Add missing switch/defaults and prototypes.
Mostly empty default statements to pass lint/strict compiler warnings.
2009-04-15 12:57:02 -07:00
Robert Moore
78c5f575d4 Add missing function prototypes.
Mostly local prototypes that were missing.
2009-04-15 09:56:33 -07:00
Robert Moore
0a7105bb76 iASL: Fix warning under gnu Bison 2.3
Small change to one rule.
2009-04-15 07:28:10 -07:00
Robert Moore
4012f44bbb iASL: Fix several warnings for 64-bit build.
Added some typecasts for printf-style statements where size_t (ACPI_SIZE)
increases to 64-bits.
2009-04-14 08:08:57 -07:00
Robert Moore
0a69fa967a Fix printf format warnings for 64-bit build.
Fix warnings caused by size_t and ACPI_SIZE changing to 64 bits.
2009-04-09 14:56:10 -07:00
Robert Moore
0dc5d93331 iASL: Add option to display summary only.
Added -va option to disable all errors and warnings, and display
the summary info only. Useful for large batch compiles.
2009-03-24 14:20:59 -07:00
Robert Moore
491a1e7ae0 New: I/O port protection.
Protect certain I/O ports from reads/writes. Provides MS
compatibility. New module, hwvalid.c
2009-03-13 08:08:55 -07:00
Robert Moore
5025573120 Remove ACPI_GET_OBJECT_TYPE macro.
Remove all instances of this obsolete macro, since it is now a simple
reference to ->common.type. There were about 150 invocations of the
macro across 41 files.
2009-02-05 10:17:44 -08:00
Robert Moore
416eb5461f Update all copyrights and signons to 2009.
Add 2009 copyright to all module headers and signons, including the Linux
header. This affects virtually every file in the ACPICA core subsystem,
iASL compiler, and all utilities.
2009-01-08 13:17:27 -08:00
Jürg Billeter
81d0f24355 iASL: Fix build error under bison-2.4
Adds the missing type specifiers to fix build with bison 2.4.1
ACPICA BZ 744, Jürg Billeter
2008-12-22 11:28:45 +08:00
Robert Moore
e747da4ccd iASL: Remove 'named object in loop' error.
Previously did not allow the creation of named objects within a while
loop. However, it is not possible to analyze the loop to determine if
a named object would actually be created twice. Also, compiling
disassembled code with switch statements would raise this error even
though the compiler-emitted while(one) loop only executed once (there
is a break statement at the bottom of the loop. Chalk this one up to
'a nice try'.
2008-11-12 12:40:17 -08:00
Robert Moore
3c27b8f4e0 iASL: Fix to allow aliases within ASL namepaths.
Fixes a problem where the use of an alias within a namepath would
result in a not found error or cause the compiler to fault.
Also now allows forward references from the Alias operator itself.
ACPICA BZ 738.
2008-10-24 13:33:44 -07:00
Robert Moore
2f705a1b06 iASL: Improved disassembly of external method calls
Added the -e option to allow the inclusion of additional ACPI tables
to help with the disassembly of method invocations and the generation
of external declarations during the disassembly. Certain external
method invocations cannot be disassembled properly without the actual
declaration of the method. Use the -e option to include the table
where the external method(s) are actually declared. Most useful for
disassembling SSDTs that make method calls back to the master DSDT.
Lin Ming.

Example: To disassemble an SSDT with calls to DSDT:

    iasl -d -e dsdt.aml ssdt1.aml
2008-10-23 15:04:38 -07:00
Robert Moore
085ae7362c Restructure includes into public/private.
acpi.h now includes only the "public" acpica headers. All other
acpica headers are "private" and should not be included by acpica
users. One new file, accommon.h is used to include the commonly
used private headers for acpica code generation. Future plans are
to move all private headers to a new subdirectory.
2008-10-22 14:31:40 -07:00
Robert Moore
0b09da4ebd Remove obsolete version number in module headers.
Removed the "$Revision" number that appeared in each module header.
This version number was useful under SourceSafe and CVS, but has no
meaning under git. It is not only incorrect, it could also be
misleading.
2008-09-25 12:56:30 -07:00
Robert Moore
fd290b3c3c Cleanup for internal Reference Object.
Fix some sloppiness in the Reference object. No longer use AML opcodes to
differentiate the types, introduce new reference Class. Cleanup the debug
output code.
2008-08-27 10:11:30 -07:00