History log of /openbmc/pldm/pldmtool/pldm_base_cmd.cpp (Results 1 – 17 of 17)
Revision Date Author Comments
# 1b89451b 10-Mar-2025 Roger G. Coscojuela <roger.gili-coscojuela@sipearl.com>

pldmtool: Add SetTID command

Added SetTID command to set the TID of a terminus.

Tested results:
```
root@bmc:~# pldmtool base SetTID -h
set the Terminus ID (TID) for a PLDM Terminus.
Usage: pldmtoo

pldmtool: Add SetTID command

Added SetTID command to set the TID of a terminus.

Tested results:
```
root@bmc:~# pldmtool base SetTID -h
set the Terminus ID (TID) for a PLDM Terminus.
Usage: pldmtool base SetTID [OPTIONS]

Options:
-h,--help Print this help message and exit
-m,--mctp_eid UINT MCTP endpoint ID
-v,--verbose
-t,--tid UINT REQUIRED The TID to be set.
Special value: 0x00, 0xFF = reserved.
root@bmc:~# pldmtool base SetTID -m 42 -t 36
{
"completionCode": 0
}

```

Change-Id: I7c6d371ea8462fe7ea35420f7bf885743e41f1a4
Signed-off-by: Roger G. Coscojuela <roger.gili-coscojuela@sipearl.com>

show more ...


# 5c3f0d1b 30-Jan-2025 Pavithra Barithaya <pavithrabarithaya07@gmail.com>

pldmtool : Migrate to placement_new from reinterpret casting

reinterpret_cast is prohibited by the C++ core guidelines because
it takes the behavior outside the language definition and gives
problem

pldmtool : Migrate to placement_new from reinterpret casting

reinterpret_cast is prohibited by the C++ core guidelines because
it takes the behavior outside the language definition and gives
problems with type safety. Placement-new on the other-hand allows
to control the object storage while still properly instantiating
an object,keeping the behavior inside the C++ language
specification.

Change-Id: Iaebfaa78c4d3c0c3658dbf9f2f6eaa932b061e83
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>

show more ...


# b8e3b0d8 20-Nov-2024 Thu Nguyen <thu@os.amperecomputing.com>

pldmtool: GetPLDMCommands: Support more PLDM Base command numbers

Add more supported PLDM Base command numbers in table "Table 7 - PLDM
Messaging Control and Discovery Command Codes" of DSP0240 V1.2

pldmtool: GetPLDMCommands: Support more PLDM Base command numbers

Add more supported PLDM Base command numbers in table "Table 7 - PLDM
Messaging Control and Discovery Command Codes" of DSP0240 V1.2.0 when
`GetPLDMCommands` is called.

Change-Id: I63a326594b3d5e9ed3fb435746dc07d1b84cbf19
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>

show more ...


# f1c0e7ca 20-Nov-2024 Thu Nguyen <thu@os.amperecomputing.com>

pldmtool: GetPLDMCommands: Support more PLDM Platform command numbers

Support more supported PLDM platform command numbers in table "Table 110
- Command numbers" of DSP0248 V1.3.0 when `GetPLDMComma

pldmtool: GetPLDMCommands: Support more PLDM Platform command numbers

Support more supported PLDM platform command numbers in table "Table 110
- Command numbers" of DSP0248 V1.3.0 when `GetPLDMCommands` is called.

Change-Id: Id8d706a41602010bee67b2aaea621766883da9cb
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>

show more ...


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


# 6c83d3bc 22-Jun-2024 Thu Nguyen <thu@os.amperecomputing.com>

pldmtool: GetPLDMCommand: Support version option

`GetPLDMCommands` in DSP0240 v1.1.0 requires the PLDM supported type
version. In the current implementation, `pldmtool` always send `0xff
0xff 0xff 0

pldmtool: GetPLDMCommand: Support version option

`GetPLDMCommands` in DSP0240 v1.1.0 requires the PLDM supported type
version. In the current implementation, `pldmtool` always send `0xff
0xff 0xff 0xff` version to `GetPLDMCommand` with the assumption that the
terminus will response for the request with any version of PLDM type.

Some termini don't accept `0xff 0xff 0xff 0xff` as input
version to `GetPLDMCommands` command because value `0xff` only has
meaning `A value of 0xFF in the "update" field indicates that the field
to be ignored.` in the `Section 12.6.1 Version field encoding` in `MCTP
Base spec` DSP0236 v1.3.1 but not in `PLDM base spec` DSP0240 v1.1.0
where `GetPLDMCommand` is detailed.

Add `-d` option to allow the user input the PLDM supported type version
which is responded by terminus in `GetPLDMVersion` command. The input
version will be in hex format. eg version 1.1.0 will be input as `0x00
0xf0 0xf1 0xf1`.

Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: I42a940ac6d8976b3630613211fcdbe1290895014

show more ...


# 8570fcc6 28-May-2024 Tal Yacobi <talycb8@gmail.com>

pldmtool: Add GetStateEffecterStates command

Add GetStateEffecterStates command in pldmtool.
Used to get state effecter current and pending states
by supplying an effecter ID.

Tested:
```
root@bmc:

