| commit | d50035f598d40309c20c0c75024fda73a6d6cb62 | [log] [tgz] |
|---|---|---|
| author | Kasun Athukorala <kasunath@google.com> | Fri Sep 05 18:50:26 2025 +0000 |
| committer | Andrew Jeffery <andrew@codeconstruct.com.au> | Tue Sep 30 10:28:40 2025 +0930 |
| tree | 4dbe185928ae680c806263abf90afab3aaa02c2e | |
| parent | 9d320cbc2c63115caabd47229f622756cf7aea19 [diff] |
dsp: base: Fix MultipartReceive Request decoding This fix is based on DSP0240 v1.2.0 section 9.6.6 - Flag usage for MultipartReceive (paragraph 351) and Table 17 MultipartReceive request format. - Removed RequestedSectionOffset check. The Property can be 0 for any TransferOperation flag. - Changed DataTransferHandle check. The property can be 0 except with PLDM_XFER_NEXT_PART. Eg. In DSP0242 v1.0.0 section 9.8.2, Table 19, and DSP0240 v1.2.0 section 9.6.5, Table 17, when using MultipartReceive to read a file, the client has to send transfer handle 0 with XFER_FIRST_PART. Change-Id: I06428556f9dee341de97f72b015ed0347adc9454 Fixes: 9c76679224cf ("libpldm: Migrate to subproject") Signed-off-by: Kasun Athukorala <kasunath@google.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
This is a library which deals with the encoding and decoding of PLDM messages. It should be possible to use this library by projects other than OpenBMC, and hence certain constraints apply to it:
Source files are named according to the PLDM Type, for eg base.[h/c], fru.[h/c], etc.
Given a PLDM command "foo", the library will provide the following API: For the Requester function:
encode_foo_req() - encode a foo request decode_foo_resp() - decode a response to foo
For the Responder function:
decode_foo_req() - decode a foo request encode_foo_resp() - encode a response to foo
The library also provides API to pack and unpack PLDM headers.
libpldm is configured and built using meson. Python's pip or pipx can be used to install a recent version on your machine:
pipx install meson
Once meson is installed:
meson setup build && meson compile -C build
meson test -C build
libpldmComponents of the library ABI[^1] (loosely, functions) are separated into three categories:
[^1]: "library API + compiler ABI = library ABI"
Applications depending on libpldm should aim to only use functions from the stable category. However, this may not always be possible. What to do when required functions fall into the deprecated or testing categories is discussed in CONTRIBUTING.
libpldm is maintained with the expectation that users move between successive releases when upgrading. This constraint allows the library to reintroduce types and functions of the same name in subsequent releases in the knowledge that there are no remaining users of previous definitions. While strategies are employed to avoid breaking existing APIs unnecessarily, the library is still to reach maturity, and we must allow for improvements to be made in the design.