Commit Graph

603 Commits

Author SHA1 Message Date
Robert Moore
d09bc88ad2 AcpiSrc: Fix indentation issues for macro invocations.
During the linuxizing process, some extra white spaces are added by the
"indent" program at the beginning of the line which is an invocation of a
macro and there is no ";" at the end of the line.

This patch adds new mode to AcpiSrc to remove extra spaces inserted before
invoking such macros and add an empty line between the invocations of such
macros (like the other function declarations).  This new mode is executed
after executing "indent" during the Linux release process.

The affected macros and files are:
 1. ACPI_HW_DEPENDENT_RETURN (acpixf.h):
    This macro is used as a wrapper for hardware dependent APIs to offer a
    stub when the reduced hardware is configured during compilation.
 2. ACPI_EXPORT_SYMBOL (utglobal.c):
    This macro is used by Linux to export symbols to be found by Linux
    modules.  All such invocations are well formatted except those exported
    as global variables.

This can help to reduce the source code differences between Linux and
ACPICA, and also help to automate the release process.  Lv Zheng.
2013-09-26 08:33:05 -07:00
Robert Moore
f2c386eee6 Cleanup global variable that is used only by OSL code.
Move AcpiGbl_DebugTimeout from AcpiExec to the OSL layer so that
any new utilities linked to the OSL file(s) won't have to define
it in order to link. Lv Zheng.
2013-09-25 13:56:13 -07:00
Robert Moore
015bcb3d8b AcpiExec: Add full line-editing support for Unix/Linux systems.
Adds a portable module to perform line editing via right-arrow,
left-arrow, and the DEL key. Portability is the key here, so
we don't attempt to use readline(), etc.
2013-09-25 12:19:39 -07:00
Robert Moore
581de77bc9 AcpiExec: Add history/line-editing for Unix/Linux systems.
This change adds full history and limited line editing for Unix and
Linux systems. It does not use readline() because of portability issues.
Instead it uses the POSIX termio interface to put the terminal in raw
input mode so that the various special keys can be trapped (such as
up-arrow and down-arrow for history support).
2013-09-13 12:58:31 -07:00
Robert Moore
a0436de828 AcpiExec: Add tests for multiple UEFI table support.
This change adds a second UEFI table that is installed by AcpiExec,
then AcpiExec retrieves both tables via the AcpiGetTableHeader and
AcpiGetTable interfaces.
2013-09-05 08:33:10 -07:00
Robert Moore
49f7852a21 AcpiXtract: Handle "empty" lines containing one or more spaces.
Empty lines are ignored by the utility. This change allows AcpiXtract
to correctly handle lines that contain simply one or more spaces as
empty lines. ACPICA BZ 1044.
2013-09-04 12:50:31 -07:00
Robert Moore
1ce28e58d5 AcpiExec: Remove local wildcard support.
This change affects windows version only; AcpiExec now is linked
to the windows setargv.obj which implements wildcards. So, all
code related to wildcards is now removed.
2013-08-30 13:02:21 -07:00
Robert Moore
bbd28ae4c1 SCI Handlers: Update handler interface, eliminate unnecessary argument.
The SCI interrupt number is not needed for the SCI handlers, and was
just unnecessary overhead.
2013-08-22 12:56:38 -07:00
Robert Moore
d36dbb46ca AcpiDump: Code cleanup, no functional change.
Fix some indenting and whitespace issues.
2013-08-22 09:47:14 -07:00
Robert Moore
6d685e9dfd AcpiDump: Add multiple table instances support.
This patch adds multiple table instances support for Unix versions.

For AcpiDump, only "-b" options need to handle multiple table instances,
other modes do not need to worry about this as it is handled by external
programs (for example, AcpiXtract).
The call path for "-b" option is:
    ApDumpAllTables()
        AcpiOsGetTableByIndex()
        ApDumpTableBuffer()
            ApWriteToBinaryFile()
It is hard for apdump.c to achieve same "instance ID" that used in the OSL
codes, this patch enhances AcpiOsGetTableByIndex() to obtain table
"instance ID" from OSL layer.  ACPICA BZ 1027.  Lv Zheng.
2013-08-22 09:26:38 -07:00
Robert Moore
64320e25e4 AcpiDump: Add option to extract "customized" ACPI tables.
This patch adds option to extract customized tables on Linux.  Lv Zheng.
2013-08-22 09:23:48 -07:00
Robert Moore
6b1c755131 AcpiDump: Add RSDP/RSDT/XSDT table extraction support.
This patch adds full support of RSDP/RSDT/XSDT support for Linux to make it
compatible with the wide used original one, it includes a UEFI RSDP search
support using /sys/firmware/efi/systab and a '-r' option.

