summaryrefslogtreecommitdiff
path: root/tests/aslts/src
Commit message (Collapse)AuthorAgeFilesLines
* ASLTS: Region: get rid of nested comments that cause converter errorErik Schmauss2018-10-241-4/+4
| | | | Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* Update for field accessRobert Moore2018-09-071-591/+365
| | | | Fix implemention of generic serial bus, cleanup for others.
* ASLTS: adding package resolution with table load testingErik Schmauss2018-05-072-0/+74
| | | | Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* iASL: Add support to detect illegal forward referencesRobert Moore2018-04-202-2/+6
| | | | | | | | | Forward references have never been allowed within control methods, and now there are illegal from module-level code (This makes ACPICA compatible with "other" acpi implementations). Both types of fwd refs now generate an error message (this is also a new addition to iASL).
* ASLTS: Change CH03 to use __LINE__ and __METHOD__ macrosErik Schmauss2018-02-26159-1620/+1620
| | | | | | This changes hard-coded digits to macros. Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: change M380-M387, M390, M391 to use the __LINE__ macroErik Schmauss2018-02-163-594/+594
| | | | Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: change CH04 to emit line numbers instead of indexErik Schmauss2018-02-1690-711/+711
| | | | | | This is done by replacing hardcorded index values with __LINE__ macro Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: change formatting of ERR to emit decimal line numbersErik Schmauss2018-02-141-5/+2
| | | | Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: adding macros to ERR functionsErik Schmauss2018-02-14266-3809/+3809
| | | | | | | | | | This change replaces the first parameter of ERR with __METHOD__ in bdemo testcases and replaces the third parameter of ERR with __LINE__. The __METHOD macro evaluates to the current method and __LINE__ evaluates to the current line number during compilation. By doing these macros help clarify error messages in ASLTS. Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: replace TS with __METHOD__ to improve styleErik Schmauss2018-01-04125-5645/+5285
| | | | | | This removes most of the TS objects which is used to store method names. Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: Update all copyrights to 2018Robert Moore2018-01-041267-1269/+1269
| | | | All ASL code in the test suite.
* ASLTS: Automated cleanup, no functional changesRobert Moore2018-01-04510-36755/+36239
| | | | Mostly trailing spaces and extra lines at EOF.
* ASLTS: converting files to ASL plus with converterErik Schmauss2017-11-10734-494758/+573753
| | | | | | | functional/control test case has been left unconverted for readability of deeply nested control statements (if, switch, while) Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: adding expected compilation failure flags for recursive methods that ↵Erik Schmauss2017-09-153-0/+3
| | | | | | create named objects Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: make stylistic adjustments to pass converter testErik Schmauss2017-09-082-9/+9
| | | | | | | | | MT_MUTEX/DYNOBJ - converter does not support nested comments. Remove the nested comment so that it is just a single-line comment EXC - converter does not currently support #include directives. replace these with ASL include statements. Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: add converter test sequence and rename all .dsl files to .aslErik Schmauss2017-09-081-0/+0
| | | | | | | | | | | | | | This is similar to the ASLTS disassembler test sequence. The converter test sequence converts each test case using iasl -ca flag and then recompiles using flags from a normal test case compilation. After recompilation, normally compiled AML is compared with the converted and recompiled AML. Converter test sequence removes all .dsl files after testing. Because of this, all .dsl files that belong in the ASLTS directory needs to be renamed as .asl. Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: exc: change test case to allow implicit conversion of strings with ↵Erik Schmauss2017-08-101-1/+4
| | | | | | | | | | | | "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>
* ASLTS: resolving conflict from rebasingErik Schmauss2017-07-21218-3928/+3928
| | | | Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: CH03 and CH04 is intended to take line numbers as arguments rather ↵Erik Schmauss2017-07-211-2/+2
| | | | | | than a number indicating the "index of error". Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: changing the third argument of ERR to __LINE__ to print line numbers ↵Erik Schmauss2017-07-21335-6337/+6337
| | | | | | instead of indices. Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: getting rid of unnecessary error reporting.Erik Schmauss2017-07-211-4/+1
| | | | | | This error information is redundant. Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: descriptor: update test buffers to include shared bit in V2 descriptorsErik Schmauss2017-07-173-54/+54
| | | | | | | | | | | | | | | 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>
* ASLTS: External: adding testcases from bz1389 by racerrehabmanErik Schmauss2017-06-091-0/+43
| | | | Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* Merge pull request #252 from zetalog/acpica-asltsRobert Moore2017-05-253-30/+9
|\ | | | | Acpica aslts
| * ASLTS: exc_result2: Fix old m689 breakage (exceptional)Lv Zheng2017-05-031-0/+4
| | | | | | | | | | | | | | | | 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>
| * ASLTS: rstore: Fix old m689 breakage (store matrix)Lv Zheng2017-05-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * ASLTS: region: Fix old m702 breakageLv Zheng2017-05-031-3/+2
| | | | | | | | | | | | | | | | | | | | 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>
| * ASLTS: reference: Fix old m34d breakageLv Zheng2017-05-031-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ASLTS: reverse the order of definition block declarations to test for a ↵Erik Schmauss2017-05-091-29/+27
| | | | | | | | | | | | | | | | | | | | 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>
* | ASLTS: get rid of External declaration for _ERR because it is a redefinition ↵Erik Schmauss2017-05-021-2/+0
|/ | | | | | of _ERR. Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: fix spelling errorErik Schmauss2017-05-021-1/+1
| | | | Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: adding external statement test case so that they can be run by aslts.shErik Schmauss2017-05-021-1/+2
| | | | Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: adding tests for externalsErik Schmauss2017-05-026-1/+287
| | | | | | This test ensures that each external declaration is resolved to the proper named objects. Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: update comments, no functional changeErik Schmauss2017-05-021-5/+5
| | | | Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ASLTS: fixing indentation and style, no functional changeErik Schmauss2017-05-021-11/+15
| | | | Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
* ACPI 6.2: Add support for PinGroupConfig() resourceMika Westerberg2017-03-214-0/+505
| | | | | | | | | | | | | | | | | | | | | 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>
* ACPI 6.2: Add support for PinGroupFunction() resourceMika Westerberg2017-03-214-0/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ACPI 6.2: Add support for PinGroup() resourceMika Westerberg2017-03-214-0/+192
| | | | | | | | | | | | | | | | | | 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>
* ACPI 6.2: Add support for PinConfig() resourceMika Westerberg2017-03-214-0/+541
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ACPI 6.2: Add support for PinFunction() resourceMika Westerberg2017-03-214-0/+199
| | | | | | | | | | | | | | | | | 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>
* ASLTS: removing unnecessary .c files and including their information in .asl ↵Erik Schmauss2017-03-154-102/+32
| | | | | | | | | | 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>
* Tests: Update copyright notices to 2017Robert Moore2017-01-061259-1259/+1259
| | | | Affects all source files.
* ASLTS: cntl: fix spelling errorsPeter Wu2016-11-121-14/+14
| | | | Signed-off-by: Peter Wu <peter@lekensteyn.nl>
* Test suite: Update for ASL grammar changes:Robert Moore2016-11-0411-631/+687
| | | | | | | Tests related to these grammar changes have been removed/commented-out: RefOf, DerefOf, ObjectType: Control method invocation as an operand is no longer supported by the ASL grammar.
* ASLTS: table: Add TLD0.tstk testLv Zheng2016-10-262-0/+144
| | | | | | | Add a test to see if a recursive "Load" - loading table2 via MLC during table1 loading - can be performed. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com>
* ASLTS: cntl: Cleanup y260 checksLv Zheng2016-10-265-147/+95
| | | | | | | | | | | | The y260 bug excluded code now works. We are using y260 to exclude an implicit target operand conversion bug. So this patch corrects the y260 code. Note that there is no bug demo code related to this bug, so we can simply remove old exclusions for y260 as it is useless to keep such kind of simple exclusions. Link: https://bugs.acpica.org/show_bug.cgi?id=1327 Signed-off-by: Lv Zheng <lv.zheng@intel.com>
* ASLTS: table: Fix TLD0.tstg testLv Zheng2016-10-262-62/+54
| | | | | | | | | | | | | | | | | | | | This patch cleans up TLD0.tstg, keeping it working for catching 'Load/Unload' regressions. This patch fixes TLD0.tstg around the old forward referencing approaches as the TermList parsing support has changed the old behavior: 1. OPR0 couldn't be referenced at the position created after FLU0. 2. FieldUnit/BufferField have already been initialized during the table loading (can be validated via changing arg2 into a named object). Such forward referencing test shouldn't be maintained by the 'table' case. Another issue is: If ArgX is a RefOf(OldObj), writing NewObj to ArgX should result in RefOf(NewObj). This is not working for object types other than Integer, String, Buffer, so this patch disables such tests with y260. Link: https://bugs.acpica.org/show_bug.cgi?id=1327 Signed-off-by: Lv Zheng <lv.zheng@intel.com>
* ASLTS: table: Fix TLT0.tst1 testLv Zheng2016-10-261-24/+35
| | | | | | | | | | | | | This patch cleans up TLT0.tst1, keeping it working for catching 'LoadTable/Unload' regressions. The wrong signature of LoadTable opcode now results in AE_BAD_SIGNATURE exception rather than siliently returning zero. This patch also re-sorts error indexes in TLT0.tst1. Link: https://bugs.acpica.org/show_bug.cgi?id=1327 Signed-off-by: Lv Zheng <lv.zheng@intel.com>
* ASLTS: table: Fix TLT0.tste testLv Zheng2016-10-261-14/+14
| | | | | | | | | | This patch cleans up TLT0.tste, keeping it working for catching 'LoadTable/Unload' regressions. The wrong signature of LoadTable opcode now results in AE_BAD_SIGNATURE. Link: https://bugs.acpica.org/show_bug.cgi?id=1327 Signed-off-by: Lv Zheng <lv.zheng@intel.com>
* ASLTS: table: Fix TLT0.tst4 testLv Zheng2016-10-261-1/+1
| | | | | | | | | | | This patch cleans up TLT0.tst4, keeping it working for catching 'LoadTable/Unload' regressions. In order to install OEM1 objects to "\DTM2", RootPathString should be 5 bytes rather than 1 bytes. Link: https://bugs.acpica.org/show_bug.cgi?id=1327 Signed-off-by: Lv Zheng <lv.zheng@intel.com>