History log of /openbmc/pldm/libpldmresponder/ (Results 276 – 300 of 377)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
d823cc0b24-Mar-2020 Sampa Misra <sampmisr@in.ibm.com>

pldm oem: implement certificate handler

This commit adds code to handle the ceritificate request and
certificate transfer between the host and bmc following pldm oem
file i/o protocol

Change-Id: I8

pldm oem: implement certificate handler

This commit adds code to handle the ceritificate request and
certificate transfer between the host and bmc following pldm oem
file i/o protocol

Change-Id: I8095e0f5ad8c3c5cc796da1cfbe4bb9946af31cf
Signed-off-by: Sampa Misra <sampmisr@in.ibm.com>

show more ...

46ece06318-Mar-2020 Sampa Misra <sampmisr@in.ibm.com>

libpldmresponder: enable DBus change notification

This commit enables libpldmresponder to subscribe to DBus
property change signal for the BIOS properties which are fetched from
DBus. The new DBus v

libpldmresponder: enable DBus change notification

This commit enables libpldmresponder to subscribe to DBus
property change signal for the BIOS properties which are fetched from
DBus. The new DBus value is received and the relevant entry in the
attributeValueTable is updated.

test result:

root@rainier:/tmp# pldmtool bios GetBIOSTable -t 0
Parsed Response Msg:
PLDM StringTable:
BIOSStringHandle : BIOSString
0 : Allowed
1 : Disabled
2 : Enabled
3 : IPv4DHCP
4 : IPv4Static
5 : Not Allowed
6 : Perm
7 : Temp
8 : pvm-fw-boot-side
9 : pvm-inband-code-update
10 : pvm-os-boot-side
11 : pvm-pcie-error-inject
12 : pvm-surveillance
13 : pvm-system-name
14 : vmi-hostname
15 : vmi-if-count
16 : vmi-if0-ipv4-ipaddr
17 : vmi-if0-ipv4-method
18 : vmi-if0-ipv4-prefix-length
19 : vmi-if1-ipv4-ipaddr
20 : vmi-if1-ipv4-method
21 : vmi-if1-ipv4-prefix-length
22 : vmi-ipv4-gateway
root@rainier:/tmp#