On hardware reduced platforms running Linux, there might only be UEFI boot
service enabled, no UEFI runtime service is available.  Thus when the RSDP
is not located in the EBDA window, it is not possible for AcpiDump to find
the RSDP through UEFI sysfs interfaces.  This patch also adds '-r' option
to allow RSDP to be extracted from a user specified position to work around
this issue.  Lv Zheng.
2013-08-22 09:21:36 -07:00
Robert Moore
5041f3c13d Tables: Cleanup table checksum verification code.
This patch reduces code redundancy by moving the FACS/S3PT checksum
verification skip logic into AcpiTbVerifyChecksum().
This patch also adds ApIsValidChecksum() to be called by AcpiDump OSL codes
to verify the checksum of RSDP and tables.  Lv Zheng.
2013-08-22 09:16:25 -07:00
Robert Moore
802e78739b AcpiExec: On region deactivation, set return context value to null.
For sanity, always set the return context value in the system
memory region handler setup routine to NULL. David Box.
2013-08-16 13:12:43 -07:00
Robert Moore
9f16790880 AcpiExec: Add support/test for SCI handlers.
Adds some testing/exercise of the SCI handler installation and
removal code.
2013-08-16 09:12:42 -07:00
Robert Moore
45ea10758c Add support for host-installed SCI handlers.
This change adds support to allow hosts to install System Control
Interrupt handlers. Certain ACPI functionality requires the host
to handle raw SCIs. For example, the "SCI Doorbell" that is defined
for memory power state support requires the host device driver to
handle SCIs to examine if the doorbell has been activated. Multiple
SCI handlers can be installed to allow for future expansion.
Debugger support is included.
Lv Zheng, Bob Moore. ACPICA BZ 1032.
2013-08-16 09:11:45 -07:00
Robert Moore
b8999a8916 Utilities: Standardize -v option for all user-space tools.
Ensure -v is supported in all of the tools, in an identical manner.
Also cleans up and standardizes the format of the utility names
and supported option strings.
2013-07-31 08:44:50 -07:00
Robert Moore
bb99bfe60f AcpiExec: Install two UEFI tables to test multi-UEFI support.
UEFI tables are allowed to have multiple instances, in addition
to SSDTs.
2013-07-03 12:39:15 -07:00
Robert Moore
35357adc05 Automated cleanup, no functional change.
Removed extraneous spaces.
2013-06-19 09:51:56 -07:00
Robert Moore
d43e189699 AcpiDump: Change "version" option to -v to standardize.
Verbose option is -z for now.
2013-06-07 11:59:37 -07:00
Robert Moore
bafa2716cc AcpiDump: Allow FADT/MADT as valid signatures, cleanup.
To be friendly, allow FADT and MADT as synonyms for FACP and APIC.
Cleanup some error messages.
2013-06-05 13:15:03 -07:00
Robert Moore
4feb7ffeb6 AcpiDump/Linux version: Restructure code and some cleanup.
Add a couple new subroutines to clarify the code, cleanup some
loops, error messages, and constants. Chao Guan.
2013-06-05 13:13:20 -07:00
Robert Moore
3fc353da22 AcpiDump: Added full support for Linux.
Adds full support for linux platforms. Chao Guan, Bob Moore.
2013-05-31 17:42:48 -07:00
Robert Moore
0d0b913fe4 AcpiExec: Add _OSI test for a feature string.
Ensure that the "Extended Address Space Descriptor" string is
recognized properly (it is always supported).
2013-05-30 13:11:02 -07:00
Robert Moore
f1393c4283 AcpiExec: Install some local space handlers for PCI devices.
For test support only. Install memory and I/O handlers for
any PCI devices (PNP0A08).
2013-05-16 08:52:21 -07:00
Robert Moore
69d912895e AcpiDump: Add porting instructions to main module.
Instructions on porting utility to other host operating systems.
2013-05-03 07:39:40 -07:00
Robert Moore
02fe96717e Update interface to AcpiUtValidAcpiName.
Clean up the interface by making the input argument a char * string
instead of a UINT32 name. This is easier to use for all callers
and eliminates casting to *(UINT32*)
2013-05-02 12:03:50 -07:00
Robert Moore
fad0d289af Deploy ACPI_DEBUG_INITIALIZE across all ACPICA utilities.
This macros enables per-host and per-compiler initialization
of debug information/output, etc. for the debug versions of the
utilities only.
2013-05-02 11:40:20 -07:00
Robert Moore
15215bf87d New: Portable acpidump utility (get system ACPI tables).
This utility dumps the system ACPI tables in an ascii format suitable
for extraction via the acpixtract utility.

The main code is portable across environments and hosts. To port the
code, only 3 functions need to be written specifically to obtain
the binary tables from the system.

In this version, Windows is supported. Linux support will be
added later.

