c727fb40 | 11-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pldm: Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
pldm_bios_table_attr_value_entry_encode_integer() is deprecated in libpldm as it uses assert() to sanitize its parameters. Us
pldm: Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
pldm_bios_table_attr_value_entry_encode_integer() is deprecated in libpldm as it uses assert() to sanitize its parameters. Use pldm_bios_table_attr_value_entry_encode_integer_check() instead, which returns a value indicating success or failure.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ic308d24a83fe3371a7ef074cb1d20092a06a1291
show more ...
|
165749d1 | 10-Jul-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
clang-error: fix clang-diagnostic-inconsistent-missing-override error
This clang-error is generated when a function overrides a member function but is not marked 'override'.
Change-Id: I664941c2dff
clang-error: fix clang-diagnostic-inconsistent-missing-override error
This clang-error is generated when a function overrides a member function but is not marked 'override'.
Change-Id: I664941c2dff5be93dec1571cc974fae2168925f2 Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
show more ...
|
a7dbca53 | 07-Jul-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
clang-error: fix clang-diagnostic-defaulted-function-deleted error
The clang-diagnostic-defaulted-function-deleted error is generated when explicitly defaulted move assignment operator is implicitly
clang-error: fix clang-diagnostic-defaulted-function-deleted error
The clang-diagnostic-defaulted-function-deleted error is generated when explicitly defaulted move assignment operator is implicitly deleted. This commit fixes those errors.
Change-Id: I7a407dd3411b19a73a13b1c1e4805b89fc2ec51a Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
show more ...
|
d15ecf92 | 27-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pldm: Migrate off deprecated libpldm BIOS table entry encoding APIs
libpldm has deprecated the affected APIs. Prefer using their `*_check()` variants as these return an error code rather than preven
pldm: Migrate off deprecated libpldm BIOS table entry encoding APIs
libpldm has deprecated the affected APIs. Prefer using their `*_check()` variants as these return an error code rather than prevent misbehaviour with assert().
1. pldm_bios_table_attr_entry_integer_encode() 2. pldm_bios_table_attr_value_entry_encode_enum() 3. pldm_bios_table_attr_value_entry_encode_string() 4. pldm_bios_table_attr_value_entry_encode_integer()
Tested: Successfully booted a p10bmc host, dumped each of the BIOS tables with pldmtool without issue
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I823b24884e518f8c53fd153b3bc30569595ecd86
show more ...
|
488f19d0 | 13-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pldm: Convert to pldm_bios_table_*_check() APIs
The pldm_bios_table_*_check() APIs wrap around unchecked equivalents that only sanitize their parameters using assert(). The checks included in the pl
pldm: Convert to pldm_bios_table_*_check() APIs
The pldm_bios_table_*_check() APIs wrap around unchecked equivalents that only sanitize their parameters using assert(). The checks included in the pldm_bios_table_*_check() APIs test the same conditions that would trigger the assert()s in the unchecked APIs but instead return an error code on failure.
Use of the unchecked APIs has the potential to blow up the pldmd process, but also requires that libpldm continue to be built with `-UNDEBUG` to avoid undefined behaviour (by aborting the process). This impacts the performance of the library in addition to be a bit of a UX disaster.
The unchecked APIs are deprecated in libpldm as a step improve its safety and code generation:
https://gerrit.openbmc.org/c/openbmc/libpldm/+/64179
Tested: Booted the host on a p10bmc system with the patch applied.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I9677a7fa5ca59d04865963b367f3bb55c8676cfb
show more ...
|
9138c209 | 19-May-2023 |
vkaverap@in.ibm.com <vkaverap@in.ibm.com> |
PLDM : Change the dbus timeout to 5 seconds
Dbus timeout value for every dbus call in PLDM is set to 5 seconds instead of default 25 seconds so that all dbus calls that expect a reply exists after 5
PLDM : Change the dbus timeout to 5 seconds
Dbus timeout value for every dbus call in PLDM is set to 5 seconds instead of default 25 seconds so that all dbus calls that expect a reply exists after 5 seconds if there is no response from the client. While BMC is still waiting for a response on any dbus calls it is possible that host can timeout and return an error. Another reason is that memory address from where BMC would read data sent by host may get deallocated after 20 seconds and it is possible for this to happen even before BMC has read the data. This has lead to DMA issues.
Tested by adding a sleep for 10 seconds inside main function of phospher-host-postd and executed get dbus property on snoopd interface from pldm. PLDM dbus call timed out after 5 seconds.
Change-Id: I1aa1b4ad7fceff2224a3ccc3bcf6abd5705963bc Signed-off-by: Varsha Kaverappa <vkaverap@in.ibm.com>
show more ...
|
2b85d784 | 24-May-2022 |
Dung Cao <dung@os.amperecomputing.com> |
pldmtool: Close socket connection
With pldm commands like getPDR, pldmtool opens new socket for each PDR. In case we have hundred number of PDRs, pldmtool open hundred number of socket connection to
pldmtool: Close socket connection
With pldm commands like getPDR, pldmtool opens new socket for each PDR. In case we have hundred number of PDRs, pldmtool open hundred number of socket connection to server. It causes mctp-demux (role as server) reach limit number of clients can handle.
So pldmtool should close socket connection to server after completely using it.
Signed-off-by: Dung Cao <dung@os.amperecomputing.com> Change-Id: I66fb00cd2d51f131c8901a8964552bcb2fc1de13
show more ...
|
66871b4d | 28-May-2023 |
Thu Nguyen <thu@os.amperecomputing.com> |
pldmtool: Use instanceId from libpldm for raw command
In the pldmtool raw command, instanceId is inputted in raw data. It does not use the retrievedi one from the instanceId database by exec() in p
pldmtool: Use instanceId from libpldm for raw command
In the pldmtool raw command, instanceId is inputted in raw data. It does not use the retrievedi one from the instanceId database by exec() in pldm_cmd_helper. This causes the failure when the response handler frees this provided instanceId because that instanceID is not in libpldm database. To fix that, the inputted instanceId will be ignored and the retrieved instanceId from libpldm will be used.
Tested: 1. No "Invalid instance ID" in the journal log when running "pldmtool raw" commands.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I310f699e2d87ba2fa16b69350fdd7fa69d9598f9
show more ...
|
6da4f91b | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I61b093f75011417cc9c7acf9605200f4fa429bac Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
71689b8b | 27-Apr-2023 |
Potin Lai <potin.lai@quantatw.com> |
pldmtool: fix GetFruRecordTable request fail
1. Use PLDM_GET_FIRSTPART for TransferOperationFlag to fix request failed due to CC code 0x81 (INVALID_TRANSFER_OPERATION_FLAG). 2. Move fruFieldValue
pldmtool: fix GetFruRecordTable request fail
1. Use PLDM_GET_FIRSTPART for TransferOperationFlag to fix request failed due to CC code 0x81 (INVALID_TRANSFER_OPERATION_FLAG). 2. Move fruFieldValuestring() to else part to avoid IANA print issue.
Tested result: ``` [ [ { "FRU Record Set Identifier": 1, "FRU Record Type": "General(1)", "Number of FRU fields": 11, "Encoding Type for FRU fields": "ASCII(1)" },
......
{ "FRU Field Type": "Vendor IANA(15)", "FRU Field Length": 4, "FRU Field Value": "33049" } ] ] ```
Change-Id: I1a711ee05c49e35cb76c104ab9b11b5b1ac97118 Signed-off-by: Potin Lai <potin.lai@quantatw.com>
show more ...
|
00a076d8 | 08-Nov-2022 |
kamal <kamalkumar.patel@ibm.com> |
Adding support for new bootprogress state
Adding new bootprogress state which indicate system firmware or BIOS is starting the operating system at the point of time.
This new bootprogress state is
Adding support for new bootprogress state
Adding new bootprogress state which indicate system firmware or BIOS is starting the operating system at the point of time.
This new bootprogress state is taken from PLDM stateset(DSP0249) design spec and stateset id is 196.
Change-Id: Idc257fe9aeab4d7282c771be33f23d988ba54c69 Signed-off-by: Kamalkumar Patel <kamalkumar.patel@ibm.com>
show more ...
|
526461a0 | 11-Jan-2023 |
Chinmay Shripad Hegde <hosmanechinmay@gmail.com> |
fwupdate: pldmtool - add QueryDeviceIdentifiers
QueryDeviceIdentifiers is used to determine if the firmware update package is applicable for updating a specific FD by comparing device identifier rec
fwupdate: pldmtool - add QueryDeviceIdentifiers
QueryDeviceIdentifiers is used to determine if the firmware update package is applicable for updating a specific FD by comparing device identifier records in the package header to those obtained from the FD.This patch adds support for QueryDeviceIdentifiers in pldmtool.
Command Usage:
``` pldmtool fw_update QueryDeviceIdentifiers -m <EID>
pldmtool fw_update QueryDeviceIdentifiers -m 0 { "EID": 0, "Descriptors": [ { "Type": "IANA Enterprise ID", "Value": [ "58270000" ] }, { "Type": "UUID", "Value": [ "273034c83ec4511695f548701e48d764" ] }, { "Type": "Vendor Defined", "Value": [ { "TESTID1": "30" }, { "TESTID2": "40" } ] } ] }
```
Unit Tests: 1. Verify QueryDeviceIdentifiers response with single descriptors 2. Verify QueryDeviceIdentifiers response with multiple descriptors of same type 3. Compare query device identifiers with raw response from FD
Signed-off-by: Chinmay Shripad Hegde <hosmanechinmay@gmail.com> Change-Id: I28b7a368138803dd4407edd06667d8be8b801a2c
show more ...
|
c453e164 | 21-Dec-2022 |
George Liu <liuxiwei@inspur.com> |
libpldm: Correct reference to libpldm header files
When relying on header files from external libraries, #include<> should be used instead of #include "" to avoid ambiguity.
Tested: Built pldm succ
libpldm: Correct reference to libpldm header files
When relying on header files from external libraries, #include<> should be used instead of #include "" to avoid ambiguity.
Tested: Built pldm successfully after enabling ibm-oem
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ia1997de7e0f61564055bbd837f4e24c8f14e55a5
show more ...
|
3618064e | 08-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
Change-Id: I0d25f27a5e449578967915d9f570cc29246927d7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
27a022ca | 10-Aug-2022 |
Andrew Jeffery <andrew@aj.id.au> |
libpldm: Migrate to subproject
Organize files in libpldm to make it a subproject
In the current state, libpldm is not readily consumable as a subproject.This commit does all the necessary re-organi
libpldm: Migrate to subproject
Organize files in libpldm to make it a subproject
In the current state, libpldm is not readily consumable as a subproject.This commit does all the necessary re-organisation of the source code to make it work as a subproject.
There are no .c/.h files changes in this commit, only meson changes and re-organising the code structure.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I20a71c0c972b1fd81fb359d604433618799102c6
show more ...
|
fc0ce97a | 24-Jun-2022 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix typos/incorrect naming in public API's
This commit attempts to fix the pointed typo's & incorrect naming in the public API's exposed by libpldm.
Resolves https://github.com/openbmc/pldm/issues/
Fix typos/incorrect naming in public API's
This commit attempts to fix the pointed typo's & incorrect naming in the public API's exposed by libpldm.
Resolves https://github.com/openbmc/pldm/issues/30
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I5ddab36222ee2a19980fdc507d7c508f3fd18eff
show more ...
|
ca1998f3 | 06-Jun-2022 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
update clang-format
This commit would update the repo's clang-format file to the latest of docs/style/cpp/clang-format file.
Following is the new change that is added: Brad : clang-format: cpp: r
update clang-format
This commit would update the repo's clang-format file to the latest of docs/style/cpp/clang-format file.
Following is the new change that is added: Brad : clang-format: cpp: remove empty lines
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: Ieaadd8a1cd779c9c12adf6d065cc1f9e9a8fa37b
show more ...
|
6f2a2489 | 27-Oct-2021 |
Tom Joseph <rushtotom@gmail.com> |
pldmtool: Add GetFirmwareParameters firmware update command
Tested:
pldmtool fw_update GetFwParams -m <eid> { "CapabilitiesDuringUpdate": { "Component Update Failure Recovery Capability
pldmtool: Add GetFirmwareParameters firmware update command
Tested:
pldmtool fw_update GetFwParams -m <eid> { "CapabilitiesDuringUpdate": { "Component Update Failure Recovery Capability": "Device will revert to previous component image upon failure, timeout or cancellation of the transfer.", "Component Update Failure Retry Capability": " Device can have component updated again without exiting update mode and restarting transfer via RequestUpdate command.", "Firmware Device Partial Updates": "Firmware Device cannot accept a partial update and all components present on the FD shall be updated.", "Firmware Device Host Functionality during Firmware Update": "Device will revert to previous component image upon failure, timeout or cancellation of the transfer", "Firmware Device Update Mode Restrictions": "No host OS environment restriction for update mode" }, "ComponentCount": 2, "ActiveComponentImageSetVersionString": "XXXXXXXX", "PendingComponentImageSetVersionString": "", "ComponentParameterEntries": [ { "ComponentClassification": "Firmware", "ComponentIdentifier": 1, "ComponentClassificationIndex": 0, "ActiveComponentComparisonStamp": 0, "ActiveComponentReleaseDate": "", "PendingComponentComparisonStamp": 0, "PendingComponentReleaseDate": "", "ComponentActivationMethods": [ "System reboot" ], "CapabilitiesDuringUpdate": { "Firmware Device apply state functionality": " Firmware Device will execute an operation during the APPLY state which will include migrating the new component image to its final non-volatile storage destination." }, "ActiveComponentVersionString": "XXXXXXXX", "PendingComponentVersionString": "" }, { "ComponentClassification": "Firmware", "ComponentIdentifier": 2, "ComponentClassificationIndex": 0, "ActiveComponentComparisonStamp": 0, "ActiveComponentReleaseDate": "", "PendingComponentComparisonStamp": 0, "PendingComponentReleaseDate": "", "ComponentActivationMethods": [ "System reboot" ], "CapabilitiesDuringUpdate": { "Firmware Device apply state functionality": " Firmware Device will execute an operation during the APPLY state which will include migrating the new component image to its final non-volatile storage destination." }, "ActiveComponentVersionString": "XXXXXXXX", "PendingComponentVersionString": "" } ] }
Signed-off-by: Tom Joseph <rushtotom@gmail.com> Change-Id: I1370beca144853f3b638a7541a8589282ccf1273
show more ...
|
2b7c1bfd | 09-Sep-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Change the entity type for system
In the current pldm code, we are using a number 11521 for representing a system and this value is not in the Spec and is vendor defined(OEM).
Changing it to Logica
Change the entity type for system
In the current pldm code, we are using a number 11521 for representing a system and this value is not in the Spec and is vendor defined(OEM).
Changing it to Logical Chassis (32813), so the BMC tree would start with logical chassis as a parent , and under that we would have physical chassis.
Tested By : 1. Entity Association PDR { "nextRecordHandle": 73, "responseCount": 26, "recordHandle": 72, "PDRHeaderVersion": 1, "PDRType": "Entity Association PDR", "recordChangeNumber": 0, "dataLength": 16, "containerID": 1, "associationType": "Physical", "containerEntityType": "[Logical] System chassis (main enclosure)", "containerEntityInstanceNumber": 1, "containerEntityContainerID": 0, "containedEntityCount": 1, "containedEntityType[1]": "[Physical] System chassis (main enclosure)", "containedEntityInstanceNumber[1]": 1, "containedEntityContainerID[1]": 1 }
2. FRU Record PDR { "nextRecordHandle": 2, "responseCount": 20, "recordHandle": 1, "PDRHeaderVersion": 1, "PDRType": "FRU Record Set PDR", "recordChangeNumber": 0, "dataLength": 10, "PLDMTerminusHandle": 0, "FRURecordSetIdentifier": 1, "entityType": "[Logical] System chassis (main enclosure)", "entityInstanceNumber": 1, "containerID": 0 }
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I0a2aa5a9e3da4ea860bb3fa43322e8889e666d2f
show more ...
|
be1a8577 | 05-Jan-2022 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix : Fix code to compile with oem-ibm enabled
8fadc9e03fdb57e5e724df25134a96b27666a52d broke oem-ibm compilation, this commit would fix it.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Fix : Fix code to compile with oem-ibm enabled
8fadc9e03fdb57e5e724df25134a96b27666a52d broke oem-ibm compilation, this commit would fix it.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I4f19178f8ef9623f0fc12a538c21bf3c3d19499e
show more ...
|
8fadc9e0 | 03-Jan-2022 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
pldmtool: Fix tool to show the oem entities
START & END are meant to be used as range to figure out if an entity/state_set is OEM or not.They are not entity & state set names.
This commit fixes abo
pldmtool: Fix tool to show the oem entities
START & END are meant to be used as range to figure out if an entity/state_set is OEM or not.They are not entity & state set names.
This commit fixes above mentioned issue & also removes TPM entity from the common fru_master configuration as the entity type is in OEM range as per DSP0249_1.1.0 specification.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: Iba4fadabf1ae4f94cee8f2f47632731de0bfd85f
show more ...
|
5de3de5f | 03-Jan-2022 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
pldmtool : Add missing state set values
This commit adds few missing states in state set 1 & also add the support fir state set 11.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-I
pldmtool : Add missing state set values
This commit adds few missing states in state set 1 & also add the support fir state set 11.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I57b06f7c0c15605636b8f346c26f3257a597e619
show more ...
|
27403f46 | 01-Dec-2021 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
pldmtool: oem: ibm: untangle header dependencies
With the oem-ibm meson option enabled, pldm_platform_command.cpp has the following header dependency chain:
requester/handler.hpp host-bmc/dbus_to_e
pldmtool: oem: ibm: untangle header dependencies
With the oem-ibm meson option enabled, pldm_platform_command.cpp has the following header dependency chain:
requester/handler.hpp host-bmc/dbus_to_event_handler.hpp libpldmresponder/platform.hpp oem/ibm/libpldmresponder/inband_code_update.hpp oem/ibm/libpldmresponder/oem_ibm_handler.hpp pldmtool/oem/ibm/oem_ibm_state_set.hpp pldmtool/pldm_platform_cmd.cpp
requester/handler.hpp has a dependency on sd_event. Since sd_event is not listed as a dependency of pldmtool, this results in a compile failure when building in subproject mode.
Clearly it isn't appropriate to add sd_event as a pldmtool dependency. To fix the compile failure, break the include dependency chain between oem_ibm_state_set.hpp and oem_ibm_handler.hpp. This is likely an intra-pldm domain violation anyway (pldmtool <-> libpldmresponder).
oem_ibm_state_set.hpp includes oem_ibm_handler.hpp to make use of a single constant: PLDM_OEM_IBM_ENTITY_FIRMWARE_UPDATE. To break the dependency chain, PLDM_OEM_IBM_ENTITY_FIRMWARE_UPDATE is moved to an oem version of entity.h.
Change-Id: I2b54ad9a7559ecf5fbe01c6a52a24428e56df77e Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
869b776f | 03-Dec-2021 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
pldmtool: oem: ibm: add missing header
Add a missing include of libpldm/entity.h for PLDM_ENTITY enumerations.
Change-Id: I08b03d98185e5dc18c42a24242064e198f56c597 Signed-off-by: Brad Bishop <bradl
pldmtool: oem: ibm: add missing header
Add a missing include of libpldm/entity.h for PLDM_ENTITY enumerations.
Change-Id: I08b03d98185e5dc18c42a24242064e198f56c597 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
eea835a9 | 25-Oct-2021 |
Tom Joseph <rushtotom@gmail.com> |
pldmtool: Add GetStatus firmware update command
Tested:
pldmtool fw_update --help firmware update type commands Usage: ./pldmtool fw_update [OPTIONS] SUBCOMMAND Options: -h,--help
pldmtool: Add GetStatus firmware update command
Tested:
pldmtool fw_update --help firmware update type commands Usage: ./pldmtool fw_update [OPTIONS] SUBCOMMAND Options: -h,--help Print this help message and exit
Subcommands: GetStatus Status of the FD
pldmtool fw_update GetStatus -m <eid> { "CurrentState": "IDLE", "PreviousState": "IDLE", "AuxState": "Not applicable in current state", "AuxStateStatus": "AuxState is In Progress or Success", "ProgressPercent": 101, "ReasonCode": "Initialization of firmware device has occurred", "UpdateOptionFlagsEnabled": 0 }
Signed-off-by: Tom Joseph <rushtotom@gmail.com> Change-Id: I2eb41996ab0dcb1d00ac5b8b0e55846b0d4b28a5
show more ...
|