Commit Graph

455 Commits

Author SHA1 Message Date
Robert Moore
d91aaaf0ae Remove extra spaces after periods within comments.
This makes all comments consistent.
2012-09-26 13:14:58 -07:00
Robert Moore
fd8f80e5d4 ACPICA core: Cleanup empty lines at file start and end.
Maintenance for source code consistency.
2012-09-21 13:46:56 -07:00
Robert Moore
09da667565 Fix some comment fields. No functional change.
Fixes some typos and linux divergences.
2012-06-28 09:15:20 -07:00
Robert Moore
651031314f AML Parser: Fix two possible memory leaks in error path.
Fixes a couple of memory leaks in the error recovery path.
Jesper Juhl, Lin Ming.
2012-03-22 14:36:32 -07:00
Robert Moore
7db43032db Update ACPICA copyrights to 2012.
Standard ACPICA source modules only.
2012-01-03 14:08:42 -08:00
Robert Moore
4d70e21e38 ACPI 5.0: Lint changes, no functional change.
A few lint-detected changes.
2011-11-10 10:10:23 +08:00
Robert Moore
905e1f36bf ACPI 5.0: Finish Connection(), more AccessAs changes.
Add support for Buffer arguments for Connection.
AccessAs now has a separate opcode for the AccessLength case.
Both are per the latest ACPI 5 proposals.
2011-11-10 10:10:23 +08:00
Robert Moore
a9b254734b ACPI 5.0: Update AccessAs syntax/encoding.
Update to final ACPI 5.0 syntax and AML encoding.
2011-11-10 10:10:23 +08:00
Robert Moore
0bb5e623a4 ACPI 5.0/iASL/Disassembler: Support for Connection/AccessAs.
New operator, Connection(). Update to AccessAs() for new
optional argument.
2011-11-10 10:10:23 +08:00
Robert Moore
4110b9bdc9 Fix issues/fault with automatic "serialized" method support.
History: This support changes a method to "serialized" on the fly if the
method generates an AE_ALREADY_EXISTS error, indicating the possibility
that it cannot handle reentrancy.

This fix repairs a couple of issues seen in the field, especially on
machines with many cores.

1) Delete method children only upon the exit of the last thread, so
as to not delete objects out from under running threads.

2) Set the "serialized" bit for the method only upon the exit of the
last thread, so as to not cause deadlock when running threads attempt
to exit.

3) Cleanup the use of the AML "MethodFlags" and internal method flags
so that there is no longer any confustion between the two.

Lin Ming, Bob Moore. Reported by dana.myers@oracle.com.
2011-01-11 10:25:15 -08:00
Robert Moore
d41344f1ec Update all ACPICA copyrights and signons to 2011.
Standard ACPICA source modules only.
2011-01-03 14:02:13 -08:00
Robert Moore
c6ad540dbe Add subsystem option to force copy of DSDT to local memory.
Optionally copy the entire DSDT to local memory (instead of simply
mapping it.) There are some BIOSs that corrupt or replace the original
DSDT, creating the need for this option. Default is FALSE, do not copy
the DSDT.
2010-03-24 15:30:14 -07:00
Robert Moore
3ff5a497b6 Add detection of corrupted/replaced DSDT.
This change adds support to detect a DSDT that has been corrupted
and/or replaced from outside the OS (by firmware). This is typically
catastrophic for the system, but has been seen on some machines.
Lin Ming, Bob Moore.
2010-03-24 14:43:33 -07:00
Robert Moore
23367dc568 Standardize integer output for ACPICA warnings/errors.
Always use 0x prefix for hex output, use %u for integer output (all
integers are unsigned.)

Affects ACPI_INFO, ACPI_ERROR, ACPI_WARNING, and ACPI_EXCEPTION.
ACPICA BZ 835.
2010-03-02 15:09:46 -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
a3dcd06fa0 Module-level code: enable _REG execution in same scope.
This change enables the execution of _REG methods that appear in the
same scope as the module-level code, in resonse to an operation region
declaration within the module-level code.
2009-12-10 12:48:24 -08:00
Robert Moore
0f4a91c1bd Add additional module-level code support.
This change will execute module-level code that is not at the root of
the namespace (under a Device object, etc.). ACPICA BZ 762. Lin Ming.
2009-11-06 13:34:17 -08:00
Robert Moore
bf219fa808 Deploy new create integer interface where appropriate.
Simplifies creation of simple integer objects.
ACPICA BZ 823.
2009-11-06 12:30:33 -08:00
Robert Moore
5681265261 Fix warning for 64-bit build.
2 possible warnings fixed.
2009-09-02 13:27:22 -07:00
Robert Moore
79f8819b96 Fix warning msg, was depending on debug compile.
Dependent on conditional compile in OpInfo.
2009-07-30 08:23:37 -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
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
Robert Moore
5bc05cb1b3 Enhance implicit return mechanism.
For Windows compatibility, return an implicit integer of value
zero for methods that have no executable code. A default implicit
value of zero is provided for methods.

