NIC Development Guide
更新时间: 2025/11/17
在Gitcode上查看源码

This document describes how to adapt a network interface card (NIC) to openUBMC.

NIC Introduction

The NIC, also known as a network adapter, network interface controller, or LAN adapter, is the hardware that enables the server to communicate over a network.

NICs are a key part of modern infrastructure. As technology advances, many different types of NICs have been developed. In out-of-band management, supporting diverse NICs has been a challenge in BMC technology. Based on the adapted NICs, openUBMC has formed a unified management framework to standardize management.

NIC Types Adapted by openUBMC

Onboard NIC Common NIC OCP NIC PCIe NIC (IB cards, FC cards, and Mezzanine cards were adapted in traditional servers but are generally not used in current projects.)

NIC Adaptation Process

Like other components, each NIC has a component self-description record (CSR) file. The CSR file tells openUBMC how to identify the NIC, manage NIC information, and monitor the NIC status.

CSR Information to Include When Adapting a New NIC

  • Fixed information such as the name, model, manufacturer, number of ports, and port types of the NIC
  • Out-of-band protocols supported by the NIC and the protocol documentation
  • Status of the NIC to be monitored, such as the NIC temperature, optical module temperature, and port connection status
  • Required sensors for the NIC and how to obtain their readings
  • Alarms to be reported and alarm conditions, such as temperature, CE, UCE, IERR, and rate matching
  • Whether the NIC requires a separate cooling policy

Basic NIC Information Acquisition

  • Confirm the NIC type (PCIe, OCP, standard low-speed NIC, and onboard NIC).
  • Obtain the NIC name and model from the NIC label or manufacturer data.
  • Determine the network port type and number of ports from the NIC design, interface type, and port type.

Advanced NIC Information Configuration

  • Identify the out-of-band protocols supported by the NIC (such as NC-SI and MCTP) from manufacturer data.
  • Obtain NIC temperature, optical module temperature, and port connection status from manufacturer data or hardware engineers.
  • Design sensors, alarms, and events based on NIC capabilities.
  • Write cooling strategies following the guidance of thermal engineers.

NIC Identification

  • Configure the self-description record (SR) file name using the format Bom + Id + AuxId.
  • For onboard and standard NICs, use the Bom + Id format for the file name. In the SR of the connected component (such as carrier board), configure the NIC connector and load the NIC SR file based on the presence signal from the hardware.
json
{
"Connector_LOM_1": {
      "Bom": "14220246",
      "Slot": 1,
      "Position": 5,
      "Presence": "<=/Scanner_Lom1Pres.Value |> expr(($1 == 1) ? 1 : 0)",
      "Id": "255",
      "AuxId": "",
      "Buses": [
        "I2c_2",
        "I2cMux_Pca9545_i2c7_chip_1"
      ],
      "SystemId": "${SystemId}",
      "ManagerId": "${ManagerId}",
      "ChassisId": "${ChassisId}",
      "SilkText": "J6008",
      "IdentifyMode": 1,  // Downstream component identification mode. 3 corresponds to Tianchi standard components, 2 corresponds to components with unreadable (reported) BoardId, and 1 corresponds to components with readable BoardId.
    },
    "Scanner_Lom1Pres": {
      "Chip": "#/Smc_ExpBoardSMC",
      "Offset": 134234368,  // SMC command word
      "Size": 2, // Number of data bytes
      "Mask": 1, // Data mask
      "Type": 0,
      "Period": 2000,  // Scanning period, in milliseconds
      "Value": 0
    }
}
  • For OCP and PCIe NICs, use the Bom + Id + AuxId format for the file name. Id consists of VendorID and DeviceID, and AuxId consists of SubVendorID and SubDeviceID.
