Documentation/driver-api/pldmfw/file-format.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API

PLDM Firmware File Format Overview

PLDM package header, device records, component info, CRC와 image layout의 전문 번역입니다.

Source pathDocumentation/driver-api/pldmfw/file-format.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

file-format.rst:1-203

PLDM firmware package는 UUID와 version을 담은 package header, device별 record와 applicable component bitmap, image 위치·크기를 지정하는 component info, 4-byte header CRC, 실제 component image binary로 구성됩니다.

문서 구성
원문 줄내용
1-73전체 file과 package header layout
74-135device record와 descriptor TLV
136-190component info와 image 위치
191-203header CRC와 component images

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0-only
2
3 ==================================
4 PLDM Firmware file format overview
5 ==================================
6
7 A PLDM firmware package is a binary file which contains a header that
8 describes the contents of the firmware package. This includes an initial
9 package header, one or more firmware records, and one or more components
10 describing the actual flash contents to program.
11
12 This diagram provides an overview of the file format::
13
14 overall file layout
15 +----------------------+
16 | |
17 | Package Header |
18 | |
19 +----------------------+
20 | |
21 | Device Records |
22 | |
23 +----------------------+
24 | |
25 | Component Info |
26 | |
27 +----------------------+
28 | |
29 | Package Header CRC |
30 | |
31 +----------------------+
32 | |
33 | Component Image 1 |
34 | |
35 +----------------------+
36 | |
37 | Component Image 2 |
38 | |
39 +----------------------+
40 | |
41 | ... |
42 | |
43 +----------------------+
44 | |
45 | Component Image N |
46 | |
47 +----------------------+
48
49 Package Header
50 ==============
51
52 The package header begins with the UUID of the PLDM file format, and
53 contains information about the version of the format that the file uses. It
54 also includes the total header size, a release date, the size of the
55 component bitmap, and an overall package version.
56
57 The following diagram provides an overview of the package header::
58
59 header layout
60 +-------------------------+
61 | PLDM UUID |
62 +-------------------------+
63 | Format Revision |
64 +-------------------------+
65 | Header Size |
66 +-------------------------+
67 | Release Date |
68 +-------------------------+
69 | Component Bitmap Length |
70 +-------------------------+
71 | Package Version Info |
72 +-------------------------+
73
74 Device Records
75 ==============
76
77 The device firmware records area starts with a count indicating the total
78 number of records in the file, followed by each record. A single device
79 record describes what device matches this record. All valid PLDM firmware
80 files must contain at least one record, but optionally may contain more than
81 one record if they support multiple devices.
82
83 Each record will identify the device it supports via TLVs that describe the
84 device, such as the PCI device and vendor information. It will also indicate
85 which set of components that are used by this device. It is possible that
86 only subset of provided components will be used by a given record. A record
87 may also optionally contain device-specific package data that will be used
88 by the device firmware during the update process.
89
90 The following diagram provides an overview of the device record area::
91
92 area layout
93 +---------------+
94 | |
95 | Record Count |
96 | |
97 +---------------+
98 | |
99 | Record 1 |
100 | |
101 +---------------+
102 | |
103 | Record 2 |
104 | |
105 +---------------+
106 | |
107 | ... |
108 | |
109 +---------------+
110 | |
111 | Record N |
112 | |
113 +---------------+
114
115 record layout
116 +-----------------------+
117 | Record Length |
118 +-----------------------+
119 | Descriptor Count |
120 +-----------------------+
121 | Option Flags |
122 +-----------------------+
123 | Version Settings |
124 +-----------------------+
125 | Package Data Length |
126 +-----------------------+
127 | Applicable Components |
128 +-----------------------+
129 | Version String |
130 +-----------------------+
131 | Descriptor TLVs |
132 +-----------------------+
133 | Package Data |
134 +-----------------------+
135
136 Component Info
137 ==============
138
139 The component information area begins with a count of the number of
140 components. Following this count is a description for each component. The
141 component information points to the location in the file where the component
142 data is stored, and includes version data used to identify the version of
143 the component.
144
145 The following diagram provides an overview of the component area::
146
147 area layout
148 +-----------------+
149 | |
150 | Component Count |
151 | |
152 +-----------------+
153 | |
154 | Component 1 |
155 | |
156 +-----------------+
157 | |
158 | Component 2 |
159 | |
160 +-----------------+
161 | |
162 | ... |
163 | |
164 +-----------------+
165 | |
166 | Component N |
167 | |
168 +-----------------+
169
170 component layout
171 +------------------------+
172 | Classification |
173 +------------------------+
174 | Component Identifier |
175 +------------------------+
176 | Comparison Stamp |
177 +------------------------+
178 | Component Options |
179 +------------------------+
180 | Activation Method |
181 +------------------------+
182 | Location Offset |
183 +------------------------+
184 | Component Size |
185 +------------------------+
186 | Component Version Info |
187 +------------------------+
188 | Package Data |
189 +------------------------+
190
191
192 Package Header CRC
193 ==================
194
195 Following the component information is a short 4-byte CRC calculated over
196 the contents of all of the header information.
197
198 Component Images
199 ================
200
201 The component images follow the package header information in the PLDM
202 firmware file. Each of these is simply a binary chunk with its start and
203 size defined by the matching component structure in the component info area.
204