root@rainier:/tmp# pldmtool bios GetBIOSTable -t 1
Parsed Response Msg:
PLDM AttributeTable:
AttributeHandle: 0, AttributeNameHandle: 13(pvm-system-name)
AttributeType: BIOSStringReadOnly
StringType: 0x01
MinimumStringLength: 1
MaximumStringLength: 100
DefaultStringLength: 15
DefaultString: witherspoon-128
AttributeHandle: 1, AttributeNameHandle: 14(vmi-hostname)
AttributeType: BIOSString
StringType: 0x01
MinimumStringLength: 0
MaximumStringLength: 255
DefaultStringLength: 0
DefaultString:
AttributeHandle: 2, AttributeNameHandle: 22(vmi-ipv4-gateway)
AttributeType: BIOSString
StringType: 0x01
MinimumStringLength: 7
MaximumStringLength: 15
DefaultStringLength: 7
DefaultString: 0.0.0.0
AttributeHandle: 3, AttributeNameHandle: 16(vmi-if0-ipv4-ipaddr)
AttributeType: BIOSString
StringType: 0x01
MinimumStringLength: 7
MaximumStringLength: 15
DefaultStringLength: 7
DefaultString: 0.0.0.0
AttributeHandle: 4, AttributeNameHandle: 19(vmi-if1-ipv4-ipaddr)
AttributeType: BIOSString
StringType: 0x01
MinimumStringLength: 7
MaximumStringLength: 15
DefaultStringLength: 7
DefaultString: 0.0.0.0
AttributeHandle: 5, AttributeNameHandle: 15(vmi-if-count)
AttributeType: BIOSIntegerReadOnly
LowerBound: 0
UpperBound: 2
ScalarIncrement: 1
DefaultValue: 1
AttributeHandle: 6, AttributeNameHandle: 18(vmi-if0-ipv4-prefix-length)
AttributeType: BIOSInteger
LowerBound: 0
UpperBound: 32
ScalarIncrement: 1
DefaultValue: 0
AttributeHandle: 7, AttributeNameHandle: 21(vmi-if1-ipv4-prefix-length)
AttributeType: BIOSInteger
LowerBound: 0
UpperBound: 32
ScalarIncrement: 1
DefaultValue: 0
AttributeHandle: 8, AttributeNameHandle: 8(pvm-fw-boot-side)
AttributeType: BIOSEnumerationReadOnly
NumberOfPossibleValues: 2
PossibleValueStringHandle[0] = 6(Perm)
PossibleValueStringHandle[1] = 7(Temp)
NumberOfDefaultValues: 1
DefaultValueStringHandleIndex[0] = 0, StringHandle = 6(Perm)
AttributeHandle: 9, AttributeNameHandle: 10(pvm-os-boot-side)
AttributeType: BIOSEnumerationReadOnly
NumberOfPossibleValues: 2
PossibleValueStringHandle[0] = 6(Perm)
PossibleValueStringHandle[1] = 7(Temp)
NumberOfDefaultValues: 1
DefaultValueStringHandleIndex[0] = 0, StringHandle = 6(Perm)
AttributeHandle: 10, AttributeNameHandle: 9(pvm-inband-code-update)
AttributeType: BIOSEnumerationReadOnly
NumberOfPossibleValues: 2
PossibleValueStringHandle[0] = 0(Allowed)
PossibleValueStringHandle[1] = 5(Not Allowed)
NumberOfDefaultValues: 1
DefaultValueStringHandleIndex[0] = 0, StringHandle = 0(Allowed)
AttributeHandle: 11, AttributeNameHandle: 12(pvm-surveillance)
AttributeType: BIOSEnumerationReadOnly
NumberOfPossibleValues: 2
PossibleValueStringHandle[0] = 1(Disabled)
PossibleValueStringHandle[1] = 2(Enabled)
NumberOfDefaultValues: 1
DefaultValueStringHandleIndex[0] = 1, StringHandle = 2(Enabled)
AttributeHandle: 12, AttributeNameHandle: 11(pvm-pcie-error-inject)
AttributeType: BIOSEnumerationReadOnly
NumberOfPossibleValues: 2
PossibleValueStringHandle[0] = 1(Disabled)
PossibleValueStringHandle[1] = 2(Enabled)
NumberOfDefaultValues: 1
DefaultValueStringHandleIndex[0] = 1, StringHandle = 2(Enabled)
AttributeHandle: 13, AttributeNameHandle: 17(vmi-if0-ipv4-method)
AttributeType: BIOSEnumeration
NumberOfPossibleValues: 2
PossibleValueStringHandle[0] = 4(IPv4Static)
PossibleValueStringHandle[1] = 3(IPv4DHCP)
NumberOfDefaultValues: 1
DefaultValueStringHandleIndex[0] = 0, StringHandle = 4(IPv4Static)
AttributeHandle: 14, AttributeNameHandle: 20(vmi-if1-ipv4-method)
AttributeType: BIOSEnumeration
NumberOfPossibleValues: 2
PossibleValueStringHandle[0] = 4(IPv4Static)
PossibleValueStringHandle[1] = 3(IPv4DHCP)
NumberOfDefaultValues: 1
DefaultValueStringHandleIndex[0] = 0, StringHandle = 4(IPv4Static)
root@rainier:/tmp#

root@rainier:/tmp# pldmtool bios GetBIOSTable -t 2
Parsed Response Msg:
PLDM AttributeValueTable:
AttributeHandle: 0
AttributeType: BIOSStringReadOnly
CurrentStringLength: 15
CurrentString: witherspoon-128
AttributeHandle: 1
AttributeType: BIOSString
CurrentStringLength: 0
CurrentString:
AttributeHandle: 2
AttributeType: BIOSString
CurrentStringLength: 7
CurrentString: 0.0.0.0
AttributeHandle: 3
AttributeType: BIOSString
CurrentStringLength: 7
CurrentString: 0.0.0.0
AttributeHandle: 4
AttributeType: BIOSString
CurrentStringLength: 7
CurrentString: 0.0.0.0
AttributeHandle: 5
AttributeType: BIOSIntegerReadOnly
CurrentValue: 1
AttributeHandle: 6
AttributeType: BIOSInteger
CurrentValue: 0
AttributeHandle: 7
AttributeType: BIOSInteger
CurrentValue: 0
AttributeHandle: 8
AttributeType: BIOSEnumerationReadOnly
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 0, StringHandle = 6(Perm)
AttributeHandle: 9
AttributeType: BIOSEnumerationReadOnly
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 0, StringHandle = 6(Perm)
AttributeHandle: 10
AttributeType: BIOSEnumerationReadOnly
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 0, StringHandle = 0(Allowed)
AttributeHandle: 11
AttributeType: BIOSEnumerationReadOnly
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 1, StringHandle = 2(Enabled)
AttributeHandle: 12
AttributeType: BIOSEnumerationReadOnly
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 1, StringHandle = 2(Enabled)
AttributeHandle: 13
AttributeType: BIOSEnumeration
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 0, StringHandle = 4(IPv4Static)
AttributeHandle: 14
AttributeType: BIOSEnumeration
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 0, StringHandle = 4(IPv4Static)
root@rainier:/tmp#

root@rainier:/tmp# busctl get-property xyz.openbmc_project.Settings
/xyz/openbmc_project/network/vmi/intf1/ipv4/addr0 xyz.openbmc_project.Network.IP
PrefixLength
y 0

