2841 Commits

Author SHA1 Message Date
Robert Moore
bb624f47b8 Update msvc header for VC++ 9 (VS 2008)
Add a couple new compiler-specific items to eliminate warnings.
2010-12-17 17:06:14 -08:00
Robert Moore
b55e472e92 Update version to 20101209.
Version 20101209.
2010-12-09 09:52:55 -08:00
Robert Moore
3bc77e86ae GPE support code overhaul and enhancement.
Contains the complete overhaul of the GPE support code including
removal of _PRW execution, improved handling of wake GPEs, new
external interfaces, and implicit notify support. ACPICA BZ 858,
870,877. Matthew Garrett, Lin Ming, Bob Moore, Rafael Wysocki.

Note: This support is committed as a single patch here because
of multiple patch backporting from Linux and the resulting
interdependency issues.

See the ACPICA reference for full documentation.
2010-12-01 12:57:25 -08:00
Robert Moore
81f545c7c6 Increase debugger buffer size for method return objects.
Was 4K, increased to 16K. Also enhanced error messages for debugger
method execution, including the buffer overflow case.
2010-11-17 13:48:30 -08:00
Robert Moore
378378c888 Disassembler: Decode AccessWidth field of GAS structure.
Decode the encoded width (1=Byte, 2=Word, etc.)
2010-10-15 12:47:07 -07:00
Robert Moore
615836b90d Update version to 20101013.
Version 20101013.
2010-10-13 09:24:43 -07:00
Robert Moore
14486424a2 Update file permissions.
No functional change.
2010-10-13 08:09:26 -07:00
Robert Moore
16da8c8163 Deploy common signon/header for all ACPICA tools.
Common signon with version,32/64 width,date,copyright.
2010-09-30 14:47:37 -07:00
Robert Moore
d01d91a34c Add configuration for AcpiBin utility.
To acenv.h file.
2010-09-30 14:37:48 -07:00
Robert Moore
f0caebb16f Clear PCIEXP_WAKE_STS when clearing ACPI events.
When clearing status bits via HwClearAcpiStatus, also clear
the PCIEXP_WAKE_STS bit. Original change from Colin King.
ACPICA BZ 880.
2010-09-29 08:49:28 -07:00
Robert Moore
990324383c Add Vista SP2 to supported _OSI strings.
Added "Windows 2006 SP2" for Vista SP2.
2010-09-29 08:43:21 -07:00
Robert Moore
ecc57b86d9 Replace _MULTI_THREADED with ACPI_SINGLE_THREADED and cleanup.
Cleanup the optional multi/single threaded code for semaphores.
2010-09-24 14:32:44 -07:00
Robert Moore
184ee2428c Update acfreebsd.h for ACPI_THREAD_ID.
From FreeBsd, Jung-uk Kim.
2010-09-16 12:33:39 -07:00
Robert Moore
0581dd659e Update version to 20100915.
Version 20100915.
2010-09-15 10:11:11 -07:00
Robert Moore
e833f7b424 iASL/Disassembler: Write ACPI errors to stderr instead of output file.
This keeps the output files clean of random error messages that may
originate from within the namespace/interpreter code.

Used this opportunity to merge all ACPI:-style messages into a single
new module, utxferror.c. ACPICA bugzilla 866.
2010-09-10 12:48:36 -07:00
Robert Moore
028e11a944 Make AcpiGbl_SystemAwakeAndRunning publically available.
Added extern for this boolean in acpixf.h. Some hosts utilize
this value during suspend/restore operations.
2010-09-08 14:35:32 -07:00
Robert Moore
c8325d8510 Update math module; no functional change.
Move the 64-bit overlay structures to the utmath module since they
are used nowhere else. Update module comment. ACPICA BZ 829.
2010-09-08 09:50:36 -07:00
Robert Moore
8df5e1c4a2 Revert "Remove obsolete/unused AcpiGbl_SystemAwakeAndRunning global."
This reverts commit f3a6e65d76883eef89299039e20112cce83797b5.

