History log of /openbmc/pldm/pldmtool/pldm_cmd_helper.hpp (Results 1 – 14 of 14)
Revision Date Author Comments
# 16c2a0a0 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I8c84201cb2343a8c8a5507a49de0721a1bee7063
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 2576aecd 17-Jun-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://githu

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://github.com/codespell-project/codespell

Change-Id: I539a0c5baa63be240fc1c76367c0af338dd89c7b
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>

show more ...


# 099efc60 12-Nov-2023 Pavithra Barithaya <pavithra.b@ibm.com>

clang-error: fix clang-diagnostic-unused-const-variable error

This clang-error is generated when there is a constant unused
variable.

Change-Id: I6cfe8d4f81e73edb9c12ff7df3ec301377880de0
Signed-off

clang-error: fix clang-diagnostic-unused-const-variable error

This clang-error is generated when there is a constant unused
variable.

Change-Id: I6cfe8d4f81e73edb9c12ff7df3ec301377880de0
Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>

show more ...


# 9427089e 25-Oct-2023 Thu Nguyen <thu@os.amperecomputing.com>

pldmtool : Add retry option `-n` or `--retry-count`

Add `-n` or `--retry-count` option to support resendinng the PLDM
message when the sendRecvMsg method of pldm transport handler is
failed.

Tested

pldmtool : Add retry option `-n` or `--retry-count`

Add `-n` or `--retry-count` option to support resendinng the PLDM
message when the sendRecvMsg method of pldm transport handler is
failed.

Tested:
1. When the option `-n` or `--retry-count` is included in pldmtool
command and the pldm message keeps be failed. pldmtool will retry to
send PLDM message `-n` times after first failure.

Signed-off-by: ThuBaNguyen <thu@os.amperecomputing.com>
Change-Id: I2c3d5e1514ead5a1f2eea6eb43178d45439788f8

show more ...


# 3d03f3fa 07-Sep-2023 Dung Cao <dung@os.amperecomputing.com>

pldmtool/softoff: Use InstanceId APIs from libpldm

The af-mctp transport does not broadcast the PLDM messages between the
MCTP socket instances. Pldmtool/softoff have to handle get/free
instanceId i

pldmtool/softoff: Use InstanceId APIs from libpldm

The af-mctp transport does not broadcast the PLDM messages between the
MCTP socket instances. Pldmtool/softoff have to handle get/free
instanceId instead of depending on the pldmd. Update pldmtool/softoff
to use get/free instanceId APIs in libpldm.

Tested.
1. Call more than 32 pldmtool commands to make sure the allocated
InstanceId are free correctly.
2. Repeat calling softoff more than 32 times. Make sure the functional
should work normally.

Signed-off-by: Dung Cao <dung@os.amperecomputing.com>
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Change-Id: I7cda124694d95d00c37f4993e22cfe33a980d364

show more ...


# a340eed8 14-Feb-2023 Pavithra Barithaya <pavithra.b@ibm.com>

Pldmtool change to fetch pdrs based on TerminusID

This commit adds a new option "-n" to getPDR in the pldmtool using
which we can retrieve the PDRs based on the terminus ID.

Tested:
./pldmtool pla

Pldmtool change to fetch pdrs based on TerminusID

This commit adds a new option "-n" to getPDR in the pldmtool using
which we can retrieve the PDRs based on the terminus ID.

Tested:
./pldmtool platform getpdr -h
get platform descriptor records
Usage: ./pldmtool platform GetPDR [OPTIONS]

Options:
-h,--help Print this help message and exit
-m,--mctp_eid UINT MCTP endpoint ID
-v,--verbose
[Option Group: Required Option]
Retrieve individual PDR, all PDRs, PDRs of a requested type or retrieve all PDRs of the requested terminusID
[Exactly 1 of the following options is required]
Options:
-d,--data UINT retrieve individual PDRs from a PDR Repository
eg: The recordHandle value for the PDR to be retrieved and 0 means get first PDR in the repository.
-t,--type TEXT retrieve all PDRs of the requested type
supported types:
[terminusLocator, stateSensor, numericEffecter, stateEffecter, EntityAssociation, fruRecord, ... ]
-i,--terminusID UINT retrieve all PDRs of the requested terminusID
supported IDs:
[1, 2, 208...]
-a,--all retrieve all PDRs from a PDR repository

