Show option->text of BIOS knob in Redfish response.
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.
Code changes are made for the same.
Tested
Sample knobs from BIOS.
<knob name="AdaptiveRefreshMgmtLevel" ... >
<options>
<option text="Default" value="0x0"/>
<option text="Level A" value="0x1"/>
<option text="Level B" value="0x2"/>
<option text="Level C" value="0x3"/>
</options>
</knob>
<knob name="ADDDCEn" ... >
<options>
<option text="Disable" value="0x0"/>
<option text="Enable" value="0x1"/>
</options>
</knob>
Corresponding Redfish response in BiosAttributeRegistry
{
"AttributeName": "AdaptiveRefreshMgmtLevel",
"CurrentValue": "0x00",
"DefaultValue": "0x00",
"DisplayName": "AdaptiveRefreshMgmtLevel",
"HelpText": "ARFM Level when ... ",
"MenuPath": "./",
"ReadOnly": false,
"Type": "Enumeration",
"Value": [
{
"ValueDisplayName": "Default",
"ValueName": "0x0"
},
{
"ValueDisplayName": "Level A",
"ValueName": "0x1"
},
{
"ValueDisplayName": "Level B",
"ValueName": "0x2"
},
{
"ValueDisplayName": "Level C",
"ValueName": "0x3"
}
]
},
{
"AttributeName": "ADDDCEn",
"CurrentValue": "0x00",
"DefaultValue": "0x00",
"DisplayName": "ADDDCEn",
"HelpText": "Enable/Disable ADDDC Sparing",
"MenuPath": "./",
"ReadOnly": false,
"Type": "Enumeration",
"Value": [
{
"ValueDisplayName": "Disable",
"ValueName": "0x0"
},
{
"ValueDisplayName": "Enable",
"ValueName": "0x1"
}
]
}
Change-Id: I77b091fe86db21906c2556bb1be87aafc712bc76
Signed-off-by: Arun Lal K M <arun.lal@intel.com>
diff --git a/yaml/xyz/openbmc_project/BIOSConfig/Manager.interface.yaml b/yaml/xyz/openbmc_project/BIOSConfig/Manager.interface.yaml
index b1b7a38..9b8dee7 100644
--- a/yaml/xyz/openbmc_project/BIOSConfig/Manager.interface.yaml
+++ b/yaml/xyz/openbmc_project/BIOSConfig/Manager.interface.yaml
@@ -62,7 +62,7 @@
- name: BaseBIOSTable
type:
dict[string,struct[enum[self.AttributeType],boolean,string,string,string,variant[int64,string],variant[int64,string],array[struct[enum[self.BoundType],
- variant[int64, string]]]]]
+ variant[int64, string],string]]]]
description: >
map{attributeName,struct{attributeType,readonlyStatus,displayname,
description,menuPath,current,default,
@@ -74,11 +74,11 @@
"Advanced/Memory Configuration/Memory Operating Speed Selection",
"0x00",
"0x0B",
- { {"OneOf", "auto"},
- {"OneOf", "2133"},
- {"OneOf", "2400"},
- {"OneOf", "2664"},
- {"OneOf", "2933"}
+ { {"OneOf", "auto", "enum0"},
+ {"OneOf", "2133", "enum1"},
+ {"OneOf", "2400", "enum2"},
+ {"OneOf", "2664", "enum3"},
+ {"OneOf", "2933", "enum4"}
}
} }
Example 2:
@@ -90,9 +90,9 @@
"Advanced/Debug Feature Selection",
0x00,
0x01,
- { {"MinBound", 0},
- {"MaxBound", 4},
- {"ScalarIncrement",1}
+ { {"MinBound", 0, ""},
+ {"MaxBound", 4, ""},
+ {"ScalarIncrement", 1, ""}
}
} }