Page MenuHomeFreeBSD

intel/intel_proc_thermal: Add Intel Processor Thermal driver
Needs ReviewPublic

Authored by guest-seuros on Mon, Jan 26, 2:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Feb 5, 4:29 AM
Unknown Object (File)
Sun, Feb 1, 5:14 PM
Unknown Object (File)
Tue, Jan 27, 8:15 PM
Unknown Object (File)
Mon, Jan 26, 7:28 PM
Unknown Object (File)
Mon, Jan 26, 4:01 PM
Unknown Object (File)
Mon, Jan 26, 3:58 PM
Unknown Object (File)
Mon, Jan 26, 3:22 PM
Subscribers

Details

Reviewers
adrian
Summary

Add driver for Intel Processor Thermal Device (B0D4) found on Skylake and later processors.
This device exposes RAPL power limits (PL1/PL2) and TDP information via sysctl.

The driver reads MSR_RAPL_POWER_UNIT to determine the correct power unit scaling factoor, with fallback to 1/8 W if MSR read fails.

Sysctls provided:

dev.intel_proc_thermal.0.pl1_mw         - Long-term power limit (mW)
dev.intel_proc_thermal.0.pl2_mw         - Short-term power limit (mW)
dev.intel_proc_thermal.0.tdp_mw         - Thermal Design Power (mW)
dev.intel_proc_thermal.0.pl1_enable     - PL1 enabled flag
dev.intel_proc_thermal.0.locked         - Firmware lock status
dev.intel_proc_thermal.0.access_denied  - MMIO access status
dev.intel_proc_thermal.0.power_unit_div - Power unit divisor
dev.intel_proc_thermal.0.power_unit_shift - Power unit shift

Note: Later generations may have different MMIO layouts and would need per-generation validation. I used the gen 10th documentation (that match the hardware i used)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 70388
Build 67271: arc lint + arc unit

Event Timeline

guest-seuros created this revision.

Wire into build; add PL2 enabled/lock bit; align sysctl names