fwctl: FWCTL_RPC to execute a Remote Procedure Call to device firmware
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 28 Feb 2025 00:26:33 +0000 (20:26 -0400)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 6 Mar 2025 19:13:13 +0000 (15:13 -0400)
commit840cfb7cf570b681f5d20e19f7c2675a9d991732
tree1191ab6cccfb508e37c618ae759257a47ea22008
parent8eea4e74475804285507c077bec87d40be87ff06
fwctl: FWCTL_RPC to execute a Remote Procedure Call to device firmware

Add the FWCTL_RPC ioctl which allows a request/response RPC call to device
firmware. Drivers implementing this call must follow the security
guidelines under Documentation/userspace-api/fwctl.rst

The core code provides some memory management helpers to get the messages
copied from and back to userspace. The driver is responsible for
allocating the output message memory and delivering the message to the
device.

Link: https://patch.msgid.link/r/5-v5-642aa0c94070+4447f-fwctl_jgg@nvidia.com
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>
Tested-by: Dave Jiang <dave.jiang@intel.com>
Tested-by: Shannon Nelson <shannon.nelson@amd.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/fwctl/main.c
include/linux/fwctl.h
include/uapi/fwctl/fwctl.h