13461 Commits

Author SHA1 Message Date
Robert Moore
50f6163654 Update version to 20170728
Version 20170728.
R07_28_17
2017-07-28 09:49:51 -07:00
Robert Moore
c2b9d289c4 Logfile: Changes for version 20170728
Version 20170728.
2017-07-28 09:49:03 -07:00
Robert Moore
6cd1ba2619 Merge pull request #288 from zetalog/efi-stdlib
Edk2 stdlib/windows
2017-07-27 14:28:48 -07:00
Robert Moore
d2e7b6389d Merge pull request #279 from james-morse-arm/for_upstream/sdei_v2
iASL: Add support for the SDEI table (v2)
2017-07-27 14:27:09 -07:00
Robert Moore
af661c00af ResourceMgr: Allow _DMA method in walk resources
The _DMA object contains a resource template, this change
adds support for the walk resources function so that ACPI
devices containing a _DMA object can actually parse it to
detect DMA ranges for the respective bus.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
2017-07-27 14:23:59 -07:00
Robert Moore
ea9152daae Ensure all instances of AE_AML_INTERNAL have error messages
This exception is only meaningful with an associated error message.
2017-07-27 13:46:19 -07:00
Robert Moore
c89d33e730 Tests: Fix an incorrect argument count
The _ERR method requires three arguments, not two.
Eliminates a warning message.
2017-07-27 13:31:38 -07:00
Robert Moore
0c08790c56 Implement deferred resolution of reference package elements
This change defers the resolution of package elements that
are named references until after the entire namespace has been
loaded from the definition block. This allows such references
to be in fact forward references for both module level code
and control methods.
2017-07-27 13:22:15 -07:00
Robert Moore
916993dbcd Debugger: Improve support for Alias objects
Properly resolve alias objects for display.
General cleanup of related output.
2017-07-27 12:36:53 -07:00
Robert Moore
afe4703186 iASL: Implement line buffer management
Realloc buffers as needed for very long input lines.
Erik Schmauss.
2017-07-27 12:23:28 -07:00
Robert Moore
719d0bdd48 Interpreter: Update handling for Alias operator
Provide common creation code for the Alias operator. All objects
are now handled the same, with the only exception being the
Method() operator. It has a special internal Alias type.
2017-07-27 10:16:26 -07:00
Robert Moore
a71cc28e6a Merge pull request #297 from SchmErik/asltsErrEdit002
Aslts err edit002
2017-07-25 14:12:03 -07:00
Erik Schmauss
e5bbb5455f ASLTS: resolving conflict from rebasing
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-07-21 17:01:45 -07:00
Erik Schmauss
be18b4ea05 ASLTS: CH03 and CH04 is intended to take line numbers as arguments rather than a number indicating the "index of error".
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-07-21 16:54:23 -07:00
Erik Schmauss
a73816a2a2 ASLTS: changing the third argument of ERR to __LINE__ to print line numbers instead of indices.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-07-21 16:54:23 -07:00
Erik Schmauss
6f3586d458 ASLTS: getting rid of unnecessary error reporting.
This error information is redundant.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-07-21 16:54:23 -07:00
Robert Moore
9764428654 Merge pull request #291 from al3xtjames/master
Unix makefiles: Add OPT_LDFLAGS and edit NOOPT parsing
2017-07-20 09:16:01 -07:00
Robert Moore
d2fd729f28 Merge pull request #293 from SchmErik/aslts_descriptor
ASLTS: descriptor: update test buffers to include shared bit in V2 de…
2017-07-20 09:14:27 -07:00
Robert Moore
30c7201369 Merge pull request #294 from SchmErik/iasl_feature001
iASL: add option to expect specific compilation remarks/warnings/errors
2017-07-20 09:13:53 -07:00
Erik Schmauss
2d27a12fde iASL: add option to expect specific compilation remarks/warnings/errors
The -vx [messageId] option, where the x stands for EXpect, allows the
compiler to expect that the compilation will result in an ASL exception
with a particular messageId. If this error is not raised. The
compilation will result in an error. This will help create a whole new
class of compilation tests in ASLTS.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-07-18 16:04:40 -07:00
Erik Schmauss
8c09a8784e ASLTS: descriptor: update test buffers to include shared bit in V2 descriptors
These tests compare a resource descriptor and an equivalent buffer to ensure
proper resource descriptor compilation. The buffer does not account for the
shared bit for V2 resource descriptors (see section 6.4.3.8.2.x in the ACPI
6.2 spec). This commit changes this test buffer to include the shared bit
(the 3rd bit of the 6th byte of V2 resource descriptors). The specification
is expected to reflect these changes (sections 6.4.3.8.2.1, 6.4.3.8.2.2, and
6.4.3.8.2.3).