root@rainier:/tmp# busctl set-property xyz.openbmc_project.Settings
/xyz/openbmc_project/network/vmi/intf1/ipv4/addr0 xyz.openbmc_project.Network.IP
PrefixLength y 6

root@rainier:/tmp# busctl get-property xyz.openbmc_project.Settings
/xyz/openbmc_project/network/vmi/intf1/ipv4/addr0 xyz.openbmc_project.Network.IP
Origin
s "xyz.openbmc_project.Network.IP.AddressOrigin.Static"

root@rainier:/tmp# busctl set-property xyz.openbmc_project.Settings
/xyz/openbmc_project/network/vmi/intf1/ipv4/addr0 xyz.openbmc_project.Network.IP
Origin s "xyz.openbmc_project.Network.IP.AddressOrigin.DHCP"

root@rainier:/tmp# busctl get-property xyz.openbmc_project.Settings
/xyz/openbmc_project/network/vmi/intf1/ipv4/addr0 xyz.openbmc_project.Network.IP
Address
s "0.0.0.0"

root@rainier:/tmp# busctl set-property xyz.openbmc_project.Settings
/xyz/openbmc_project/network/vmi/intf1/ipv4/addr0 xyz.openbmc_project.Network.IP
Address s "1.2.3.4"

root@rainier:/tmp# pldmtool bios GetBIOSTable -t 2
Parsed Response Msg:
PLDM AttributeValueTable:
AttributeHandle: 0
AttributeType: BIOSStringReadOnly
CurrentStringLength: 15
CurrentString: witherspoon-128
AttributeHandle: 1
AttributeType: BIOSString
CurrentStringLength: 0
CurrentString:
AttributeHandle: 2
AttributeType: BIOSString
CurrentStringLength: 7
CurrentString: 0.0.0.0
AttributeHandle: 3
AttributeType: BIOSString
CurrentStringLength: 7
CurrentString: 0.0.0.0
AttributeHandle: 4
AttributeType: BIOSString
CurrentStringLength: 7
CurrentString: 1.2.3.4
AttributeHandle: 5
AttributeType: BIOSIntegerReadOnly
CurrentValue: 1
AttributeHandle: 6
AttributeType: BIOSInteger
CurrentValue: 0
AttributeHandle: 7
AttributeType: BIOSInteger
CurrentValue: 6
AttributeHandle: 8
AttributeType: BIOSEnumerationReadOnly
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 0, StringHandle = 6(Perm)
AttributeHandle: 9
AttributeType: BIOSEnumerationReadOnly
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 0, StringHandle = 6(Perm)
AttributeHandle: 10
AttributeType: BIOSEnumerationReadOnly
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 0, StringHandle = 0(Allowed)
AttributeHandle: 11
AttributeType: BIOSEnumerationReadOnly
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 1, StringHandle = 2(Enabled)
AttributeHandle: 12
AttributeType: BIOSEnumerationReadOnly
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 1, StringHandle = 2(Enabled)
AttributeHandle: 13
AttributeType: BIOSEnumeration
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 0, StringHandle = 4(IPv4Static)
AttributeHandle: 14
AttributeType: BIOSEnumeration
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 1, StringHandle = 3(IPv4DHCP)

Change-Id: I60e8f916a82bda0ef27c8c482fafb755b65210b4
Signed-off-by: Sampa Misra <sampmisr@in.ibm.com>

show more ...

45fed20f01-Apr-2020 John Wang <wangzqbj@inspur.com>

bios_table: Implement find attr entry by string handle

Implement find attribute table entry by string handle

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

bios_table: Implement find attr entry by string handle

Implement find attribute table entry by string handle

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

show more ...

6080aae713-Feb-2020 John Wang <wangzqbj@inspur.com>

bios: Use the new APIs in bios table commands

Use new APIs(BIOSConfig) in bios table commands.

The previous code built bios tables after receiving
the GetBIOSTable command. But A BIOS can send
GetB

bios: Use the new APIs in bios table commands

Use new APIs(BIOSConfig) in bios table commands.

The previous code built bios tables after receiving
the GetBIOSTable command. But A BIOS can send
GetBIOSAttributeCurrentValueByHandle or
SetBIOSAttributeCurrentValue before GetBIOSTable, then
we should build bios tables in those commands.

This change builds bios tables in the command handler's
constructor, which avoids building bios tables in multiple
places.

Tested: Build tables and verify that built tables are as expected
(same as before)

Tested on fp5280g2, with json file
https://gist.github.com/wangzqbj/b24558331cb35d14fca3b555ef03e458

$ pldmtool bios GetBIOSTable -t StringTable
...
...
PLDM StringTable:
BIOSStringHandle : BIOSString
0 : CodeUpdatePolicy
1 : Concurrent
2 : Disruptive
3 : Led
4 : Model
5 : OUTLET
6 : Off
7 : On
8 : str_example3

