-
Notifications
You must be signed in to change notification settings - Fork 2
pldmtool: Support for Seamless Firmware Servicing #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: integ_sp7
Are you sure you want to change the base?
Conversation
|
Test pldmtool commands with the changes. |
|
Few of the considerations: Since MCTP layer extracts its header in a response and only sends the payload to the upper layer (e.g. libpldm), there is no IC bit and Message Type information in the payload. I think the SFS protocol probably needs to retain that information as part of its protocol (e.g. a byte). Since the IC bit information is missing, parsing code for SFS response has to either a) disregard checksum and verification of the checksum or b) explicitly expect a checksum in a response and validate the checksum. Currently b) is coded. Since the Message Type information is not available, the parsing code needs to decide whether the response is for either I think existing pldmtool mctpRaw testcases need to be exercised to make sure there is no regression with this change. |
80f97ac to
e09e62b
Compare
a017b64 to
022450c
Compare
mahkurap
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple of comments. please check.
022450c to
85d4717
Compare
| std::vector<std::unique_ptr<CommandInterface>> commands; | ||
| } | ||
|
|
||
| /* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File Scope:
- Please follow commit message 50(subject(/72(body) Rule,
- Please make sure rin clang-format tool.
- Upstream-status: Inappropriate - Not required here . Is used for patches only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for clang-format tool, where I ran into errors, completed this.
pldmtool/pldmtool.cpp
Outdated
| */ | ||
|
|
||
| inline constexpr unsigned int DEVHDRSIZE = 7; | ||
| inline constexpr unsigned int FSFIELD = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are using c++23, inline for constants is generally not required because:
constexpr variables at namespace scope have internal linkage by default (since C++17), so they don’t cause multiple definition issues across translation units.
85d4717 to
d24badd
Compare
|
@ojayanth, I have addressed most of the comments except: Also, function pldm_edac_crc32() does not accept Use std::span as input, its definition is different. Had a compilation error... | ../../../../../../workspace/sources/pldm/pldmtool/pldmtool.cpp:214:93: error: cannot convert 'std::span' to 'const void*' | 214 | uint32_t csField = to_big_endian(static_cast<uint32_t>(pldm_edac_crc32(std::span(fData)))); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | std::span |
|
root@congo-0057:/tmp# pldmtool mctpraw --help Options: Example: pldmtool mctpRaw -m 21 -e 1 |
|
Verified with the new code, when the same command is issued: metadata (e.g. AMD IANA number and file size in Big Endian format) and checksum (also in Big Endian format) e.g. Some initial bytes with the current vesion and this with the prior version |
57fdeb2 to
2b742e6
Compare
Enhance the `mctpRaw` subcommand with options to read request data from a file (`--file-in`), write response data to a file (`--file-out`), and append or validate checksum (`--checksum`). These additions improve usability for large payloads and ensure data integrity during raw MCTP transactions. Contents of the file specified in option --file-in are appended to the contents of the option --data. Signed-off-by: Shirish Pargaonkar <Shirish.Pargaonkar@amd.com>
2b742e6 to
03b51fb
Compare
Adding support for Seamless Firmware Servicing (SFS) protocol. Implement code to support Get Firmware Version and Update Firmware using mctpRaw option of pldmtool.