Updated buffers include buffers equivalent to I2cSearialBusv2, SpiSerialBusv2,
and UartSerialBusv2

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-07-17 14:29:33 -07:00
Lv Zheng
a7c6d65a5d EFI/EDK2: Enable /WX for MSVC builds
/WX turns warning into fatal erros for MSVC builds. We need /WX- during
EDK2 porting to allow agile development.

Now it is time to enable /WX. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-07-13 14:32:15 +08:00
Shao, Ming
f9450316d8 EFI/EDK2: Add support to compile acpidump.efi with StdLib
This patch ports acpidump EDKII build to the environment where EDKII
internal C-library StdLib is used. Shao Ming.

Signed-off-by: "Shao, Ming" <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-07-13 14:21:48 +08:00
Lv Zheng
ae846edff2 EFI: Add AcpiOsStall()/AcpiOsSleep() support
This patch adds AcpiOsStall() and AcpiOsSleep() support.
Currently we do not support asynchronous polling of key stroke and timer,
so AcpiOsSleep() is simply an invocation of AcpiOsStall(). Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-07-13 14:21:46 +08:00
Lv Zheng
f610e149bc EFI: Add AcpiOsGetTimer() support
This patch adds AcpiOsGetTimer() support for EFI environment.
Note that currently we don't support timezone. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-07-13 14:15:06 +08:00
Lv Zheng
06eafca73d EFI: Add stubs for multi-threading OSLs to make EFI ported applications running
This patch only adds stub supports for multi-threading OSLs to make
EFI ported application running.

In order to fully support acpiexec in a non multi-threading environment,
ACPICA core itself need to be upgraded to contain full asynchrnous support.
Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-07-13 14:14:51 +08:00
Lv Zheng
45bb76a55a EFI: Add OSL supports for those can be empty
This patch adds OSLs that can be empty under EFI environment. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-07-13 14:14:43 +08:00
Lv Zheng
4683013633 EFI/EDK2: Allow StdLib target to use different inf/dsc files
This patch adds support in edksetup.sh to allow StdLib build target to
use different inf/dsc files. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-07-13 14:14:26 +08:00
Lv Zheng
343fc31840 acpidump: Add DSDT/FACS instance support for Linux and EFI
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: https://github.com/acpica/acpica/issues/285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-07-13 14:14:24 +08:00
Lv Zheng
01b8f5a235 CLib: Add short multiply/shift support
In order to build ACPICA EFI tools with EDK-II on Windows, 64-bit
multiply/shift supports are also required to be implemented. Otherwise,
MSVC complains:
 acpidump.lib(utstrtoul64.obj) : error LNK2001: unresolved external symbol __allmul
 acpidump.lib(uthex.obj) : error LNK2001: unresolved external symbol __aullshr

Note:
1. This patch also splits _EDK2_EFI from _GNU_EFI as they might have
   different math64 supports.
2. Support of gcc math64 is not included in this patch.
3. Support of EDK2 arch independent math64 is done via linking to BaseLib.

This patch fixes this issue. Reported by Shao Ming, fixed by Lv Zheng.

Tested-by: "Shao, Ming" <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-07-13 14:14:20 +08:00
Shao Ming
43ff22215f EFI/EDK2: Add support to compile acpidump.efi on Windows
Several changes are needed to compile EDK-II port of acpidump on
Windows:
1. sort acpi.h inclusion: va_list is used before it's definition, we
   only need to ensure order of acenv.h/acenvex.h/actypes.h.
2. /GL-: enabling global optimization causes memset() to be linked by
   MSVC builds.
3. /DUSE_MS_ABI: to enable simpler uefi_call_wrapper().
4. /D__x86_64__|__i386__: they are strictly required by ACPICA headers,
   but not defined by MSVC.

