b4268607 | 17-Apr-2020 |
Tom Joseph <tomjoseph@in.ibm.com> |
pldm_events: Parse state sensor PDRs from the Host PDR
Parse the State Sensor PDRs from the host firmware and build the HostStateSensorMap data structure which will be used to lookup the sensor info
pldm_events: Parse state sensor PDRs from the Host PDR
Parse the State Sensor PDRs from the host firmware and build the HostStateSensorMap data structure which will be used to lookup the sensor info for the sensorEventType in the PlatformEventMessage command. Also clear the HostStateSensorMap when the host powers off.
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com> Change-Id: Id85a73f1a0a1caf4b4155a8d235b3e807383e53a
show more ...
|
64d26bed | 14-Jan-2020 |
George Liu <liuxiwei@inspur.com> |
pldm: Add gmock test for the setNumericEffecterValue method
Add the setNumericEffecterValueHandler test method to the test/libpldmresponder_platform_numeric_effecter_test.cpp.
Signed-off-by: George
pldm: Add gmock test for the setNumericEffecterValue method
Add the setNumericEffecterValueHandler test method to the test/libpldmresponder_platform_numeric_effecter_test.cpp.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Iccc7e672ddd5044eb23f5e61202a5a51a1ef17f3
show more ...
|
0d7aca8c | 30-Mar-2020 |
George Liu <liuxiwei@inspur.com> |
pldm: Optimized the setXXXHandler method in platform.hpp
Since other PDR types(eg: numeric effecter PDR) need to be added later, all setXXXHandler methods are best separated, which is easy to mainta
pldm: Optimized the setXXXHandler method in platform.hpp
Since other PDR types(eg: numeric effecter PDR) need to be added later, all setXXXHandler methods are best separated, which is easy to maintain and read. so moved the setStateEffecterStateHandler method to platform_state_effecter.hpp.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Iae120541963f3026e303f38f7960f51434be9de3
show more ...
|
456c9a2f | 12-Jan-2020 |
George Liu <liuxiwei@inspur.com> |
pldm: Add parsing JSON for Numeric Effecter PDR
According to spec DSP0248_1.2.0: 28.11 and effecter_pdr.json, parse JSON and generate PDR structure.
In addition: 1. move the parsing generateNumeri
pldm: Add parsing JSON for Numeric Effecter PDR
According to spec DSP0248_1.2.0: 28.11 and effecter_pdr.json, parse JSON and generate PDR structure.
In addition: 1. move the parsing generateNumericEffecterHandler method to pdr_numeric_effecter_pdr.hpp. 2. test/libpldmresponder_pdr_state_effecter_test.cpp renamed test/libpldmresponder_pdr_effecter_test.cpp.
Tested with JSON files: https://gist.github.com/lxwinspur/2c3fd68cdb35e06480c4a5f7890e3a06#file-effecter_pdr-json.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I4254a14f0fd5e33b312f65c15c9a23437e28d341
show more ...
|
c94d4941 | 14-Jan-2020 |
Chicago Duan <duanzhijia01@inspur.com> |
pldm: Add numeric effecter configuration to the effecter_pdr.json
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com> Change-Id: Ic8ecd052001e52b855872c27e7e11f21679ddb7c Signed-off-by: George Liu
pldm: Add numeric effecter configuration to the effecter_pdr.json
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com> Change-Id: Ic8ecd052001e52b855872c27e7e11f21679ddb7c Signed-off-by: George Liu <liuxiwei@inspur.com>
show more ...
|
0be647d3 | 02-Mar-2020 |
George Liu <liuxiwei@inspur.com> |
pldm: rename state_effecter_pdr.json to effecter_pdr.json
state_effecter_pdr.json represents PDR state effecter, and the PDR numeric effecter is added after it, so it is renamed effecter_pdr.json.
pldm: rename state_effecter_pdr.json to effecter_pdr.json
state_effecter_pdr.json represents PDR state effecter, and the PDR numeric effecter is added after it, so it is renamed effecter_pdr.json.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ia6a1b54787cada3146dfc108874ea406d436c6f0
show more ...
|
8cb6f665 | 10-Apr-2020 |
Deepak Kodihalli <dkodihal@in.ibm.com> |
event: Handling pldmPDRRepositoryChgEvent
Added a handler to react to the "pldmPDRRepositoryChgEvent" event and extract the data. If the eventDataFormat is "formatIsPDRHandles" then the changeRecord
event: Handling pldmPDRRepositoryChgEvent
Added a handler to react to the "pldmPDRRepositoryChgEvent" event and extract the data. If the eventDataFormat is "formatIsPDRHandles" then the changeRecords are further extracted. If the eventDataOperation is "recordAdded" then the PDRHandles are extracted from the changeEntry data and stored in the "pdrRecordHandle" vector.
"decode_pldm_pdr_repository_chg_event_data" function will extract the eventData and changeRecord from the pldmPDRRepositoryChgEvent class while the "decode_pldm_pdr_repository_change_record_data" will extract the changeEntries data from the changeRecord. Unit tests for the above decode functions have been added.
Extracted PDR handles are used to fetch PDRs corresponding to the same from the host.
Signed-off-by: Zahed Hossain <zahzahed@in.ibm.com> Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com> Change-Id: I32e8745e04ac82393e067c0f0ab48802809495a6
show more ...
|
51efaf87 | 02-Apr-2020 |
Pavithra Barithaya <pbaritha@in.ibm.com> |
Add HostPDRHandler class
HostPDRHandler has an API to fetch PDRs from the host.
The class HostPDRHandler has a function fetchPDR which basically calls GetPDR on the host using libpldm's pldm_send_r
Add HostPDRHandler class
HostPDRHandler has an API to fetch PDRs from the host.
The class HostPDRHandler has a function fetchPDR which basically calls GetPDR on the host using libpldm's pldm_send_recv API.
The retrieved PDRs are stored in the BMCs primary PDR repo.
Change-Id: Ifd727316caf37d49f17e117b32ee105f6d941e0e Signed-off-by: Pavithra Barithaya <pbaritha@in.ibm.com> Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
show more ...
|
46ece063 | 18-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 ...
|
6080aae7 | 13-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 ...
|
3be7085e | 13-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 ...
|
95e6b3c1 | 12-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 ...
|
d965934f | 27-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 ...
|
29683b53 | 27-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 ...
|
e2efdcce | 12-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 ...
|
1ec85d4b | 12-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 ...
|
3cd61814 | 10-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 ...
|
1e44c73b | 28-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 ...
|
c682fe2d | 04-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 ...
|
ba4c1fb3 | 05-Feb-2020 |
George Liu <liuxiwei@inspur.com> |
pldmtool: Fix SetStateEffecterStates command
Fix and use the following command to set state effecter PDR: pldmtool platform SetStateEffecterStates --id <effecterId> --count <count> --data <setReques
pldmtool: Fix SetStateEffecterStates command
Fix and use the following command to set state effecter PDR: pldmtool platform SetStateEffecterStates --id <effecterId> --count <count> --data <setRequest effecterState ...>
Tested: $ pldmtool platform SetStateEffecterStates -i 1 -c 1 -d 0 2 set_request = 0 Encode request successfully Request Message: 08 01 80 02 39 01 00 01 00 02 00 00 00 00 00 00 00 00 00 00 00 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 = 24 Total length:24 Loopback response message: 08 01 80 02 39 01 00 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 On first recv(),response == request : RC = 0 Total length: 6 Shutdown Socket successful : RC = 0 Response Message: 08 01 00 02 39 00 SetStateEffecterStates: SUCCESS
$ pldmtool platform SetStateEffecterStates -i 1 -c 1 -d 1 2 set_request = 1 Encode request successfully Request Message: 08 01 80 02 39 01 00 01 01 02 00 00 00 00 00 00 00 00 00 00 00 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 = 24 Total length:24 Loopback response message: 08 01 80 02 39 01 00 01 01 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 On first recv(),response == request : RC = 0 Total length: 6 Shutdown Socket successful : RC = 0 Response Message: 08 01 00 02 39 00 SetStateEffecterStates: SUCCESS
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I4a2e71b149040c3e0c0f585f8fae0e5e25ec7ceb
show more ...
|
e53193fa | 23-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 ...
|
f357b5ab | 26-Feb-2020 |
Lei YU <mine260309@gmail.com> |
Move libpldm test cases into libpldm directory
The test cases for different libraries in this repo are put in the same test directory. As a follow up of building libpldm only, move the test cases of
Move libpldm test cases into libpldm directory
The test cases for different libraries in this repo are put in the same test directory. As a follow up of building libpldm only, move the test cases of libpldm into libpldm/tests, so that the test cases could be built and run by libpldm-only option.
Tested: Verify the libpldm tests are built and run by libpldm-only option. Verify all the tests are built and run without libpldm-only option.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I097000bef316f787ef1894f1a3feec5089ea081a
show more ...
|
e176a65d | 14-Feb-2020 |
John Wang <wangzqbj@inspur.com> |
bios_table: Check the attr type when set attr value
When setting an attribute, we only checked whether the attributes's type is non-read-only, but the remote may send a non-read-only type that does
bios_table: Check the attr type when set attr value
When setting an attribute, we only checked whether the attributes's type is non-read-only, but the remote may send a non-read-only type that does not match the attribute.
eg, set an integer attribute:
the remote should send: 1(attr handle), 0x03(attr type,integer, non-read-only),100(integer value)
but it may send: 1(attr handle), 0x01(attr type,string, non-read-only),100(integer value) which is wrong.
Signed-off-by: John Wang <wangzqbj@inspur.com> Change-Id: I7db8b65f39b40624202627e2b4f94088dee0b423
show more ...
|
db914675 | 07-Feb-2020 |
Deepak Kodihalli <dkodihal@in.ibm.com> |
libpldm: add APIs for FRU record set PDR ops
Add APIs for: - adding FRU record set PDRs to a PDR repository - finding FRU record set PDRs in a PDR repository based on the FRU record set identifier
libpldm: add APIs for FRU record set PDR ops
Add APIs for: - adding FRU record set PDRs to a PDR repository - finding FRU record set PDRs in a PDR repository based on the FRU record set identifier.
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com> Change-Id: I2b233af1325849cfc5d7de6a9a69af6771b222b2
show more ...
|
3b02ed81 | 06-Feb-2020 |
Deepak Kodihalli <dkodihal@in.ibm.com> |
libpldm: add APIs for PDR operations
Add APIs for PDR operations such as: - Creating/destroying a PDR repository - Adding record to a PDR repository - Finding records in a PDR repository
Tested wit
libpldm: add APIs for PDR operations
Add APIs for PDR operations such as: - Creating/destroying a PDR repository - Adding record to a PDR repository - Finding records in a PDR repository
Tested with unit tests.
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com> Change-Id: Ied6ae1755a1a249b563bf0fa953586789810b3dc
show more ...
|