Example 1:
./pldmtool platform getpdr -i 0
[]

Example 2:
./pldmtool platform getpdr -i 2
Copied the output here:
https://gist.github.com/Pavithrab7/4218104bc7e58951ff91fe5b49e562b0

Change-Id: I8b78818abbbbb3678e180d2bd1f38017454fd0d3
Signed-off-by: Pavithra Barithaya <pavithra.b@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 ...


# 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 ...


# 5079ac4a 19-Aug-2021 Brad Bishop <bradleyb@fuzziesquirrel.com>

treewide: remove 'using namespace' from headers

Using namespace at global scope in a header file violates the cpp core
guidelines. Quoting the guidelines:

"Doing so takes away an #includer’s abi

treewide: remove 'using namespace' from headers

Using namespace at global scope in a header file violates the cpp core
guidelines. Quoting the guidelines:

"Doing so takes away an #includer’s ability to effectively
disambiguate and to use alternatives. It also makes #included headers
order-dependent as they might have different meaning when included in
different orders."

For further reading:
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rs-using-directive

The guidelines don't call out using using namespace from namespace
scope, but it is only marginally less problematic and still unexpected,
so this patch removes those as well.

The process used to do the update is roughly:

1 - git grep 'using namespace' **.hpp
2 - For each instance, remove the offending 'using namespace' line
3 - build
4 - add 'using namespace' to cpp files or fully resolve types in hpp
files until the project builds again.

Further cleanup is possible - for example cpp files could be scrubbed
for unnecessary namespace qualification - this was not done here to make
review as simple as possible.

Change-Id: I4931f5e78a1b5b74b4a4774c035a549f4d59b91a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# ae28bc77 10-Dec-2020 Sridevi Ramesh <sridevra@in.ibm.com>

Add tracing when the BMC PLDM daemon issues GetPDR to host

After PDR trace enabled

Sending Msg:
80 02 51 18 00 00 00 00 00 00 00 01 ff ff 00 00
Receiving Msg:
00 02 51 00 19 00 00 00 00 00 00 00 05

Add tracing when the BMC PLDM daemon issues GetPDR to host

After PDR trace enabled

Sending Msg:
80 02 51 18 00 00 00 00 00 00 00 01 ff ff 00 00
Receiving Msg:
00 02 51 00 19 00 00 00 00 00 00 00 05 14 00 18 00 00 00 01 14 00 00 0a 00 02 00 40 01 43 00 01 00 01 00
Sending Msg:
80 02 51 19 00 00 00 00 00 00 00 01 ff ff 00 00
Receiving Msg:
00 02 51 00 1a 00 00 00 00 00 00 00 05 14 00 19 00 00 00 01 14 00 00 0a 00 02 00 41 01 43 00 02 00 01 00
Sending Msg:
80 02 51 1a 00 00 00 00 00 00 00 01 ff ff 00 00
Receiving Msg:
00 02 51 00 1b 00 00 00 00 00 00 00 05 14 00 1a 00 00 00 01 14 00 00 0a 00 02 00 c0 20 42 00 01 00 01 00
Sending Msg:
80 02 51 1b 00 00 00 00 00 00 00 01 ff ff 00 00
Receiving Msg:
00 02 51 00 1c 00 00 00 00 00 00 00 05 14 00 1b 00 00 00 01 14 00 00 0a 00 02 00 c2 20 42 00 02 00 01 00

Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
Change-Id: I464de3c128054b381dbba6199f2525ed2b327195

show more ...


# ca4a815b 11-Aug-2020 Sridevi Ramesh <sridevra@in.ibm.com>

Display pldmtool Base & Bios command output in JSON.

