13035 Commits

Author SHA1 Message Date
Robert Moore
f0071e7169 iASL: optimization improvement for 32-bit tables
For 32-bit case only, compute the optimum integer opcode
after 64-to-32 bit truncation. Warning message is still
emitted, however.
2016-10-31 12:43:36 -07:00
Robert Moore
8ad249078f Merge branch 'master' of ssh://ssh.github.com/acpica/acpica 2016-10-25 14:14:48 -07:00
Robert Moore
b2e89d72ef Disassembler: fix regression for ResourceTemplates
detection and proper disassembly of resource templates was broken.
2016-10-25 14:12:45 -07:00
Robert Moore
d2be037cdc Merge pull request #181 from zetalog/acpica-script
Acpica script
2016-10-14 21:32:06 -07:00
Lv Zheng
e97f20f3d6 Fix ACPICA release issues for recent distros
Several issues were found in recent cygwin/ubuntu distros:

1. Newer git implements "-c" with different meaning, removes it;
2. "tempfile" is mostly debian specific command, replaces it with
   "mktemp -u", the latter is more portable.

Singed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-10-14 22:09:39 +08:00
Hoan Tran
c991d08535 avoid iasl return Access Size error with PCC register when
its value is over 4.

Signed-off-by: Hoan Tran <hotran@apm.com>
2016-10-11 09:21:31 -07:00
Robert Moore
a68b02b47f Test suite: Some small changes for new test generation method
minor changes to allow for disassembly/recompile.
2016-10-06 13:33:16 -07:00
Robert Moore
ec434a8549 Revert "ToHexString: Add "0x" prefix to the converted string"
This reverts commit f9efaa885dc3fbdd73307e3748c096ec0849f7a5.

Collides with hex buffer code.
2016-10-05 13:00:51 -07:00
Robert Moore
9f76de2d24 Resources: Not a valid resource if buffer length too long
The declared buffer length must be the same as the length of the
byte initializer list, otherwise not a valid resource descriptor.
2016-10-04 14:35:07 -07:00
Robert Moore
a002071b5a Disassembler: Improve detection of Resource Descriptors in Buffers
Cannot be a resource descriptor if the declared buffer length is
not the same as the length of the buffer initializer list. For
a resource descriptor, both values will always be equal.
2016-10-04 14:17:42 -07:00
Robert Moore
0cc9d5be1c Disassembler: Improve Unicode and String detection for Buffers
1) Only detect unicode if all buffer characters are printable ASCII.
Prevents some false positives.

2) Do not detect a string for buffers that contain 0x79, 0x00
because this is a resource descriptor EndTag, and will cause
a false postive for a string.
2016-10-04 14:11:37 -07:00
Robert Moore
60225ffb77 Test suite: Delete extraneous text file
Delete an extraneous test output file.
2016-10-03 10:08:18 -07:00
Robert Moore
f9efaa885d ToHexString: Add "0x" prefix to the converted string
This is more to the spirit of the ACPI spec, even though it
is not explicitly stated what a "hexadecimal string" is.
However, a hex string is defined in ToInteger to be prefixed
with 0x. Other ACPI implementation already add the 0x, so
this also fixes a compatibility issue.
2016-10-03 10:02:04 -07:00
Robert Moore
e1342c9f2d Fix for implicit result conversion for the ToXXXX functions
Implicit result conversion was incorrectly disabled for the
following functions:
FromBCD
ToBCD
ToDecimalString
ToHexString
ToInteger
ToBuffer
2016-10-03 08:43:01 -07:00
Robert Moore
cb8dfc8157 Update version to 20160930
Version 20160930.
R09_30_16
2016-09-30 09:41:27 -07:00
Robert Moore
73cbaa3fb2 Logfile: Changes for version 20160930
Version 20160930.
2016-09-30 09:40:42 -07:00
Robert Moore
eb8b219420 Move AcpiGbl_MaxLoopIterations to the public globals file
Moved to acpixf.h with the rest of the configuration globals.
2016-09-30 07:15:09 -07:00
Robert Moore
5c5bf49f68 Merge pull request #179 from zetalog/acpica-macosx
Acpica MacOSX
2016-09-30 07:13:59 -07:00
Lv Zheng
de5b9c0ef1 MacOSX: Fix anonymous semaphore implementation
Using of temporal file name functions can easily result in bus errors on
MacOSX. This patch implements anonymous semaphore using an automatic
increasing number. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-09-30 11:04:49 +08:00
Robert Moore
483b0adb71 acpibin: exit with non-zero status on miscompare
For the compare option, return -1 if any bytes miscompare.
2016-09-29 14:10:05 -07:00
Robert Moore
4b36740865 Disassembler: Fix for Divide() support, new support for test suite
Fixes a problem with complex expressions where an illegal mix
of legacy ASL and ASL+ could be emitted.

