From: Muralidhara M K <muralidhara.mk@amd.com>
To: <ilpo.jarvinen@linux.intel.com>
Cc: <platform-driver-x86@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <muthusamy.ramalingam@amd.com>,
Muralidhara M K <muralidhara.mk@amd.com>
Subject: [PATCH 0/7] platform/x86/amd/hsmp: Family 1Ah client support
Date: Wed, 29 Jul 2026 22:10:27 +0530 [thread overview]
Message-ID: <20260729164034.1331375-1-muralidhara.mk@amd.com> (raw)
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
next reply other threads:[~2026-07-29 16:41 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 16:40 Muralidhara M K [this message]
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-10-11 10:04 ` Shyam Sundar S K
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260729164034.1331375-1-muralidhara.mk@amd.com \
--to=muralidhara.mk@amd.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=muthusamy.ramalingam@amd.com \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®