$ pldmtool bios GetBIOSTable -t AttributeTable
...
...
PLDM AttributeTable:
AttributeHandle: 0, AttributeNameHandle: 4(Model)
AttributeType: BIOSString
StringType: 0x01
MinimumStringLength: 1
MaximumStringLength: 100
DefaultStringLength: 8
DefaultString: FP5280G2
AttributeHandle: 1, AttributeNameHandle: 8(str_example3)
AttributeType: BIOSStringReadOnly
StringType: 0x00
MinimumStringLength: 1
MaximumStringLength: 100
DefaultStringLength: 2
DefaultString: ef
AttributeHandle: 2, AttributeNameHandle: 5(OUTLET)
AttributeType: BIOSInteger
LowerBound: 0
UpperBound: 68002
ScalarIncrement: 1
DefaultValue: 0
AttributeHandle: 3, AttributeNameHandle: 3(Led)
AttributeType: BIOSEnumeration
NumberOfPossibleValues: 2
PossibleValueStringHandle[0] = 7(On)
PossibleValueStringHandle[1] = 6(Off)
NumberOfDefaultValues: 1
DefaultValueStringHandleIndex[0] = 1, StringHandle = 6(Off)
AttributeHandle: 4, AttributeNameHandle: 0(CodeUpdatePolicy)
AttributeType: BIOSEnumerationReadOnly
NumberOfPossibleValues: 2
PossibleValueStringHandle[0] = 1(Concurrent)
PossibleValueStringHandle[1] = 2(Disruptive)
NumberOfDefaultValues: 1
DefaultValueStringHandleIndex[0] = 0, StringHandle = 1(Concurrent)

$ pldmtool bios GetBIOSTable -t AttributeValueTable
...
...
PLDM AttributeValueTable:
AttributeHandle: 0
AttributeType: BIOSString
CurrentStringLength: 12
CurrentString: powersupply0
AttributeHandle: 1
AttributeType: BIOSStringReadOnly
CurrentStringLength: 2
CurrentString: ef
AttributeHandle: 2
AttributeType: BIOSInteger
CurrentValue: 0
AttributeHandle: 3
AttributeType: BIOSEnumeration
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 1, StringHandle = 6(Off)
AttributeHandle: 4
AttributeType: BIOSEnumerationReadOnly
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 0, StringHandle = 1(Concurrent)

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

show more ...

3be7085e13-Feb-2020 John Wang <wangzqbj@inspur.com>

bios: Implement BIOSEnumAttribute

Implement BIOSEnumAttribute, most of the code is copied from
bios/bios_parser.cpp.

Implement SetAttrValueOnDbus and constructEntry for enum attribute

Signed-off-b

bios: Implement BIOSEnumAttribute

Implement BIOSEnumAttribute, most of the code is copied from
bios/bios_parser.cpp.

Implement SetAttrValueOnDbus and constructEntry for enum attribute

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

show more ...

95e6b3c112-Feb-2020 John Wang <wangzqbj@inspur.com>

bios: Implement BIOSIntegerAttribute

Implement BIOSIntegerAttribute, most of the code is copied from
bios/bios_parser.cpp.

Implement SetAttrValueOnDbus and constructEntry for integer attribute

Sig

bios: Implement BIOSIntegerAttribute

Implement BIOSIntegerAttribute, most of the code is copied from
bios/bios_parser.cpp.

Implement SetAttrValueOnDbus and constructEntry for integer attribute

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

show more ...

d965934f27-Feb-2020 John Wang <wangzqbj@inspur.com>

bios: Implement BIOSConfig

Load the parsed json configs into memory.
And provid APIs to get/set on bios tables.

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

bios: Implement BIOSConfig

Load the parsed json configs into memory.
And provid APIs to get/set on bios tables.

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

show more ...

29683b5327-Feb-2020 John Wang <wangzqbj@inspur.com>

bios: Implement BIOSStringAttribute

Implement BIOSStringAttribute, most of the code is copied from
bios/bios_parser.cpp.

Implement SetAttrValueOnDbus and constructEntry for string attribute

Signed

bios: Implement BIOSStringAttribute

Implement BIOSStringAttribute, most of the code is copied from
bios/bios_parser.cpp.

Implement SetAttrValueOnDbus and constructEntry for string attribute

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

show more ...

e2efdcce12-Feb-2020 John Wang <wangzqbj@inspur.com>

bios: Implement BIOSAttribute

BIOS tables are built based on json entry. When a bios attribute
is set by pldm, the corresponding dbus backend should be synchronized.

Then, the BIOSAttribute class i

bios: Implement BIOSAttribute

BIOS tables are built based on json entry. When a bios attribute
is set by pldm, the corresponding dbus backend should be synchronized.

