€•(6Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ+/translations/zh_CN/driver-api/pldmfw/index”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/zh_TW/driver-api/pldmfw/index”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/it_IT/driver-api/pldmfw/index”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/ja_JP/driver-api/pldmfw/index”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/ko_KR/driver-api/pldmfw/index”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/sp_SP/driver-api/pldmfw/index”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ%SPDX-License-Identifier: GPL-2.0-only”h]”hŒ%SPDX-License-Identifier: GPL-2.0-only”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒE/var/lib/git/docbuild/linux/Documentation/driver-api/pldmfw/index.rst”h KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ"PLDM Firmware Flash Update Library”h]”hŒ"PLDM Firmware Flash Update Library”…””}”(hh»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hh¶hžhhŸh³h KubhŒ paragraph”“”)”}”(hŒÀ``pldmfw`` implements functionality for updating the flash on a device using the PLDM for Firmware Update standard .”h]”(hŒliteral”“”)”}”(hŒ ``pldmfw``”h]”hŒpldmfw”…””}”(hhÑhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhhËubhŒj implements functionality for updating the flash on a device using the PLDM for Firmware Update standard <”…””}”(hhËhžhhŸNh NubhŒ reference”“”)”}”(hŒJhttps://www.dmtf.org/documents/pmci/pldm-firmware-update-specification-100”h]”hŒJhttps://www.dmtf.org/documents/pmci/pldm-firmware-update-specification-100”…””}”(hhåhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”hçuh1hãhhËubhŒ>.”…””}”(hhËhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khh¶hžhubhŒcompound”“”)”}”(hhh]”hŒtoctree”“”)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”hŒdriver-api/pldmfw/index”Œentries”]”(NŒdriver-api/pldmfw/file-format”†”NŒdriver-api/pldmfw/driver-ops”†”eŒ includefiles”]”(jjeŒmaxdepth”KŒcaption”NŒglob”‰Œhidden”‰Œ includehidden”‰Œnumbered”KŒ titlesonly”‰Œ rawentries”]”uh1jhŸh³h K hjubah}”(h]”h ]”Œtoctree-wrapper”ah"]”h$]”h&]”uh1hþhh¶hžhhŸh³h Nubeh}”(h]”Œ"pldm-firmware-flash-update-library”ah ]”h"]”Œ"pldm firmware flash update library”ah$]”h&]”uh1h´hhhžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒ"Overview of the ``pldmfw`` library”h]”(hŒOverview of the ”…””}”(hj2hžhhŸNh NubhÐ)”}”(hŒ ``pldmfw``”h]”hŒpldmfw”…””}”(hj:hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhj2ubhŒ library”…””}”(hj2hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj/hžhhŸh³h KubhÊ)”}”(hŒ¥The ``pldmfw`` library is intended to be used by device drivers for implementing device flash update based on firmware files following the PLDM firmware file format.”h]”(hŒThe ”…””}”(hjRhžhhŸNh NubhÐ)”}”(hŒ ``pldmfw``”h]”hŒpldmfw”…””}”(hjZhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhjRubhŒ— library is intended to be used by device drivers for implementing device flash update based on firmware files following the PLDM firmware file format.”…””}”(hjRhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khj/hžhubhÊ)”}”(hŒxIt is implemented using an ops table that allows device drivers to provide the underlying device specific functionality.”h]”hŒxIt is implemented using an ops table that allows device drivers to provide the underlying device specific functionality.”…””}”(hjrhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khj/hžhubhÊ)”}”(hXÛ``pldmfw`` implements logic to parse the packed binary format of the PLDM firmware file into data structures, and then uses the provided function operations to determine if the firmware file is a match for the device. If so, it sends the record and component data to the firmware using the device specific implementations provided by device drivers. Once the device firmware indicates that the update may be performed, the firmware data is sent to the device for programming.”h]”(hÐ)”}”(hŒ ``pldmfw``”h]”hŒpldmfw”…””}”(hj„hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhj€ubhXÑ implements logic to parse the packed binary format of the PLDM firmware file into data structures, and then uses the provided function operations to determine if the firmware file is a match for the device. If so, it sends the record and component data to the firmware using the device specific implementations provided by device drivers. Once the device firmware indicates that the update may be performed, the firmware data is sent to the device for programming.”…””}”(hj€hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khj/hžhubhµ)”}”(hhh]”(hº)”}”(hŒParsing the PLDM file”h]”hŒParsing the PLDM file”…””}”(hjŸhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjœhžhhŸh³h K%ubhÊ)”}”(hX=The PLDM file format uses packed binary data, with most multi-byte fields stored in the Little Endian format. Several pieces of data are variable length, including version strings and the number of records and components. Due to this, it is not straight forward to index the record, record descriptors, or components.”h]”hX=The PLDM file format uses packed binary data, with most multi-byte fields stored in the Little Endian format. Several pieces of data are variable length, including version strings and the number of records and components. Due to this, it is not straight forward to index the record, record descriptors, or components.”…””}”(hj­hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K'hjœhžhubhÊ)”}”(hŒ™To avoid proliferating access to the packed binary data, the ``pldmfw`` library parses and extracts this data into simpler structures for ease of access.”h]”(hŒ=To avoid proliferating access to the packed binary data, the ”…””}”(hj»hžhhŸNh NubhÐ)”}”(hŒ ``pldmfw``”h]”hŒpldmfw”…””}”(hjÃhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhj»ubhŒR library parses and extracts this data into simpler structures for ease of access.”…””}”(hj»hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K-hjœhžhubhÊ)”}”(hŒüIn order to safely process the firmware file, care is taken to avoid unaligned access of multi-byte fields, and to properly convert from Little Endian to CPU host format. Additionally the records, descriptors, and components are stored in linked lists.”h]”hŒüIn order to safely process the firmware file, care is taken to avoid unaligned access of multi-byte fields, and to properly convert from Little Endian to CPU host format. Additionally the records, descriptors, and components are stored in linked lists.”…””}”(hjÛhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K1hjœhžhubeh}”(h]”Œparsing-the-pldm-file”ah ]”h"]”Œparsing the pldm file”ah$]”h&]”uh1h´hj/hžhhŸh³h K%ubhµ)”}”(hhh]”(hº)”}”(hŒPerforming a flash update”h]”hŒPerforming a flash update”…””}”(hjôhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjñhžhhŸh³h K7ubhÊ)”}”(hŒMTo perform a flash update, the ``pldmfw`` module performs the following steps”h]”(hŒTo perform a flash update, the ”…””}”(hjhžhhŸNh NubhÐ)”}”(hŒ ``pldmfw``”h]”hŒpldmfw”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhjubhŒ$ module performs the following steps”…””}”(hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K9hjñhžhubhŒenumerated_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