This global is actually used by some hosts in the suspend/resume
code (FreeBSD for one.)
2010-09-03 14:38:49 -07:00
Robert Moore
0845205248 Update header for Intel 64-bit C compiler.
Remove unused macros.
2010-08-26 10:05:19 -07:00
Robert Moore
b890ef7b6b Make ACPI_THREAD_ID no longer configurable, always UINT64.
Change definition of ACPI_THREAD_ID to always be a UINT64. This simplifies
the code, especially any printf output. UINT64 is the only common data
type for all thread_id types across all operating systems. We now force
the OSL to cast the native thread_id type to UINT64 before returning
the value to ACPICA (via AcpiOsGetThreadId). Lin Ming, Bob Moore.
2010-08-20 13:37:40 -07:00
Robert Moore
a598d63bbe Add ACPI_INLINE configuration parameter.
The C inline keyword is not standardized, ACPI_INLINE allows this
to be configured on a per-compiler basis. Lin Ming.
2010-08-20 12:25:54 -07:00
Robert Moore
f3a6e65d76 Remove obsolete/unused AcpiGbl_SystemAwakeAndRunning global.
No longer used or needed.
2010-08-19 15:11:58 -07:00
Robert Moore
08fd52445b Obsolete the AcpiOsDerivePciId OSL interface.
This function is not OS-dependent and has been replaced by
AcpiHwDerivePciId, which is now in the ACPICA core code.
Local implementations of AcpiOsDerivePciId are no longer
necessary and may be removed. ACPICA BZ 857.
2010-08-17 10:22:06 -07:00
Robert Moore
1b23040ed8 Update version to 20100806.
Version 20100806.
2010-08-06 09:27:54 -07:00
Robert Moore
8ad66eb93a Add new host interfaces for _OSI support.
Adds install/remove interfaces so that the host can dynamically
alter the global _OSI table. Also adds support for _OSI handlers.
Additional support: new debugger command (osi), and test support
in the acpiexec utility. Adds new file, utilities/utosi.c.
Lin Ming, Bob Moore. ACPICA bugzilla 836.
2010-08-05 14:18:28 -07:00
Robert Moore
89cfbf859b Revert "Revert "Enable multi-byte EC transfers.""
This reverts commit f23b9c7d4928dca89d0e93f0683caf094c4a74d0.
The problem with this change was determined to be a problem with
the FreeBSD host OSL (OS services layer), not with this patch
itself. Therefore, re-introducing this change into the main
ACPICA code. See ACPICA bugzilla 863.
2010-08-04 14:20:18 -07:00
Robert Moore
9b3dfcc9e0 iASL/Disassembler: Implement -da (disassemble all) option.
This option allows a group of ACPI tables to be loaded into a
common namespace and then disassembled. Useful for loading
all of the AML tables for a given machine (DSDT, SSDT1...SSDTn)
and disassembling with one simple command. ACPICA BZ 865.
Lin Ming.
2010-07-20 14:46:57 -07:00
Robert Moore
7782d737f3 iASL: Allow multiple invocations of -e option.
This change allows multiple uses of -e on the command line:
-e ssdt1.dat -e ssdt2.dat
ACPICA bugzilla 834. Lin Ming.
2010-07-20 14:34:32 -07:00
Robert Moore
450e9850a4 Fix AcpiOsReadPciConfiguration prototype.
Prototype in acpiosxf.h had the output value pointer as a (void *).
Should be a (UINT64 *).
2010-07-16 08:43:24 -07:00
Robert Moore
5815db2cec Update version to 20100702.
Version 20100702.
2010-07-02 09:09:12 -07:00
Robert Moore
8211930a35 Update GPE initialization.
The GPE block initialization code in acpi_ev_initialize_gpe_block()
uses acpi_set_gpe() to make sure that the GPEs with nonzero
runtime counter will remain enabled, but since it already has
a struct acpi_gpe_event_info object for each GPE, it might use
the low-level GPE enabling function, acpi_clear_and_enable_gpe(),
for this purpose.

Rename acpi_clear_and_enable_gpe() to acpi_ev_enable_gpe(),
modify the two existing users of it accordingly and modify
acpi_ev_initialize_gpe_block() to use it instead of acpi_set_gpe()
and to check its return value.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

