Add depex support in bios.xml parsing.

Added logic to execute depex expression for every knob in bios.xml.
knob is added to BiosAttributeRegistry only if depex evaluation result
is TRUE.

Tested:
By giving GET Request to
'redfish/v1/Registries/BiosAttributeRegistry/BiosAttributeRegistry'.
Output sample showing few knobs added becuase depex evaluation result
was TRUE:

{
    "AttributeName": "AEPErrorInjEn",
    "CurrentValue": "0x00",
    "DefaultValue": "0x00",
    "DisplayName": "AEPErrorInjEn",
    "HelpText": "Enable/Disable PMem Error Injection",
    "MenuPath": "./",
    "ReadOnly": false,
    "Type": "String",
    "Value": [
        {
            "OneOf": "0x0"
        },
        {
            "OneOf": "0x1"
        }
    ]
}
{
    "AttributeName": "wrVrefCenter",
    "CurrentValue": "0x01",
    "DefaultValue": "0x01",
    "DisplayName": "wrVrefCenter",
    "HelpText": "Write Vref Centering Disable/Enable",
    "MenuPath": "./",
    "ReadOnly": false,
    "Type": "String",
    "Value": [
        {
            "OneOf": "0x0"
        },
        {
            "OneOf": "0x1"
        }
    ]
}

Following are few knobs rejected becuase depex evaluation
result was FALSE:

<knob  type="scalar" setupType="oneof" name="PfrProvision"
varstoreIndex="04" prompt="PFR Provision"
description="Selectable if PFR is not locked." size="1"
offset="0x0126"
depex="Sif( PfrSupported _EQU_ 0 ) _AND_ Gif( PfrLockStatus _EQU_ 1 OR
PfrProvisionStatus _EQU_ 1 )"
default="0x00" CurrentVal="0x00">
    <options>
        <option text="Disable" value="0x0"/>
        <option text="Enable" value="0x1"/>
    </options>
</knob>

<knob  type="scalar" setupType="oneof" name="SataHotPlugController0_0"
varstoreIndex="01" prompt="
Hot Plug" description="Designates this port as Hot Pluggable." size="1"
offset="0x0119"
depex="Sif( PchSata_0 _EQU_ 0 ) _AND_
Sif( SataExternalController0_0 _EQU_ 1 )" default="0x00"
CurrentVal="0x00">
    <options>
        <option text="Disabled" value="0x0"/>
        <option text="Enabled" value="0x1"/>
    </options>
</knob>

Signed-off-by: Arun Lal K M <arun.lal@intel.com>
Change-Id: Iff1ea01fb06200e21cc7f2a2e0fdfdff70376581
2 files changed
tree: 5618307f79c5651c6eca3e552144a7c2a1793cef
  1. cmake/
  2. docs/
  3. include/
  4. non-yocto/
  5. src/
  6. tests/
  7. .clang-format
  8. .gitignore
  9. cmake-format.json
  10. CMakeLists.txt
  11. CMakeLists.txt.in
  12. generate-whitelist.py
  13. ipmi-whitelist.conf
  14. LICENSE
  15. MAINTAINERS
  16. README.md
README.md

Intel IPMI OEM support library

This component is intended to provide Intel-specific IPMI[3] command handlers for OpenBMC. These handlers are intended to integrate BMC with servers based on Intel architecture.

Overview

intel-ipmi-oem serves as an extension[1] to OpenBMC IPMI daemon[2]. It is compiled as a shared library and intended to both:

  • override existing implementation of standard IPMI commands to comply with Intel-specific solutions,
  • provide implementation for non-standard OEM extensions.

Capabilities

Related features provided by the library are grouped in separate source files. Main extensions to vanilla OpenBMC IPMI stack are the following:

  • Acquiring SMBIOS data over IPMI
  • Commands for better integration with Intel hardware
  • Firmware update extensions
  • Extended parsing of IPMI Platform Events[4]

References

  1. OpenBMC IPMI Architecture
  2. Phosphor IPMI Host
  3. IPMI Specification v2.0
  4. Intel Platform Events parsing