Entity Configuration System

The Entity Configuration System in tlBMC is responsible for parsing platform configurations (modeled on standard OpenBMC Entity Manager JSON files) and translating them into C++ config objects and schemas that drive the discovery, topological mapping, and telemetry polling in tlBMC.

The core implementation resides in the third_party/milotic/external/cc/tlbmc/configs/ directory.


Overview

The Entity Configuration system:

  • Loads and parses JSON files representing platform hardware components and virtual devices.
  • Validates the JSON fields against defined schemas.
  • Maps physical devices to their respective driver configurations.
  • Constructs the machine's topological tree (TopologyConfig), linking parent and child chassis, slots, sensors, and cables.
  • Populates the local inventory table (FruTable).

Configuration Parsing and Probe Rules

The C++ entry point EntityConfigJsonImpl parses files under /usr/share/entity-manager/configurations/ (or designated directory) and evaluates probes to determine if a hardware component is present.

Probe Types

A configuration is only loaded if its "ProbeV2" rules evaluate to true. Supported probes include:

Probe TypeKeyDescription
IPMI FRU Probe"IpmiFru"Evaluates the presence
: : : of an EEPROM FRU based :
: : : on its bus, address, and :
: : : product name. :
GPIO Probe"Gpio"Evaluates one or more
: : : GPIO pin values. A match :
: : : occurs if the actual pin :
: : : values equal the :
: : : expected boolean states. :
**Offline Node Entity"OfflineNodeEntityInfo"Matches
: Probe** : : platform-specific :
: : : offline hardware :
: : : contexts. :
**Standard Boolean"TRUE" / "FALSE"Statically forces the
: Probe** : : probe to match or fail. :
Dependency ProbeFOUND('ConfigName')Evaluates to true if
: : : another named config has :
: : : already been :
: : : successfully probed :
: : : (using topological BFS :
: : : evaluation). :

Supported Configuration Schemas

EntityConfigJsonImpl parses specific JSON sections into dedicated configurations depending on the "Type" of exposed elements.

Sensor Configuration Types

Exposure "Type"Internal Protobuf ConfigDescription
HWMon TempHwmonTempSensorConfigPolled via Linux
: : : sysfs hwmon :
: : : interfaces. :
PSU SensorsPsuSensorConfigPolled via PMBus or
: : : custom PSU :
: : : monitoring ICs. :
ADC SensorsAdcSensorConfigPolled via
: : : analog-to-digital :
: : : converter chips. :
Fan ControllersFanControllerConfigDriver configuration
: : : for fan controller :
: : : chips. :
Fan PWMFanPwmConfigIndividual PWM
: : : control :
: : : configurations. :
Fan TachFanTachConfigIndividual
: : : tachometer speed :
: : : sensors. :
Shared MemorySharedMemSensorConfigTelemetry shared via
: : : a shared memory :
: : : buffer. :
Intel CPUIntelCpuSensorConfigPolled via Intel CPU
: : : hardware interfaces. :
GPIO SensorGpioSensorConfigExposes pin voltage
: : : levels as discrete :
: : : sensors. :
Virtual SensorVirtualSensorConfigEvaluates
: : : mathematical :
: : : expressions using :
: : : other sensors. :
NIC TelemetryNicTelemetryConfigExposes metrics
: : : parsed from Network :
: : : Interface Cards. :
**RedfishRedfishAggregatedSensorConfigConfigures sensors
: Aggregated** : : aggregated from :
: : : satellite :
: : : controllers. :

Protobuf Configuration Schemas

The Entity Configuration System parses Entity Manager JSON configurations into structured protobuf messages. These messages are used by different collectors to initialize the corresponding services.

Core Inventory & Topology Schemas

  • FruTable (defined in fru.proto): Holds the list of all probed FRUs (field replaceable units) and inventory metrics.
  • TopologyConfig (defined in topology_config.proto): Maps the physical hierarchy of chassis, cards, slots, and cables.
  • AdHocFruConfig (defined in ad_hoc_fru_config.proto): Defines fallback inventory keys when EEPROMs are missing or unreadable.
  • GpioFruConfig (defined in gpio_fru_config.proto): Maps FRU presence checks to discrete GPIO pins.

Common Device & Attribute Schemas

Sensor Driver & Subsystem Schemas


Examples

1. GPIO Probed Board Config

Shows a board configuration that is only loaded if GPIO pin SYS_PWROK is true.

{
    "Name": "Platform_Mobo",
    "Probe": {
        "Gpio": {
            "SYS_PWROK": true
        }
    },
    "Exposes": [
        {
            "Name": "Board_Temp",
            "Type": "tmp75",
            "Bus": 8,
            "Address": "0x48",
            "TlbmcOwned": true
        }
    ]
}

2. Dependency Probe (FOUND) Config

Shows a child riser card config that is only loaded if the parent "Platform_Mobo" is successfully probed.

{
    "Name": "Riser_Card",
    "Probe": "FOUND('Platform_Mobo')",
    "Exposes": [
        {
            "Name": "Riser_Temp",
            "Type": "tmp461",
            "Bus": 9,
            "Address": "0x4c",
            "TlbmcOwned": true
        }
    ]
}

Blocklist Configuration (blocklist_parser.cc)

To prevent tlBMC from scanning or interacting with unstable or reserved devices, a JSON blocklist configuration can be defined.

JSON Format

{
  "buses": [
    5,
    {
      "bus": 12,
      "addresses": ["0x50", "0x51"]
    }
  ]
}

In this example, I2C bus 5 is blocked entirely. On bus 12, only addresses 0x50 and 0x51 are blocked.


Code References

Config Protos

Core Code