./pldmtool base GetPLDMTypes
[
{
"PLDM Type": "base",
"PLDM Type Code": 0
},
{
"PLDM Type": "platform",

Display pldmtool Base & Bios command output in JSON.

./pldmtool base GetPLDMTypes
[
{
"PLDM Type": "base",
"PLDM Type Code": 0
},
{
"PLDM Type": "platform",
"PLDM Type Code": 2
},
{
"PLDM Type": "bios",
"PLDM Type Code": 3
},
{
"PLDM Type": "fru",
"PLDM Type Code": 4
},
{
"PLDM Type": "oem-ibm",
"PLDM Type Code": 63
}
]

./pldmtool base GetPLDMVersion -t 0
{
"Response": "1.0.0"
}

./pldmtool base GetTID
{
"Response": 1
}

./pldmtool base GetPLDMCommands -t 0
[
{
"PLDM Command Code": 2,
"PLDM Command": "GetTID"
},
{
"PLDM Command Code": 3,
"PLDM Command": "GetPLDMVersion"
},
{
"PLDM Command Code": 4,
"PLDM Command": "GetPLDMTypes"
},
{
"PLDM Command Code": 5,
"PLDM Command": "GetPLDMCommands"
}
]

./pldmtool bios GetDateTime
{
"Response": "2020-10-15 16:33:55"
}

./pldmtool bios GetBIOSTable -t 0
{
"0": "Allowed",
"1": "Disabled",
"2": "Enabled",
"3": "IPv4DHCP",
"4": "IPv4Static",
"5": "Not Allowed",
"6": "OPAL",
"7": "Perm",
"8": "PowerVM",
"9": "Temp",
"10": "hb-hyp-switch",
"11": "pvm-fw-boot-side",
"12": "pvm-inband-code-update",
"13": "pvm-os-boot-side",
"14": "pvm-pcie-error-inject",
"15": "pvm-stop-at-standby",
"16": "pvm-surveillance",
"17": "pvm-system-name",
"18": "vmi-hostname",
"19": "vmi-if-count",
"20": "vmi-if0-ipv4-ipaddr",
"21": "vmi-if0-ipv4-method",
"22": "vmi-if0-ipv4-prefix-length",
"23": "vmi-if1-ipv4-ipaddr",
"24": "vmi-if1-ipv4-method",
"25": "vmi-if1-ipv4-prefix-length",
"26": "vmi-ipv4-gateway"
}

./pldmtool bios GetBIOSTable -t 1
[
{
"AttributeHandle": 0,
"AttributeNameHandle": "17(pvm-system-name)",
"AttributeType": "BIOSString",
"StringType": "0x01",
"MinimumStringLength": 0,
"MaximumStringLength": 100,
"DefaultStringLength": 0,
"DefaultString": ""
},
...
...
{
"AttributeHandle": 16,
"AttributeNameHandle": "15(pvm-stop-at-standby)",
"AttributeType": "BIOSEnumeration",
"NumberOfPossibleValues": 2,
"PossibleValueStringHandle[0]": "1(Disabled)",
"PossibleValueStringHandle[1]": "2(Enabled)",
"NumberOfDefaultValues": 1,
"DefaultValueStringHandleIndex[0]": 1,
"StringHandle": "2(Enabled)"
}
]

./pldmtool bios GetBIOSTable -t 2
[
{
"AttributeHandle": 0,
"AttributeType": "BIOSString",
"CurrentStringLength": 0,
"CurrentString": ""
},
...
...
{
"AttributeHandle": 16,
"AttributeType": "BIOSEnumeration",
"NumberOfCurrentValues": 1,
"CurrentValueStringHandleIndex[0]": "Enabled"
}
]

./pldmtool bios GetBIOSAttributeCurrentValueByHandle -a pvm-pcie-error-inject
{
"CurrentValue": "Enabled"
}

./pldmtool bios SetBIOSAttributeCurrentValue -a vmi-if0-ipv4-method -d IPv4Static
{
"Response": "SUCCESS"
}

Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
Change-Id: If58e2ce380efcad228e4440316cd2653eada9e73

show more ...


# d6638b70 02-Jul-2020 Deepak Kodihalli <dkodihal@in.ibm.com>

pldmtool: fixup uninitialized variable

Uninitialized 'verbosity' class member would cause inconsistent
behavior.

Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Change-Id: I5d2d5eb33aac6ba088

pldmtool: fixup uninitialized variable

Uninitialized 'verbosity' class member would cause inconsistent
behavior.

Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Change-Id: I5d2d5eb33aac6ba0885e3c64cea1d45792ec725b

show more ...


# f7f5da97 17-Jun-2020 Deepak Kodihalli <dkodihal@in.ibm.com>

Rename tool/ as pldmtool/

Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Change-Id: I38d7a6ab907014cd5fca049b095d692d069feab1