232 Commits

Author SHA1 Message Date
Lv Zheng
5a52881149 iasl: Move aslversion determination logic from Makefile.def to Do script 2017-08-30 15:05:37 -07:00
Lv Zheng
bf8ee64902 ASLTS: Split install target into install_n32/n64/s32/s64
This patch splits install target into install_n32/n64/s32/s64 targets
so that they can be invoked from "Do" script separately. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-08-30 15:05:37 -07:00
Lv Zheng
66b85dc874 ASLTS: Allow cases/modes to be specified for aslts compile
This patch adds support in Do to allow test cases/modes to be specified
in "Do 0" mode - build aslts aml test cases. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-08-30 15:05:37 -07:00
Lv Zheng
421e5d9439 ASLTS: Convert make_install into make_target
Convert make_install into make_target so that other targets can be used
in Do script. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-08-30 15:05:37 -07:00
Erik Schmauss
eab4fc423b ASLTS: exc: change test case to allow implicit conversion of strings with "0x" to hex
The ACPI spec's definition of implicit conversion does not allow
'0x' within strings that are converted to integers. Without '0x'
the number being converted could be mistaken as a decimal number.
Instead we are allowing with 0x or no 0x and both versions are
implicitly converted to hex.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-08-10 14:35:01 -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
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
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
Erik Schmauss
86bcb87e3c ASLTS: External: adding testcases from bz1389 by racerrehabman
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-06-09 10:50:18 -07:00
Erik Schmauss
a90d78b8d1 ASLTS: misc: adding ASL/ASL+ converter sample
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-05-31 10:29:50 -07:00
Robert Moore
84416b3e45 Merge pull request #252 from zetalog/acpica-aslts
Acpica aslts
2017-05-25 11:01:04 -07:00
Erik Schmauss
8cc341b3dd ASLTS: reverse the order of definition block declarations to test for a corner case
Reversing the order of defintion block declarations exposed an
issue in the compiler namespace loading. This issue has been fixed
and this change exercises the code involved in the bug fix.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-05-09 10:34:11 -07:00
Lv Zheng
49f041a2f1 ASLTS: exc_result2: Fix old m689 breakage (exceptional)
When tests are meant to return exceptions, proceeding causes unexpected
number of exceptions left. This patch fixes such issues by interrupting the
tests when exception is expected. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-05-03 15:06:29 +08:00
Lv Zheng
2f79a52433 ASLTS: rstore: Fix old m689 breakage (store matrix)
The p6a0 store matrix is used to indicate "Stroe" allowable types while
b67a contains indexes to this matrix.
1. Row[3] is used for Package target,
   Row[4] is used for Method target,
   Row[5] is used for Non-computational data (Device/Event/...) target.
2. Col[2] is used for FIXED fields result,
   Col[3] is used for Computational data (Integer/String/Buffer) result,
   Col[4] is used for Package result.
As it is not possible to:
1. Store(Package/Method/Noncomputation, Field/Computationl/Package)
2. Store(Method/Noncomputation, Field/Computational)
We must change the matrix to reflect the validated Windows behavior. By
doing so, several m689 failures are fixed. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-05-03 15:06:29 +08:00
Lv Zheng
a12a7052a1 ASLTS: region: Fix old m702 breakage
In m702 tests, there are 2 lines trying to exclude 2 test cases, while
the test cases should be valid. OTOH, GeneralPurposeIo test is not
correct, it shouldn't validate the region access result as we don't
implement fully functioning region handlers in acpiexec. This patch fixes
these breakage. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-05-03 15:06:29 +08:00
Lv Zheng
8d8926ae4d ASLTS: reference: Fix old m34d breakage
Store(Integer/String/Buffer, Package) results in AE_AML_TARGET_TYPE. This
patch fixes ASLTS failures by removing these invalid test cases.

Note that m34d is not a kind of coverage test that also validates if
invalid Store test cases can trigger exceptions, it only contains valid
Store test cases where the results' ObjectType can be compared, so we
should just remove the invalid test cases instead of adding exception
check. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-05-03 15:06:29 +08:00
Lv Zheng
14a1c31432 ASLTS: scripts: Fix directory name of Identity2MS tests
This patch fixes the Identity2MS collection's directory name of its
sub-test-cases in order to fix unexpected error occurred to the following
command:
  aslts.sh -u -m n32 -c extra_aslts
