요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. 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
==============
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 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 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 |
+------------------------+
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.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
PLDM firmware package 전체 layout
1-48PLDM 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를 검증해야 합니다.
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-73package 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
==============
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-135device 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 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-190component 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 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-203component 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는 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.
요약과 해설
file-format.rst:1-203PLDM firmware package는 UUID와 version을 담은 package header, device별 record와 applicable component bitmap, image 위치·크기를 지정하는 component info, 4-byte header CRC, 실제 component image binary로 구성됩니다.