|
| 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