The Identity2MS test cases are located at Identity2MS/abbu, rather than
Identity2MS/extra or Identity2MS/extra_aslts. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-05-03 15:06:29 +08:00
Erik Schmauss
979346922f ASLTS: get rid of External declaration for _ERR because it is a redefinition of _ERR.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-05-02 14:41:06 -07:00
Erik Schmauss
3dda379ed4 ASLTS: fix spelling error
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-05-02 13:50:55 -07:00
Erik Schmauss
34bc64edf0 ASLTS: adding external statement test case so that they can be run by aslts.sh
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-05-02 12:42:52 -07:00
Erik Schmauss
46d3b8a88a ASLTS: adding tests for externals
This test ensures that each external declaration is resolved to the proper named objects.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-05-02 12:42:52 -07:00
Erik Schmauss
06dddc5318 ASLTS: update comments, no functional change
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-05-02 12:42:52 -07:00
Erik Schmauss
9c2774ff5e ASLTS: fixing indentation and style, no functional change
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-05-02 12:42:52 -07:00
Erik Schmauss
cef42782fd Fix typo
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-04-14 15:47:38 -07:00
Robert Moore
54b4d991c5 Merge pull request #239 from SchmErik/asltsFix005
ASLTS: do not run binary comparisons if -f flag is set for compilation.
2017-03-22 10:46:12 -07:00
Robert Moore
680bde3e4d Merge pull request #231 from zetalog/acpica-pin
Acpica pin
2017-03-21 20:04:29 -07:00
Erik Schmauss
16fa2b6868 ASLTS: do not run binary comparisons if -f flag is set for compilation.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-03-21 15:27:03 -07:00
Mika Westerberg
08b83591c0 ACPI 6.2: Add support for PinGroupConfig() resource
PinGroupConfig() is analogous to PinGroupFunction() but instead of mode
(muxing), it is used to apply specific fine-grained configuration to a
set of referenced pins.

The format of this new resource is:

  PinGroupConfig (Shared/Exclusive, PinConfigType, PinConfigValue,
                  ResourceSource, ResourceSourceIndex, ResourceSourceLabel,
                  ResourceUsage, DescriptorName, VendorData)

The PinConfigType/PinConfigValue are the same used by PinConfig()
resource.

Here also the combination of ResourceSource and ResourceSourceLabel is
used to specify the PinGroup() this resource refers to.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-03-21 13:54:51 +08:00
Mika Westerberg
bd9a745749 ACPI 6.2: Add support for PinGroupFunction() resource
PinGroupFunction() is a new resource introduced with ACPI 6.2. It is
used with PinGroup() to configure specific mode for a set of pins
exposed by a GPIO controller.

The format of the resource is:

  PinGroupFunction (Shared/Exclusive, FunctionNumber, ResourceSource,
                    ResourceSourceIndex, ResourceSourceLabel,
                    ResourceUsage, DescriptorName, VendorData)

The ResourceSource and ResourceSourceLabel fields are used to specify
the PinGroup() resource referenced by PinGroupFunction().

  Device (GPIO)
  {
      Name (_CRS, ResourceTemplate () {
          PinGroup ("group1") {2, 3}
          PinGroup ("group2") {4, 5}
          ...
      })
  }

  Device (I2C)
  {
      Name (_CRS, ResourceTemplate () {
          PinGroupFunction (Exclusive, 6, "^GPIO", 0, "mygroup2")
      })
  }