json
{
    "Connector_OCP_1": {
        "Bom": "14220247",
        "Slot": 7,
        "Position": 7,
        "Presence": 0,
        "Id": "15b31015",
        "AuxId": "19e5d13b",
        "Buses": [
            "I2cMux_Pca9545_i2c7_chip_1"
        ],
        "SystemId": "${SystemId}",
        "ManagerId": "${ManagerId}",
        "ChassisId": "${ChassisId}",
        "SilkText": "J6008",
        "IdentifyMode": 2
    },
    "BusinessConnector_1": {
      "Name": "Down_1",
      "Direction": "Downstream",  // Connector direction. Use "Downstream" for downlinks (corresponding to slots) and "Upstream" for uplinks (corresponding to UBC ports on the BCU).
      "Slot": 1,  // Slot index for the downlink connector within the component. It used to determine the global slot ID after the service topology is established.
      "LinkWidth": "X4",  // PCIe link width
      "MaxLinkRate": "PCIe 4.0", // Maximum supported PCIe specification
      "ConnectorType": "UBCDD", // Connector type (such as UBCDD and PCIE CEM)
      "UpstreamResources": [  // Uplink connectors resources for the downlink connector. It matches Name to the uplink connector Name and Offset to the uplink Port.
        {
          "Name": "Up_1",
          "ID": 255,
          "Offset": 0,
          "Width": 4
        }
      ],
      "RefMgmtConnector": "#/Connector_OCP_1", // Management connector object associated with the downlink connector to load the NIC CSR
      "RefPCIeAddrInfo": "#/PcieAddrInfo_1" // PCIeAddrInfo object of the slot associated with the downlink connector
    },
    "PcieAddrInfo_1": {
      "Location": "RiserCard${Slot}",  // PCIe slot location
      "ComponentType": 83,  // Component type corresponding to COMPONENT_TYPE in the code
      "ContainerSlot": "${Slot}",
      "ContainerUID": "00000001040302000002",  // Container UID
      "ContainerUnitType": "EXU",  // Container board type
      "GroupPosition": "PcieAddrInfo_1_${GroupPosition}",
      "ControllerType": 1, // PCIe controller type: 0 for PCIeCore, 1 for NIC, 2 for SAS, 3 for SATA, 4 for ZIP, and 5 for SEC
      "Segment": 0,  // Segment index for multi-PCI bridge scenarios. Each segment corresponds to a PCI bus space.
      "GroupID": 0,  // Logical group ID
      "SlotID": 1,  // PCIe device slot number
      "SocketID": 0,  // CPU ID: 0 for CPU 1 and 1 for CPU 2
      "Bus": 0,  // Root port bus number
      "Device": 125,  // Root port device number
      "Function": 0  // Root port function number
    }
}

Management Topology Object

  • Configure all bus information for the NIC.
  • Configure all channel information.
  • Configure all chip information.
json
{
    "ManagementTopology": {
        "Anchor": {
            "Buses": [
                "I2c_2",
                "I2cMux_pca9545_chan1"
            ]
        },
        "I2c_2": {
            "Chips": [
                "Smc_ExpBoardSMC"
            ]
        },
        "I2cMux_pca9545_chan1": {
            "Chips": [
                "Chip_NICTempChip",
                "Eeprom_NIC"
            ]
        }
    }
}

Component Object

  • Configure FruId of the NIC.
  • Configure the NIC type.
  • Configure NIC location information.
  • Configure the NIC part number.
  • Configure the NIC serial number.
  • Configure NIC manufacturer information.
json
{
    "Component_OCPCard": {
        "FruId": 255,  // The default value is 255 if there is no FRU. Otherwise, FruId of the FRU object is referenced.
        "Instance": "${Slot}",
        "Type": 83,  // Component type, corresponding, to COMPONENT_TYPE* in the code
        "BoardId": 65535,
        "Name": "<=/PCIeDevice_1.DeviceName",
        "Location": "<=/PCIeDevice_1.Position",
        "Manufacturer": "<=/NetworkAdapter_1.Manufacturer",
        "PartNumber": "06310158",  // Part number, which can be obtained from FRU data
        "UniqueId": "N/A",
        "Presence": 1,
        "Health": 0,
        "Function": "PCIe device",
        "GroupId": 1,
        "PowerState": 1,
        "SerialNumber": "<=/PCIeCard_1.SerialNumber"
        }
}

