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>
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>
1) Allow whitespace in string before the constant
2) UtStrtoul64 now always creates a 64-bit integer; iASL will
truncate this to the lower 32-bits if the table being compiled
is a 32-bit table (DSDT revision less than 2).
The acpiexec count was too small to run some of the tests,
so just use the acpica default. this count is scheduled to
be removed, to be replaced by a real timer/timeout.
Improve adherence to ACPI spec for implicit and explicit conversions
Adds octal support for constants in ASL code
Adds integer overflow errors for constants during ASL compilation
Eliminates most of the existing complex flags parameters
Simplify support for implicit/explicit runtime conversions
Adds one new file, utilities/utstrsuppt.c
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>