Page MenuHomeFreeBSD

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

Authored by obiwac_gmail.com on Sat, Jan 25, 7:17 PM.

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