Then, the BIOSAttribute class is abstracted, and it provides the following two
interfaces

1. constructEntry: Construct the entry of the attribute/attribute-value table
2. setAttrValueOnDbus: Update the corresponding dbus backend

Specific types of attributes are implemented based on BIOSAttribute. eg
BIOSStringAttribute, BIOSEnumAttribute, BIOSIntegerAttribute.

Once the BIOS Handler is loaded, all attributes would be constructed from json.
We use BIOSConfig(class) to persist all attributes in ram.

BIOSConfig provides the following methods.

- buildTables: Build tables
- removeTables: Remove the persistent tables
- setAttrValue: Set attribute value on dbus and update the bios table
- getBIOSTable: Get bios table by table type

After we implemented BIOSConfig/BIOSSIntegerAttribute/BIOSStringAttribute/BIOSEnumAttribute,
we will use the new interface(BIOSConfig) in BIOS Handler.

It will have the following advantages

1. Different types of attribute implementations are placed in different files, improving readability
2. Logic to operate bios tables is no longer coupled with BIOS Handler.

In addition, added a c++ wrapper for string table. After
completing this refactor, will move the implementation to a common
place. It's useful for pldmtool.

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

show more ...

9e24242f04-Mar-2020 John Wang <wangzqbj@inspur.com>

utils: Make getDbusPropertyVariant virtual

Make getDbusPropertyVariant virtual so it can be mocked

Tested: built successfully, no more testing

Change-Id: I83fa8e8a3810f42fea6969722add27d52534072b

75330f3624-Mar-2020 Zahed Hossain <zahzahed@in.ibm.com>

event: Handle platform event message

Provide infrastructure to set the properties for the D-Bus object
depending on the EventEntry, Where <EventEntry - uint32_t>=
<uint8_t - EventState> <uint8_t - S

event: Handle platform event message

Provide infrastructure to set the properties for the D-Bus object
depending on the EventEntry, Where <EventEntry - uint32_t>=
<uint8_t - EventState> <uint8_t - SensorOffset> <uint16_t - SensorID>
Based on the EventEntry value the corresponding dBus property will be
set.

Current EventEntryMap contains EventEntries mapped for the sensorID 7 &
8 representing the COM Channel 1001 (VMI) port 0's & port 1's ipv4
"STATE SET 15" respectively each for "valid" & "invalid" Configuration
States as listed in DSP0249_1.0.0 State Set Specification.

Change-Id: Iff26f5879ec632053de7de46154f962ce95a7512
Signed-off-by: Zahed Hossain <zahzahed@in.ibm.com>

show more ...

56e45c5815-Mar-2020 Tom Joseph <tomjoseph@in.ibm.com>

Add responder for Platform Event Message

Provide infrastructure to hook handler for each PLDM event type.

Change-Id: I67480bb923f5eca311b2b0e597a146e020a5baf7
Signed-off-by: Tom Joseph <tomjoseph@i

Add responder for Platform Event Message

Provide infrastructure to hook handler for each PLDM event type.

Change-Id: I67480bb923f5eca311b2b0e597a146e020a5baf7
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>

show more ...

1896716114-Jan-2020 Sampa Misra <sampmisr@in.ibm.com>

implement commands for dump xfer

This commit implements the writeFile command
for dumpHandler in PLDM oem. This is for offloading
the dump from host memory to an external location
via bmc. Also it i

implement commands for dump xfer

This commit implements the writeFile command
for dumpHandler in PLDM oem. This is for offloading
the dump from host memory to an external location
via bmc. Also it implements the newfileAvailable
notification handler in libpldmresponder.This caters
to the new dump notification coming from the Host

Change-Id: Ibf7c1facea282ec4f772dfee646cca9f7877bb7d
Signed-off-by: Sampa Misra <sampmisr@in.ibm.com>

show more ...

a287072610-Feb-2020 George Liu <liuxiwei@inspur.com>

pldm: Optimized parsing of PDR JSON files

Move the generateStateEffecterRepo method of parse JSON to
pdr_state_effecter.hpp.

Tested with JSON files:
https://gist.github.com/lxwinspur/2c3fd68cdb35e

pldm: Optimized parsing of PDR JSON files

Move the generateStateEffecterRepo method of parse JSON to
pdr_state_effecter.hpp.

Tested with JSON files:
https://gist.github.com/lxwinspur/2c3fd68cdb35e06480c4a5f7890e3a06#file-effecter_pdr-json.

