mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/7] platform/x86/amd/hsmp: Family 1Ah client support
@ 2026-07-29 16:40 Muralidhara M K
  2026-07-29 16:40 ` [PATCH 1/7] platform/x86/amd/hsmp: Add HSMP client support for Family 1Ah Muralidhara M K
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Muralidhara M K @ 2026-07-29 16:40 UTC (permalink / raw)
  To: ilpo.jarvinen
  Cc: platform-driver-x86, linux-kernel, muthusamy.ramalingam, Muralidhara M K

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


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2026-07-31 10:29 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-29 16:40 [PATCH 0/7] platform/x86/amd/hsmp: Family 1Ah client support Muralidhara M K
2026-07-29 16:40 ` [PATCH 1/7] platform/x86/amd/hsmp: Add HSMP client support for Family 1Ah Muralidhara M K
2026-07-29 21:27   ` Mario Limonciello
2026-07-30  9:37     ` M K, Muralidhara
2026-07-30 16:43   ` Armin Wolf
2026-07-31  4:27     ` M K, Muralidhara
2026-07-31  7:00     ` Shyam Sundar S K
2026-07-31 10:29       ` Armin Wolf
2026-07-29 16:40 ` [PATCH 2/7] platform/x86/amd/hsmp: Route metric table through the client messages Muralidhara M K
2026-07-29 21:29   ` Mario Limonciello
2026-07-30  9:42     ` M K, Muralidhara
2026-07-29 16:40 ` [PATCH 3/7] platform/x86/amd/hsmp: Add ACPI client support via the SMNR method Muralidhara M K
2026-07-29 21:30   ` Mario Limonciello
2026-07-30  9:44     ` M K, Muralidhara
2026-07-29 16:40 ` [PATCH 4/7] platform/x86/amd/hsmp: Leave the hwmon power sensors off on client platforms Muralidhara M K
2026-07-29 21:35   ` Mario Limonciello
2026-07-30 10:01     ` M K, Muralidhara
2026-07-29 16:40 ` [PATCH 5/7] platform/x86/amd/hsmp: Add SMN read IOCTL support Muralidhara M K
2026-07-29 16:40 ` [PATCH 6/7] platform/x86/amd/hsmp: Add MSR " Muralidhara M K
2026-07-29 16:40 ` [PATCH 7/7] Documentation/arch/x86/amd_hsmp: Document the SMN and MSR IOCTLs Muralidhara M K
2026-07-29 21:41   ` Mario Limonciello
2026-07-30 10:05     ` M K, Muralidhara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®