Commit Graph

312 Commits

Author SHA1 Message Date
Robert Moore
8cd93d4ce0 AcpiExec: Remove unused variable.
Remove an unused local variable from the acgetline module.
2013-09-25 12:38:06 -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
de4006bfe4 iASL: Additional fix for wildcard support.
Fixes a possible fault caused by the previous commit for wildcard
changes. Code restructuring left a global variable uninitialized.
2013-09-12 12:50:35 -07:00
Robert Moore
93c1c10009 iASL: Implement wildcard support for -e option (get external tables).
This change implements wildcard support for this option. It also
removes the local implementation of wildcard expansion. This part
affects the windows version only. Windows version is now linked
to the setargv.obj library to get this support.
2013-08-30 13:05:16 -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
1b3070f5d1 Revert "Disassembler: Update for CondRefOf operator."
This reverts commit 64e52a3577.
Change was shown to cause some problems with ASLTS.
Note: The AML parser is very delicate as far as changes like this.
Needs additional investigation.
2013-08-08 08:29:20 -07:00
Robert Moore
64e52a3577 Disassembler: Update for CondRefOf operator.
The operand for this operator does not ever need to generate an
external declaration. Change the type of the operand from a SuperName
to a simple Namestring. Improves disassembly of this operator if
the operand is a control method.
2013-08-02 12:09:37 -07:00
Robert Moore
96f37ef6bf iASL/disassembler: Add support for external method reference file.
Adds the -fe option which allows the user to specify a file that
contains control method external declarations, with the proper
number of arguments. This tells the disassembler how to parse
code that invokes these methods.
2013-07-26 09:46:13 -07:00
Robert Moore
4e3dd4273f iASL/Disassembler: Emit all unresolved method externals in a text block
Put all of the unresolved external method declarations in a single block,
since they are important and may cause the resulting disassembled ASL file
to not compile.
2013-06-28 13:10:00 -07:00
Robert Moore
3d822b0f66 iASL: Make argument to -T optional (default is DSDT template)
The most common usage of -T is to create a DSDT template, so make
the argument optional, and if not specified, default to the DSDT.
2013-06-28 12:54:06 -07:00
Robert Moore
588973fc4b Disassembler: Add EINJ "Flush Cacheline" instruction.
This instruction was added post-ACPI 5.0
Colin Ian King <colin.king@canonical.com>
2013-06-19 10:48:48 -07:00
Robert Moore
50bf399c8e iASL/Disassembler: Fix some possible memory leaks.
Fix for a few possible memory leaks in error recovery paths
Reported by Colin King <colin.king@canonical.com>
2013-06-04 13:17:45 -07:00
Robert Moore
b569b601b7 iASL/TableCompiler: Fix form DMAR compilation problems.
Fixes problems with the optional DMAR subtables.
ACPICA BZ 999. Lv Zheng.
2013-05-21 12:55:04 -07:00
Robert Moore
df934a1718 Disassembler: Add some missing types for HEST and EINJ tables.
Add a missing EINJ action, and two missing HEST notify names.
Colin King <colin.king@canonical.com>.
2013-05-21 11:38:57 -07:00
Robert Moore
63ebf517fd iASL: Add mechanism to disable specific warnings/remarks.
New command line option, -vw<messageid>. also #pragma disable <messageid>.
ACPICA BZ 989. Chao Guan, Bob Moore.
2013-05-07 12:04:53 -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
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
d24fc3744e Disassembler: Add warnings for unresolved control methods.
Flags the case where external control methods are unresolved,
meaning that the disassembler had no idea how many arguments
to parse for the method invocation.
2013-02-14 10:08:27 -08:00
Robert Moore
3b40cbc108 iASL: Auto-detect binary ACPI tables for disassembly.
Detect a binary file with a valid ACPI table header and invoke
the disassembler automatically. Ease-of-use feature.
Also fixes a problem where the -dc option (disassemble and then
compile) was broken.
2013-02-06 13:02:50 -08:00
Robert Moore
b1c32b8b50 iASL/Disassembler: Add support for MTMR table.
MTMR table is used in the recent ACPI BIOS enabled Intel MID platforms.
The format of this table has been defined in the "Simple Firmware
Interface Specification" except it uses GAS instead of 64-bit values for
address fields.
This patch introduces MTMR table support into ACPICA.
Lv Zheng.
2013-01-22 11:32:47 -08:00
Robert Moore
17b0a51c0a iASL/Disassembler: Add support for VRTC table.
VRTC is used in Intel MID platforms as a replacement of the traditional
x86 RTC. VRTC table can be found in the recent ACPI BIOS enabled Intel
MID platforms. The format of this table has been defined in the "Simple
Firmware Interface Specification" except it uses GAS instead of 64-bit
values for address fields.
This patch introduces VRTC table support into ACPICA.
Lv Zheng.
2013-01-22 11:23:17 -08:00
Robert Moore
dd96990682 Disassembler: Add an stderr message for unknown ACPI tables.
An additional error message for tables that are not supported,
so that it appears on the console.
2013-01-18 13:32:38 -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
3bf598ae38 iASL source restructuring: split large files into 5 new files.
Five new files.
2012-12-14 09:22:49 -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
59b9a857b8 Update ** pointers in some of the various walk functions.
Cleans up the pointers and eliminates some divergences from Linux.
Does not effect any external interfaces. Lv Zheng.
2012-11-21 12:03:27 -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
Robert Moore
e13146b9f1 Disassembler: Prevent duplicate External() statements.
During generation of external statements, prevent similar pathnames
that are actually duplicates, such as these:
External (\ABCD)
External (ABCD)
Remove all leading '\' characters from pathnames during the external
statement generation so that duplicates will be detected and tossed.
2012-11-02 12:20:30 -07:00
Robert Moore
adb8709e05 Debugger: Major update for the Disassemble<method> command.
This command was downreved and did not properly disassemble control
methods with any reasonable complexity. This fix brings the
command up to the same level as the rest of the disassembler.
Adds one new file, dmdeferred.c, which is existing code that is
now common with the main disassembler and the debugger disassembl
command.
2012-10-31 13:57:20 -07:00
Robert Moore
9435ca866f Disassembler: Fix for external declaration generation
Fixes a problem where an incorrect pathname could be generated
for an external declaration if the original reference to the object
includes leading carats.
2012-10-31 13:42:35 -07:00
Robert Moore
85605310e4 iASL: Update template for MPST table.
Emit new template based upon recent header changes for MPST.
2012-10-18 10:02:45 -07:00
Robert Moore
4322675fc9 Add starting offset parameter to common dump buffer routine.
Rename the dump buffer routines. Offset parameter can specify
the buffer starting offset that is used when displaying each
line of the buffer.
2012-10-12 13:44:40 -07:00
Robert Moore
ef898130ec Deploy ACPI_MOVE_NAME across ACPICA source base.
Replaces instances of strncpy(...,4) for ACPI_NAMEs.
ACPI_MOVE_NAME optimizes these to a single 32-bit copy on machines
that support misaligned transfers.
2012-10-12 12:54:03 -07:00
Robert Moore
d4fa24b0bf Update support for ACPI 5.0 MPST table.
Fixes some problems introduced by late changes to the table as it
was added to the ACPI 5.0 specification.
Both the table compiler and the disassembler and the main header
support for the table.
2012-10-12 12:21:06 -07:00
Robert Moore
ff56b2ded9 Disassembler: Add option (-vt) to also dump binary table data in hex.
Optionally dump the binary table data of an AML table (DSDT/SSDT)
after the normal disassembly of the table.
2012-10-11 15:00:00 -07:00
Robert Moore
2406636978 Small fix for standard Intel legal header.
Remove an extraneous space after a comma, for consistency.
2012-09-27 09:36:49 -07:00
Robert Moore
a28a14bc42 Remove extra spaces after periods in the Intel license.
For consistency with the rest of the source code.
2012-09-26 13:17:19 -07:00
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
99b5831b9d Audit/update for ACPICA return macros and debug depth counter.
1) Ensure that all functions that use the various TRACE macros also
use the appropriate ACPICA return macros.
2) Ensure that all normal return statements surround the return
expression (value) with parens.