Signed-off-by: "Shao, Ming" <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-07-13 14:14:16 +08:00
Robert Moore
b542af9a4c iASL: Fix an incorrectly placed range check
Variable was being used before the range check.
From GitHub user dcb314.
2017-07-12 10:26:22 -07:00
Robert Moore
d586c29a02 Add a comment, no functional change
Describe 2nd byte of the EndTag resource descriptor.
2017-07-11 12:05:40 -07:00
Robert Moore
98bf1d6bac Merge branch 'master' of ssh://ssh.github.com/acpica/acpica 2017-07-11 10:35:13 -07:00
Robert Moore
edfdd7b591 Merge pull request #290 from zetalog/acpica-1706
Acpica 1706
2017-07-11 10:31:11 -07:00
Robert Moore
8b7fa979ef Namespace: Update/fix an error message
Was emitting an internal namestring without converting it to
the external format.
2017-07-11 09:18:09 -07:00
Alex James
e79e1133a9 Unix makefiles: Add OPT_LDFLAGS and edit NOOPT parsing
Add OPT_LDFLAGS to be specified during compilation for custom linker
flags. Disable optimization (adding -O0) when NOOPT is set to true.
2017-07-11 08:54:58 -05:00
James Morse
5ad4f0b7bf iASL: Add support for the SDEI table
ACPI 6.2 adds support for the Software Delegated Exception Interface,
which is described by "Software Delegated Exception Interface (SDEI)"
ARM DEN0054A.

Add the necessary types in the ACPICA header files and support for
compiling/decompiling the table.

Signed-off-by: James Morse <james.morse@arm.com>
2017-07-11 09:26:26 +01:00
James Morse
e3c74a3d69 iASL: Allow 'header only' simple tables
Today DtCompileTable() will return AE_BAD_PARAMETER if it has already
reached the end of the FieldList. This prevents it building the SDEI
table (which is only a table header) as a simple table.

Explicitly check whether there are more fields before calling
DtCompileTable() on the simple-table compile path.

Signed-off-by: James Morse <james.morse@arm.com>
2017-07-11 09:26:26 +01:00
Rafael J. Wysocki
0013cb824a Revert "Disassembler: Enhance resource descriptor detection"
Revert commit ba5020b2dbe (Disassembler: Enhance resource
descriptor detection) as it is based on an assumption that doesn't
hold all the time and causes problems to happen because of that.

Broken platform:
 HPE Moonshot ProLiant DL380Gen9
 HPE Moonshot M400 Server Cartridge

Reported-by: Linda Knippers <linda.knippers@hpe.com>
Reported-by: Graeme Gregory <graeme.gregory@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-07-10 13:59:56 +08:00
Lv Zheng
cf27b3c988 Divergences: reduce access size definitions
Linux guys start to define access size values for
ACPI_RESOURCE_GENERIC_REGISTER, while it should be better to just define
the access_size -> access_bit_width algorithm and deply it for both
ACPI_RESOURCE_GENERIC_REGISTER and ACPI_GENERIC_ADDRESS types. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-07-10 13:59:54 +08:00
Robert Moore
41e7b3575c Merge pull request #287 from zetalog/acpica-tables
Acpica tables
2017-06-30 11:10:23 -07:00
Lv Zheng
ffddee6638 Tables: Enable duplication check for late stage
This patch enables duplication check for late stage. The previous fixes
only prepare mechanism for late stage table verification and checksum
verification is enabled by default. But an explicit !Null TableIndex is
required to enable duplication check for late stage. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-06-30 10:09:42 +08:00
Robert Moore
167e48f20c iASL: Add __METHOD__ predefined macro
Returns the name of the parent control method.
2017-06-29 13:27:57 -07:00
Robert Moore
7271c1c54c Update version to 20170629
Version 20170629
R06_29_17
2017-06-29 08:03:47 -07:00
Robert Moore
3aae6b031d Logfile: Changes for version 20170629
Version 20170629
2017-06-29 08:02:45 -07:00
Robert Moore
998836ef88 Revert "Executer: adapt buffer length for Field Attrib Raw Process in Ops Region"
This reverts commit d28f6c2927053d85f33780b66c0d9050f0e30d3a.

This appears to be a workaround for some bad ASL or other code. This
type of code should not be in the ACPICA code.
2017-06-28 13:33:35 -07:00
Robert Moore
eba92e4224 Merge pull request #284 from gpkulkarni/iort_smmuv3_update
iasl: Update to IORT SMMUv3 disassembling
2017-06-28 07:23:37 -07:00
Robert Moore
1ac9974b58 Merge pull request #282 from SchmErik/bz1391
Revert "Update resource descriptor handling"
2017-06-28 07:21:54 -07:00
Ganapatrao Kulkarni
8cadc4fb50 iasl: Update to IORT SMMUv3 disassembling
ARM IORT specification has provision to define Proximity domain
in SMMUv3 IORT table. Adding required changes to decode
Proximity domain of SMMUv3 IORT table.

Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
2017-06-28 15:02:07 +05:30