#
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 ...
|
#
d6608096 |
| 23-May-2024 |
Archana Kakani <archana.kakani@ibm.com> |
bios: Converting bios json keys to lower snake case
Converting following bios attribute json keys to lower snake case displayName --> display_name helpText --> help_text readOnly --> read_only
bios: Converting bios json keys to lower snake case
Converting following bios attribute json keys to lower snake case displayName --> display_name helpText --> help_text readOnly --> read_only
Tested: Power on/off Gtest passed
Change-Id: Iad88ed7bc381d66182c99e31e7d385f65750e0ed Signed-off-by: Archana Kakani <archana.kakani@ibm.com>
show more ...
|
#
cbe68b2d |
| 23-Feb-2024 |
Sagar Srinivas <sagar.srinivas@ibm.com> |
Remove iostream references
With the adoption of LG2 we do not need iostream prints to the journal. The library was referred but never used in these cases.
Signed-off-by: Sagar Srinivas <sagar.srini
Remove iostream references
With the adoption of LG2 we do not need iostream prints to the journal. The library was referred but never used in these cases.
Signed-off-by: Sagar Srinivas <sagar.srinivas@ibm.com> Change-Id: I11d3f00284e4f16b63cddb8da2fed14d59672ba1
show more ...
|
#
58cbcaf2 |
| 06-Oct-2023 |
Kamalkumar Patel <kamalkumar.patel@ibm.com> |
PLDM:Catching exception precisely and printing it
Correcting catch block in PLDM repo to print all exception precisely so pldm trace can be more useful to identify defect easily.
Change-Id: If2e86d
PLDM:Catching exception precisely and printing it
Correcting catch block in PLDM repo to print all exception precisely so pldm trace can be more useful to identify defect easily.
Change-Id: If2e86dcb031ddc2e927e7836d7f4359f5b44cdec Signed-off-by: Kamalkumar Patel <kamalkumar.patel@ibm.com>
show more ...
|
#
47792274 |
| 13-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pldm: Include config.h via compiler argument
This removes any ambiguity about which config.h is being included. Subprojects such as libpldm and phosphor-logging also generate config.h files, and the
pldm: Include config.h via compiler argument
This removes any ambiguity about which config.h is being included. Subprojects such as libpldm and phosphor-logging also generate config.h files, and these are exposed in the include path.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I3e0ccd6339f088380ffa29d41167b07aefc7dd16
show more ...
|
#
5bb9edb9 |
| 05-Aug-2021 |
George Liu <liuxiwei@inspur.com> |
BIOS: support readonly attributes
Since the P10 system has BMC to manager the BIOS attributes, and the BMC side does not know the attribute values of the BIOS, it should allow the OOB interface(Host
BIOS: support readonly attributes
Since the P10 system has BMC to manager the BIOS attributes, and the BMC side does not know the attribute values of the BIOS, it should allow the OOB interface(Host) to be able to set BIOS readOnly attributes, while still preventing the redfish-doPATCH operation on it.
Tested: if the readOnly attribute of the pvm_system_name is true, so we can use `pldmtool` to update the BIOS attributes.
pldmtool bios SetBIOSAttributeCurrentValue -a pvm_system_name -d XXX { "Response": "SUCCESS" }
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Iabcb5c2400eb0a5c208cc76180d4b07e02457f44
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 ...
|
#
92bb4021 |
| 03-Sep-2020 |
George Liu <liuxiwei@inspur.com> |
BIOS: Implement HelpText and DisplayName properties
Introduce HelpText and DisplayName fields in the PLDM BIOS JSONs, these should be parsed and passed to the D-Bus APIs that populates the BIOS tabl
BIOS: Implement HelpText and DisplayName properties
Introduce HelpText and DisplayName fields in the PLDM BIOS JSONs, these should be parsed and passed to the D-Bus APIs that populates the BIOS table. https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/BIOSConfig/Manager.interface.yaml#L68 Also, they have the same names in the Redfish schema. https://redfish.dmtf.org/schemas/v1/AttributeRegistry.v1_3_3.json
Tested: test with JSON https://gist.github.com/lxwinspur/2afffff2e445fddf90dfed6eceef4014
busctl get-property xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager xyz.openbmc_project.BIOSConfig.Manager BaseBIOSTable
a{s(sbsssvva(sv))} 5
"CodeUpdatePolicy" "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.Enumeration" true "CodeUpdatePolicy DisplayName" "CodeUpdatePolicy HelpText" "" s "Concurrent" s "Concurrent" 2 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.OneOf" s "Concurrent" "xyz.openbmc_project.BIOSConfig.Manager.BoundType.OneOf" s "Disruptive"
"Led" "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.Enumeration" false "Led DisplayName" "Led HelpText" "" s "Off" s "Off" 2 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.OneOf" s "On" "xyz.openbmc_project.BIOSConfig.Manager.BoundType.OneOf" s "Off"
"Model" "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.String" false "Model DisplayName" "Model HelpText" "" s "powersupply0" s "FP5280G2" 2 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.MinStringLength" x 1 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.MaxStringLength" x 100
"OUTLET" "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.Integer" false "OUTLET DisplayName" "OUTLET HelpText" "" x 9127925392260618112 x 0 3 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.LowerBound" x 0 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.UpperBound" x 68002 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.ScalarIncrement" x 1
"str_example3" "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.String" true "str_example3 DisplayName" "str_example3 HelpText" "" s "ef" s "ef" 2 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.MinStringLength" x 1 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.MaxStringLength" x 100
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I4e0e28a6fbaeb409b4d57dfcb54d79aee1c5b211
show more ...
|
#
daa6923c |
| 02-Sep-2020 |
George Liu <liuxiwei@inspur.com> |
BIOS: Fix readOnly BIOS attributes
Previously, the readOnly property is true when without a D-Bus section in BIOS JSON. Now, the readOnly property should be determined by a new readOnly field, which
BIOS: Fix readOnly BIOS attributes
Previously, the readOnly property is true when without a D-Bus section in BIOS JSON. Now, the readOnly property should be determined by a new readOnly field, which should be introduced in the JSON. The checks are updated to ensure that if there is D-Bus mapping then only D-Bus lookups are done.
Tested: test with json https://gist.github.com/lxwinspur/2afffff2e445fddf90dfed6eceef4014
busctl get-property xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager xyz.openbmc_project.BIOSConfig.Manager BaseBIOSTable
a{s(sbsssvva(sv))} 5 "CodeUpdatePolicy" "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.Enumeration" true "" "" "" s "Concurrent" s "Concurrent" 2 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.OneOf" s "Concurrent" "xyz.openbmc_project.BIOSConfig.Manager.BoundType.OneOf" s "Disruptive"
"Led" "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.Enumeration" false "" "" "" s "Off" s "Off" 2 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.OneOf" s "On" "xyz.openbmc_project.BIOSConfig.Manager.BoundType.OneOf" s "Off"
"Model" "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.String" false "" "" "" s "powersupply0" s "FP5280G2" 2 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.MinStringLength" x 1 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.MaxStringLength" x 100
"OUTLET" "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.Integer" false "" "" "" x 9149282306036291456 x 0 3 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.LowerBound" x 0 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.UpperBound" x 68002 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.ScalarIncrement" x 1
"str_example3" "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.String" true "" "" "" s "ef" s "ef" 2 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.MinStringLength" x 1 "xyz.openbmc_project.BIOSConfig.Manager.BoundType.MaxStringLength" x 100
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I73d2dcb9fc65a1aa8bbd060cfb9d44e708b47aae
show more ...
|
#
d130e1a3 |
| 17-Jun-2020 |
Deepak Kodihalli <dkodihal@in.ibm.com> |
common: code re-org
Move common files under a common/ directory.
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com> Change-Id: I0eaf91d4ee94c1e78228da0c50892f82e91912fa
|
#
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 ...
|
#
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 ...
|