pldmtool platform GetPDR -d 1
Encode request successfully
Request Message:
08 01 80 02 51 01 00 00 00 00 00 00 00 01 80 00 00 00
Success in creating the socket : RC = 3
Success in connecting to socket : RC = 0
Success in sending message type as pldm to mctp : RC = 0
Write to socket successful : RC = 18
Total length:18
Loopback response message:
08 01 80 02 51 01 00 00 00 00 00 00 00 01 80 00 00 00
On first recv(),response == request : RC = 0
Total length: 46
Shutdown Socket successful : RC = 0
Response Message:
08 01 00 02 51 00 02 00 00 00 00 00 00 00 01 1d 00 01 00 00 00 01 0b 00 00 13 00 00 00 01 00 21 00 00 00 00 00 00 00 00 00 01 c4 00 01 06
Parsed Response Msg:
nextRecordHandle: 2
responseCount: 29
recordHandle: 1
PDRHeaderVersion: 1
PDRType: 11
recordChangeNumber: 0
dataLength: 19
PLDMTerminusHandle: 0
effecterID: 1
entityType: 33
entityInstanceNumber: 0
containerID: 0
effecterSemanticID: 0
effecterInit: 0
effecterDescriptionPDR: false
compositeEffecterCount: 1
stateSetID: 196
possibleStatesSize: 1
possibleStates: 6

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I8428ed042fb0a90ecc448073f059f66360066306

show more ...

1ec85d4b12-Feb-2020 George Liu <liuxiwei@inspur.com>

pdr: Update D-Bus mapping structure

For most PDR types, the D-Bus object structure(paths, interfaces, and
properties) should be defined in the JSON file instead of hard-coded.

Tested with JSON file

pdr: Update D-Bus mapping structure

For most PDR types, the D-Bus object structure(paths, interfaces, and
properties) should be defined in the JSON file instead of hard-coded.

Tested with JSON files:
https://gist.github.com/lxwinspur/2c3fd68cdb35e06480c4a5f7890e3a06#file-effecter_pdr-json.

pldmtool platform GetPDR -d 1
Encode request successfully
Request Message:
08 01 80 02 51 01 00 00 00 00 00 00 00 01 80 00 00 00
Success in creating the socket : RC = 3
Success in connecting to socket : RC = 0
Success in sending message type as pldm to mctp : RC = 0
Write to socket successful : RC = 18
Total length:18
Loopback response message:
08 01 80 02 51 01 00 00 00 00 00 00 00 01 80 00 00 00
On first recv(),response == request : RC = 0
Total length: 46
Shutdown Socket successful : RC = 0
Response Message:
08 01 00 02 51 00 02 00 00 00 00 00 00 00 01 1d 00 01 00 00 00 01 0b 00 00 13 00 00 00 01 00 21 00 00 00 00 00 00 00 00 00 01 c4 00 01 06
Parsed Response Msg:
nextRecordHandle: 2
responseCount: 29
recordHandle: 1
PDRHeaderVersion: 1
PDRType: 11
recordChangeNumber: 0
dataLength: 19
PLDMTerminusHandle: 0
effecterID: 1
entityType: 33
entityInstanceNumber: 0
containerID: 0
effecterSemanticID: 0
effecterInit: 0
effecterDescriptionPDR: false
compositeEffecterCount: 1
stateSetID: 196
possibleStatesSize: 1
possibleStates: 6

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ifc0cd1540b08e9b73e03d99d71a0980ef6353e72

show more ...

3cd6181410-Mar-2020 Deepak Kodihalli <dkodihal@in.ibm.com>

libpldmresponder: FRU: construct PDRs

Construct FRU record set and entity association PDRs for the FRUs for
which the BMC collects VPD (FRU information off of an EEPROM).

These PDRs are structured

libpldmresponder: FRU: construct PDRs

Construct FRU record set and entity association PDRs for the FRUs for
which the BMC collects VPD (FRU information off of an EEPROM).

These PDRs are structured as per PLDM spec DSP0248 v1.2.0.

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

show more ...

22b5a7d717-Mar-2020 Deepak Kodihalli <dkodihal@in.ibm.com>

libpldmresponder: GetPDR: fix response

The transferFlag was being incorrectly set to Start, instead of
StartAndEnd.

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

libpldmresponder: GetPDR: fix response

The transferFlag was being incorrectly set to Start, instead of
StartAndEnd.

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

show more ...

1e44c73b28-Feb-2020 George Liu <liuxiwei@inspur.com>

pldm: Move the updateDbusProperty method to the common utils

The updateDbusProperty method defined in libpldmresponder/bios_parse.cpp
and need to moved pldm/utils.hpp.
Add the updateDbusProperty met

pldm: Move the updateDbusProperty method to the common utils

The updateDbusProperty method defined in libpldmresponder/bios_parse.cpp
and need to moved pldm/utils.hpp.
Add the updateDbusProperty method to Mock test class and remove the
setDbusProperty method in Mock test class.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ib1c339af41df7f625d6976c192a3b72ce06b04a2

show more ...

c682fe2d04-Mar-2020 Deepak Kodihalli <dkodihal@in.ibm.com>

