11757 Commits

Author SHA1 Message Date
Robert Moore
b53ee89773 Update ACPICA build instruction file (build.txt).
Fix some missing steps.
2013-08-23 13:21:52 -07:00
Robert Moore
a8f8380a74 Update version to 20130823.
Version 20130823.
R08_23_13
2013-08-23 09:45:59 -07:00
Robert Moore
4ff41a8844 Logfile: Changes for version 20130823.
Version 20130823.
2013-08-23 09:45:17 -07:00
Robert Moore
1ab2505cca Documents: Updates for ACPICA and iASl references.
Update to reflect changes in version 20130823.
2013-08-23 09:17:30 -07:00
Robert Moore
ac4b505600 Linux scripts: Update file permissions to add execute.
Simple change to add execute permission as the default.
2013-08-23 08:19:18 -07:00
Robert Moore
4186927833 AcpiDump/Linux: Update for code style, no functional change.
Fixes a while(1) loop to improve readability.
Lv Zheng.
2013-08-23 08:10:20 -07:00
Robert Moore
99779c83f4 AcpiDump: Update for FreeBSD support only.
Adds some conditional compiles required for FreeBSD support.
2013-08-23 08:04:55 -07:00
Robert Moore
08093adb7c Windows table OSL: Compile local mapping functions for acpidump only.
iASL uses oswinxf also, where the original copy of these functions exist.
Does not seem to be worthwhile at this time to split these into a
separate file, but we don't want to link oswinxf into AcpiDump.
2013-08-23 07:57:27 -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
b0cf3e5a09 SCI handlers: Optimize installation by only locking SCI list once.
The code was locking the list twice. Allocate the new SCI handler object
up front to eliminate the second lock, and free the object on any
error.
2013-08-22 12:55:20 -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
181e81c61a AcpiDump: Update for windows OSL and project file.
Port windows version to the recent AcpiDump changes.
2013-08-22 09:31:27 -07:00
Robert Moore
88c42a5f57 AcpiDump: Cleanup exception codes in the Linux OSL.
This patch cleans up ACPI_STATUS returned in the Linux version of AcpiDump.

These changes include:
1. AE_ACCESS is added to reflect requirement of root priviledge.
2. AE_BAD_ADDRESS is used where address is 0.
3. AE_BAD_SIGNATURE is returned where root cause of the error is the
   signature.
4. AE_BAD_HEADER is returned especially on a failure of ApGetTableLength().
5. AE_INVALID_TABLE_LENGTH is returned when reading table content fails
   while reading table header succeeds.
6. AE_ERROR is no longer used for the Linux version.
Some error prompts are also cleaned up in this patch.  Lv Zheng.
2013-08-22 09:28:16 -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
b39ecb7097 AcpiDump: Cleanup Linux-specific initialization code.
This patch cleans up Linux specific AcpiDump initialization code to make
sure it is called by all external interfaces.  A redundant flag that
indicates the completion of the initialization is deleted.
This patch also deletes the wrong usage of returning tables used for
initialization from AcpiOsGetTableByName().  Lv Zheng.
2013-08-22 09:13:20 -07:00
Robert Moore
833e24c9df AcpiDump: Fix errors caused by an empty internal list head.
This patch cleans up the empty head entry of Gbl_TableListHead which is
only used to hold the count of the list entries.  The empty signature name
will cause program error messages where a valid table signature is
expected.
This patch also moves the table entry insertion logic into one single
function and appends multiple table instances handling codes in the new
function.  Lv Zheng.
2013-08-22 09:11:44 -07:00
Robert Moore
4c8b7785af AcpiDump: Fix a possible buffer overflow.
This patch fixes buffer overflows detected around sscanf invocations by
using ACPI_MOVE_NAME().  Lv Zheng.
2013-08-22 09:08:16 -07:00
Robert Moore
042b5a984d AcpiDump: Cleanup code for extraction of "customized" tables.
The following error message is fixed after applying this cleanup.
  Could not get ACPI table at index 8, AE_NOT_FOUND

