summaryrefslogtreecommitdiff
path: root/scripts/const_structs.checkpatch
diff options
context:
space:
mode:
authorMuralidhara M K <muralidhara.mk@amd.com>2026-10-12 14:24:05 +0530
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-10-16 14:27:07 +0300
commit7aa141d1fa13e79b970cb91712fac9bb667d935a (patch)
tree38aed1672b3096745bde748dff9cb60a2cabead4 /scripts/const_structs.checkpatch
parentaf51cf46d4d3015543a65b77605566c5f37258c6 (diff)
platform/x86/amd/hsmp: Add HSMP client support for Family 1Ah
Add HSMP client support for the Family 1Ah client platforms, Models 80h-8Fh and E0h-E3h, recognized by the previous commit via is_client_platform(). These parts speak the Ryzen Master SMC (RMSMC) message set instead of the server HSMP messages, and probe via ACPI _CRS/_DSD like a server socket. Add the client message set to the UAPI header. Introduce struct hsmp_plat_desc to select the test message and protocol-version message at runtime, based on is_client_platform() rather than a fixed set of family/model ranges. The client set has no per-message descriptor table. validate_message() and hsmp_ioctl_msg() therefore skip msg_id range validation and the /dev/hsmp GET/SET fd-mode gate for client messages, leaving msg_id validity to firmware's response status; validate_message() still bounds client num_args and response_sz to HSMP_CLIENT_MAX_MSG_LEN. Server platforms keep every check, and get_msg_desc() now also enforces a lower msg_id bound there. get_msg_desc() sanitizes msg_id with array_index_nospec() against its own num_msgs bound before indexing the descriptor table, rather than depending on a caller-side clamp. Add hsmp_msg_response_sz(), returning the descriptor table entry on server and the client protocol max otherwise, used by hsmp_cache_proto_ver() since firmware returns only args[0] for client. validate_message() and hsmp_ioctl_msg() distinguish the two sets via the already-resolved hsmp_plat_desc/hsmp_msg_desc pointers, not a second is_client_platform() call. The /dev/hsmp 0600 restriction and every sysfs/hwmon attribute hidden on client platforms stay from the previous commit: hsmp_ioctl_msg() still has no GET/SET gate for client messages, so an unprivileged opener could otherwise issue destructive SET messages, and the hidden attributes still resolve against unrelated client commands. Lifting either restriction is deferred to the commits that make the corresponding client functionality safe to expose. Document the client models in amd_hsmp.rst. Signed-off-by: Muralidhara M K <muralidhara.mk@amd.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Link: https://patch.msgid.link/20261012085407.1202295-3-muralidhara.mk@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions