Olivier Certner 69a303ace7 acpi_spmc(4): Auto-detect DSM revisions by default
Which revisions to use for the Intel and AMD DSMs is unclear.  For the
Intel one, the written specification indicates only 0, but Linux uses
1 (possibly an oversight).  For the AMD one, for which there is no
specification, Linux uses 0, but at least on the Framework 13 AMD 7040
series, the "enumerate functions" function only returns a mask that
covers all the functions we expect when called with revision 2.

Introduce an auto-detection strategy where each revision starting from
0 is tried in turn up to some limit (included; default: 15).  As soon as
a revision implements all expected functions, we stop the loop and use
that one, in effect selecting the minimum revision that implements all
we need, which should avoid potential backwards-compatibility problems.
If no revision implements all expected functions, the highest available
revision in the checked range is selected, but higher revisions that do
not bring new functions are discarded (see the explanatory comment in
acpi_spmc_probe_dsm()).

The revision policy is still tunable using the same existing sysctl(8)
knobs 'debug.acpi.spmc.intel_dsm_revision' and
'debug.acpi.spmc.amd_dsm_revision'.  They have been extended so that
a negative value indicates to use the auto-detection mechanism up to
a revision of minus the value.  As before, a 0 or positive value
requests a specific revision.  A new knob is introduced for the
Microsoft DSM just in case ('debug.acpi.spmc.ms_dsm_revision').

Since now the revision can be auto-detected, and thus depends on
a particular device instance, move it into 'struct dsm_info' on the
softc.  This also enables finishing the split between static and
dynamic/tunable information, allowing to constify all the DSM
descriptors.

Print the revision eventually used along with the supported functions.

Tested on an Intel Framework laptop.

Reviewed by:    obiwac
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56882
2026-05-13 14:38:26 +02:00
2026-05-12 21:26:44 -07:00
2026-05-12 21:12:09 +00:00
2026-02-21 20:53:19 -05:00
2026-05-10 17:53:20 +03:00
2026-05-13 11:26:56 +08:00
2026-05-12 20:24:10 +00:00
2026-02-21 20:53:19 -05:00
2026-05-12 21:26:44 -07:00
2026-05-12 20:05:19 +00:00
2026-03-07 00:51:15 -07:00
2026-01-01 00:29:23 +00:00
2023-12-26 10:28:25 -07:00
2026-05-03 13:53:25 -04:00
2026-05-13 11:13:20 +08:00

FreeBSD Source:

This is the top level of the FreeBSD source directory.

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), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables.

For information on the CPU architectures and platforms supported by FreeBSD, see the FreeBSD website's Platforms page.

For official FreeBSD bootable images, see the release page.

Source Roadmap:

Directory Description
bin System/user commands.
cddl Source code for third-party software under the Common Development and Distribution License.
contrib Source code for third-party software.
crypto Source code for cryptographic libraries and commands (see crypto/README).
etc Template files for /etc.
gnu Source code for third-party software under the GNU General Public License (GPL) or Lesser General Public License (LGPL). Please see gnu/COPYING and gnu/COPYING.LIB for more information.
include System include files.
kerberos5 Build system for Kerberos 5 (Heimdal).
krb5 Build system for Kerberos 5 (MIT).
lib System libraries.
libexec System commands intended to be executed by other commands or daemons.
packages Base system packages.
release Makefiles and scripts used for building releases and VM images.
rescue Build system for statically linked /rescue commands.
sbin System commands.
secure Build system for cryptographic libraries and commands (excluding Kerberos).
share Shared resources.
stand Boot loader sources.
sys Kernel sources (see sys/README.md).
targets Support for experimental DIRDEPS_BUILD
tests Tests which can be run by Kyua. See tests/README for additional information.
tools Ancillary utilities and tests (not included in the build).
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 FreeBSD Handbook.

S
Description
Source code of KekenoBSD
https://kekenobsd.surge.sh
Readme 1.7 GiB
Languages
C 59.6%
C++ 27%
Roff 4.5%
Shell 2.8%
Assembly 1.7%
Other 3.8%