FRU Management Handbook
The frudata service parses data stored in the EEPROM by domains and fields, and then uploads the data to the resource tree for other components to use. It also provides the read and write capabilities of electronic labels to external systems.
1. Service Overview of frudata
1.1 Resource Tree Class Design of frudata
- The
Fruclass describes information related to a field replaceable unit (FRU), such as a mainboard, RAID controller card, riser card, or drive backplane. Each FRU has only oneFruobject. - The
Frudataclass describes information stored in the EEPROM of an FRU. Each FRU has at most oneFrudataobject. Frusprimarily sendsFruIdsignals to sensors to manage SDR data after the system distributes the FRU object.- The
Componentclass indicates management information about components, such as memory, drives, and fans. An FRU can contain multiple components. During alarm configuration, aComponentobject is also configured for event management. Componentsallows querying system events on web pages and filtering them by component type. It retrieves component types from all existing objects in the resource tree.
1.2 Service Process of frudata
1.3 Layered Design of Service Code for frudata
1.3.1 Four-Layer Model
- Application layer: This layer only registers self-discovery objects and RPC or IPMI interfaces. The service logic is offloaded to lower layers to maintain single responsibility.
- Object service layer: This layer creates objects in a unified way and executes specific strategy objects to separate changes.
- Object layer: This layer implements differentiated interfaces for objects, ensuring high cohesion and following the open-closed principle.
- Data layer: This layer uses a unified data structure to store electronic labels in different formats, depending on stable directions.
1.3.2 Strategy Pattern
The strategy pattern switches algorithms at runtime as needed, which eliminates complex conditional statements and ensures high cohesion in service code.
1.4 External Presentation of Electronic Labels
- Board information area: This area provides the serial number, part number, and other information of the FRU storage device on the board.
- Chassis information area: This area typically saves the serial number, part number, and other information about the system chassis.
- Overview information area: This area describes the FRU type and
FruId. - Product information area: This area provides the serial number, part number, manufacturer, and other information of the product.
- Extended information area: Information in this area is stored as key-value pairs in the format
key=value. - System information area: This area is available only on the mounting brackets (where
FruIdis 0) and describes the configuration information of the entire device.
2. Electronic Label Design
2.1 Standard Electronic Label Design
- Standard electronic label: This type of label is stored in the EEPROM format according to Tianchi specifications. It is generally divided into several areas, including the EEPROM header, electronic label area, PSR area, and CSR area.
2.2 Non-Standard Electronic Label Design
- Non-standard electronic label: This type of label is stored in an EEPROM that does not follow Tianchi specifications, or it is stored in media such as flash memory, MCU, or files.
Design for non-standard electronic labels:
- Configure the CSR object.
- Use the corresponding non-standard application to parse the electronic label data.
- Call the
Updatemethod of frudata to update the resource tree. - Use the unified external IPMI interface provided by frudata to read and write electronic labels.
- frudata calls the read and write methods of the non-standard application to complete the operation.
Design objectives:
Ensure high scalability so that when partners add new non-standard electronic labels, frudata code does not need to be modified.
3. Electronic Label Configuration
"Eeprom_EXU": {
"OffsetWidth": 2,
"AddrWidth": 1,
"Address": 174,
"WriteTmout": 100,
"ReadTmout": 100,
"RwBlockSize": 32,
"WriteInterval": 20,
"HealthStatus": 0
},
"Accessor_EXUWP": {
"Chip": "#/Smc_ExpBoardSMC",
"Size": 1,
"Offset": 11776,
"Mask": 255,
"Type": 0,
"Value": 0
},
"FruData_Expander": {
"FruId": 1,
"FruDev": "#/Eeprom_EXU",
"EepromWp": "#/Accessor_EXUWP.Value",
"StorageType": "TianChi"
},
"Fru_Expander": {
"PcbId": 1,
"PcbVersion": ".A",
"FruId": 1,
"FruName": "ExpBoard${Slot}",
"PowerState": 1,
"Health": 0,
"EepStatus": "<=/Eeprom_EXU.HealthStatus",
"Type": 50,
"FruDataId": "#/FruData_Expander",
"ConnectorGroupId": "${GroupId}",
"BoardId": 65535,
"UniqueId": "00000001010302023922"
}Precautions:
- If you configure
FruIdfrom 1 to 63, the system automatically assigns aFruId. You can set the default value to 1. - The
FruId0 is reserved for the mounting brackets. The system does not assignFruIdvalues from 64 to 255. - Ensure that
FruDataIdinFrurefers to the correspondingFrudataobject. - Set
StorageTypefor standard electronic labels toTianChi,EepromV2, orFile. - You can set
StorageTypefor non-standard electronic labels toMCUor other values without restriction.
4. Electronic Label Reading and Writing Through IPMI
4.1 Commands for Viewing the Electronic Label Resource Tree
busctl --user tree bmc.kepler.frudata
# View the mounting brackets.
busctl --user introspect bmc.kepler.frudata /bmc/kepler/Systems/1/FruDatas/FruData_Fru0_010104
# View the expansion board.
busctl --user introspect bmc.kepler.frudata /bmc/kepler/Systems/1/FruDatas/FruData_Expander_0101
# Release the equipment package locally.
bmcgo publish -z 05024HFH -b TaiShan200_2280v2Note:
frame.pyhas been replaced by thebmcgotool.
4.2 Electronic Label Reading and Writing Through IPMI Commands
1. Write an electronic label:
ipmitool -H <IP_address> -I lanplus -p 623 -U Administrator -P xxx(password) -C 17 raw 0x30 0x90 0x04(write command) 0x01(fru_id) 0x2(Area) 0x03(field) 0x00(offset) 0x3(write length) 0x42 0x61 0x72(content to write, in ASCII)2. Update an electronic label:
ipmitool -H <IP_address> -I lanplus -p 623 -U Administrator -P xxx(password) -C 17 raw 0x30 0x90 0x06(update command) 0x01(fru_id) 0xAA3. Read an electronic label:
ipmitool -H <IP_address> -I lanplus -p 623 -U Administrator -P xxx(password) -C 17 raw 0x30 0x90 0x05(read command) 0x01(fru_id) 0x2(Area) 0x03(field) 0x00(offset) 0x3(read length)4. Clear an electronic label:
ipmitool -H <IP_address> -I lanplus -p 623 -U Administrator -P xxx(password) -C 17 raw 0x30 0x90 0x03(clear command) 0x01(fru_id) 0xAADefinitions of area and field:
4.3 Electronic Label Reading and Writing Through the IPMI edit Command
fru edit <fruid> field <section> <index> <string>Definitions of section and index:
Note: You must use the edit command to modify fields that already contain content. Otherwise, an error occurs indicating that the field cannot be found.