3. 한국어 전문 번역

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

PLDM firmware package 전체 layout

1-48

PLDM firmware package는 package 내용을 설명하는 header와 실제 flash contents를 담은 binary file입니다. header 영역은 initial package header, 하나 이상의 device firmware record, 하나 이상의 component description, package header CRC로 구성됩니다.

header 뒤에는 component image 1부터 N까지가 이어집니다. 각 image의 시작 위치와 크기는 앞선 component info 구조가 지정하므로 parser는 단순히 순서만 가정하지 않고 offset과 size를 검증해야 합니다.

PLDM firmware file layout
Package HeaderDevice RecordsComponent InfoPackage Header CRCComponent Image 1Component Image 2...Component Image N

metadata header와 CRC 다음에 component image binary들이 배치됩니다.

.. SPDX-License-Identifier: GPL-2.0-only

==================================
PLDM Firmware file format overview
==================================

A PLDM firmware package is a binary file which contains a header that
describes the contents of the firmware package. This includes an initial
package header, one or more firmware records, and one or more components
describing the actual flash contents to program.

This diagram provides an overview of the file format::

        overall file layout
      +----------------------+
      |                      |
      |  Package Header      |
      |                      |
      +----------------------+
      |                      |
      |  Device Records      |
      |                      |
      +----------------------+
      |                      |
      |  Component Info      |
      |                      |
      +----------------------+
      |                      |
      |  Package Header CRC  |
      |                      |
      +----------------------+
      |                      |
      |  Component Image 1   |
      |                      |
      +----------------------+
      |                      |
      |  Component Image 2   |
      |                      |
      +----------------------+
      |                      |
      |         ...          |
      |                      |
      +----------------------+
      |                      |
      |  Component Image N   |
      |                      |
      +----------------------+

package header 필드

49-73

package header는 PLDM file format을 식별하는 UUID로 시작합니다. 이어서 file이 사용하는 format revision, 전체 header size, release date, component bitmap의 크기, package 전체 version 정보가 들어갑니다.

component bitmap length는 뒤의 device record가 어떤 component를 적용 대상으로 표시하는지 해석하는 기준이 됩니다. package version info는 package 수준의 version string과 그 encoding 정보를 포함합니다.

package header layout
순서필드의미
1PLDM UUIDfile format 식별
2Format Revision사용한 PLDM format version
3Header Sizemetadata header 전체 크기
4Release Datepackage release timestamp
5Component Bitmap Lengthapplicable component bitmap 폭
6Package Version Infopackage version 정보

Package Header
==============

The package header begins with the UUID of the PLDM file format, and
contains information about the version of the format that the file uses. It
also includes the total header size, a release date, the size of the
component bitmap, and an overall package version.

The following diagram provides an overview of the package header::

             header layout
      +-------------------------+
      | PLDM UUID               |
      +-------------------------+
      | Format Revision         |
      +-------------------------+
      | Header Size             |
      +-------------------------+
      | Release Date            |
      +-------------------------+
      | Component Bitmap Length |
      +-------------------------+
      | Package Version Info    |
      +-------------------------+

device firmware record 영역

74-135

device firmware records 영역은 file 안의 전체 record 수로 시작하고 각 record가 차례로 이어집니다. 유효한 PLDM firmware file에는 최소 한 record가 있어야 하며, 여러 device를 지원하는 package는 record를 둘 이상 포함할 수 있습니다.

각 record는 device를 설명하는 TLV descriptor로 자신이 지원하는 device를 식별합니다. 예를 들어 PCI vendor와 device 정보가 descriptor가 될 수 있습니다. record는 이 device에 적용되는 component bitmap도 제공하며, package가 가진 component 중 일부만 선택할 수 있습니다. update 중 firmware가 사용할 device-specific package data를 선택적으로 포함할 수도 있습니다.

개별 record에는 record length, descriptor count, option flags, version settings, package data length, applicable components, version string, descriptor TLVs, package data가 순서대로 들어갑니다. variable-length 필드가 있으므로 parser는 각 length와 전체 record 경계를 함께 확인해야 합니다.