he commit message for your changes. Lines starting
2010-06-29 13:54:46 -07:00
Robert Moore
837ccbd58d Additional GPE cleanup.
After the previous patch that introduced acpi_gpe_wakeup() and
modified the ACPI suspend and wakeup code to use it, the third
argument of acpi_{enable|disable}_gpe() and the GPE wakeup
reference counter are not necessary any more.  Remove them and
modify all of the users of acpi_{enable|disable}_gpe()
accordingly.  Also drop GPE type constants that aren't used
any more. Rafael J. Wysocki.
2010-06-29 13:35:07 -07:00
Robert Moore
5fd2f4c6d3 New GPE function, AcpiGpeWakeup.
ACPICA uses reference counters to avoid disabling GPEs too early in
case they have been enabled for many times.  This is done separately
for run time and for wakeup, but the wakeup GPE reference counter is
not really necessary, because GPEs are only enabled to wake up the
system at the hardware level by acpi_enter_sleep_state().  Thus it
only is necessary to set the corresponding bits in the wakeup enable
masks of these GPEs' registers right before the system enters a sleep
state.  Moreover, the GPE wakeup enable bits can only be set when the
target sleep state of the system is known and they need to be cleared
immediately after wakeup regardless of how many wakeup devices are
associated with a given GPE.

On the basis of the above observations, introduce function
acpi_gpe_wakeup() to be used for setting or clearing the enable bit
corresponding to a given GPE in its enable register's enable_for_wake
mask. Rafael J. Wysocki
2010-06-29 13:03:38 -07:00
Robert Moore
b64e486fb7 Remove obsolete GPE function.
Remove AcpiHwWriteGpeEnableReg, it had been reduced down to a single
line of code, and called from only one place.
2010-06-22 10:28:57 -07:00
Robert Moore
1e514e60e8 Update for GPE enable masking.
ACPICA uses acpi_hw_write_gpe_enable_reg() to re-enable a GPE after
an event signaled by it has been handled.  However, this function
writes the entire GPE enable mask to the GPE's enable register which
may not be correct.  Namely, if one of the other GPEs in the same
register was previously enabled by acpi_enable_gpe() and subsequently
disabled using acpi_set_gpe(), acpi_hw_write_gpe_enable_reg() will
re-enable it along with the target GPE.

To fix this issue rework acpi_hw_write_gpe_enable_reg() so that it
calls acpi_hw_low_set_gpe() with a special action value,
ACPI_GPE_CONDITIONAL_ENABLE, that will make it only enable the GPE if the
corresponding bit in its register's enable_for_run mask is set.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Patch : https://patchwork.kernel.org/patch/104909/
2010-06-21 14:42:52 -07:00
Robert Moore
56ab559769 Update for GPE enabling/disabling.
ACPICA uses acpi_ev_enable_gpe() for enabling GPEs at the low level,
which is incorrect, because this function only enables the GPE if the
corresponding bit in its enable register's enable_for_run mask is set.
This causes acpi_set_gpe() to work incorrectly if used for enabling
GPEs that were not previously enabled with acpi_enable_gpe().  As a
result, among other things, wakeup-only GPEs are never enabled by
acpi_enable_wakeup_device(), so the devices that use them are unable
to wake up the system.