This patch reduces code redundancy by combining 2 pieces of the customized
table extraction codes into one single function - OslGetCustomizedTable() -
for Linux.
This patch also cleans up OslReadTableFromFile() which is called by
OslGetCustomizedTable().  A loop around fread() can help to reduce error
messages on Linux where the size of the file containing the customized
table are limitted to 4KB due to sysfs limitation.  Lv Zheng.
2013-08-22 09:06:55 -07:00
Robert Moore
4805c565d8 AcpiDump: Cleanup directory/mapping functions.
This patch splits file mapping implementation from AcpiDump to form a new
OSL osunixmap.c.
The invocations of AcpiOsMap/UnmapMemory are split into the table related
mappings and the memory related mappings in this patch.
This patch also cleans up opendir/readdir/closedir in AcpiDump by replacing
them with OSL directory iteration implementation.  Lv Zheng.
2013-08-22 09:04:55 -07:00
Robert Moore
e4eeff5dba Linuxize scripts: Add an ACPICA release library.
This patch removes deprecated generate/linux/patches folder, moves useful
release scripts to the generate/linux folder, reduces code redundancy by
creating a script library libacpica.sh file under generate/linux folder.
Lv Zheng.
2013-08-22 08:33:00 -07:00
Robert Moore
e88864d197 Debugger: Remove unused variable.
Info structure is not used for the Paths command.
2013-08-22 07:45:17 -07:00
Robert Moore
b26683cc29 Tests/AAPITS: Insert legal header in all source modules (.c, .h)
Insert missing Intel legal header in all modules.
2013-08-21 12:20:49 -07:00
Robert Moore
9cc8240dbf Debugger: Add new command to display full namespace pathnames.
Paths command displays the full pathname and object type for
the entire namespace. Alternative to the Namespace command.
2013-08-21 09:11:56 -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
617b8cae83 Operation region support: Never free the handler "context" pointer.
This change removes some dangerous code that attempts to free the
handler context pointer in some (rare) circumstances. The owner of
the handler owns this pointer and the ACPICA code should never
touch it. Although not seen to be an issue in any kernel, it did
show up as a problem under AcpiExec. Also, set the internal storage
field for the context pointer to zero when the region is deactivated,
simply for sanity. David Box.
2013-08-16 13:04:31 -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
19d0e9560c Validate start object for AcpiWalkNamespace.
Perform a sanity check on the start object to prevent problems
later. ACPICA BZ 1025.
2013-08-14 12:27:31 -07:00
Robert Moore
fdf9fef706 Debugger: Prevent possible command line buffer overflow.
Increase the size of a couple of the debugger line buffers.
ACPICA BZ 1037.
2013-08-14 12:23:59 -07:00
Robert Moore
d85cf98594 Linux-specific header: enable "aarch64" 64-bit build.
Add support for the __aarch64__ define for 64-bit builds.
Naresh Bhat <naresh.bhat@linaro.org>
2013-08-14 10:31:51 -07:00
Robert Moore
c9d7c6ae5e Application OSLs: Set return value for the PCI read functions.
These functions simply return AE_OK, but should set the return
value to zero also. This fix implements this. ACPICA BZ 1038.
2013-08-09 13:22:09 -07:00
Robert Moore
1b3070f5d1 Revert "Disassembler: Update for CondRefOf operator."
This reverts commit 64e52a3577f287eeafee98663deff1163cccdd46.
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
2c075154fa Revert "Add support for method invocation as a target operand for ASL operators."
This reverts commit f2fd7294de5b93a778160064f6d61df1792f0d0f.
Change was seen to cause problems with the ASLTS test suite and
will need to be reworked/readdressed.
2013-08-07 10:16:18 -07:00
Robert Moore
c68fe56602 Revert "Parser: Fix handling of NULL target operands."
This reverts commit b5513899b2931631456f61f5152279d4d505d988.
Change was seen to cause problems under ASLTS test suite.
2013-08-07 10:15:35 -07:00
Robert Moore
6ac67e15da ASLTS: Serialize all methods that create named objects.
This change greatly reduces the remark that iASL emits when a
non-serialized control method creates named objects. David Box.
2013-08-02 13:07:39 -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
b5513899b2 Parser: Fix handling of NULL target operands.
This is an update to the previous commit to support method invocation
as a target operand. Handle the case where an optional target is not
specified in the ASL.
2013-08-02 12:07:32 -07:00
Robert Moore
0a13fe8e6b Debug output: small formatting update, no functional change.
Allow for longer filenames in the module name output during
trace operations.
2013-08-01 13:37:17 -07:00
Robert Moore
f2fd7294de Add support for method invocation as a target operand for ASL operators.
This change implements support to allow method invocations during the
resolution of the target of an ASL operator (such as Store, Add, etc.)
Examples - MTH1 is a control method:
Store (0x1234, MTH1())
Add (INT1, 32, MTH1())

In these cases, the method MTH1 must return a reference to the object
where the result of the operator will be stored. Otherwise, an operand
type exception will occur.

Note: This behavior is legal and supported by the ASL grammar. However,
it was not implemented in the ACPICA interpreter. This provides compatibility
with other ACPI implementations.
2013-08-01 13:28:16 -07:00
Robert Moore
7bbc5f141b iASL: Abort immediately upon serious unrecoverable parse errors.
Partially due to the nature of the ASL language, it is very difficult
to recover from parse-time errors. Rather than generate perhaps
hundreds of errors later in the compile process, abort immediately
on any serious parse errors.
2013-08-01 09:37:48 -07:00
Robert Moore
2160740a2d Linux patch makefiles: Improve patch generation.
The make-patches.pl will generate patches with broken patch descriptions.  This
is because the script is written to generate Linuxized patches for CVS commits.
The complexity in the make-patches.pl is not needed as GIT has offered many
features to let the patch descriptions to be extracted correctly from the
command line.
The new make-patches.sh script invokes git-extract.sh to provide equivalent
functionalities as make-patches.pl for ACPICA release.  This patch also modifies
the git-extract.sh to allow generation of patches that can be used as a part of
an ACPICA release patch set.  Lv Zheng.
2013-07-31 14:52:18 -07:00
Robert Moore
f23c63c8a0 AcpiRead: On error, do not modify the return value target location.
If an error happens in the middle of a split 32/32 64-bit I/O
operation, do not modify the target of the return value pointer.
Makes the code consistent with the rest of ACPICA. Bjorn Helgaas.
2013-07-31 12:54:13 -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
fbf126e7f6 Improve error message for "too many parent prefixes" condition.
Emit the full offending pathname in the error message.
2013-07-26 12:24:05 -07:00
Robert Moore
4f01a9439b iASL: Fix possible segfault for "too many parent prefixes" condition.
Fixes a possible segfault if there are too many parent prefixes
in a namepath (for example, ^^^^^^PCI0.ECRD). ACPICA BZ 1035.
2013-07-26 12:23:20 -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
0631bf977d Update version to 20130725.
Version 20130725.
R07_25_13
2013-07-25 10:02:13 -07:00