#
7927f90c |
| 09-Oct-2023 |
Sagar Srinivas <sagar.srinivas@ibm.com> |
bios: Add support for enum value display names
This commits adds changes to add support for the value display names for the Enum BIOS attributes.
GET on /redfish/v1/Registries/BiosAttributeRegistry
bios: Add support for enum value display names
This commits adds changes to add support for the value display names for the Enum BIOS attributes.
GET on /redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry/ shows list of Attributes under RegistryEntries. Each attribute corresponds to a knob in BIOS.
If knob in BIOS is of type Enumeration, it will have 'option' with 'text' and 'value'. This text should be mapped to attribute->Value->ValueDisplayName.
This change only applies to ENUM type of BIOS attributes and does not make sense for Integer and String attributes. Hence, we are sending attribute name in place of the value display name field for these attributes.
The corresponding bios-setting-mgr change which mandated this change in PLDM is at-
[1] https://github.com/openbmc/bios-settings-mgr/commit/1a448ad88fdaec7e082b4a1c437f7f3c990402cd
Signed-off-by: Sagar Srinivas <sagar.srinivas@ibm.com> Change-Id: Ib2882c93e81a70332e4897b196ae812b63cf6184
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 awa
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 ...
|
#
1244acfd |
| 13-Aug-2020 |
George Liu <liuxiwei@inspur.com> |
support runtime update of BIOS attributes Register the BIOSConfig/PendingAttributes signal and when the out of band redfish user updates the BIOS attributes, the pldm daemon should proce
support runtime update of BIOS attributes Register the BIOSConfig/PendingAttributes signal and when the out of band redfish user updates the BIOS attributes, the pldm daemon should process and check the PendingAttributes porperty, and then update the BIOSConfig/BaseBIOSTable property and the BIOS table. Tested: test JSON with https://gist.github.com/lxwinspur/2afffff2e445fddf90dfed6eceef4014 Type.Enumeration: ~#: busctl set-property xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager xyz.openbmc_project.BIOSConfig.Manager PendingAttributes a\{s\(sv\)\} 1 "Led" "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.Enumeration" s "xyz.openbmc_project.Led.Physical.Action.On" ~#: pldmtool bios getbiostable -t 2 PLDM AttributeValueTable: ... ... AttributeHandle: 3 AttributeType: BIOSEnumeration NumberOfCurrentValues: 1 CurrentValueStringHandleIndex[0] = 0, StringHandle = On ... ... Type.String ~#: busctl set-property xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager xyz.openbmc_project.BIOSConfig.Manager PendingAttributes a\{s\(sv\)\} 1 "Model" "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.String" s "testModel" ~#: pldmtool bios getbiostable -t 2 PLDM AttributeValueTable: AttributeHandle: 0 AttributeType: BIOSString CurrentStringLength: 10 CurrentString: testModel ... ... Type.Integer ~#: busctl set-property xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager xyz.openbmc_project.BIOSConfig.Manager PendingAttributes a\{s\(sv\)\} 1 "OUTLET" "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.Integer" x 1000 ~#: pldmtool bios getbiostable -t 2 ... ... AttributeHandle: 2 AttributeType: BIOSInteger CurrentValue: 1000 ... ... Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I4d4d2941e6c9bfa7f6fccb664db1580f2ffc9c9f
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
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 ...
|
#
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 att
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 ...
|