For the cases such as a store of a string to an existing package
object, implement the store as a CopyObject(). This is a small
departure from the ACPI specification which states that the
control method should be aborted in this case. However, ASLTS
suite depends on this behavior.
These two bits are merged at the external interface level for the
IRQ, Interrupt, and GpioInt resource descriptors. However, these
bits are logically independent and there is no need to keep them
merged internally. Therefore, this change splits the bits into
"sharable" and "wake capable" fields within the resource manager.
This simplifies drive code that needs to examine these bits.
Aaron Lu, Bob Moore.
Some ASL compilers allow 64-bit constants within a 32-bit table
(DSDT version == 1). When encountered, emit a warning that the
constant will be truncated to 32 bits. This is potentially a
serious problem in the ACPI table(s).
In the functions that implement the macros, check if debug is enabled
up-front before the call to the lower debug print function. This
provides a small performance improvement.
Move check for "debug enable" to before the actual call to the debug
print routine. Improves time of ASLTS by about 15%.
Also, remove "safe" exit macros since no complex expressions are
ever used in the return statements.
A method invocation is no longer legal as an argument to ObjectType.
This is because the interpreter cannot determine the difference between
a simple ObjectType on a method versus a method invocation that is
intended to return an object to be typed.
This is pending as a change to the ACPI specification.
This change tracks an errata to the ACPI 5.0 document. The AML grammar
will not allow the interpreter to differentiate between a method and a
method invocation when these are used as an argument to the ObjectType
operator.
The ACPI specification change is to disallow a method invocation
(UserTerm) for the ObjectType operator.
This fixes a problem with WaitSemaphore where the timeout always
expires immediately if the semaphore is not available.
The default code uses sem_timedwait to support semaphore timeouts. However, the
full implementation is incorrect. sem_timedwait uses an absolute time value,
not a relative time value. Therefore, clock_gettime must be called first in
order to get the current time. The timeout value must be added to the current
time in order to get the absolute time -- which then becomes the latest we are
willing to wait for the semaphore.
Currently, the incorrect implementation will always timeout immediately. This
is not a huge problem, since this OSL is only used for the user-space ACPICA
utilities, but the ASLTS test suite does depend on the correct behavior for
approximately 20 tests.
ACPICA BZ 990.
Removed a test that invokes a control method for an ObjectType argument.
This does not work properly (method is not invoked), and the ability
to use this construct is being removed from the grammar for ObjectType.
(Requires a change to the ACPI specification.) Chao Guan.
For LoadTable tests, remove the the test that uses Load() to load a
table, then unloads the table, then uses LoadTable to load the same
table. This would be highly improbable in the real world.
Chao Guan.