PCIe Device Object

Define the basic properties and types of the PCIe device.

  • Device name
  • Function class
  • Device type
  • Slot type
json
{
    "PCIeDevice_1": {
        "DeviceName": "PCIe Card $ (device model)",
        "FunctionClass": 2,  // Function class: 0 for unknown, 1 for RAID, 2 for NIC, 3 for GPU, 4 for storage card (SSD card/M.2 card), 5 for SDI card, 6 for acceleration card, 7 for expansion card (PCIe riser), 8 for FPGA card, 9 for NPU
        "PCIeDeviceType": "MultiFunction",  // Device type
        "SlotType": "FullLength",  // Slot type
        "FunctionProtocol": "PCIe",  // Protocol type
        "FunctionType": "Physical"  // Function type
        "SlotID": 1,  // PCIe device slot number
        "SocketID": 0,  // CPU ID: 0 for CPU 1 and 1 for CPU 2
        "Bus": 0,  // Root port bus number
        "Device": 125,  // Root port device number
        "Function": 0  // Root port function number
        "Position": "EXU${Slot}"  // Device position (container name)
    }
}

NIC Object

Define the basic information and properties of the NIC.

  • Name
  • Description
  • Vendor ID
  • Device ID.
  • Manufacturer information

OCP card object:

json
{
    "OCPCard_1": {
        "SlotID": "${Slot}",
        "NodeID": "<=/NetworkAdapter_1.SlotNumber |> string.format('OCPCard%s',$1)",
        "Name": "BCM957414N4140C",
        "BoardName": "BCM957414N4140C",
        "Description": "BCM957414N4140C",
        "FunctionClass": 2,
        "VendorID": 5348,
        "DeviceID": 5847,
        "SubVendorID": 5348,
        "SubDeviceID": 16710,
        "Position": "<=/PCIeDevice_1.Position",
        "LaneOwner": "<=/PCIeDevice_1.SocketID",
        "FirmwareVersion": "N/A",
        "Manufacturer": "Broadcom",
        "PartNumber": "",
        "Health": "<=/Component_OCPCard.Health",
        "Model": "BCM57414",
        "DeviceName": "<=/PCIeDevice_1.DeviceName",
        "PcbVersion": ".A",
        "Bus": "<=/PCIeDevice_1.Bus",
        "Device": "<=/PCIeDevice_1.Device",
        "Function": "<=/PCIeDevice_1.Function",
        "DevBus": "<=/PCIeDevice_1.DevBus",
        "DevDevice": "<=/PCIeDevice_1.DevDevice",
        "DevFunction": "<=/PCIeDevice_1.DevFunction",
        "SerialNumber": ""
    }
}

PCIe card object:

json
{
    "PCIeCard_1": {
        "SlotID": "<=/PCIeDevice_1.SlotID",
        "NodeID": "<=/PCIeDevice_1.SlotID |> string.format('PCIeCard%s',$1)",
        "Name": "SP670",
        "BoardName": "SP670",
        "BoardID": 255,
        "Description": "100Gb/s Dual port card",
        "FunctionClass": 2,
        "VendorID": 6629,
        "DeviceID": 546,
        "SubVendorID": 6629,
        "SubDeviceID": 161,
        "Position": "<=/PCIeDevice_1.Position",
        "LaneOwner": "<=/PCIeDevice_1.SocketID",
        "FirmwareVersion": "<=/NetworkAdapter_1.FirmwareVersion",
        "Manufacturer": "Huawei",
        "PartNumber": "02314CRT",
        "RefChip": "#/Chip_Hi1822",  // Chip associated with properties obtained via advanced protocols
        "Protocol": "SmBus",  // Uses out-of-band protocols to obtain properties like junction temperature and optical module temperature.
        "MaxFrameLen": 64,
        "Model": "Hi1822",
        "DeviceName": "<=/PCIeDevice_1.DeviceName",
        "LinkSpeed": "<=/NetworkAdapter_1.LinkSpeed",
        "LinkSpeedCapability": "<=/NetworkAdapter_1.LinkSpeedCapability",
        "PcbID": "#/Accessor_PcbID.Value",
        "PcbVersion": ".A",
        "Health": "<=/Component_PCIeCard.Health",
        "Bus": "<=/PCIeDevice_1.Bus",
        "Device": "<=/PCIeDevice_1.Device",
        "Function": "<=/PCIeDevice_1.Function",
        "DevBus": "<=/PCIeDevice_1.DevBus",
        "DevDevice": "<=/PCIeDevice_1.DevDevice",
        "DevFunction": "<=/PCIeDevice_1.DevFunction",
        "SerialNumber": "<=/FruData_Fru0.BoardSerialNumber"
    }
}
Onboard NIC object:

