Enhanced the sleep/wake interfaces to optionally execute the _GTS
method (Going To Sleep), and the _BFS method (Back From Sleep).
Windows apparently does not execute these methods, and therefore
these methods are often untested. It has been seen on some systems
where the execution of these methods causes errors and also prevents
the machine from entering S5. It is therefore suggested that host
operating systems do not execute these methods by default. In the
future, perhaps these methods can be optionally executed based on
the age of the system and/or what is the newest version of Windows
that the BIOS asks for via _OSI.
Repair a common problem with objects that are defined to
return a variable-length Package of sub-objects. If there is
only one sub-object, some BIOS code mistakenly simply declares
the single object instead of a Package with one sub-object.
This function attempts to repair this error by wrapping a
Package object around the original object, creating the
correct and expected Package with one sub-object.
Add an additional option character that specifies that the
option has a required single-character suboption (|). This
simplifies the command line processing for the various tools.
Enable the deferred mapping mechanism for tables loaded via the
physical override OSL interface. This allows for early mapping
before the virtual memory manager is available. Thomas Renninger,
Bob Moore.
The local FADT table length cannot be set to the common length
until the original length has been examined. There is code that
checks the table length and sets various fields appropriately.
This can affect older machines with early FADT versions. For
example, this can cause inadvertant writes to the CST_CNT
register. Julian Anastasov.
Change the returned exception code from AE_BAD_PARAMETER to the more
appropriate AE_BAD_PATHNAME, when the input pathname to
evaluate object is invalid.
Changed the METHOD_NAME* defines that define a full pathname to the
method to METHOD_PATHNAME* in order to make it clear that it is not a simple
4-character ACPI name. Used for the various sleep/wake methods.
The functions for the original/legacy sleep/wake registers are
in hwsleep.c, and the functions for the new extended FADT V5
sleep registers are in hwesleep.c
Adds AcpiHwExecuteSleepMethod to handle the various sleep
methods such as _GTS, _BFS, _WAK, and _SST. Removes the specialized
functions previously used for each of these methods.
The execution of ACPI global control methods _GTS and _BFS is
currently tied to the preparation to enter a sleep state and to the
leaving of the sleep state, respectively. However, these functions
are called before disabling the nonboot CPUs and after enabling
them, respectively (in fact, on ACPI 1.0x systems the first of them
ought to be called before suspending devices), while according to the
ACPI specification, _GTS is to be executed right prior to entering
the system sleep state and _BFS is to be executed right after the
platform firmware has returned control to the OS on wake up.
Move the execution of _GTS and _BFS to the right places.
Adds a new external function, AcpiEnterSleepStatePrep.
Rafael Wysocki.
Some BIOS code assumes that WAK_STS will be cleared on resume
and use it to determine whether the system is rebooting or
resuming. During resume, clear WAK_STS for compatibility.
Matthew Garrett.
It seems it is required to enable GPEs before _WAK. For example, the
X60 triggers a LID related GPE instead of doing a Notify in _WAK.
With this change, the GPE reaches the host kernel and the Notify
for LID status change happens as a result. Thomas Renninger.
This interface allows the host to override a table via a physical
address, instead of the logical address required by
AcpiOsTableOverride. This simplifies the host implementation.
Initial implementation by Thomas Renninger. ACPICA implementation
creates a single function for table overrides that attempts
both a logical and a physical override.
For the ACPI 5.0 serial descriptors (I2C,SPI,UART), the disassembler
was looking at the wrong bit for the producer/consumer field.
Reported by Stephen Ziemba.
This change expands AcpiOsReadMemory and AcpiOsWriteMemory to
a full 64 bits. This allows 64 bit transfers via the AcpiRead
and AcpiWrite interfaces. Note: The internal AcpiHwRead and
AcpiHwWrite interfaces remain at 32 bits, because 64 bits is not
needed to access the standard ACPI registers.