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>
1 file changed
tree: 3453c0a20b8180342aa35c1e930ea5c3cc72c12c
  1. gen/
  2. subprojects/
  3. yaml/
  4. .gitignore
  5. .markdownlint.yaml
  6. .prettierrc.yaml
  7. .shellcheck
  8. LICENSE
  9. meson.build
  10. meson_options.txt
  11. OWNERS
  12. README.md
  13. requirements.md
README.md

phosphor-dbus-interfaces

YAML descriptors of standard D-Bus interfaces. The format is described by the sdbusplus binding generation tool sdbus++.

Before defining a new D-Bus interface or modifying an existing one, please read through the documented set of the common requirements and expectations.

Building

This project can be built with meson. The typical meson workflow is: meson builddir && ninja -C builddir.

The meson files used to handle the YAML files are automatically generated and found under the gen subdirectory. When adding or removing YAML files, this must be regenerated. This can be done with the helper script found in the gen subdirectory: cd gen && ./regenerate-meson.

Configuration

Only the xyz/openbmc_project and org/freedesktop interfaces are built by default. Other interfaces can be enabled by meson options:

  • com/ibm - -Ddata_com_ibm=true
  • org/open_power - -Ddata_org_open_power=true

Example: meson builddir -Ddata_com_ibm=true && ninja -C builddir

References