6010 Commits

Author SHA1 Message Date
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
Robert Moore
c63f4ddb0f Add 64-bit support to AcpiRead and AcpiWrite.
Needed by drivers for new ACPi tables.
Internal versions of these functions still use 32-bit max transfers,
in order to minimize disruption and stack use for the standard ACPI
registers (FADT-based).
2009-05-27 13:06:39 -07:00
Robert Moore
c99866ffd8 Fix several pointer casts to avoid possible compile warnings.
Fixes warnings with gcc -Wcast-qual flag.
2009-05-22 09:20:09 -07:00
Robert Moore
66a7952f1b Region deletion: Ensure region object is removed from handler list.
Prevents a possible fault when a dynamic operation region is
deleted. ACPICA BZ 507. Lin Ming.
2009-05-20 14:47:25 -07:00
Robert Moore
b9d03a5871 Eliminate extra call to NsGetParentNode.
Was called twice in the same function with the same parameter.
Alex Chiang.
2009-05-19 07:49:09 -07:00
Robert Moore
f7baaa44f5 Simplify internal operation region interface.
Changed address parameter to a simple offset. This removes the need for
the caller to access the region object to obtain the physical address.
2009-05-15 14:33:05 -07:00
Robert Moore
39a897a21d Update Load() to use operation region interfaces.
Replace memory mapping with region access calls. Now, all region
accesses go through the region handler as they should.
2009-05-15 08:26:13 -07:00
Robert Moore
7abcc2ea10 New: AcpiInstallMethod - install a single control method.
This interface enables the override or creation of a single control
method. Useful to repair a bug or install a missing method.
2009-05-13 13:04:01 -07:00
Robert Moore
c31764aaf7 Invalidate DdbHandle after table unload.
Mark the DdbHandle as invalid after the table it refers to is unloaded.
This is needed because the handle itself may not be deleted after
the table unload, depending on whether it has been stored in a named
object by the caller.
2009-05-13 08:27:59 -07:00
Robert Moore
89dddabda1 Fix reference count issues for DdbHandle object.
Fix a problem where the DdbHandle could be prematurely deleted, possibly
causing a fault. Lin Ming.
2009-05-12 08:26:54 -07:00
Robert Moore
200372599b Simplify and optimize NsGetNextNode function.
Reduced parameter count and reduced code for this frequently used
function.
2009-05-11 13:13:54 -07:00
Robert Moore
eab3288b4b Additional validation of _PRT packages (resource mgr).
Fixes a possible fault when parsing an ill-formed _PRT package.
2009-05-07 13:12:59 -07:00
Robert Moore
b64d850f1f Fix DebugObject output for DdbHandle objects.
Was putting several extra spaces on the next line.
2009-05-07 13:03:27 -07:00
Robert Moore
506914294f Fix allowable release order for ASL mutex objects.
The ACPI 4.0 specification has been changed to make the SyncLevel
for mutex objects more useful. When releasing a mutex, the synclevel
of the mutex must now be the same as the current sync level. This
makes more sense. This change updates the code to match the spec.
2009-05-01 15:00:05 -07:00
Robert Moore
95b36bc38b Mutex support: Fix release ordering issue and current sync level.
Fixes a problem where if multiple mutexes of the same sync level are
acquired but then not released in strict opposite order, the current
sync level becomes confused and can cause errors. ACPICA BZ 471.
2009-05-01 12:54:20 -07:00
Robert Moore
3fda08b9ad Lock local cache during purge.
Cache must be locked during object deletion. Andrew Baumann.
2009-04-28 09:46:35 -07:00
Robert Moore
a3c67073f1 Debugger: Lock method args for multithread command.
Prevents corruption of the global method arg structure when
multiple threads are created. Lin Ming.
2009-04-24 12:28:49 -07:00
Robert Moore
ef30c37591 Fix implementation of AML BreakPoint operator (break to debugger).
The AML BreakPoint opcode will now cause a break into the AML debugger
if it is present/configured. This matches the expected behavior per
the ACPI specification. Previously, only a message was output.
2009-04-14 10:50:38 -07:00
Robert Moore
e47bc1fea2 Fix miscellaneous warnings under gcc 4+
Some possible warnings with gcc 4+, especially with extended warnings
enabled.
2009-04-13 14:05:16 -07:00
Robert Moore
01004bcfb6 Fix warnings when ACPI_THREAD_ID is configured as a pointer.
The default type is an integer, but can be reconfigured as a pointer.
This change fixes some possible warnings when ACPI_THREAD_ID is
defined to be a pointer type.
2009-04-13 13:32:56 -07:00
Robert Moore
68fc5c1456 Miscellaneous lint changes.
Unused variables/headers, casting, etc.
2009-04-10 09:16:48 -07:00
Robert Moore
86ba33b4eb Fix possible dereference of null pointer.
Fix dereference of possibly null pointer "Predefined" in the case
where the method is not one of the predefined methods.
2009-04-10 08:31:09 -07:00
Robert Moore
144220d6de I/O port protection: update for windows compatibility.
For windows compatibility,
1) On a port protection violation, simply ignore the request and do not
return an exception (allow the control method to continue execution.)
2) If only part of the request overlaps a protected port, read/write the
individual ports that are not protected.
2009-04-10 07:59:12 -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
39fa6f4a16 Fix possible warnings for ACPI_THREAD_ID on 64-bit build.
Warnings can be generated for printf-like statements that output
the ACPI_THREAD_ID on 64-bit builds, since this type can expand
to 64-bits depending on how it is defined. Use the %p format
specifier to allow the output to automatically expand to 64 bits.
2009-04-09 08:18:21 -07:00
Robert Moore
e2896fc024 Change behavior of object copy for mutex/event objects.
When copying these internal objects, cannot simply copy the underlying
OS object. A new OS object must be created.
2009-04-08 10:38:08 -07:00
Robert Moore
26c4a8e708 Fix a few warnings for gcc 3.4.4
Mostly for acpiexec, one in the core subsystem.
2009-03-27 13:41:59 -07:00
Robert Moore
5541c0cae8 Update error/warning interfaces.
Moved the module name and line number to the end of the message.
2009-03-25 14:23:48 -07:00
Robert Moore
bd334bf7cc Fix warnings for 64-bit build.
Several warnings in hwvalid.c for ACPI_IO_ADDRESS output on 64-bit.
2009-03-20 12:15:58 -07:00
Robert Moore
3a5c56fbe8 Remove unused code, dsopcode.
Unnecessary check of ACPI_STATUS.
2009-03-19 12:20:29 -07:00
Robert Moore
cc3df039ac Fix index value in package warning message.
For predefined method validation. Index value in warning message could
be off by one.
2009-03-18 08:11:24 -07:00
Robert Moore
3f956fd779 FADT: Favor 32-bit FACS and DSDT addresses.
If both the 32-bit and 64-bit addresses are non-null, use the 32-bit
address. Provides Windows compatibility.
2009-03-17 14:24:33 -07:00
Robert Moore
ae2ea280f4 FADT: Favor 32-bit register addresses for compatibility.
Use the 32-bit register addresses whenever they are non-zero. This means
that the 32-bit addresses are favored over the 64-bit (GAS) addresses. The
64-bit addresses are only used if the 32-bit addresses are zero. This
change provides compatibility with all versions of Windows. The worst
case that this solves is when both the 32-bit and 64-bit addresses are
non-zero, but only the 32-bit addresses are actually valid. This appears
to happen in some BIOSes because in this case, Windows uses the 32-bit
addresses.
2009-03-17 14:06:44 -07:00
Robert Moore
8526fe17f6 Fix PCI configuration space port address range.
Microsoft website uses 0xCF8-0xD00. Should be 0xCF8-0xCFF
(Two 32-bit registers.)
2009-03-17 12:43:35 -07:00
Robert Moore
0223f20b27 Condense some protected ports.
One entry in the protected port table eliminated. Added extra
comments to describe each table entry.
2009-03-16 14:42:56 -07:00
Robert Moore
5b1d2828ff Remove unused code, no functional change.
Removed unused code for dump of args and locals. General cleanup
and splitting of long lines.
2009-03-16 14:41:36 -07:00
Robert Moore
aa203e9e24 Clear PM register write-only bits on reading.
Affects PM1 Control register only. When reading the register,
zero the write-only bits as per the ACPI spec.
ACPICA BZ 443. Lin Ming.
2009-03-13 15:05:13 -07:00
Robert Moore
4df59faf08 Remove obsolete AcpiOsValidateAddress interface.
This interface is no longer necessary. Requests should be validated
on a per-field basis, not on the entire operation region.
2009-03-13 08:49: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
cabb0010ed Remove "Linux" from supported _OSI strings.
The Linux OS no longer wants to respond true for this string.
The only safe strings are windows-related as they represent
the tested path through the BIOS-provided ASL.
2009-03-12 14:18:26 -07:00
Robert Moore
a6fd0232e2 Preserve all PM control reserved and ignored bits.
As per the ACPI specification, preserve (read/modify/write) all
bits that are defined as either reserved or ignored (PM control
control registers only.)
2009-03-11 13:51:04 -07:00
Robert Moore
66bfc57c53 Change handling of PM1 Status register ignored bit.
Ignored bits must be preserved according to the ACPI spec.
Usually this means a read/modify/write when writing to the register.
However, for status registers, writing a one means clear the event.
Writing a zero means preserve the event (do not clear.) This behavior
is clarified in the ACPI 4.0 spec, and the ACPICA code now simply
always writes a zero to the ignored bit.
2009-03-06 13:29:34 -08:00
Robert Moore
b1c943d6c2 Fix AcpiWalkNamespace race condition with table unload.
Added a reader/writer locking mechanism to allow multiple
concurrent namespace walks (readers), but a dynamic table
unload will have exclusive access to the namespace. This fixes
a problem where a table unload could delete the portion of
the namespace that is currently being examined by a walk.
Adds a new file, utlock.c that implements the reader/writer
lock mechanism. ACPICA BZ 749.
2009-03-06 08:54:39 -08:00
Robert Moore
9f849c6ae7 FADT: Fix extraneous length mismatch warning.
Incorrect register length mismatch between the 32 and 64 bit
registers in some cases. Code was was checking the wrong pointer
for non-zero, should be looking at the address within the GAS
structure.
2009-03-05 16:03:18 -08:00
Robert Moore
ead71a2916 Fix for illegal port access <regression>
Fixes problem introduced in 20090220, "Split out PM1 status registers
from the FADT". Must check for the case where the PM1B status reg
does not exist, before the GAS structure is constructed.
Junk-uk Kim.
2009-03-05 13:25:18 -08:00
Robert Moore
30139ee39d Formatting update - no functional changes.
Split some long lines.
2009-02-24 13:26:26 -08:00