Such methods are seen in the field as stubs (presumably), and can
cause drivers to fail if they expect a return value. Lin Ming.
2008-10-30 10:26:41 -07:00
Robert Moore
28da268b28 Add support to externally execute _OSI method.
The current implemenation of _OSI within ACPICA only allows other
control methods to execute _OSI. This change allows the host OS
to execute _OSI via the AcpiEvaluateObject interface. _OSI is a
special method -- it does not exist in the AML code, it is
implemented within ACPICA.
2008-10-23 10:28:17 -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
2107ff8b75 Fix possible memory leak on error in parser.
Fixes a possible memory leak if an allocation failure happens in
the parse loop. Must terminate an executing control method. Lin Ming,
Bob Moore. ACPICA BZ 489.
2008-10-07 14:56:34 -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
ab557ef061 Fix for implicit return compatibility.
This change improves the implicit return mechanism to be more compatible
with the MS interpreter. Lin Ming, ACPICA BZ 349.
2008-09-23 09:32:18 -07:00
Robert Moore
6a16af9dd2 Fix fault after mem allocation failure in AML parser.
Fixes a crash if a memory allocation fails during the Op completion
routine AcpiPsCompleteThisOp. Lin Ming. BZ 492.
2008-09-11 13:06:41 -07:00
Robert Moore
48de5ac6ea Fix for access to deleted object <regression>.
Fixes problem introduced in 20080123, with fix for Unload operator.
Parse tree object can be already deleted; must use the opcode within
the WalkState.
2008-05-21 14:48:56 -07:00
Robert Moore
b98eacb45a Fix for hang on GPE method invocation.
Fixes problem introduced in 20080514 where the new method argument count
validation mechanism will enter an infinite loop when a GPE method is
dispatched. Problem fixed be removing the obsolete code that passes GPE
block information to the notify handler via the control method parameter
pointer.
2008-05-21 14:10:42 -07:00
Robert Moore
10e9550130 Eliminate ACPI_NATIVE_UINT type.
No longer needed; replaced mostly with UINT32, but also ACPI_SIZE where a
type that changes 32/64 bit on 32/64-bit platforms is required.
2008-05-08 13:22:20 -07:00
rmoore1
f710c3b2e4 Fixes for Unload and DDBHandles.
Implemented support for the use of DDBHandles as an Indexed Reference, as per the ACPI spec. (Lin Ming) BZ 486. Implemented support for UserTerm (Method invocation) for the Unload operator as per the ACPI spec. (Lin Ming) BZ 580
2008-01-23 22:19:31 +00:00
rmoore1
20c70630f8 Methods now implicitly return 0 in slack mode.
Implemented an enhancement to the interpreter "slack mode". In the absence of an explicit return or an implicitly returned object from the last executed opcode, a control method will now implicitly return an integer of value 0 for Microsoft compatibility. (Lin Ming) BZ 392
2008-01-23 21:49:59 +00:00
rmoore1
a417391ec6 Update copyright to 2008.
Added 2008 copyright to all module headers and signons. This affects virtually every file in the ACPICA core subsystem, iASL compiler, and the utilities.
2008-01-09 21:27:10 +00:00
rmoore1
07c223a3de Implemented full argument resolution support for the BankValue argument to BankField. Previously, only constants were supported, now any TermArg may be used. Lin Ming BZ 387, 393 2007-12-11 22:43:43 +00:00
rmoore1
5215ee7228 Implemented full support for deferred execution for the TermArg string arguments for DataTableRegion. This enables forward references and full operand resolution for the three string arguments. Similar to OperationRegion deferred argument execution.) Lin Ming. BZ 430 2007-12-07 21:45:40 +00:00
rmoore1
500fff6f63 Cosmetic changes only, no functional changes.
Lint changes, fix compiler warnings, etc.
2007-10-25 22:52:06 +00:00
rmoore1
945e10ca16 Fix for namespace lookup problem.
Fixed a problem where objects of certain types (Device, ThermalZone, Processor, PowerResource) can be not found if they are declared and referenced from within the same control method (Lin Ming) BZ 341.
2007-09-19 20:06:54 +00:00
rmoore1
dceba6cbd1 Automated cleanup.
Cleanup via acpisrc.
2007-08-30 23:03:19 +00:00
rmoore1
ba70f0d7e5 Updated error message for dynamic method serialization.
Added more information to make the message clearer.
2007-08-24 20:22:57 +00:00
rmoore1
689fefdab9 changed order of interpretation of operand objects.
The interpreter now evaluates operands in the order that they appear (both in the
 AML and ASL), instead of in reverse order. This previously caused subtle incompatibilities with the MS interpreter as well as being non-intuitive.
2007-03-14 19:57:40 +00:00
rmoore1
7e357a5031 Several fixes for internal method result stack.
fixes STACK_OVERFLOW exception on nested method calls. internal bugzilla 262 and 275.
2007-03-08 20:26:06 +00:00
rmoore1
6e075f8871 Update copyright to 2007.
Added 2007 copyright to all module headers and signons. This affects virtually every file in the ACPICA core subsystem, iASL compiler, and the utilities.
2007-01-09 20:01:19 +00:00
rmoore1
afa45d032e Fix for fault in new parse loop code 2006-10-11 17:12:36 +00:00
rmoore1
92d234ea50 Use manifest constants for parse pass number 2006-10-06 22:50:35 +00:00
rmoore1
830a10802d Eliminate control method 2-pass parse/execute.
Completed an AML interpreter performance enhancement for control method execution. Previously a 2-pass parse/execution, control methods are now completely parsed and executed in single pass. This improves overall interpreter performance by ~25%, reduces code size, and reduces CPU stack use.
2006-10-06 22:29:34 +00:00
rmoore1
dfd059e735 Restructured module into multiple functions. Restructured the AML ParseLoop function, breaking it into several subfunctions in order to reduce CPU stack use and improve maintainability 2006-10-05 21:43:35 +00:00
rmoore1
a3afae2f67 ACPICA: Fixed a regression where an error was no longer emitted if a control method attempts to create 2 objects of the same name. This previously and now returns AE_ALREADY_EXISTS. When this exception occurs, it invokes the mechanism that will dynamically serialize the control method to possible prevent future errors. (BZ 440) 2006-09-11 22:28:31 +00:00