6005 Commits

Author SHA1 Message Date
Robert Moore
d29acc2c26 Add more conversions to predefined name repair module.
This change enhances the automatic repairs/conversions for predefined
name return values to make Integers, Strings, and Buffers fully
interchangeable. Also, a Buffer can be converted to a Package of
Integers if necessary. The nsrepair.c module was completely restructured.
Lin Ming, Bob Moore.
2009-12-03 14:20:31 -08:00
Robert Moore
e5f4b2f88d Update internal namespace node/handle interfaces.
This change deletes the unnecessary NsConvertEntryToHandle interface
and renames the NsMapHandleToNode interface to NsValidateHandle.
ACPICA BZ 798.
2009-11-25 09:23:21 -08:00
Robert Moore
453386a16b Automated cleanup - no functional change.
acpisrc -c cleanup.
2009-11-20 09:16:42 -08:00
Robert Moore
048fba8f81 Add repair for bad _FDE/_GTM buffers.
The expected return value for both names is a Buffer of 5 DWORDS.
This repair fixes two possible problems (both seen in the field):
A package of integers is returned, or a buffer of BYTEs is
returned.
2009-11-20 09:10:33 -08:00
Robert Moore
a6fe819faf Fix two additional Scope override error messages.
These messages were using the internal path for the message
instead of using the node name.
2009-11-18 13:50:34 -08:00
Robert Moore
ca84b670c6 Fix two Scope type error messages.
Both messages incorrectly used the internal Path string instead
of the node name.
2009-11-18 13:43:52 -08:00
Robert Moore
9b6e9d4341 Fix possible memory leak for module-level code execution.
An object can be leaked for each block of executed module-level
code if the interpreter slack mode is enabled. The change
deletes any implicitly returned object in this case.
2009-11-18 13:25:42 -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
7fc5b28b51 New internal utility function to create Integer objects.
AcpiUtCreateIntegerObject. This function (when deployed) should
simplify some of the object creation code.
ACPICA BZ 823.
2009-11-05 15:00:14 -08:00
Robert Moore
829c0044e5 Add repair for predefined methods that must return sorted lists.
This change will repair (by sorting) packages returned by _ALR,
_PSS, and _TSS. Drivers can now assume that the packages are
correctly sorted. Adds one new file, namespace/nsrepair2.c
ACPICA BZ 784. Lin Ming, Bob Moore.
2009-11-04 13:57:17 -08:00
Robert Moore
c73b29b348 Fix possible fault if return Package objects contain NULL elements.
For predefined name validation. Also adds a warning if a NULL
element is followed by any non-null elements.
ACPICA BZ 813, 814.
2009-10-29 08:44:53 -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
9c992f8871 Change package length error message to an info message.
This message happens when the package element list is longer than
the declared length of the package. Changed to an info message
because this condition is not actually an error. It is caused by
the BIOS attempting to truncate the package on the fly by adjusting
the package element count at the start of the package definition.
2009-10-28 09:44:52 -07:00
Robert Moore
381f8561ee Do not cross page boundaries when mapping operation regions.
Ensure that memory mappings created for operation regions do
not cross page boundaries. Crossing a page boundary while mapping
regions can cause warnings if the pages have different attributes.
Such regions are probably BIOS bugs, and this is the workaround.
Linux BZ 14445. Lin Ming.
2009-10-28 09:38:25 -07:00
Robert Moore
e16dcbba87 Reduce severity of predefined repair messages, Warning to Info.
Since the object was successfully repaired, a Warning is too severe.
Reduced to Info for now. We may eventually change these messages
to debug-only. ACPICA BZ 812.
2009-10-14 13:32:06 -07:00
Robert Moore
e6d2570bdf Fix possible memory leak for Scope ASL operator.
Using Scope(\) to change the scope to the root could cause
a single object memory leak. Lin Ming.
2009-10-01 14:32:20 -07:00
Robert Moore
e7a2f12dda Debugger: Ignore errors during Batch execution.
Do not abort Batch execution on an error returned from a method.
2009-10-01 14:31:28 -07:00
Robert Moore
ecea3cc012 Disassembler: Restructure code for externals, no functional change.
Add new file for handling of ASL External() statements. Consolidates
all such code, it is used only for iASL disassembler (not kernel code
or acpiexec.)
2009-10-01 13:33:07 -07:00
Robert Moore
c13698fbed Remove possibility of executing _REG methods twice.
If a custom address space handler is installed by the host before the
"initialize operation regions" phase of the ACPICA initialization, any
_REG methods for that address space could be executed twice. This change
fixes the problem. ACPICA BZ 427. Lin Ming.
2009-09-30 13:15:32 -07:00
Robert Moore
ae7d6fd01a Disassembler: Properly handle externals with parent-prefix (carat)
References to external names in secondary tables that contained one or
more carats (parent-prefixes) were not handled correctly.
ACPICA BZ 806. Lin Ming.
2009-09-30 10:29:17 -07:00
Robert Moore
2551bea592 Debugger: Add max count argument for Batch command.
Allows a maximum number of predefined methods to be executed.
2009-09-29 12:31:58 -07:00
Robert Moore
bd05120354 Add repair for bad _MAT buffers.
_MAT can inadvertently return an Integer instead of a Buffer if
the return value has been read from a Field whose width is less
than or equal to the global integer width (32 or 64 bits).
ACPICA BZ 810. Lin Ming.
2009-09-23 12:35:05 -07:00
Robert Moore
07843a09ce Add repair for bad _BIF/_BIX packages.
Add a repair for the "Oem Information" field which is often
mistakenly returned as an integer. It should always be a string.
ACPICA BZ 807.
2009-09-23 12:24:15 -07:00
Robert Moore
457f6bf9d7 Windows compatibility: autoexecute root _INI method.
Add support for execution of an _INI method at the namespace root.
Although not defined in the ACPI specification, this support was
added to Windows around the Vista timeframe. It is added here
for Windows compatibility.
2009-09-02 14:04:28 -07:00
Robert Moore
5681265261 Fix warning for 64-bit build.
2 possible warnings fixed.
2009-09-02 13:27:22 -07:00
Robert Moore
e9491d3ef6 Update _OSI with new Windows OS strings.
Added strings for Windows server 2008, Windows Vista SP1,
Windows 7, and Windows server 2008 R2.
2009-09-02 10:18:11 -07:00
Robert Moore
f32e3476e0 Fix memory leak for ill-formed Package objects.
Fixes a possible memory leak in the interpreter for package objects if the
package initializer list is longer than the defined size of the package. This
apparently can only happen if the BIOS changes the package size on the fly
(seen in a _PSS object), as both iASL and the other compiler do not allow this.
The interpreter will truncate the package to the defined size (and issue an
error message), but can leave the extra objects undeleted if they have been
pre-created during the argument processing (such is the case if the package
consists of a number of sub-packages as in the _PSS.) ACPICA BZ 805.
2009-09-01 12:52:55 -07:00
Robert Moore
7a78d55e3f Windows compatibility fix: same buffer/string store.
Fixes a compatibility issue when the same buffer or string is
stored to itself. This has been seen in the field. Previously,
ACPICA would zero out the buffer/string. Now, the operation is
treated as a noop. ACPICA BZ 803. Lin Ming.
2009-08-13 07:06:20 -07:00
Robert Moore
c54620b195 Remove error message for Store(Localx,Localx)
We silently ignore this construct for Windows compatibility.
ACPICA BZ 785.
2009-08-12 09:38:19 -07:00
Robert Moore
3cc98ca6e2 Fix extraneous warning if _DSM returns a package.
_DSM can return any type of object, so validation on the return type
cannot be performed. ACPICA BZ 802.
2009-08-12 09:27:21 -07:00
Robert Moore
a5777b37bd AcpiReset: Bypass port validation mechanism.
Allow writes to reserved ports. This change may eventually be
driven down in to AcpiWrite and AcpiRead.
2009-07-30 08:38:30 -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
cadb875839 Fix symbol to allow correct translation of Linux code.
AcpiSrc removes all symbols with '__' prefix, these cannot be used.
2009-07-23 12:28:23 -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
106406c1b8 Fix suspend failure if PM2 control register does not exist.
Since PM2 control is an optional register, ignore an AE_BAD_ADDRESS
exception from any writes to it. Affects writes to the BM arbitration
bit. ACPICA BZ 799.
2009-07-20 13:31:50 -07:00
Robert Moore
b9b8329702 ACPI 4.0: Add validation for new predefined names.
Added 31 new names for ACPI 4.0.
2009-07-20 12:59:48 -07:00
Robert Moore
1170aa2715 Fix fault if AcpiTerminate is called twice.
Fixes a problem with the mechanism that prevents problems if the
AcpiTerminate interface is inadvertently called more than once before
the ACPICA code is re-initialized. ACPICA BZ 795.
2009-07-14 09:24:25 -07:00
Robert Moore
eeb71b76cb Fix regression for AcpiGetDevices - ID matching.
Problem was introduced in 20090625. The _HID and _CID matching code
was broken with the introduction of the string changes for these
IDs. ACPICA BZ 793. Reported by Dana Myers.
2009-06-30 14:10:27 -07:00
Robert Moore
619cbe4d6c ACPI 4.0: Add new return package type, restructure module.
Added one new package type, a package that contains a revision number
and a variable number of sub-packages. Restructured the module to
put the sub-package list traversal in a separate function.
2009-06-30 08:13:22 -07:00
Robert Moore
ede1ca0212 Add repair for predefined methods that return nested packages.
Fixes a problem where a predefined method is defined to return a
variable-length Package of sub-packages. If the length is one, the
BIOS code occasionally creates a simple single package with no
sub-packages. This code attempts to fix the problem by wrapping
a new package object around the existing package. ACPICA BZ 790.
2009-06-26 10:54:44 -07:00
Robert Moore
4811ab66f4 Move predefined repair code to new file, no functional change.
New file is nsrepair.c. This is in preparation for additional
errror correcting code.
2009-06-26 09:36:18 -07:00
Robert Moore
ba06eaab14 Clarify common suffix for error/warning messages.
Added parens around the acpica version/modulename/linenumber to
clearly differentiate this group from the rest of the message.
2009-06-23 13:44:35 -07:00
Robert Moore
8997e8ccd1 Fix: Predefined object repair executed only once.
This fixes a problem where the code that attempts to repair/convert an
object of incorrect type is only executed on the first time the
predefined method is called. The mechanism that disables warnings
on subsequent calls was interfering with the repair mechanism.
ACPICA BZ 781.
2009-06-23 13:33:48 -07:00
Robert Moore
93d8cbef0d Dump table header - suppress output of non-printable characters.
Function AcpiTbPrintTableHeader. Some ACPI tables contain non-printable
characters in one of the string fields of the the header - Signature,
OemId, OemTableId, or CompilerId. Invalid characters are replaced
by '?'. ACPICA BZ 788.
2009-06-22 12:33:47 -07:00
Robert Moore
ace198676c Fix several AcpiAttachData problems.
Handler was never invoked. Now invoked if/when host node is deleted.
Data object was not automatically deleted when host node was deleted.
Interface to handler had an unused parameter, removed it.
ACPICA BZ 778.
2009-06-19 13:23:34 -07:00
Robert Moore
64a735c120 ACPI 4.0: Interpreter support for IPMI.
Adds support for IPMI which is similar to SMBus and uses a bi-directional
data buffer. ACPICA BZ 773. Lin Ming.
2009-06-19 09:17:58 -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
235329a8f3 Fix possible memory leak in nspredef.c
Fixed a possible leak when an attempt is made to repair a return object.
The only current repair is an automatic buffer to string conversion.
2009-06-12 13:33:19 -07:00
Robert Moore
95dd0f01c6 Major update for AcpiGetObjectInfo external interface.
Completed a major update for the AcpiGetObjectInfo external interface.
Changes include:
 - Support for variable, unlimited length HID, UID, and CID strings
 - Support Processor objects the same as Devices (HID,UID,CID,ADR,STA, etc.)
 - Call the _SxW power methods on behalf of a device object
 - Determine if a device is a PCI root bridge
 - Change the ACPI_BUFFER parameter to ACPI_DEVICE_INFO.
These changes will require an update to all callers of this interface.
See the ACPICA Programmer Reference for details.
2009-06-10 14:07:55 -07:00