More PDR refactor

- PDRs can be created not just by the platform monitoring and control
handlers, but by other handlers (eg FRU) as well.
- For this purpose, create the PDR repo in the pldm daemon

More PDR refactor

- PDRs can be created not just by the platform monitoring and control
handlers, but by other handlers (eg FRU) as well.
- For this purpose, create the PDR repo in the pldm daemon, and pass it
to the handlers. This change warranted some refactor.

Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Change-Id: I4e789da9bae99dee1b535d92ce98ae5bb8eed62b
Signed-off-by: George Liu <liuxiwei@inspur.com>

show more ...

d3cf57ec31-Dec-2019 Xiaochao Ma <maxiaochao@inspur.com>

Updated supported PDLM commands list

The associative container "capabilities" was updated to reflect the
currently implemented PLDM types and respective commands. The return
value in the test code w

Updated supported PDLM commands list

The associative container "capabilities" was updated to reflect the
currently implemented PLDM types and respective commands. The return
value in the test code was updated.

Add set-bios-attribute-current-value.

Tested:
Tested on fp5280g2:

root@fp5280g2:~# pldmtool base GetPLDMCommands --type bios
Encode request successfully
Request Message:
.....
Parsed Response Msg:
Supported Commands : 1(GetBIOSTable) 7(SetBIOSAttributeCurrentValue) 8(GetBIOSAttributeCurrentValueByHandle) 12(GetDateTime) 13(SetDateTime)

Signed-off-by: Xiaochao Ma <maxiaochao@inspur.com>
Change-Id: Ic15efb589586d980258ed10d470f168e7c8cc6a6

show more ...

e53193fa23-Feb-2020 George Liu <liuxiwei@inspur.com>

pldm: Refector PDR repo based on the new PDR APIs