pldmtool: Add GetStateEffecterStates command

Add GetStateEffecterStates command in pldmtool.
Used to get state effecter current and pending states
by supplying an effecter ID.

Tested:
```
root@bmc:~# pldmtool platform GetStateEffecterStates -h
get the state effecter states
Usage: pldmtool platform GetStateEffecterStates [OPTIONS]

Options:
-h,--help Print this help message and exit
-m,--mctp_eid UINT MCTP endpoint ID
-v,--verbose
-n,--retry-count UINT Number of retry when PLDM request message is failed
-i,--effecter_id UINT REQUIRED
Effecter ID that is used to identify and access the effecter
root@bmc:~# pldmtool platform GetStateEffecterStates -m 9 -i 348
{
"compositeEffecterCount": 1,
"effecterOpState[0])": "Effecter Enabled No Update Pending",
"pendingState[0]": 1,
"presentState[0]": 1
}
```

Change-Id: Ib72d2181dec955367310d6218628bb26952346b2
Signed-off-by: Tal Yacobi <talycb8@gmail.com>

show more ...


# 21f128d8 14-Jan-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

pldm: Use modern libpldm OEM header paths

Fixed with:

```
sed -Ei 's/libpldm\/([a-z_]+)_oem_ibm\.h/libpldm\/oem\/ibm\/\1.h/' $(git ls-files)
sed -Ei 's/libpldm\/file_io.h/libpldm\/oem\/ibm\/file_io

pldm: Use modern libpldm OEM header paths

Fixed with:

```
sed -Ei 's/libpldm\/([a-z_]+)_oem_ibm\.h/libpldm\/oem\/ibm\/\1.h/' $(git ls-files)
sed -Ei 's/libpldm\/file_io.h/libpldm\/oem\/ibm\/file_io.h/' $(git ls-files)
sed -Ei 's/libpldm\/host.h/libpldm\/oem\/ibm\/host.h/' $(git ls-files)
```

Change-Id: Idbe61dcc53754d7e6005b34ae21bec8ab6ed45da
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# a675662c 20-Oct-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-17 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-17 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: Ib8dfa202f1d59add43fc0d55ab2bf388c8e7c877
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

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


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


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


# 8fb11c97 08-Jun-2021 Sridevi Ramesh <sridevra@in.ibm.com>

libpldmresponder & pldmtool : Expand support for GetPLDMCommands

Update newly available pldm commands for bios and platform.
Resolves : https://github.com/openbmc/pldm/issues/9

Tested on latest BMC

libpldmresponder & pldmtool : Expand support for GetPLDMCommands

Update newly available pldm commands for bios and platform.
Resolves : https://github.com/openbmc/pldm/issues/9

Tested on latest BMC environment.

$ pldmtool base GetPLDMCommands -t 3
[
{
"PLDM Command Code": 1,
"PLDM Command": "GetBIOSTable"
},
{
"PLDM Command Code": 2,
"PLDM Command": "SetBIOSTable"
},
{
"PLDM Command Code": 7,
"PLDM Command": "SetBIOSAttributeCurrentValue"
},
{
"PLDM Command Code": 8,
"PLDM Command": "GetBIOSAttributeCurrentValueByHandle"
},
{
"PLDM Command Code": 12,
"PLDM Command": "GetDateTime"
},
{
"PLDM Command Code": 13,
"PLDM Command": "SetDateTime"
}
]

$ pldmtool base GetPLDMCommands -t 2
[
{
"PLDM Command Code": 4,
"PLDM Command": "SetEventReceiver"
},
{
"PLDM Command Code": 10,
"PLDM Command": "PlatformEventMessage"
},
{
"PLDM Command Code": 17,
"PLDM Command": "GetSensorReading"
},
{
"PLDM Command Code": 33,
"PLDM Command": "GetStateSensorReadings"
},
{
"PLDM Command Code": 49,
"PLDM Command": "SetNumericEffecterValue"
},
{
"PLDM Command Code": 50,
"PLDM Command": "GetNumericEffecterValue"
},
{
"PLDM Command Code": 57,
"PLDM Command": "SetStateEffecterStates"
},
{
"PLDM Command Code": 81,
"PLDM Command": "GetPDR"
}
]

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

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


# 5bdde3a4 16-Jun-2020 John Wang <wangzqbj@inspur.com>

pldmtool: Implement GetFRURecordByOption

Implement GetFRURecordByOption

Tested:

$pldmtool fru GetFRURecordByOption -i 0 -r 0 -f 0
...
FRU Record Set Identifier: 1
FRU Record Type: 1(General)
Numbe

pldmtool: Implement GetFRURecordByOption

Implement GetFRURecordByOption

Tested:

$pldmtool fru GetFRURecordByOption -i 0 -r 0 -f 0
...
FRU Record Set Identifier: 1
FRU Record Type: 1(General)
Number of FRU fields: 5
Encoding Type for FRU fields: 1(ASCII)
FRU Field Type: 3(Part Number)
FRU Field Length: 7
FRU Field Value: 02CY415
FRU Field Type: 4(Serial Number)
FRU Field Length: 12
FRU Field Value: YA1934319126
FRU Field Type: 5(Manufacturer)
FRU Field Length: 3
FRU Field Value: IBM
FRU Field Type: 8(Name)
FRU Field Length: 16
FRU Field Value: PROCESSOR MODULE
FRU Field Type: 10(Version)
FRU Field Length: 2
FRU Field Value: 22
FRU Record Set Identifier: 2
FRU Record Type: 1(General)
Number of FRU fields: 4
Encoding Type for FRU fields: 1(ASCII)
FRU Field Type: 2(Model)
FRU Field Length: 20
FRU Field Value: M393A2K43BB1-CTD
FRU Field Type: 4(Serial Number)
FRU Field Length: 10
FRU Field Value: 0x367f4d92
FRU Field Type: 5(Manufacturer)
FRU Field Length: 19
FRU Field Value: Samsung Electronics
FRU Field Type: 8(Name)
FRU Field Length: 32
FRU Field Value: DDR4-2666 16GiB 64-bit ECC RDIMM
FRU Record Set Identifier: 3
FRU Record Type: 1(General)
Number of FRU fields: 1
Encoding Type for FRU fields: 1(ASCII)
FRU Field Type: 8(Name)
FRU Field Length: 12
FRU Field Value: powersupply0
FRU Record Set Identifier: 4
FRU Record Type: 1(General)
Number of FRU fields: 1
Encoding Type for FRU fields: 1(ASCII)
FRU Field Type: 8(Name)
FRU Field Length: 12
FRU Field Value: powersupply1

$pldmtool fru GetFRURecordByOption -i 0 -r 0 -f 8
FRU Record Set Identifier: 1
FRU Record Type: 1(General)
Number of FRU fields: 1
Encoding Type for FRU fields: 1(ASCII)
FRU Field Type: 8(Name)
FRU Field Length: 16
FRU Field Value: PROCESSOR MODULE
FRU Record Set Identifier: 2
FRU Record Type: 1(General)
Number of FRU fields: 1
Encoding Type for FRU fields: 1(ASCII)
FRU Field Type: 8(Name)
FRU Field Length: 32
FRU Field Value: DDR4-2666 16GiB 64-bit ECC RDIMM
FRU Record Set Identifier: 3
FRU Record Type: 1(General)
Number of FRU fields: 1
Encoding Type for FRU fields: 1(ASCII)
FRU Field Type: 8(Name)
FRU Field Length: 12
FRU Field Value: powersupply0
FRU Record Set Identifier: 4
FRU Record Type: 1(General)
Number of FRU fields: 1
Encoding Type for FRU fields: 1(ASCII)
FRU Field Type: 8(Name)
FRU Field Length: 12
FRU Field Value: powersupply1

$pldmtool fru GetFRURecordByOption -i 0 -r 0 -f 4
FRU Record Set Identifier: 1
FRU Record Type: 1(General)
Number of FRU fields: 1
Encoding Type for FRU fields: 1(ASCII)
FRU Field Type: 4(Serial Number)
FRU Field Length: 12
FRU Field Value: YA1934319126
FRU Record Set Identifier: 2
FRU Record Type: 1(General)
Number of FRU fields: 1
Encoding Type for FRU fields: 1(ASCII)
FRU Field Type: 4(Serial Number)
FRU Field Length: 10
FRU Field Value: 0x367f4d92
FRU Record Set Identifier: 3
FRU Record Type: 1(General)
Number of FRU fields: 0
Encoding Type for FRU fields: 1(ASCII)
FRU Record Set Identifier: 4
FRU Record Type: 1(General)
Number of FRU fields: 0
Encoding Type for FRU fields: 1(ASCII)

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: Ia4bf6f938061dad69ab243704cfa9ac8da5fc80e

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