In the above example the PinGroupFunction() references the second
PinGroup() resource (using label "mygroup2" and configures pins 4 and 5
into mode 6.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-03-21 13:54:51 +08:00
Mika Westerberg
7d928e3174 ACPI 6.2: Add support for PinGroup() resource
ACPI 6.2 introduced a new resource that is used to declare set of pins
belonging to a GPIO controller. This resource is referenced by new
PinGroupFunction() and PinGroupConfig() resources using ResourceSource
and ResourceLabel fields.

The PinGroup() resource looks like this:

  PinGroup (ResourceLabel, ResourceUsage, DescriptorName,
            VendorData) {Pin List}

This resource should be listed in _CRS under the GPIO/pincontroller
device providing these pins.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-03-21 13:54:51 +08:00
Mika Westerberg
a06fdba686 ACPI 6.2: Add support for PinConfig() resource
ACPI 6.2 introduced a new resource that is used to specify fine-grained
configuration of a pin or set of pins used by a device. The ASL syntax of
this new resource looks like:

  PinConfig (Shared/Exclusive, PinConfigType, PinConfigValue,
             ResourceSource, ResourceSourceIndex, ResourceUsage,
             DescriptorName, VendorData) {Pin List}

PinConfigType is an integer with following accepted values:

  0x00 (Default) - No configuration is applied to the pin
  0x01 (Bias Pull-up) - Pin is pulled up using certain size resistor
  0x02 (Bias Pull-down) - Pin is pulled down using certain size resistor
  0x03 (Bias Default) - Set to default biasing
  0x04 (Bias Disable) - All bias settings will be disabled
  0x05 (Bias High Impedance) - Configure the pin as HiZ
  0x06 (Bias Bus Hold) - Configure the pin in a weak latch state where
                         it drives the last value on a tristate bus
  0x07 (Drive Open Drain) - Configure the pin into open drain state
  0x08 (Drive Open Source) - Configure the pin into open source state
  0x09 (Drive Push Pull) - Configure the pin into push-pull state
  0x0a (Drive Strength) - How much the pin can supply current
  0x0b (Slew Rate) - Configure slew rate of the pin
  0x0c (Input Debounce) - Enable input debouncer for the pin
  0x0d (Input Schmitt Trigger) - Enable schmitt trigger for the pin
  0x0e - 0x7f - Reserved
  0x80 - 0xff - Vendor defined types

The PinConfigValue depends on the type and is expressed as units
suitable for that type (for example bias uses Ohms).

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-03-21 13:54:51 +08:00
Mika Westerberg
6bbc6357f7 ACPI 6.2: Add support for PinFunction() resource
ACPI 6.2 introduced a new resource that is used to describe how certain
pins are muxed for a device. The ASL syntax of this new resource looks
like below:

  PinFunction(Shared, PinConfig, FunctionNumber, ResourceSource,
              ResourceSourceIndex, ResourceUsage, DescriptorName,
              VendorData) {Pin List}

Which is pretty similar to GpioIo()/GpioInt() resources.

Teach ACPICA about this new resource.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-03-21 13:54:51 +08:00
Robert Moore
7d14e40d82 Merge pull request #232 from SchmErik/asltsExternalOp
Aslts external op
2017-03-17 10:46:31 -07:00
Erik Schmauss
8999ef41b2 ASLTS: removing unnecessary .c files and including their information in .asl files.
The .c files contain snippets of ASL code. This has been extracted and placed as a
comment within DECL.asl. Note the style of this comment does not adhere to our
normal style so that it is easy to copy/paste, if needed.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-03-15 11:43:10 -07:00
Erik Schmauss
d35dfcb31e ASLTS: Fixing small syntax issue resulting in ASLTS build issues on debian.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-03-14 11:20:23 -07:00
Erik Schmauss
5c6cd994f0 ASLTS: refactor removal of artifact files to retain clean test directory when test run is successful.
This applies to the binary comparison portion of the ASLTS script.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-03-10 15:53:13 -08:00
Erik Schmauss
6134f5331a ASLTS: add flags to compile externals in binary comparison test
When performing the binary comparison test sequence, the compilation
will use the -oE flag to compile the externals in place (rather than
emitting external aml bytecode at the top of the definition block.
The disassembly will use the -oe flag to disassemble externals in place.
The final re-compilation will use the same flags as the normal test case
compilation.

The -oe and -oE flags ensures that the externals within ASL will remain
in the same location throughout the compilation and disassembly. This is
needed for binary comparisons to match for several test cases such as bdemo
and table.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-03-10 15:05:13 -08:00
Erik Schmauss
3072c43fb4 ASLTS: adding stylistic changes to testsuite script
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-03-01 12:58:00 -08:00
Erik Schmauss
b40b556bbf ASLTS: adding binary compare option
this option disables test execution and terminates after test suite
compilation and binary comparison.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-02-28 12:09:22 -08:00
Erik Schmauss
fc5b38198a ASLTS: replacing slack/norm with opt/nopt
This gets rid of slack mode and normal mode within the test suite and replaces
this with opt (optimized) and nopt (non-optimized) modes.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-02-28 12:07:22 -08:00
Erik Schmauss
1b7315dcc0 ASLTS: editing help message
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-02-28 12:02:49 -08:00
Erik Schmauss
3e6131748f ASLTS: adding AML binary compare
This adds the capability for ASLTS to exercise the aml disassembler during the
compilation of ASLTS. This is done by comparing aml generated by compiling and
disassembling/recompiling each test case and performing a binary comparison
between the two aml files.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-02-28 11:34:33 -08:00
Robert Moore
56740737cd Test suite: Update to recognize new iASL signon
iASL signon added the word "Disassembler", this unfortunately
broke the ASLTS generation. Erik Schmauss
2017-01-19 13:55:42 -08:00
Robert Moore
356556da55 Tests: Update copyright notices to 2017
Affects all source files.
2017-01-06 14:20:36 -08:00
Robert Moore
d1b8a8751d Grammar test: Deploy __LINE__ macro to simplify debugging
ERR_ method now accepts __LINE__ from caller
2016-11-18 08:57:40 -08:00
Peter Wu
4f4e12b8ee ASLTS: fix acpiexec command example
The -e option was changed in commit d90488f43579 ("acpiexec: add option
to disable memory tracking mechanism."), released as version 20100528.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2016-11-15 15:31:04 +01:00
Peter Wu
6729c3d308 ASLTS: cntl: fix spelling errors
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2016-11-12 12:18:45 +01:00