```json
{
    "BoardNICCard_1": {
        "Slot": "$&#123;Slot&#125;",
        "UID": "00000001C00302023956",
        "BoardNICCardName": "BC83ETHB",
        "Manufacturer": "<=/NetworkAdapter_1.Manufacturer",
        "Type": "NICCard",
        "Description": "<=/NetworkAdapter_1.ModelDescription",
        "PartNumber": "N/A",
        "PcbVersion": "<=/Fru_NICCard.PcbVersion",
        "LogicVersion": "N/A",
        "SRVersion": "",
        "BoardID": "<=/NetworkAdapter_1.BoardID",
        "BoardType": "BoardNICCard",
        "Number": 1,
        "DeviceName": "<=/NetworkAdapter_1.DeviceLocator",
        "Position": "<=/NetworkAdapter_1.Position",
        "BoardNodeId": "<=/NetworkAdapter_1.SlotNumber |> string.format('chassisNIC%s(SF223D-H)',$1)",
        "FruID": "<=/Fru_NICCard.FruId",
        "AssociatedResource": "<=/NetworkAdapter_1.AssociatedResource",
        "RefComponent": "#/Component_NICCard",
        "RefFru": "#/Fru_NICCard"
    }
}

Network Adapter Object

  • Name
  • Description
  • Number of ports
  • Supported features
json
{
    "NetworkAdapter_1": &#123;
        "Name": "BCM957414A4142CC", // Adapter name
        "Description": "2*25GE", // Adapter description
        "NetworkPortCount": "2", // Number of ports
        "VendorID": "0x14e4",  // Vendor ID
        "DeviceID": "0x16d7",  // Device ID
        "SupportedMctp": true,  // MCTP support
        "SupportedLLDP": true,  // LLDP support
        "HotPluggable": false,  // Hot swap support
        "LinkWidth": "N/A",  // Link width
        "LinkSpeed": "N/A",  // Link speed
        "Model": "BCM57414",  // NIC model, used to load out-of-band protocols to obtain NIC information
        "FruId": 255,
        "HotPluggable": false,  // Hot swap support
        "ReadyToRemove": false,  // Swap status for notified hot swap
        "AttentionHotPlugState": 255,  // Hot swap state
        "TemperatureCelsius": 0,  // NIC temperature
        "TemperatureStatus": 0,  // Status for temperature acquisition
        "BandwidthThresholdPercent": 100,  // Bandwidth alarm threshold percentage
        "SpecialPcieCard": false // Whether the NIC has a special chip topology. Currently, this field is true only for 1822 Ethernet NICs.
    &#125;
}

Configuring Basic Port Information

Network Port Object

Define the network port properties and capabilities.

  • Port ID
  • Medium type
  • Link capability
  • Port type
  • Device function type
json
{
    "NetworkPort_0": &#123;
        "@Parent": "NetworkAdapter_1",
        "SystemID": 1,
        "PortID": 0,  // Port ID
        "NetDevFuncType": 1,  // Device function type: 0 for Disabled, 1 for Ethernet, 2 for FC, 4 for iSCSI, 8 for FCoE, 16 for OPA, and 32 for IB
        "MediumType": "FiberOptic",  // Medium type, which can be Copper or FiberOptic
        "SupportedLinkCapability": "25GE",  // Link capability
        "BandwidthUsagePercent": 0,  // Current port bandwidth usage
        "Type": 5,  // Port type
        "LinkStatusValue": 1,  // Connection status
        "LinkStatusNumeric": 255,  // Connection status
        "SupportedFuncType": 1,
        "FunctionType": 1,  // Supported NIC type: 1 for ETHERNET, 2 for FC, and 3 for IB
        "MACAddress": "00:00:00:00:00:00",  // Port MAC address
        "PermanentMACAddress": "00:00:00:00:00:00"  // Permanent port MAC address
    &#125;
}

Optical Module Object

  • Channel ID
  • Temperature
  • Power state
  • Thresholds
json
{
    "OpticalModule_0": &#123;
        "@Parent": "NetworkPort_0",
        "ChannelNum": 1,
        "TemperatureCelsius": 0,
        "PowerState": 0,
        "Presence": 0,
        "IsSupportedType": 0,
        "Temp_UpperThresholdCritical": 125,
        "FaultState": 0,
        "SupplyVoltage": 0,
        "LowerThresholdCritical": 0,
        "UpperThresholdCritical": 0
    &#125;
}

Alarm and Event Configuration

For configuration, refer to Sensor Customization and Development. The following example focuses solely on the monitoring configuration of NIC sensors.

  • Set temperature monitoring thresholds for alarms or cooling.
  • Configure voltage and power monitoring for alarms or sensors.

Threshold Sensor Object (ThresholdSensor)

  • Six thresholds
  • Alarm deassertion hysteresis
  • Reading data source
  • Reasonable M and RBExp values to keep calculated sensor readings within the valid one-byte range
json
{
    "ThresholdSensor_Temp": &#123;
        "OwnerId": 32,
        "OwnerLun": 0,
        "EntityId": "<=/Entity_PCIeCard.Id",
        "EntityInstance": "<=/Entity_PCIeCard.Instance",
        "Initialization": 127,
        "Capabilities": 232, // Sensor activation conditions
        "SensorType": 1, // Sensor type. For details, see chapter 42 in the IPMI Specification.
        "ReadingType": 1,
        "SensorName": "<=/PCIeDevice_1.SlotID |> string.format('PCIe NIC%s Temp',$1)",
        "Unit": 128,
        "BaseUnit": 1,
        "ModifierUnit": 0,
        "Analog": 1,
        "NominalReading": 25,
        "NormalMaximum": 0,
        "NormalMinimum": 0,
        "MaximumReading": 127,
        "MinimumReading": 128,
        "Reading": "<=/NetworkAdapter_1.TemperatureCelsius",
        "AssertMask": 128, // Alarm capability mask. For details, see Assertion Event Mask in the IPMI Specification.
        "DeassertMask": 28800, // For details, see Deassertion Event Mask in the IPMI Specification.
        "ReadingMask": 2056,
        "Linearization": 0,
        "M": 100,
        "RBExp": 224,
        "UpperNoncritical": 105,
        "PositiveHysteresis": 2,
        "NegativeHysteresis": 2
        
    &#125;,
    "ThresholdSensor_Voltage": &#123;
        "OwnerId": 32,
        "OwnerLun": 0,
        "EntityId": "<=/Entity_PCIeCard.Id",
        "EntityInstance": "<=/Entity_PCIeCard.Instance",
        "Initialization": 127,
        "Capabilities": 232,
        "SensorType": 2,
        "ReadingType": 1,
        "SensorName": "<=/PCIeDevice_1.SlotID |> string.format('Hi1822_NIC%s_1v2',$1)",
        "Unit": 0,
        "BaseUnit": 4,
        "ModifierUnit": 0,
        "Analog": 1,
        "NominalReading": 90,
        "NormalMaximum": 0,
        "NormalMinimum": 0,
        "MaximumReading": 127,
        "MinimumReading": 0,
        "Reading": "<=/Scanner_1v2.Value |> expr($1 / 10)",
        "AssertMask": 516,
        "DeassertMask": 516,
        "ReadingMask": 4626,
        "Linearization": 0,
        "M": 1,
        "RBExp": 224,
        "UpperCritical": 132,
        "LowerCritical": 108,
        "PositiveHysteresis": 2,
        "NegativeHysteresis": 2,
        "ReadingStatus": "<=/::FruCtrl_1_0.PowerState |> string.cmp($1, 'ON') |> expr($1 ? 0 : 2)",
    &#125;,
    "ThresholdSensor_Power": &#123;
      "OwnerId": 32,
      "OwnerLun": 0,
      "EntityId": "<=/Entity_MainBoard.Id",
      "EntityInstance": "<=/Entity_MainBoard.Instance",
      "Initialization": 127,
      "Capabilities": 232,
      "SensorType": 11,
      "ReadingType": 1,
      "SensorName": "Power",
      "SensorIdentifier": "Power",
      "BaseUnit": 6,
      "Analog": 1,
      "NominalReading": 25,
      "MaximumReading": 255,
      "Reading": "<=/Scanner_Fan_Pwr.Value",
      "ReadingStatus": "<=/Scanner_Fan_Pwr.Status",
      "SensorNumber": 255,
      "M": 5,
      "PositiveHysteresis": 1,
      "NegativeHysteresis": 1
    &#125;
}

Cooling Control Object

  • Target temperature
  • Maximum allowed temperature
json
{
    {
        "CoolingConfig_Basic": &#123;  // CoolingConfig is usually not configured in the board configuration file.
        "SmartCoolingState": "Enabled",  // Whether smart cooling is enabled. The value can be Enabled or Disabled
        "SmartCoolingMode": "EnergySaving",  // Smart cooling mode. The value can be EnergySaving, HighPerformance, LowNoise, Custom, or LiquidCooling.
        "LevelPercentRange": [20, 100],  // Smart cooling speed range (20 to 100 in the example)
        "InitLevelInStartup": 100,  // Default speed level at startup. The value range is LevelPercentRange.
        "DiskRowTemperatureAvailable": false,  // Whether the drive temperature is available
        "SysHDDsMaxTemperature": 80.0,  // Max temperature threshold for HDDs
        "SysSSDsMaxTemperature": 80.0,  // Max temperature threshold for SSDs
        "SensorLocationSupported": false  // Whether the temperature ocean interface is supported
        &#125;
    }
    {
        "CoolingPolicy_EnergySaving": &#123;
        "PolicyIdx": 6,  // ID for the linear cooling policy, which must be globally unique
        "ExpCondVal": "EnergySaving", // Expected condition. CoolingPolicy takes effect only when the actual condition matches the expected condition. The value can be EnergySaving, HighPerformance, LowNoise, Custom, or LiquidCooling.
        "ActualCondVal": "<=/CoolingConfig_1.SmartCoolingMode", // Actual condition. The value can be EnergySaving, HighPerformance, LowNoise, Custom, or LiquidCooling.
        "TemperatureRangeLow": [-127, 20, 30, 40, 50], // Lower thresholds for temperature intervals in the linear cooling policy
        "TemperatureRangeHigh": [20, 30, 40, 50, 127], // Upper thresholds for temperature intervals in the linear cooling policy
        "SpeedRangeLow": [20, 32, 70, 100], // Lower thresholds for speed intervals in the linear cooling policy
        "SpeedRangeHigh": [20, 32, 70, 100], // Upper thresholds for speed intervals in the linear cooling policy
        "FanType": ["02314BLG 8038+"] // List of fan types. The fan condition is met if any fan type in this list exists.
        &#125;
    }
    "CoolingRequirement_1_7": &#123;
        "RequirementId": 7, // Target cooling policy ID. The ID must be globally unique. Currently, the ID supports 16 valid bits, where the first 8 bits are the base ID and the last 8 bits are the slot ID.
        "TemperatureType": 11, // Type of the target cooling temperature point. The value can be 1 for Cpu, 2 for Outlet, 3 for Disk, 4 for Memory, 5 for PCH, 6 for VRD, 7 for VDDQ, 8 for NPUHbm, 9 for NPUAiCore, 10 for NPUBoard, 11 for Inlet, 12 for SoCBoardOutlet, or 13 for SoCBoardInlet,.
        "MonitoringStatus": "<=/Scanner_Lm75_Inlet.Status",  // Temperature sensor status: 0 for normal and 1 for abnormal
        "MonitoringValue": "<=/Scanner_Lm75_Inlet.Value;<=/Scanner_Lm75_Inlet.Value |> expr((($1 + 5) > ($2 - 10)) ? ($1 + 5) : ($2 - 10))",  // Temperature value involved in cooling
        "FailedValue": 80,  // Fan speed when the temperature status is abnormal. If this field is not set, abnormal cooling is not triggered. If it is set, the set fan speed is issued during abnormal cooling when the temperature point fails to be read.
        "TargetTemperatureCelsius": 50,  // Current cooling target value
        "MaxAllowedTemperatureCelsius": 60,
        "TargetTemperatureRangeCelsius": [  // Allowed range for the custom target temperature, which is used for validity check of custom target values
            40,
            60
        ],
        "SmartCoolingTargetTemperature": [  // Target temperature values for EnergySaving, HighPerformance, and LowNoise modes. This field is optional.
            50,
            47,
            53
        ],
        "CustomSupported": true,  // Whether custom target values are supported. The value can be true or false.
        "CustomTargetTemperatureCelsius": 50, // Custom temperature. The value 255 is invalid.
        "SensorName": "#/ThresholdSensor_InletTemp.SensorName"  // Sensor name
    &#125;,
    "CoolingArea_1_25": &#123;
        "AreaId": 25,  // ID for the cooling area, which must be globally unique
        "RequirementIdx": 25,  // ID of the target cooling policy associated with the cooling area. The value is the same as that of RequirementId in unsigned 8-bit integer or base ID in unsigned 16-bit integer.
        "PolicyIdxGroup": [],  // Indexes of ambient cooling policies associated with the cooling area
        "FanIdxGroup": [  // Collection of fan IDs (CoolingFan.FanId) associated with the cooling area, representing fans participating in cooling of the area
            1,
            2,
            3,
            4
        ]
    &#125;
}

Basic Event Object

json
{
    "Event_PCIeBandWidth": &#123;
        "EventKeyId": "PCIeCard.PCIeCardBandWidthDecreased",
        "xxx": "xxxx"
    &#125;,
    "Event_PCIeLinkSpeed": &#123;
        "EventKeyId": "PCIeCard.PCIeCardLinkSpeedReduced",
        "xxx": "xxxx"
    &#125;,
    "Event_PCIeCardUCE": &#123;
        "EventKeyId": "PCIeCard.PCIeCardUncorrectableErr",
        "xxx": "xxxx"
    &#125;
}

Temperature Events

json
{
    "Event_OverTemp": &#123;
        "EventKeyId": "PCIeCard.PCIeCardOverTemp",
        "xxx": "xxxx"
    &#125;,
    "Event_TempFail": &#123;
        "EventKeyId": "PcieCard.PCIeCardTempFail",
        "xxx": "xxxx"
    &#125;,
    "Event_TempSensorFail": &#123;
        "EventKeyId": "PcieCard.PCIeCardTempSensorFail",
        "xxx": "xxxx"
    &#125;
}

Power Supply Events

json
{
    "Event_PowerFail": &#123;
        "EventKeyId": "PCIeCard.PCIeCardPowerFail",
        "xxx": "xxxx"
    &#125;,
    "Event_VoltageAlarm": &#123;
        "EventKeyId": "PCIeCard.PCIeCardVoltageAlarm",
        "xxx": "xxxx"
    &#125;,
    "Event_PowerOverload": &#123;
        "EventKeyId": "PCIeCard.PCIeCardPowerOverload",
        "xxx": "xxxx"
    &#125;
}

Port Events

json
{
    "Event_Port1LinkDown": &#123;
        "EventKeyId": "Port.PortDisconnected",
        "xxx": "xxxx"
    &#125;,
    "Event_OM1PowerAlarm": &#123;
        "EventKeyId": "Port.PortOpticalModulePowerAlarm",
        "xxx": "xxxx"
    &#125;,
    "Event_OM1SpeedMatch": &#123;
        "EventKeyId": "Port.PortOpticalModuleSpeedMismatch",
        "xxx": "xxxx"
    &#125;,
    "Event_Port1BWUsageMntr": &#123;
        "EventKeyId": "NICCard.SystemNetworkBandwidthUsageHigh",
        "xxx": "xxxx"
    &#125;
}

Device Status Events

json
{
    "Event_DevicePresence": &#123;
        "EventKeyId": "PCIeCard.PCIeCardPresence",
        "xxx": "xxxx"
    &#125;,
    "Event_PowerState": &#123;
        "EventKeyId": "PCIeCard.PCIeCardPowerState",
        "xxx": "xxxx"
    &#125;,
    "Event_FaultState": &#123;
        "EventKeyId": "PCIeCard.PCIeCardFaultState",
        "xxx": "xxxx"
    &#125;
}

FRU Object

json
{
    "Eeprom_NetCard": &#123;
            "OffsetWidth": 2,
            "AddrWidth": 1,
            "Address": 172,
            "WriteTmout": 100,
            "ReadTmout": 100,
            "RwBlockSize": 32,
            "WriteInterval": 20,
            "HealthStatus": 0
    &#125;,
    "Fru_PCIeCard": {
        "PcbId": "PCB ID",
        "FruId": 1,
        "FruName": "OCP$&#123;slot&#125;",
        "ConnectorGroupId": "$&#123;GroupId&#125;",
        "BoardId": 255,
        "PowerState": 1,
        "Health": 0,
        "EepStatus": 1,
        "FruDataId": "#/FruData_OCP1"
    },
    "FruData_OCP1": &#123;
      "FruId": 1,
      "FruDev": "#/Eeprom_NetCard",
      "EepromWp": "#/Accessor_WP.Value",
      "BoardPartNumber": "N/A",
      "BoardSerialNumber": "N/A",
      "StorageType": "EepromV2"  // 
    &#125;
}

Chip Object

json
{
    "Chip_Hi1822": &#123;
        "OffsetWidth": 0,
        "AddrWidth": 1,  // Address bit width
        "Address": 232,  // Address
        "WriteTmout": 100,  // Write timeout interval
        "ReadTmout": 100,  // Read timeout interval
        "HealthStatus": 0  // Health status
        "WriteRetryTimes": 2,  // Retries for write failure
        "ReadRetryTimes": 0
    &#125;
}

Common Issues

  1. The OCP and PCIe cards cannot be identified.
    Description: Generally, the OCP and PCIe cards are loaded with IdentifyMode set to 2. The overall process is as follows:
    ->During device adaptation, configure the PcieAddrInfo object for OCP and PCIe cards in the BMC.
    ->The BIOS transmits the BDF numbers of both device types to the BMC through WritePcieCardBdfToBmc and WriteOcpCardBdfToBmc.
    ->The BMC queries the IMU for the quadruple information of the corresponding PCIe slot based on the BDF number. It sets the Id, AuxId, and presence information for the connector, triggering the CSR load.

  2. The number of network ports is incorrect.
    Description: Check whether the NetworkPortCount property of the NetworkAdapter object is correct.
    Check whether the number of NetworkPort objects matches the number of network ports. Each network port requires an object. If an optical port is used, configure the corresponding OpticalModule object, too.

  3. NS-CI is unavailable.
    Description: Check the configuration of the NCSIChannelMgmt or NCSICapabilities object.
    Check whether Model of the NetworkAdapter object has a file with the same name in the src/lualib/hardware_config directory. The file contains methods for device identification and property acquisition through the properties table.

  4. The data reported by the iBMA is mismatched.
    Description: Check whether the PcieAddrInfo object configuration matches the hardware information. You can run the lscpi command on the OS to view the BDF information of each slot card.