device record 영역과 record layout
계층필드역할
영역Record Count뒤따르는 record 수
recordRecord Length / Descriptor Countrecord 경계와 TLV 수
recordOption Flags / Version Settings선택 기능과 version 표현
recordPackage Data Lengthoptional data 크기
recordApplicable Components이 device가 사용하는 component bitmap
recordVersion Stringdevice record version
recordDescriptor TLVsdevice 일치 판정 정보
recordPackage Datadevice-specific update data

Device Records
==============

The device firmware records area starts with a count indicating the total
number of records in the file, followed by each record. A single device
record describes what device matches this record. All valid PLDM firmware
files must contain at least one record, but optionally may contain more than
one record if they support multiple devices.

Each record will identify the device it supports via TLVs that describe the
device, such as the PCI device and vendor information. It will also indicate
which set of components that are used by this device. It is possible that
only subset of provided components will be used by a given record. A record
may also optionally contain device-specific package data that will be used
by the device firmware during the update process.

The following diagram provides an overview of the device record area::

         area layout
      +---------------+
      |               |
      |  Record Count |
      |               |
      +---------------+
      |               |
      |  Record 1     |
      |               |
      +---------------+
      |               |
      |  Record 2     |
      |               |
      +---------------+
      |               |
      |      ...      |
      |               |
      +---------------+
      |               |
      |  Record N     |
      |               |
      +---------------+

           record layout
      +-----------------------+
      | Record Length         |
      +-----------------------+
      | Descriptor Count      |
      +-----------------------+
      | Option Flags          |
      +-----------------------+
      | Version Settings      |
      +-----------------------+
      | Package Data Length   |
      +-----------------------+
      | Applicable Components |
      +-----------------------+
      | Version String        |
      +-----------------------+
      | Descriptor TLVs       |
      +-----------------------+
      | Package Data          |
      +-----------------------+

component information 영역

136-190

component information 영역은 component count로 시작하고 각 component description이 이어집니다. description은 실제 component data가 file 어디에 저장되는지 가리키며, component version을 식별하는 정보도 포함합니다.

각 component 구조에는 classification, component identifier, comparison stamp, component options, activation method, location offset, component size, component version info, package data가 들어갑니다. `Location Offset`과 `Component Size`가 뒤의 binary image 범위를 정의합니다.

record의 applicable component bitmap은 이 component 목록의 항목을 선택합니다. 따라서 하나의 package가 여러 device용 component를 담더라도 matching record에 지정된 subset만 table 협상과 flashing의 대상이 됩니다.

component layout
필드의미
Classificationcomponent 종류 분류
Component Identifiercomponent 식별자
Comparison Stampversion 비교용 stamp
Component Optionsupdate option flags
Activation Methodprogramming 후 activation 방식
Location Offsetfile 안의 image 시작 위치
Component Sizeimage byte 크기
Component Version Infocomponent version 표현
Package Datacomponent 관련 추가 data

Component Info
==============

The component information area begins with a count of the number of
components. Following this count is a description for each component. The
component information points to the location in the file where the component
data is stored, and includes version data used to identify the version of
the component.

The following diagram provides an overview of the component area::

         area layout
      +-----------------+
      |                 |
      | Component Count |
      |                 |
      +-----------------+
      |                 |
      | Component 1     |
      |                 |
      +-----------------+
      |                 |
      | Component 2     |
      |                 |
      +-----------------+
      |                 |
      |     ...         |
      |                 |
      +-----------------+
      |                 |
      | Component N     |
      |                 |
      +-----------------+

           component layout
      +------------------------+
      | Classification         |
      +------------------------+
      | Component Identifier   |
      +------------------------+
      | Comparison Stamp       |
      +------------------------+
      | Component Options      |
      +------------------------+
      | Activation Method      |
      +------------------------+
      | Location Offset        |
      +------------------------+
      | Component Size         |
      +------------------------+
      | Component Version Info |
      +------------------------+
      | Package Data           |
      +------------------------+

header CRC와 component images

191-203

component information 다음에는 4-byte Package Header CRC가 놓입니다. CRC는 package header에 속한 모든 정보의 contents를 대상으로 계산되며, parser는 component image를 사용하기 전에 이 값을 검증할 수 있습니다.

component images는 header 정보 뒤에 놓이는 단순 binary chunk입니다. 각 chunk의 시작과 크기는 component info 영역에서 일치하는 component 구조의 `Location Offset`과 `Component Size`가 정의합니다.

CRC 경계와 image 참조
Package + records + component info4-byte Package Header CRCComponent images
Component `Location Offset` + `Component Size`Matching binary chunk

CRC는 metadata header를 보호하고 component 구조가 뒤쪽 binary chunk를 가리킵니다.


Package Header CRC
==================

Following the component information is a short 4-byte CRC calculated over
the contents of all of the header information.

Component Images
================

The component images follow the package header information in the PLDM
firmware file. Each of these is simply a binary chunk with its start and
size defined by the matching component structure in the component info area.