This change continues compilation of ASLTS test cases even
if one of the test cases fail. This is helpful when deliberate
compilation changes are made to iASL. When these compiler changes
occur, it is helpful for the test suite to run all the way to
completion.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
A method cannot call itself if the method creates named objects.
On the first recursive call, the method will fail at runtime
with an AE_ALREADY_EXISTS exception.
This change adds an error condition at compile time to catch
this problem earlier.
by indenting the suberror message, it helps users distinguish iASL
error output between errors and sub-errors.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
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>
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>
This patch implements a new infinite loop detection mechanism to replace
the old one, it uses AcpiOsGetTimer() to limit loop execution into a
determined time slice.
This is useful in case some hardware/firmware operations really require the
AML interpreter to wait while the old mechanism could expire too fast on
recent machines.
The new mechanism converts old AcpiGbl_MaxLoopIterations to store the user
configurable value for the new mechanism in order to allow users to be
still able to configure this value for acpiexec via command line. This
patch also removes wrong initilization code of AcpiGbl_MaxLoopIterations
accordingly (it should have been initialized by ACPI_INIT_GLOBAL, and the
default value is also properly tuned for acpiexec). Reported by M. Foronda,
fixed by Lv Zheng.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=156501
Reported-by: M. Foronda <josemauricioforonda@gmail.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
This module was not being included in any ACPICA tool, and thus
not even built until it was included in a kernel.
Also add a few small tests in acpiexec that invoke the timer
interfaces in hwtimer.
If a name alredy exists in scope error occurs, an error message pointing to
the duplicate declaration is helpful because it informs users on the error
locations of conflicting declarations. This change adds support for
AslDualParseOpError, a function that can allow the error message like below.
DSDT.iiii 1692: Device(PEG2) {
Error 6074 - ^ Name already exists in scope (PEG2)
Original name creation/declaration below:
DSDT.iiii 93: External(\_SB.PCI0.PEG2, DeviceObj)
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
AslCommonError and AslCommonError2 exhibit code duplication. This
change modularizes these functions as well as add a suberror field
within the ASL_ERROR_MSG structure for future features.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
The calls to AcpiOsAcquireObject can result in a null being assigned
to Op (for example if a mutex acquire fails) which can lead to a
null pointer dereference on Op on the call to ASL_CV_TRANSFER_COMMENTS
(via function CvTransferComments). Move the block into the previous
block that checks for a null Op so that we never can call
CvTransferComments with a null Op.
Detected by: CoverityScan CID#1371660 ("Dereference after null check")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
This error message tends to clutter up the disassembled ASL
file with information that is unnecessary.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
This is a convenient way to look at the difference between the current and
previous ASLTSL run if there exists a difference.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Delta calculation has an off-by-one error when there is a rollover.
For example, when StartTicks is 0x00FFFFFF and EndTicks is 0x00000000
(for 24-bit timer), DeltaTicks should be 1 (one) but it was 0 (zero).
This is intended to be used as a part of the disassembler test
sequence in order to ensure that compiling, disassembling and
recompiling has the same effect as simply compiling the ASL files.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
The disassembler test sequence is as follows:
Given a test case ASL file, it will compile, disassemble and re-compile.
The above procedures result in an AML file. This should be then compared
to a file that is compiled by ASLTS for a normal compilation by using
the acpibin utility (not yet implemented).
This sequence of commands ensures that the disassembler does not inject
any unwanted code in the AML.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Compile-disassemble-recompile will be in different targets. This means that
the OPT argument is no longer needed in install_all_modes_of_test_case.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
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>