Date: Thu, 29 Jan 2026 18:05:41 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: Aymeric Wibo <obiwac@FreeBSD.org> Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: c5daa5a4c32c - main - acpi_spmc: Add system power management controller driver Message-ID: <44q7361r-p46r-r885-6p7q-62r5489ps510@mnoonqbm.arg> In-Reply-To: <69776f5e.2500f.227efeb7@gitrepo.freebsd.org>
index | next in thread | previous in thread | raw e-mail
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 <obiwac@FreeBSD.org> > AuthorDate: 2025-06-14 15:30:44 +0000 > Commit: Aymeric Wibo <obiwac@FreeBSD.org> > 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:7home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44q7361r-p46r-r885-6p7q-62r5489ps510>