To fix this issue remove acpi_ev_enable_gpe() and its counterpart
acpi_ev_disable_gpe() and replace acpi_hw_low_disable_gpe() with
acpi_hw_low_set_gpe() that will be used instead to manipulate GPE
enable bits at the low level.  Make the users of acpi_ev_enable_gpe()
and acpi_ev_disable_gpe() call acpi_hw_low_set_gpe() instead and
make sure that GPE enable masks are only updated by acpi_enable_gpe()
and acpi_disable_gpe() when GPE reference counters change from 0
to 1 and from 1 to 0, respectively.
Rafael Wysocki. Corresponds to:
Patch : https://patchwork.kernel.org/patch/104912/
2010-06-21 14:28:04 -07:00
Robert Moore
8b4c46906a Add new function to compute GPE register masks.
In quite a few places ACPICA needs to compute a GPE enable mask with
only one bit set, corresponding to a given GPE. Currently, that
computation is always open coded which leads to unnecessary code
duplication. Fix this by introducing a helper function for computing
one-bit GPE enable masks and using it where appropriate.
Rafael Wysocki. corresponds to:
Patch : https://patchwork.kernel.org/patch/104903/
2010-06-21 13:30:30 -07:00
Robert Moore
7cf3243436 iASL-DTC: Add comment support, fix error messages.
Adds full support for comments within input source files.
Fixed a couple error messages one for unknown table signature,
another for unrecognized source file (not asl or data table source.)
Also, reduced verbosity of the standard templates, but added
option (-vt) to make the output look exactly like the disassembler.
2010-06-11 10:05:28 -07:00
Robert Moore
f23b9c7d49 Revert "Enable multi-byte EC transfers."
This change was found to break IndexField and possibly BankField
operations.
2010-06-09 11:40:54 -07:00
Robert Moore
9178def100 Disassembler: Add new strings for EINJ, ERST, HEST tables.
Add description strings for EINJ/ERST actions and instructions.
Also flag decoding for EINJ/ERST/HEST.
2010-06-08 15:10:01 -07:00
Robert Moore
648799e494 Disassembler: Add checksum validation for RSDP.
Verify both RSDP checksums during disassembly.
Also, fix checksum generation during RSDP compile.
2010-06-08 12:45:36 -07:00
Robert Moore
64edfcfe01 iASL: Add templates for FACS, RSDP, DSDT, SSDT.
These tables are a bit different from the rest of the tables.
DSDT/SSDT are AML tables, not data tables. FACS/RSDP do not use
the standard ACPI table header.
2010-06-04 13:41:40 -07:00
Robert Moore
d9634daeee iASL: Additional template generator integration.
Also fixes a few issues with SBST, HEST, and ECDT templates.
2010-06-03 13:38:49 -07:00
Robert Moore
1ad056a79f iASL: Add support to generate ACPI Data Table Template files.
These files can be used as the starting point for an actual ACPI
table, to be compiled via the iASL Data Table Compiler.
2010-06-02 13:45:39 -07:00
Robert Moore
b738e9a74c Add support for WDDT - Watchdog Descriptor Table.
Disassembler and header file support.
2010-06-02 12:29:13 -07:00
Robert Moore
f07ee8aa56 Update version to 20100528.
Version 20100528.
2010-05-28 14:16:03 -07:00
Robert Moore
41fdcaead2 Add signatures for undefined tables: ATKG, GSCI, IEIT.
These ACPI tables have been seen in the field, but the actual
table definitions are unkown at this time.
2010-05-27 10:32:55 -07:00
Robert Moore
df3d422671 Enable multi-byte EC transfers.
Previously, the maximum data size passed to the EC operation region
handler was a single byte. Since there are often larger datums that
need to be transfered, and the EC would like to lock these as a single
transaction, this change enables transfers larger than a single byte.
This may require changes to the host-OS Embedded Controller driver
to enable 16/32/64 bit tranfers in addition to 8-bit transfers.
Alexey Starikovskiy, Lin Ming
2010-05-26 13:01:18 -07:00
Robert Moore
14aafc8b1b Update flags for operand object.
Remove obsolete AOPOBJ_SINGLE_DATUM. Add AOPOBJ_INVALID for use if
the host OS rejects the address of an operation region (currently
only used by Linux.)
2010-05-26 11:25:44 -07:00
Robert Moore
de716aac23 Performance enhancement for namespace search and access.
This change enhances the performance of namespace searches and walks
by adding a backpointer to the parent in each namespace node. On large
namespaces, this change can improve overall ACPI performance by up to 9X.
Adding a pointer to each namespace node increases the overall size of
the internal namespace by about 5%, since each namespace entry usually
consists of both a namespace node and an ACPI operand object.
Alexey Starikovskiy.
2010-05-25 12:38:08 -07:00