platform/x86: Add AMD system management interface
authorSuma Hegde <suma.hegde@amd.com>
Tue, 22 Feb 2022 05:05:00 +0000 (10:35 +0530)
committerHans de Goede <hdegoede@redhat.com>
Wed, 2 Mar 2022 10:42:36 +0000 (11:42 +0100)
commit91f410aa679a035e7abdff47daca4418c384c770
treed579aec46c6be453e2b8a13ec51eea774fbc4c1d
parentf094399fae9cde11c3f98565eb150522aa7c15ab
platform/x86: Add AMD system management interface

Recent Fam19h EPYC server line of processors from AMD support system
management functionality via HSMP (Host System Management Port) interface.

The Host System Management Port (HSMP) is an interface to provide
OS-level software with access to system management functions via a
set of mailbox registers.

More details on the interface can be found in chapter
"7 Host System Management Port (HSMP)" of the following PPR
https://www.amd.com/system/files/TechDocs/55898_B1_pub_0.50.zip

This patch adds new amd_hsmp module under the drivers/platforms/x86/
which creates miscdevice with an IOCTL interface to the user space.
/dev/hsmp is for running the hsmp mailbox commands.

Signed-off-by: Suma Hegde <suma.hegde@amd.com>
Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
Reviewed-by: Carlos Bilbao <carlos.bilbao@amd.com>
Acked-by: Song Liu <song@kernel.org>
Reviewed-by: Nathan Fontenot <nathan.fontenot@amd.com>
Link: https://lore.kernel.org/r/20220222050501.18789-1-nchatrad@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Documentation/userspace-api/ioctl/ioctl-number.rst
MAINTAINERS
arch/x86/include/asm/amd_hsmp.h [new file with mode: 0644]
arch/x86/include/uapi/asm/amd_hsmp.h [new file with mode: 0644]
drivers/platform/x86/Kconfig
drivers/platform/x86/Makefile
drivers/platform/x86/amd_hsmp.c [new file with mode: 0644]