I want to do this change because this call (actually, AcpiHwLegacyWakePrep) does a memory allocation and ACPI namespace evaluation. Although it is not very likely to run into any trouble, it is still not safe to make those calls with interrupts disabled. witness(4) and malloc(9) do not currently check for a context with interrupts disabled via intr_disable and we lack a facility for doing that. So, those unsafe operations fly under the radar. But if intr_disable in acpi_EnterSleepState was replaced with spinlock_enter (which it probably should be), then witness and malloc would immediately complain. Also, AcpiLeaveSleepStatePrep is documented as called when interrupts are enabled. It used to require disabled interrupts, but that requirement was changed a long time ago when support for _BFS and _GTS was removed from ACPICA. The ACPI wakeup sequence is very sensitive to changes. I consider this change to be correct, but there can be fallouts from it. What AcpiHwLegacyWakePrep essentially does is writing a value corresponding to S0 into SLP_TYPx bits of PM1 Control Register(s). According to ACPI specifications that write should be a NOP as SLP_EN bit is not set. But I see in some chipset specifications that they allow to ignore SLP_EN altogether and to act on a change of SLP_TYPx alone. Also, there are a couple of accesses to ACPI hardware before the new location of the call to AcpiLeaveSleepStatePrep. One is to clear the power button status and the other is to enable SCI. So, the move may affect the interaction between then OS and ACPI platform. I have not seen any regressions on my test system, but it's a desktop. MFC after: 5 weeks |
||
|---|---|---|
| bin | ||
| cddl | ||
| contrib | ||
| crypto | ||
| etc | ||
| gnu | ||
| include | ||
| kerberos5 | ||
| lib | ||
| libexec | ||
| release | ||
| rescue | ||
| sbin | ||
| secure | ||
| share | ||
| stand | ||
| sys | ||
| targets | ||
| tests | ||
| tools | ||
| usr.bin | ||
| usr.sbin | ||
| .arcconfig | ||
| .arclint | ||
| .gitattributes | ||
| .gitignore | ||
| COPYRIGHT | ||
| LOCKS | ||
| MAINTAINERS | ||
| Makefile | ||
| Makefile.inc1 | ||
| Makefile.libcompat | ||
| Makefile.sys.inc | ||
| ObsoleteFiles.inc | ||
| README | ||
| README.md | ||
| UPDATING | ||
FreeBSD Source:
This is the top level of the FreeBSD source directory. This file
was last revised on:
FreeBSD
FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.
For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.
The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html, and https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html for more information, including setting make(1) variables.
Source Roadmap:
bin System/user commands.
cddl Various commands and libraries under the Common Development
and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Various commands and libraries under the GNU Public License.
Please see gnu/COPYING* for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources.
sys/<arch>/conf Kernel configuration file
tests Regression tests which can be run by Kyua. See tests/README
for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.
For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see:
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/current-stable.html