Adds new support for ASLTS that disables some disassembler
optimizations could be changed during a conversion to ASL+.
These expressions are now emitted in legacy ASL instead
of ASL+.
2016-09-29 14:04:23 -07:00
Robert Moore
14b4464b8b Test suites, ASLTS: Update for ASL+; Resources, Store
Update for latest resource descriptor macro names
Update for various Store(operator, operand tests) for ASL+
2016-09-28 10:25:46 -07:00
Robert Moore
9f83b34cb1 Increase loop limit for AE_AML_INFINITE_LOOP exception
increase loop limit to accomodate faster processors. From 64k loops max
to 1 million.
2016-09-27 14:19:46 -07:00
Robert Moore
be9a1059d4 iASL: Optimization for FieldUnit lists
Ignore a field unit that is both unnamed and has a length of zero.
Previously, two zero bytes were emitted for no good reason.
2016-09-23 13:17:24 -07:00
Robert Moore
72910e63ce Disassembler: Always emit value of the _TRS flag.
Was conditionally emitting the value of the flag, however, the
disassembler should always emit exactly what is in the AML.
2016-09-23 13:15:50 -07:00
Robert Moore
72fd279870 Merge branch 'master' of ssh://ssh.github.com/acpica/acpica 2016-09-23 12:51:24 -07:00
Robert Moore
39ec745ded Disassembler: Fix missing code problem with ElseIf conversion
During conversion of Else...If sequences to ASL ElseIf statements,
blocks of code can become detached from the parse tree and lost.
This change fixes the problem.
2016-09-23 12:45:33 -07:00
Robert Moore
0c16662871 Merge pull request #176 from zetalog/acpica-mac
Acpica mac
2016-09-22 18:25:57 -07:00
Robert Moore
5b72f1c25e Merge pull request #175 from zetalog/acpica-locks
Acpica locks
2016-09-22 18:24:39 -07:00
Lv Zheng
a78506e0ce Parser: Fix a regression in LoadTable support
LoadTable allows an alternative RootPathString than the default "\", while
the new table execution support fails to keep this logic.

This regression can be detected by ASLTS - TLT0.tst4, this patch fixes this
regression.

Linux upstream is not affected by this regression as we haven't enabled the
new table execution support there. BZ 1326, Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1326
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-09-23 08:44:12 +08:00
Lv Zheng
39227380f5 Tables: Fix "UNLOAD" code path lock issues
The previous lock fixes didn't cover "Unload" opcode and table unload APIs,
this patch fixes lock issues in the "Unload" code path. BZ 1325, Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1325
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-09-23 08:44:11 +08:00
Lv Zheng
55b49920db Tables: Fix a regression in AcpiTbFindTable()
This was just an already fixed issue, and accidently released due to my
local process issues. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-09-23 08:44:11 +08:00
Lv Zheng
1a69fcaa99 ASLTS: Fix script regression of running LoadTable
LoadTable opcodes require acpiexec to build OEM tables in RSDT/XSDT.
However, during the EFI porting, OEM test table loading becomes an optional
behavior for acpiexec.
As ASLTS requires the OEM test tables, disabling this option by default
triggers the regression for ASLTS, causing LoadTable related cases to fail.

This patch fixes this regression by enabling this option for ASLTS.

Link: https://bugs.acpica.org/show_bug.cgi?id=1327
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-09-23 08:44:10 +08:00
Lv Zheng
bbcb58f787 MacOSX: Fix wrong sem_destroy definition
The following build errors can be seen for MacOSX builds:
.../osunixxf.c:882:9: error: 'sem_close' is deprecated [-Werror,-Wdeprecated-declarations]
.../acmacosx.h:122:29: note: expanded from macro 'sem_destroy'
#define sem_destroy         sem_close

