On Mon, 26 Jan 2026, Aymeric Wibo wrote:
The branch main has been updated by obiwac:
URL:
https://cgit.FreeBSD.org/src/commit/?id=c5daa5a4c32c9b1ecb506ddf1a80579c93c3ea6d
commit c5daa5a4c32c9b1ecb506ddf1a80579c93c3ea6d
Author: Aymeric Wibo <[email protected]>
AuthorDate: 2025-06-14 15:30:44 +0000
Commit: Aymeric Wibo <[email protected]>
CommitDate: 2026-01-26 13:42:11 +0000
acpi_spmc: Add system power management controller driver
Add SPMC (system power management controller) driver as acpi_spmc. This
is the device which provides the LPI device D-state constraints and
allows for OSPM to send S0ix/modern standby entry/exit notifications.
This supports the original Intel DSM
(https://uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf,
untested), the AMD DSM (tested), and the Microsoft DSM (tested).
Before entry, acpi_spmc_check_constraints is called to notify of any
violated power constraints. This will use acpi_pwr_get_state to get
current device D-states when that gets added back.
Reviewed by: olce
Tested by: jkim, Oleksandr Kryvulia, Matthias Lanter
Approved by: olce
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48387
---
share/man/man4/acpi.4 | 4 +-
sys/conf/files | 1 +
sys/dev/acpica/acpi.c | 1 +
sys/dev/acpica/acpi_spmc.c | 618 +++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 623 insertions(+), 1 deletion(-)
diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c
new file mode 100644
index 000000000000..57593d9ccae1
--- /dev/null
+++ b/sys/dev/acpica/acpi_spmc.c
....
+
+static int
+acpi_spmc_suspend(device_t dev)
+{
+ acpi_spmc_display_off_notif(dev);
+ acpi_spmc_entry_notif(dev);
+
+ return (0);
+}
+
+static int
+acpi_spmc_resume(device_t dev)
+{
+ acpi_spmc_exit_notif(dev);
+ acpi_spmc_display_on_notif(dev);
+
+ return (0);
+}
Those two functions are not hooked up to device methods and thus are currently
unused.
Will they be used?
+static device_method_t acpi_spmc_methods[] = {
+ DEVMETHOD(device_probe, acpi_spmc_probe),
+ DEVMETHOD(device_attach, acpi_spmc_attach),
+ DEVMETHOD(device_detach, acpi_spmc_detach),
+ DEVMETHOD_END
+};
+
+static driver_t acpi_spmc_driver = {
+ "acpi_spmc",
+ acpi_spmc_methods,
+ sizeof(struct acpi_spmc_softc),
+};
+
+DRIVER_MODULE_ORDERED(acpi_spmc, acpi, acpi_spmc_driver, NULL, NULL,
SI_ORDER_ANY);
+MODULE_DEPEND(acpi_spmc, acpi, 1, 1, 1);
--
Bjoern A. Zeeb r15:7