The related APIs for PDR operations is implemented in
pldm/libpldm/pdr.h and pldm/libpldm/pdr.c, we need to use this instead
of pdr::Repo(defined in

pldm: Refector PDR repo based on the new PDR APIs

The related APIs for PDR operations is implemented in
pldm/libpldm/pdr.h and pldm/libpldm/pdr.c, we need to use this instead
of pdr::Repo(defined in libpldmresponder/pdr.hpp).
pdr::Repo is now a C++ wrapper around the PDR APIs in libpldm.

Tested with unit tests, with JSON files:
https://gist.github.com/lxwinspur/2c3fd68cdb35e06480c4a5f7890e3a06#file-effecter_pdr-json.

$ pldmtool platform GetPDR -d 0
Encode request successfully
Request Message:
08 01 80 02 51 00 00 00 00 00 00 00 00 01 80 00 00 00
Success in creating the socket : RC = 3
Success in connecting to socket : RC = 0
Success in sending message type as pldm to mctp : RC = 0
Write to socket successful : RC = 18
Total length:18
Loopback response message:
08 01 80 02 51 00 00 00 00 00 00 00 00 01 80 00 00 00
On first recv(),response == request : RC = 0
Total length: 46
Shutdown Socket successful : RC = 0
Response Message:
08 01 00 02 51 00 02 00 00 00 00 00 00 00 01 1d 00 01 00 00 00 01 0b 00 00 13 00 00 00 01 00 21 00 00 00 00 00 00 00 00 00 01 c4 00 01 06
Parsed Response Msg:
nextRecordHandle: 2
responseCount: 29
recordHandle: 1
PDRHeaderVersion: 1
PDRType: 11
recordChangeNumber: 0
dataLength: 19
PLDMTerminusHandle: 0
effecterID: 1
entityType: 33
entityInstanceNumber: 0
containerID: 0
effecterSemanticID: 0
effecterInit: 0
effecterDescriptionPDR: false
compositeEffecterCount: 1
stateSetID: 196
possibleStatesSize: 1
possibleStates: 6

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I0c41f888b2e36a5a49968dff190ad8d53255b9ed

show more ...

5b145b9902-Mar-2020 Sampa Misra <sampmisr@in.ibm.com>

libpldmresponder getBiosTable: delete bios tables

This commit deletes all the three persistent bios tables before
serving a request to getBIOSTable for type "string". This is done
to make the BIOS t

libpldmresponder getBiosTable: delete bios tables

This commit deletes all the three persistent bios tables before
serving a request to getBIOSTable for type "string". This is done
to make the BIOS tables consistent with the corresponding dbus property
values which might have changed after the tables are constructed and
sent over to Host.

Change-Id: Ic9bea66a2db5e2313d13423688a6b3e8bb127c9c
Signed-off-by: Sampa Misra <sampmisr@in.ibm.com>

show more ...

e297b9f402-Feb-2020 John Wang <wangzqbj@inspur.com>

Remove findStringName/Handle functions

Use the `find` functions in BiosStringTable.

Tested: all the code changes are about building bios tables.
tested on fp5280g2, with json
https://gist.github.co

Remove findStringName/Handle functions

Use the `find` functions in BiosStringTable.

Tested: all the code changes are about building bios tables.
tested on fp5280g2, with json
https://gist.github.com/wangzqbj/b24558331cb35d14fca3b555ef03e458

saw the built tables are as expected.

$ pldmtool bios GetBIOSTable -t 0
...
...
PLDM StringTable:
BIOSStringHandle : BIOSString
0 : CodeUpdatePolicy
1 : Concurrent
2 : Disruptive
3 : Led
4 : Model
5 : OUTLET
6 : Off
7 : On
8 : str_example3

$ pldmtool bios GetBIOSTable -t 1
...
...
PLDM AttributeTable:
AttributeHandle: 0, AttributeNameHandle: 0(CodeUpdatePolicy)
AttributeType: BIOSEnumerationReadOnly
NumberOfPossibleValues: 2
PossibleValueStringHandle[0] = 1(Concurrent)
PossibleValueStringHandle[1] = 2(Disruptive)
NumberOfDefaultValues: 1
DefaultValueStringHandleIndex[0] = 0, StringHandle = 1(Concurrent)
AttributeHandle: 1, AttributeNameHandle: 3(Led)
AttributeType: BIOSEnumeration
NumberOfPossibleValues: 2
PossibleValueStringHandle[0] = 7(On)
PossibleValueStringHandle[1] = 6(Off)
NumberOfDefaultValues: 1
DefaultValueStringHandleIndex[0] = 1, StringHandle = 6(Off)
AttributeHandle: 2, AttributeNameHandle: 5(OUTLET)
AttributeType: BIOSInteger
LowerBound: 0
UpperBound: 68002
ScalarIncrement: 1
DefaultValue: 0
AttributeHandle: 3, AttributeNameHandle: 4(Model)
AttributeType: BIOSString
StringType: 0x01
MinimumStringLength: 1
MaximumStringLength: 100
DefaultStringLength: 8
DefaultString: FP5280G2
AttributeHandle: 4, AttributeNameHandle: 8(str_example3)
AttributeType: BIOSStringReadOnly
StringType: 0x00
MinimumStringLength: 1
MaximumStringLength: 100
DefaultStringLength: 2
DefaultString: ef

$ pldmtool bios GetBIOSTable -t 2
...
...
PLDM AttributeValueTable:
AttributeHandle: 0
AttributeType: BIOSEnumerationReadOnly
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 0, StringHandle = 1(Concurrent)
AttributeHandle: 1
AttributeType: BIOSEnumeration
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 1, StringHandle = 6(Off)
AttributeHandle: 2
AttributeType: BIOSInteger
CurrentValue: 0
AttributeHandle: 3
AttributeType: BIOSString
CurrentStringLength: 12
CurrentString: powersupply0
AttributeHandle: 4
AttributeType: BIOSStringReadOnly
CurrentStringLength: 2
CurrentString: ef

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

show more ...

59ef607320-Jan-2020 John Wang <wangzqbj@inspur.com>

bios: enum: Remove sorting of possible values

Possible values are sorted in byte order at runtime,
which will cause inconsistencies with the order in JSON file.

eg

json:
possible_values: ["On", "O

bios: enum: Remove sorting of possible values

Possible values are sorted in byte order at runtime,
which will cause inconsistencies with the order in JSON file.

eg

json:
possible_values: ["On", "Off"];

runtime vector:
possible_values: ["Off", "On"];

pldm uses the index of the possible values to set the
enum attribute, it's better to not sort it.

Tested:

tested on fp5280g2, with enum_attrs.json
https://gist.github.com/wangzqbj/b24558331cb35d14fca3b555ef03e458

possible_values: [ "On", "Off" ];
default_value: [ "Off" ]

Before the commit:

GetAttributeCurrentValueByHandle:
root@fp5280g2:/tmp# pldmtool raw --data 0x80 0x03 0x08 0x00 0x00 0x00 0x00 0x00 0x01 0x00
...
...
Response Message:
08 01 00 03 08 00 00 00 00 00 05 01 00 //current value index = 0

After:

GetAttributeCurrentValueByHandle:
root@fp5280g2:/tmp# pldmtool raw --data 0x80 0x03 0x08 0x00 0x00 0x00 0x00 0x00 0x01 0x00
...
...
Response Message:
08 01 00 03 08 00 00 00 00 00 05 01 01 //current value index = 1

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

show more ...

b368b33723-Feb-2020 Pavithra Barithaya <pbaritha@in.ibm.com>

Fru:Change of pass by value to const reference

Change-Id: Idf53d897375f895fc52ec0a49ee0a2517ed32258
Signed-off-by: Pavithra Barithaya <pbaritha@in.ibm.com>

1...<<111213141516