AMD "HSMP" System Management Driver On The Way To The Linux Kernel
AMD EPYC 7003 series processors introduce the Host System Management Port (HSMP) as a new interface for providing access to additional system management functions on AMD servers. The amd_hsmp driver is on its way for supporting this interface under Linux. The driver in turn provides /dev/hsmp as an interface for sending HSMP mailbox register commands.
The AMD HSMP currently supports messages for reading the current average socket power consumption, setting the socket power limit, getting/setting a maximum frequency limit, setting the min/max width of the xGMI link, enabling the DF P-State Performance Boost support, getting the FCLK and MEMCLK for the current socket, reading the average C0 residency for that socket, getting per-DIMM temperatures and refresh rates, and getting the maximum/current DDR bandwidth usage, among other possible options (messages).
The AMD HSMP is only found with AMD EPYC processors for Family 19h and newer. With EPYC 7003 series having been introduced nearly one year ago, it's a bit unfortunate that this 600+ lines of code kernel driver is only working its way to the mainline kernel now, but at least better late than never.
The driver code as of yesterday made it into platform-drivers-x86's review branch, so if it's all reviewed well and in time this driver should be ready for inclusion into next month's Linux 5.18 merge window.
This documentation commit has more information on the AMD HSMP interface. The AMD esmi_ib_library in user-space for EPYC system management is able to make use of this new /dev/hsmp interface besides any other user-space software now being able to also read/set the various features exposed by the Host System Management Port.