git: apple_smc: add thermal governor and PROCHOT override

Matthew Dillon dillon at crater.dragonflybsd.org
Fri Jul 3 10:37:54 PDT 2026


commit 47846c6aa650bf232ca9cd346eecd2495bdecf70
Author: Abdelkader Boudih <dragonflybsd at seuros.com>
Date:   Fri Jul 3 12:18:57 2026 +0000

    apple_smc: add thermal governor and PROCHOT override
    
    When the SMC asserts PROCHOT# due to disconnected sensors or absent
    battery, the driver now detects this at attach, clears BD_PROCHOT in
    MSR 0x1FC, and takes over fan control from the SMC failsafe.  A kernel
    thread implements a linear fan curve between configurable temperature
    thresholds with hysteresis and rate-limited ramp-down.
    
    New sysctls expose scheduled wake time (CLWK), S5 power-on timer
    (G3AO/G3WD), AC wake delay (AUWT), display brightness (DPBR),
    chassis state (ENV0), and software thermal throttle disable (STFD).
    The raw key interface is no longer gated behind APPLE_SMC_DEBUG.
    
    Temperature description table expanded to ~170 entries.

Summary of changes:
 share/man/man4/apple_smc.4      | 179 +++++++++--
 sys/dev/apple/smc/Makefile      |   2 +-
 sys/dev/apple/smc/smc.c         | 652 +++++++++++++++++++++++++++++++++++-----
 sys/dev/apple/smc/smc.h         |  62 +++-
 sys/dev/apple/smc/smc_io.c      |  53 +++-
 sys/dev/apple/smc/smc_sysctl.c  | 233 +++++++++++++-
 sys/dev/apple/smc/smc_thermal.c | 299 ++++++++++++++++++
 7 files changed, 1366 insertions(+), 114 deletions(-)
 create mode 100644 sys/dev/apple/smc/smc_thermal.c

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/47846c6aa650bf232ca9cd346eecd2495bdecf70


-- 
DragonFly BSD source repository


More information about the Commits mailing list