Guan Chao, Tang Feng, Zheng Lv, Bob Moore.
ACPICA Bugzilla 972.
2012-09-21 09:44:23 -07:00
Robert Moore
19b67bf928 Disassembler: Fix possible fault for Resource Descriptors.
Fixes a possible fault during the disassembly of resource descriptors
when a second parse is required because of the invocation of external
control methods within the table. With assistance from adq@lidskialf.net.
ACPICA BZ 976.
2012-09-13 08:03:57 -07:00
Robert Moore
770111d95b Disassembler: Add support for CSRT and DBG2 ACPI tables.
These tables are defined outside of the ACPI specification.
2012-08-15 08:44:44 -07:00
Robert Moore
0280d5f05f iASL: Fix generation issue on newer versions of Bison.
Newer versions of Bison apparently automatically emit some of
the necessary externals. This change handles these versions
in order to eliminate generation warnings.
2012-08-15 08:31:07 -07:00
Robert Moore
685d6112d1 Add support for complex _PLD buffers.
_PLD (Physical Location of Device) returns a bit-packed buffer that
is difficult to parse. This change adds a new interface,
AcpiDecodePldBuffer that parses the buffer into a more usable
local struct. Also adds macros to both get and set individual
fields within the packed _PLD buffer. Adds a new include file,
acbuffer.h - which will be expanded to add structs for other
ACPI names that return buffers. ACPICA BZ 954.
2012-07-18 13:09:53 -07:00
Robert Moore
a231a84063 Update comments to simplify source translation, no functional changes.
Change some comments that cause problems for the AcpiSrc conversion
utility.
2012-06-15 12:46:02 -07:00
Robert Moore
d4fcca77cc Disassembler: Emit descriptions for resource tags (_MIN, etc.)
Add support to emit short commented descriptions for the various
resource tags, when they are referenced by a Create* operator.
2012-05-31 15:21:56 -07:00
Robert Moore
5274ae5495 Update ahpredef.c helpfile; fix typos, expand some descriptions.
Fixes for this helpfile, used by AcpiHelp and the disassembler.
2012-05-30 09:26:21 -07:00
Robert Moore
ac6865d3b1 Update predefined name help file, no functional change.
Fixes some typos and case issues.
2012-05-25 14:42:06 -07:00
Robert Moore
97a2049af8 Disassembler: Emit descriptions for ACPI predefined names.
For each predefined name, emit a short description within a comment.
ACPICA BZ 959.
2012-05-25 10:19:05 -07:00