ACPICA bugzilla 859.
2013-05-02 09:27:35 -07:00
Robert Moore
bc5dceb5a9 AcpiExec: Correctly implement -h option.
'h' was not in the option list and thus did not work.
2013-05-01 13:07:39 -07:00
Robert Moore
6b0b8eedff Standardize all switch() blocks.
After many years, different formatting for switch() has crept in.
This change makes every switch block identical. Chao Guan.
ACPICA bugzilla 997.
2013-04-23 14:04:40 -07:00
Robert Moore
a3f45e58b8 AcpiBin: Miscellaneous cleanup.
Cleanup some code
Add additional error checks
Add additional output info message
2013-04-19 13:33:58 -07:00
Robert Moore
0ecbfc54b6 AcpiExec: Ensure all handlers installed before _REG method execution.
Move the installation of the "late" handlers to just before
AcpiInitializeObjects is executed. This ensures that all region
handlers are installed before the _REG methods are executed.
2013-04-18 09:30:36 -07:00
Robert Moore
875842a2de AcpiExec: Add support for multiple embedded controllers.
This change installs operation region handlers for multiple embedded
controllers that the DSDT may support. All EC handlers are now
installed at the individual EC device nodes, instead of a single
EC handler installed at the root. This reflects the typical installation
of EC operation region handler(s) by host operating systems.
2013-04-18 09:04:05 -07:00
Robert Moore
f9c8728fda AcpiExec: Add a default handler for SystemCMOS.
Add SystemCMOS handler so that methods that use CMOS won't have
to abort when CMOS is accessed. For AcpiExec ONLY. Not for the
kernel resident code.
2013-04-12 14:18:27 -07:00
Robert Moore
257247e0e0 Linux divergence fixes, no functional changes.
Fixes a couple small Linux divergences. Lv Zheng.
2013-03-27 11:43:52 -07:00
Robert Moore
ca5bb5c730 AcpiHelp: Add argument types to predefined names info display.
Uses the recent update to the predefined names table, displays
the argument count and the allowable argument types.
2013-02-27 13:42:38 -08:00
Robert Moore
6cb3c06d1b Add mechanism for early object repairs on a per-name basis.
Adds the framework to allow object repairs very early in the
return object analysis. Enables repairs like string->unicode,
etc. Bob Moore, Lv Zheng.
2013-02-06 10:18:09 -08:00
Robert Moore
0197232c08 AcpiSrc: Add new table structures into conversion table
The new RASF/VRTC/MTMR table structures are added to the
conversion to allow proper patches generated for Linux.
Lv Zheng.
2013-02-06 09:39:38 -08:00
Robert Moore
81a5a5cfb5 AcpiHelp: Add support for exception code descriptions.
When displaying decoded exception codes, also display the short
description for the code.
2013-01-31 12:36:19 -08:00
Robert Moore
1b80c07cb9 Add exception descriptions to exception info table.
Descriptions to be compiled/used by the acpihelp utility
only. Not compiled for the kernel ACPICA code.
2013-01-31 12:34:40 -08:00
Robert Moore
392e5cce3c AcpiSrc: Add a local version of strlwr() to prevent header issues.
Some systems implement this, others do not, so it is safest to
just have a local version (AsStrlwr).
2013-01-16 12:27:55 -08:00
Robert Moore
e10f38020d AcpiExec: Use ACPI_ROOT_OBJECT where appropriate.
Use the predefined ACPI_ROOT_OBJECT instead of AcpiGbl_RootNode.
This helps exercise the code that checks for ACPI_ROOT_OBJECT.
2013-01-08 13:51:50 -08:00
Robert Moore
5b6ee00b56 Update ACPICA copyrights to 2013.
Includes all source headers and signons for the various tools.
2013-01-08 09:23:11 -08:00
Robert Moore
1f67b264b4 iASL: Finish support for the TPM2 table.
Add disassembler, table compiler, and template support.
2012-12-05 13:18:08 -08:00
Robert Moore
0ab6c47de3 iASL: Finish support for CSRT table.
Add intel-specific shared info subtable.
Add data table compiler and template support.
2012-12-05 12:46:40 -08:00
Robert Moore
71323a48e4 AcpiHelp: Fix a few small typos.
Fix some small issues within the ASL operator display.
2012-12-04 14:33:52 -08:00
Robert Moore
29e066e019 Eliminate some small unnecessary pathname functions.
Removed several small pathname functions to increase efficiency.
Essentially, they replace a function call with a single compare.
2012-11-15 12:55:12 -08:00
Robert Moore
dbfa50ac62 AcpiBin: Fix for the dump-to-hex function.
Now correctly output the table name header so that AcpiXtract
recognizes the output file/table.
2012-11-08 13:51:05 -08:00
Robert Moore
898b052723 iASL/Tools: Standardize use of stream I/O functions.
1) Check for I/O error after every fopen/fread/fwrite
2) Ensure proper order of size/count params for fread/fwrite
3) Use test of Actual != Requested after all fwrite, most fread
4) Standardize I/O error messages

Improve reliability and maintainability of the code.
Bob Moore, Lv Zheng.
2012-11-08 13:27:52 -08:00