← Documents Documentation/userspace-api/fwctl/pds_fwctl.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API

fwctl PDS driver

PDS Core auxiliary device가 DSC firmware endpoint와 operation을 발견하고 scoped RPC를 실행하는 방법을 설명합니다.

Source pathDocumentation/userspace-api/fwctl/pds_fwctl.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

pds_fwctl.rst:1-46

PDS Core auxiliary device가 DSC firmware endpoint와 operation을 발견하고 scoped RPC를 실행하는 방법을 설명합니다.

원문의 RPC scope, capability, taint, ABI symbol, sysfs path, code와 줄 좌표를 보존해 전문을 번역했습니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
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.
47

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

PDS Core와 firmware operation discovery

1-32

PDS Core device는 `pds_core.fwctl.N`이라는 `auxiliary_device`를 통해 fwctl service를 제공합니다. `pds_fwctl` driver가 이 device에 bind하고 fwctl subsystem에 자신을 register합니다.

생성된 userspace interface는 Distributed Service Card(DSC)용 AMD Pensando software package의 application이 사용합니다.

`pds_fwctl` driver는 firmware internal을 거의 알지 못하며, fwctl request를 PDS Core message queue로 firmware에 보내는 방법만 압니다. 사용할 수 있는 fwctl operation은 DSC firmware에 따라 달라지고 userspace application version은 통신할 firmware와 맞아야 합니다.

Connection을 만들면 driver는 firmware object endpoint list를 요청하고 각 endpoint에서 operation list를 다시 요청합니다.

각 operation description에는 FWCTL scope level에 mapping되는 firmware-defined command attribute가 있습니다. Driver는 이 firmware value를 FWCTL scope value로 변환하고 scoped userspace request filtering에 사용합니다.

PDS operation discovery
pds_core.fwctl.N auxiliary device 생성pds_fwctl bind와 subsystem 등록Firmware endpoint list 요청Endpoint별 operation list 요청Command attribute를 FWCTL scope로 변환

Connection 시 firmware capability를 계층적으로 열거합니다.

.. SPDX-License-Identifier: GPL-2.0

================
fwctl pds driver
================

:Author: Shannon Nelson

Overview
========

The PDS Core device makes a fwctl service available through an
auxiliary_device named pds_core.fwctl.N.  The pds_fwctl driver binds to
this device and registers itself with the fwctl subsystem.  The resulting
userspace interface is used by an application that is a part of the
AMD Pensando software package for the Distributed Service Card (DSC).

The pds_fwctl driver has little knowledge of the firmware's internals.
It only knows how to send commands through pds_core's message queue to the
firmware for fwctl requests.  The set of fwctl operations available
depends on the firmware in the DSC, and the userspace application
version must match the firmware so that they can talk to each other.

When a connection is created the pds_fwctl driver requests from the
firmware a list of firmware object endpoints, and for each endpoint the
driver requests a list of operations for that endpoint.

Each operation description includes a firmware defined command attribute
that maps to the FWCTL scope levels.  The driver translates those firmware
values into the FWCTL scope values which can then be used for filtering the
scoped user requests.

PDS fwctl RPC

33-46

각 RPC request에는 target endpoint, operation id, input/output buffer length와 pointer가 들어갑니다.

Driver는 요청한 endpoint와 operation이 존재하는지 확인하고 request scope를 operation required scope와 비교합니다. 검증이 끝나면 request data와 함께 PDS Core message queue로 firmware에 보내고 결과를 caller에 반환합니다.

RPC endpoint, operation, buffer content는 device의 firmware package가 정의하며 product configuration에 따라 달라집니다. 세부 사항은 해당 product SDK documentation에서 제공합니다.

PDS RPC 실행
Endpoint와 operation id 수신Endpoint/operation 존재 확인Request scope와 required scope 비교PDS Core message queue로 전송Firmware result를 caller에 반환

Discovery된 endpoint와 scope를 바탕으로 request를 검증합니다.

PDS RPC field
항목설명
TargetFirmware object endpoint
OperationEndpoint-specific operation id
InputBuffer length와 pointer
OutputBuffer length와 pointer
Definition sourceProduct-specific SDK documentation

Userspace request의 핵심 요소입니다.

pds_fwctl User API
==================

Each RPC request includes the target endpoint and the operation id, and in
and out buffer lengths and pointers.  The driver verifies the existence
of the requested endpoint and operations, then checks the request scope
against the required scope of the operation.  The request is then put
together with the request data and sent through pds_core's message queue
to the firmware, and the results are returned to the caller.

The RPC endpoints, operations, and buffer contents are defined by the
particular firmware package in the device, which varies across the
available product configurations.  The details are available in the
specific product SDK documentation.