The branch main has been updated by olce:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=e401e6d3fc91679b16c5cfa4c473dcb8fcadacfa

commit e401e6d3fc91679b16c5cfa4c473dcb8fcadacfa
Author:     Olivier Certner <[email protected]>
AuthorDate: 2026-01-09 09:53:39 +0000
Commit:     Olivier Certner <[email protected]>
CommitDate: 2026-02-03 17:19:08 +0000

    acpi: 'hw.acpi.s4bios' sysctl: Change type to bool, expand description
    
    Another boolean, indicating hardware support, will be introduced in next 
commit.
    
    Thanks to the previous commit modifying sysctl_handle_bool(), this
    change is backwards-compatible with old programs using an integer in and
    out of sysctl(3).
    
    Reviewed by:    obiwac
    MFC after:      2 weeks
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D54626
---
 sys/dev/acpica/acpi.c    | 6 +++---
 sys/dev/acpica/acpivar.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 47bb47bfb0af..58ddb0a83922 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -626,7 +626,7 @@ acpi_attach(device_t dev)
 
     /* Only enable S4BIOS by default if the FACS says it is available. */
     if (AcpiGbl_FACS != NULL && AcpiGbl_FACS->Flags & 
ACPI_FACS_S4_BIOS_PRESENT)
-       sc->acpi_s4bios = 1;
+       sc->acpi_s4bios = true;
 
     /*
      * Probe all supported ACPI sleep states.  Awake (S0) is always supported,
@@ -754,9 +754,9 @@ acpi_attach(device_t dev)
     SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
        OID_AUTO, "sleep_delay", CTLFLAG_RW, &sc->acpi_sleep_delay, 0,
        "sleep delay in seconds");
-    SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
+    SYSCTL_ADD_BOOL(&sc->acpi_sysctl_ctx, 
SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
        OID_AUTO, "s4bios", CTLFLAG_RW, &sc->acpi_s4bios, 0,
-       "Use S4BIOS when hibernating.");
+       "On hibernate, have the firmware save/restore the machine state 
(S4BIOS).");
     SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
        OID_AUTO, "verbose", CTLFLAG_RW, &sc->acpi_verbose, 0, "verbose mode");
     SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h
index eea54178060f..51881c580d4b 100644
--- a/sys/dev/acpica/acpivar.h
+++ b/sys/dev/acpica/acpivar.h
@@ -64,7 +64,7 @@ struct acpi_softc {
     enum power_stype   acpi_lid_switch_stype;
 
     int                        acpi_standby_sx;
-    int                        acpi_s4bios;
+    bool               acpi_s4bios;
 
     int                        acpi_sleep_delay;
     int                        acpi_do_disable;

Reply via email to