Page MenuHomeFreeBSD

amdsmu: Initial work on a driver for the AMD SMU
Needs ReviewPublic

Authored by obiwac_gmail.com on Jan 25 2025, 7:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 14, 2:36 AM
Unknown Object (File)
Wed, Apr 30, 6:20 PM
Unknown Object (File)
Tue, Apr 29, 12:05 AM
Unknown Object (File)
Apr 22 2025, 2:55 AM
Unknown Object (File)
Mar 10 2025, 4:35 AM
Unknown Object (File)
Feb 5 2025, 6:25 PM
Unknown Object (File)
Feb 4 2025, 9:35 PM
Unknown Object (File)
Feb 1 2025, 10:42 PM
Subscribers

Details

Reviewers
jkim
cem
jhb
imp
Summary

Start work on a driver for the AMD SMU (system management unit), which will eventually be used for getting S0ix statistics (e.g. how long the CPU has spent in the deepest - S0i3 - sleep state during the last sleep) as well as letting PMFW (power management firmware, running on the SMU) know when we intend to enter and exit sleep. It is what's responsible for turning off the VDD line to the CPU.

Currently, amdsmu is just able to get the SMU's firmware version on AMD Rembrandt, Phoenix, and Strix Point CPUs. Future patches will come for stats and sleep, and will hopefully help with the EC wake event "noisiness" issue described in D48387.

This is the equivalent to amd-pmc on Linux.

Test Plan

I have tested this on the Framework 13 AMD Ryzen 7040 series (Phoenix), with SMU firmware version 76.70.0:

amdsmu0 on hostb0
amdsmu0: SMU version: 76.70.0 (program 0)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 62024
Build 58908: arc lint + arc unit