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