[PATCH 0/7] platform/x86/amd/hsmp: Family 1Ah client support

From: Muralidhara M K

Date: Wed Jul 29 2026 - 13:14:26 EST


This series enables the HSMP driver on the Family 1Ah client platforms
- Medusa1 (Models 80h-87h), Olympic Ridge (Models 88h-8Fh) and Medusa2
(Models E0h-E3h) - and adds the two read-only ioctls that bring-up on
those parts needs.

The client parts drive a different mailbox from the server HSMP
interface. Its SMN addresses are fixed rather than discoverable through
firmware, and the parts speak the Ryzen Master SMC message set instead
of the server message IDs. Patches 1-4 teach the driver both, leaving
server behaviour unchanged:

- Patch 1 describes each platform once in struct hsmp_plat_desc,
which carries the mailbox addresses, the message descriptor table
and its size, and the IDs of the messages the driver issues itself.
Every lookup then picks the table matching the running platform
rather than testing the platform at each site. It also adds the
client message set to the UAPI header, and lets the client probe
survive an interface-version query that some client SMU builds
reject with "invalid message" even though the mailbox works.

- Patch 2 routes the metric table through the client message IDs,
which unlike the test and version queries are not numbered alike in
the two sets: 24h/25h on the server against 05h/06h on the client.

- Patch 3 handles the ACPI device (HID AMDI0097), which on these
parts exposes neither a _CRS window nor a _DSD mailbox package and
carries a bare socket number in _UID rather than the server "IDXX"
form. Reads go through the read-only SMNR ACPI method, the same
accessor the AMDHSMP Windows driver uses.

- Patch 4 leaves the hwmon power sensors unregistered on the client.
hwmon.c issues the server power message IDs unconditionally, and on
the client those numbers are metric-table queries that pass
validate_message(), so power1_input and power1_cap would report a
table version and the low half of a DRAM address as microwatts.

Patches 5-7 add HSMP_IOCTL_SMN_CMD and HSMP_IOCTL_MSR_CMD and document
them. Bringing a client platform up means reading SMN registers and
core MSRs that the message set does not cover, which today means either
debugfs, absent on production kernels, or an out-of-tree module. Both
ioctls are read-only and require CAP_SYS_RAWIO. Each request struct
carries a @write flag so write support could be added later without
changing the layout, but a request that sets it is refused with -EPERM
regardless of the caller's privilege or open mode.

Each patch builds individually at W=1 and is clean under
checkpatch.pl --strict --codespell.

Muralidhara M K (7):
platform/x86/amd/hsmp: Add HSMP client support for Family 1Ah
platform/x86/amd/hsmp: Route metric table through the client messages
platform/x86/amd/hsmp: Add ACPI client support via the SMNR method
platform/x86/amd/hsmp: Leave the hwmon power sensors off on client
platforms
platform/x86/amd/hsmp: Add SMN read IOCTL support
platform/x86/amd/hsmp: Add MSR read IOCTL support
Documentation/arch/x86/amd_hsmp: Document the SMN and MSR IOCTLs

Documentation/arch/x86/amd_hsmp.rst | 62 +++++-
arch/x86/include/uapi/asm/amd_hsmp.h | 210 ++++++++++++++++++++
drivers/platform/x86/amd/hsmp/acpi.c | 138 +++++++++++--
drivers/platform/x86/amd/hsmp/hsmp.c | 285 ++++++++++++++++++++++++---
drivers/platform/x86/amd/hsmp/hsmp.h | 77 ++++++++
drivers/platform/x86/amd/hsmp/plat.c | 61 +++---
6 files changed, 774 insertions(+), 59 deletions(-)


base-commit: 775f2078b38ff2121410a35302497a1e81b8e459
--
2.34.1