sem_destroy() issue is caused by the wrong order of the following lines:
  #define #sem_destroy        sem_close
  #include <semaphore.h>
This patch fixes it by removing the buggy re-definitiion. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-09-20 13:19:55 +08:00
metacollin
01eb9a58f4 MacOSX: Remove deprecated tmpnam call for OS X
The following build errors can be seen for MacOSX builds:
.../osunixxf.c:829:42: error: 'tmpnam' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead. [-Werror,-Wdeprecated-declarations]

tmpnam should NOT be used and provides an easy and obvious privilege
escalation attack point.  There is no advantage or compatibility reason to
use this function on OS X, and it correctly throws an error if its use is
attempted.  Simply replacing it with mktemp, which behaves identically to
tmpnam, only with responsible protection against interprocess attacks.  It
will behave identically if given NULL, and will fail in exactly the same
way, so there is no danger in switching to this function.

It's also safely tucked away in a specific #ifdef __APPLE__ block anyway,
so the scope of this change is perfectly controlled.

Signed-off-by: metacollin <metacollin@gmail.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-09-20 13:19:55 +08:00
Robert Moore
d14099ff86 ASL test suite: Additional changes for method invocations
More changes to fix incorrect control method invocation.
similar to previous commit.
2016-09-16 12:48:50 -07:00
Robert Moore
a315224255 ASL test suite: Fix incorrect method invocations
A bunch of tests were invoking the wrong control method.
New iASL caught these because the number of arguments were wrong.
2016-09-14 14:15:02 -07:00
Robert Moore
90b333e16f iASL: Allow control method invocations from DeRefOf operator
Actually, enable method argument count validation for methods
invoked from within DeRefOf. Used in ASLTS.
2016-09-14 13:30:38 -07:00
Robert Moore
45b8f63894 Fix for incorrect status from AcpiTbFindTable
Was always returning AE_NOT_FOUND, even if the table was found.

Affected these ASL operators:
DataTableRegion
LoadTable
2016-09-14 07:39:29 -07:00
Robert Moore
937d9789cc iASL/Tools: Handle AML and non-AML files consistently.
1) For AcpiExec and disassembler, allow all types (AML/non-AML)
of ACPI tables
2) For iASL -e option, only allow AML files (DSDT/SSDT).
2016-09-13 13:47:42 -07:00
Robert Moore
461367073b Merge branch 'master' of ssh://ssh.github.com/acpica/acpica 2016-09-13 07:50:59 -07:00
Robert Moore
0cf0a743f8 iASL: Fix missing rule for ObjectType/ASL+
The index rule was missing rule for ObjectType operator.
Caused syntax error when an operator uses the [] (Index) operator.
2016-09-13 07:48:14 -07:00
Robert Moore
1d435008fd Update an info message during table load phase.
Only emit an extra newline for acpiexec.
2016-09-09 11:47:50 -07:00
Robert Moore
66359202a8 Merge pull request #174 from zetalog/acpica-1608
Acpica 1608
2016-09-08 18:33:51 -07:00
Lv Zheng
3e70d2a755 Utilities: Add quotes to 0x to reduce divergences
A difference is generated during 20160831 release cycle. This patch
reduces it. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-09-08 11:13:52 +08:00
Robert Moore
cd4f0ae0a5 Fix a bad (non-ascii) character in the source file.
Fixed an illegal character.
2016-09-07 12:22:45 -07:00
Robert Moore
64839e969a Disassembler: Improve support for the ToPLD macro.
Improved the detection of possible PLD buffers based upon
the size of the buffer and size of the surrounding AML package
(PkgLen).
2016-09-07 12:18:19 -07:00
Colin Ian King
f4bd3dcf48 Insert missing space to correct indentation
Signed-off-by: Colin Ian King <colin.king@canonical.com>
2016-09-07 08:29:27 -07:00
Robert Moore
d328d5fa03 iASL: Handle unresolved symbols for hardware map file
fixes a fault for -lm option used with disassembler,
concerning unresolved names (symbols).
2016-09-01 08:49:37 -07:00
Robert Moore
3c8c04c2e8 Update version to 20160831
Version 20160831
R08_31_16
2016-08-31 09:27:28 -07:00