Skip to content

Commit 4032570

Browse files
emuslnjgunthorpe
authored andcommitted
pds_fwctl: add Documentation entries
Add pds_fwctl to the driver and fwctl documentation pages. Link: https://patch.msgid.link/r/[email protected] Reviewed-by: Leon Romanovsky <[email protected]> Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 92c66ee commit 4032570

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

Documentation/userspace-api/fwctl/fwctl.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ fwctl User API
150150

151151
.. kernel-doc:: include/uapi/fwctl/fwctl.h
152152
.. kernel-doc:: include/uapi/fwctl/mlx5.h
153+
.. kernel-doc:: include/uapi/fwctl/pds.h
153154

154155
sysfs Class
155156
-----------

Documentation/userspace-api/fwctl/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ to securely construct and execute RPCs inside device firmware.
1111

1212
fwctl
1313
fwctl-cxl
14+
pds_fwctl
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
================
4+
fwctl pds driver
5+
================
6+
7+
:Author: Shannon Nelson
8+
9+
Overview
10+
========
11+
12+
The PDS Core device makes a fwctl service available through an
13+
auxiliary_device named pds_core.fwctl.N. The pds_fwctl driver binds to
14+
this device and registers itself with the fwctl subsystem. The resulting
15+
userspace interface is used by an application that is a part of the
16+
AMD Pensando software package for the Distributed Service Card (DSC).
17+
18+
The pds_fwctl driver has little knowledge of the firmware's internals.
19+
It only knows how to send commands through pds_core's message queue to the
20+
firmware for fwctl requests. The set of fwctl operations available
21+
depends on the firmware in the DSC, and the userspace application
22+
version must match the firmware so that they can talk to each other.
23+
24+
When a connection is created the pds_fwctl driver requests from the
25+
firmware a list of firmware object endpoints, and for each endpoint the
26+
driver requests a list of operations for that endpoint.
27+
28+
Each operation description includes a firmware defined command attribute
29+
that maps to the FWCTL scope levels. The driver translates those firmware
30+
values into the FWCTL scope values which can then be used for filtering the
31+
scoped user requests.
32+
33+
pds_fwctl User API
34+
==================
35+
36+
Each RPC request includes the target endpoint and the operation id, and in
37+
and out buffer lengths and pointers. The driver verifies the existence
38+
of the requested endpoint and operations, then checks the request scope
39+
against the required scope of the operation. The request is then put
40+
together with the request data and sent through pds_core's message queue
41+
to the firmware, and the results are returned to the caller.
42+
43+
The RPC endpoints, operations, and buffer contents are defined by the
44+
particular firmware package in the device, which varies across the
45+
available product configurations. The details are available in the
46+
specific product SDK documentation.

0 commit comments

Comments
 (0)