Get Device Info
更新时间: 2025/06/26
在Gitcode上查看源码27h-获取设备信息(Get-Device-Info)
修订记录
| openUBMC版本号 | 修订日期 | 修订内容 |
|---|---|---|
| 25.06 | 2025/06/26 | 初稿,新增命令详情 |
2023-08-31接口扩展的注意事项:
1、Get/Set BMC Configuration:为BMC公共配置类,禁止在此接口中增加特定机型的配置,比如不能增加“机柜”形态专用的配置。
2、Get/Set Rack Info、Get/Set Chassis Info:“机柜”、“机框”形态专用的配置。
3、Get/Set Device Info:为公共硬件的配置。(**备注:**此命令停止扩展和演进,后续在 Get/Set Component Parameters 命令中进行扩展)
基本信息
功能说明
获取设备信息。
权限
命令信息
请求信息
| 字节顺序 | 域取值说明 |
|---|---|
| NetFn | 30h |
| CMD | 93h |
| 1:3 | Manufacturer ID,LS Byte first。长度固定3个字节,例如,某厂家ID是2011,对应十六进制为0x0007DB,则字节序为第1个字节为DBh、第2个字节为07h、第3个字节为00h。 |
| 4 | Sub command,子命令=0x27h |
| 5 | Device Type Parameter,见 表3 。 |
| 6 | Device No,设备逻辑序号(从1开始编号);支持slotid场景,与slotid或丝印保持一致。 特别说明: 1、0xff表示不指定槽位号,部分操作支持,以实际返回为准。 2、如果使用0xff失败,则以slotid或设备逻辑序号重试。 3、当Device Type为Pcie Card,Device Info为0xCA时,Device No代表pcie设备端口号。 |
| 7 | Device Info Parameter, 通用类型,定义如 表1 。 特定类型,定义如 表2 。 |
| 8 | Read Offset,读取的数据偏移,从0开始。 |
| 9 | Length,读取长度(最大为250 bytes)。 |
响应信息
| 字节顺序 | 域取值说明 |
|---|---|
| 1 | Completion Code 80h-Device not present |
| 2:04 | Manufacturer ID,LS Byte first。长度固定3个字节,例如,某厂家ID是2011,对应十六进制为0x0007DB,则字节序为第1个字节为DBh、第2个字节为07h、第3个字节为00h。 |
| 5 | End of List 表示当前数据是否结束。当参数数据比较长的时候,可能需要分多次读取,通过此字段可以判断数据是否读完。 [7:1]:reserved [0]:End of list 0=last data 1=middle data |
| 6:N | Data. 实际返回的数据可能小于等于Read length。 通用类型,定义如 表1 。 特定类型,定义如 表2 。 |
命令样例
获取设备信息
请求:
ipmicmd -k "0f 00 MM NN" smi 0响应:
0f MM NN附表1 通用Device information parameters(通用Device Info区间0x00-0xBF)
| Parameter | Parameter Data | 描述 | |
|---|---|---|---|
| Maximum | read only | data1:1-Get maximum of the device type | 1 |
| Presence Status | read only | data1:1-Get presence status 00h-not present 01h-present 02h-unknown Other Reserved | 2 |
| Health Status | read only | data1:1-Get health status 00h-normal 01h-minor 02h-major 03h-critical 04h-absent 05h-unknown Other Reserved | 3 |
| sub-device Maximum | read only | data1:1-Get sub-device Maximum of a device, only for expansion board | 4 |
| Availability | read only,可用性,目前只支持CPU、内存条和标准PCIE设备,active status只对内存条有效 | data1:1-Get enable status and active status [7:2]: reserved [0]: enable status 0=disable 1=enable [1]: active status. 0=backup 1=active | 5 |
| BoardID | read only | data1:2-Get BoardID of the device. LS-byte first | 6 |
| Physical Number | read only,物理序号,比如:MEZZ卡物理上与背板和交换板连接方式,MEZZ1连接到中间的2、3槽交换板,MEZZ2连接到两边的1、4槽交换板等 data1表示单板槽位号,data2表示板内MEZZ编号 | data1-Get Physical Number of the device, 1 based data2-Get Physical Sub Number of the device, 1 based | 7 |
| location | read only,物理位置、容器(如:主板、前置硬盘背板、后置硬盘背板等) | data1:N-Device Location Max 50 Bytes.End by null if less than 50 Bytes | 8 |
| Function | read only,功能组或逻辑分组(如:内存、系统盘、数据盘等) | data1:N-Device Function Max 50 Bytes.End by null if less than 50 Bytes | 9 |
| Device Name | read only,跟设备丝印对应 | data1:N-Device Name Max 50 Bytes.End by null if less than 50 Bytes | 10 |
| Group ID | readonly,设备所属组ID | data1-Get Group ID of the device. 1 Based. | 11 |
| Sensor State | write only,设置传感器读数和状态 | Set sensor reading and event status data1:1-event direct 0-assert 1-deassert data2:1-sensor reading data3:1-event data1 data4:1-event data2 data5:1-event data3 | 12 |
| Disk Connect | read only | Get disk connection,以端口为单位.(这个命令主要给BMA使用,用于确定硬盘的物理位置) data1:1-disk container count.硬盘容器总数,一个硬盘背板就是一个硬盘容器 data2:1-disk maximum in the container1, unknown if 0xff. data3:1- container1 type and sas port count in the container1, unknown if 0xff [7:4]: disk container type 0-直通硬盘背板 1-expander硬盘背板 15-unknown others reserved [3:0]: sas port count in the container1, unknown if 0x0f. data4:1-sas port1 destination [7:4]:type,0-none,1-RAID扣卡,2-PCH,3-RAID标卡,15-unknown [3:0]:port number, 1 based, none if 0, unknown if 15. data5:1-sas port2 destination [7:4]:type, 0-none,1-RAID扣卡,2-PCH,3-RAID标卡,15-unknown [3:0]:port number, 1 based, none if 0, unknown if 15. ...... data(N+3):1-sas portN destination [7:4]:type,0-none,1-RAID扣卡,2-PCH,3-RAID标卡 [3:0]:port number, 1 based, none if 0, unknown if 15. data(N+4):1-disk maximum in the container2, unknown if 0xff. data(N+5):1-sas port count in the container2, unknown if 0xff. data(N+6):1-sas port1 destination [7:4]:type, 0-none,1-RAID扣卡,2-PCH,3-RAID标卡,15-unknown [3:0]:port number, 1 based, none if 0, unknown if 15. data(N+7):1-sas port2 destination [7:4]:type,0-none,1-RAID扣卡,2-PCH,3-RAID标卡,15-unknown [3:0]:port number, 1 based, none if 0, unknown if 15. ...... | 13 |
| Model | read only | data1:N-Device model Max 128 Bytes.End by null if less than 128 bytes. | 14 |
| Disk Locate State | read only | Get All Disk Locate State/查询所有硬盘的定位灯状态 data1:8-每位代表一个硬盘的定位灯的状态 data1:bit0表示逻辑号为1的硬盘的定位灯状态,以此类推 | 15 |
| FRU Device ID | read only | data1:1-Get FRU ID,该参数当前只有MEZZ卡用到,为了兼容,保留继续使用,但后面不再使用到其它Device Type上,后面要获取FRU Device ID时通过另外新定义的Get Device FRU ID命令获取 | 16 |
| Mezz PCIE Connect | read only | data1:1-直连或者交叉 0-直连,1-交叉 data2:3-PCIE的bus,device,fun data5:4-第2个PCIE port的信息 其中0xff 0xff 0xff 0xff标识无效的PCIE信息 | 17 |
| Type | read only | data1:1-类型 若devicetype为Disk,则表示硬盘类型 0h=HDD 1h=SSD | 18 |
| Capacity | read only | data1:4-容量 data5:1-单位 若devicetype为Disk,则表示硬盘容量单位 0h=GB 1h=TB | 19 |
| NC Work Stage | read only | data1:1-NC work stage status,1 base | 20 |
| Power Control | read write | data1:1-上下电/复位,目前硬盘、载板、标卡、PCIE Retimer支持上下电操作;标卡支持复位(需要CPLD支持) 0h=强制下电 1h=跟随X86系统上电(设置后,只有X86上电,设备才跟随上电) 2h=强制复位 3h=跟随X86系统复位(设置后,只有X86复位,设备才跟随复位) | 21 |
| SDI Card storage ip | read only | read Data1:1 status取值见右侧 Data2:4 ipv4地址 Data7:2 vlan号 | 22 |
| SDI Card bootorder | read write | data1:1 bootorder启动项 bit0: 0x0=hdd 0x1=pxe bit1(注意:针对SDI 2.1.0及之后卡,当bit0为1时有效): 0x0=底板pxe 0x1=网卡pxe | 23 |
| SDI Card System Status | read | data1:1 system status系统启动阶段 0x0=未启动 0x1=BIOS加载成功启动OS中 0x3=OS加载成功 | 24 |
| SDI Card eth0/eth1'bond0 ip | read write | read data1:1 status见右侧 data2:4 ipv4地址 data7:2 vlan号 write data1:4 ipv4地址 data5:4 mask data9:2 vlan号 (1-4096) | 25 |
| SDI Card Reset | write | 注意:针对SDI 2.1.0及之后卡有效 data1:1 reset 0x55=reset 其他值:无效 | 26 |
| SDI Card IMU Reset | write | 注意:针对SDI 3.0及之后卡有效 data1:1 reset 0x55=reset 其他值:无效 | 27 |
| Rack Ucount | read write | 机柜U位数 data1:1整数 | 28 |
| Empty Rack SN | read write | 空机柜SN data1:n字符串 | 29 |
| Typical Configuration Rack SN | read write | 机柜典配SN data1:n字符串 | 30 |
| Rack Model | read write | 机柜型号 data1:n字符串 | 31 |
| LSW PORT INFO | read only | data1:1-端口link状态 data2:2-端口速率 data4:1-端口双工状态 data5:8-端口RX误码数量 data13:8-端口TX误码数量 | 31 |
| ALL SDI Cards EP Init Status | read | data1:1所有的SDI卡初始化状态 0x0=SDI EP未初始化完成 0x1=SDI卡初始化完成(所有的SDI卡都初始化完成才算完成) | 33 |
| Basic Rack SN | read write | 基本配置机柜SN data1:n字符串 | 34 |
| Component Unique ID | read only | 组件唯一标识 data1:n字符串 说明: 天池架构的机型上查询生效,其他机型不支持查询。 | 35 |
| Rack Function | read write | 机柜用途 data1:1-C表示计算柜,N表示网络柜 data2:19-Reserved,可不填充 | 36 |
| KunpengDevice Type | read write | 鲲鹏设备类型 data1:1 0x00-TaiShan 200 (Model 2280) 0x01-TaiShan 200 (Model 5280) 0x0a-TaiShan 200K (Model 2280K) 0x0b-TaiShan 200K (Model 5280K) | 37 |
| Rack Configuration | read write | 机柜发货配置 data1:1- 0:代表管理网口使用GE网口eth2,无右挂耳。(默认配置) 1:代表管理网口使用PCIe扩展网口,有右挂耳。(华为云配置) 2:代表管理网口使用GE网口eth3。 配置命令:ipmitool raw 0x30 0x93 0xdb 0x07 0x00 0x3c 0x51 0x26 0x00 0xff 0xff 0x00 0x00 0x00 0x01 0x00 | 38 |
| Memory Temperature | read only | data1:N内存温度 | 39 |
| Memory Chip BitWidth | read only | data1:N字符串,内存芯片位宽 | 40 |
| Retimer Type | read only | data1:1 retimer芯片类型 0x00: 5902L 0x01: 5902H 0x02: 5901 0x03: ds280 0x05: ds160 0xff: 没有retimer | 41 |
| Manufacturer | read only | data1:N字符串,设备厂商名称 | 42 |
备注:
1、通用Device Info区间0x00-0xBF,Device Info需要保证系统全局唯一;
2、专用Device Info区间0xC0-0xFF,Device Info需要保证同一类Device Type中唯一。
3、BMC V2查询代码ipmi_get_device_info,需要做适配为根据“Device Type、Device Info”查询。
附表2 Device Type and information parameters(专用Device Info区间0xC0-0xFF)
| Device Type | Device Info | 描述 | 查询设置属性 | Data |
|---|---|---|---|---|
| 0x39 SCM | 10=0x0A | Device Name | read only | data1:N-Device Name,表示查询SD100物理丝印号 Max 50 Bytes.End by null if less than 50 Bytes. |
| 22=0x16 | SDI Card storage ip | read only | 表示查询SD100 FusionStorage Agent的IP地址和VLAN: Data 1:1 IPv4地址和VLAN号的状态 Data 2:1设置状态见《SD100命令参考》查询返回码表 Data 3:4 IPv4地址 Data 7:2 VLAN号 | |
| 23=0x17 | SDI Card bootorder | read write | 表示查询SD100启动项: Data1:启动顺序。 SDI V2: 0x00=hdd 0x01=主卡pxe 0x03=扩展卡pxe SDI V3: 0x00=HDD Boot 0x01=Base Board PXE Boot 0x03=Buckle Card1 PXE Boot 0x05=Buckle Card2 PXE Boot 0x07=Buckle Card3 PXE Boot SDI V5.0、SDI V5.1: 0x00=HDD Boot 0x01=Base Board PXE Boot 0xff=None Data2:有效期。(仅SDI V5.0、SDI V5.1使用) 0x00=单次有效 0x01=永久有效 | |
| 24=0x18 | SDI Card System Status | read | 表示查询SD100系统启动状态: Data:系统启动状态。 SDI V2: 00h-BIOS加载失败 01h-BIOS加载成功 03h-OS加载成功 SDI V3: 00h-IMU未加载完成 04h-IMU加载完成,BIOS和OS未完成 05h-IMU和BIOS加载完成,OS未完成 07h-IMU、BIOS和OS都加载成功 | |
| 25=0x19 | SDI Card eth0/eth1'bond0 ip | read write | - 查询SD100 设置VLAN 上IP 地址的状态(仅支持SD100 2.1.0之前版本): Data 1:1 IP设置状态 Data 2:4 ipv4地址 Date 6:2 vlan号 | |
| 26=0x1A | 复位SD100 | write | 复位SD100: data1:1 reset 0x55=reset | |
| 27=0x1B | 复位SDI卡的IMU | write | 复位SDI卡的IMU: data1:1 reset 0x55=reset | |
| 28=0x1C | 设置SDI卡的NMI中断 | write | 设置SDI卡的NMI中断: Length:0,无需参数 | |
| 29=0x1D | 设置SDI卡系统上下电 | write | 设置SDI卡系统上下电: data1:1上电下电操作 0x00=下电 0x01=上电 | |
| 39=0x27 | DPU Card Reset Linkage | read write | 注意:针对DPU卡有效 data1:1复位联动策略 0x00=复位联动 0x01=复位不联动 | |
| 40=0x28 | DPU Card Secure Boot | read write | device info为0x28时表示设置DPU卡安全启动配置: data1:1安全启动配置 0x00=不打开安全启动 0x01=打开安全启动 | |
| 192=0xC0 | DPU Card Sol Switch | read write | 注意:针对DPU卡有效 data1:1 DPU卡内部串口切换 0x01=SPU UART 0x02=MPU UART 0x03=MCU UART 0x04=GE UART 0x07=IMP UART 0x08=IMU UART | |
| 193=0xC1 | DPU Card Bios PXE Option | read write | - 查询PXE启动项- 设置PXE启动项- data1:1 PXE启动项 0x00 UEFI PXE (IPV4) 0x01 https PXE (IPV4 & IPV6) :SDI不支持该项 0x02 https PXE (IPV4) :SDI不支持该项 0x03 https PXE (IPV6) :SDI不支持该项 0x04 UEFI PXE (IPV6) 0x05 UEFI PXE (IPV4 & IPV6) | |
| 194=0xC2 | DPU Card Bios MRC Log Level | read write | - 设置DPU BIOS日志级别 data1:1日志类型 1 – MRC 2 – UEFI data2:1日志等级 1 – 精简打印 2 – 全打印- 查询DPU BIOS日志级别 data1:1 MRC日志级别 data2:1 UEFI日志级别 | |
| 195=0xC3 | Get force power on state | read | 注意:天翼云搭配512C DPU网卡使用 Device No必须是0xff 当BIOS查询时状态是开启“开启”,则自动复位成“关闭”。 data1:1系统强制启动标志位 0x00关闭 0x01开启 | |
| 196=0xC4 | Get DPU os startup status | read | 注意:天翼云搭配512C DPU网卡使用 Device No必须是0xff,业务侧上电状态可用 data1:1 DPU os启动状态 0x00未启动/启动未完全 0x01开启 | |
| 198=0xC6 | Set force power on state | write | 注意:天翼云搭配512C DPU网卡使用 data1:1系统强制启动标志位 0x00关闭 0x01开启 | |
| 199=0xC7 | DPU Card Bios PXE Option | Read Write | - 查询PXE启动项- 设置PXE启动项- data1:1 PXE启动项 0x00 UEFI PXE (IPV4) 0x04 UEFI PXE (IPV6) 0x05 UEFI PXE (IPV4 & IPV6) | |
| 0x08 M.2 | 197=0xC5 | Set M.2 info | write | 注意:天翼云无法安装BMA,需要从bios获取数据进行设置 Data1:77 M.2数据按格式填写: part1:1 selector part2:4 capacity part3:1 sataPort part4:10 manufacturer part5:41 modelNumber part6:21 serialNumber part7:9 firmwareVersion |
| 0x08 PCIeCard | 200=0xC8 | Card Number and Name | Read only | Data 1卡的数量,表示目前环境上配置Pcie卡的数量。 Data 2卡1的槽位号。 Data 3卡1名称长度 Data 4:23卡1的名称 Data 24卡2名称长度 Data 25:44卡2的名称。 …… |
| 201=0xC9 | Card Reg Info | Read only | Data 1卡的槽位号 Data 2:106 SOC1 Reg Info Data 107:211 SOC2 Reg Info | |
| 202=0xCA | Set/Get PCIe Card Link Status And Pci.ids Info | Write Read | 设置/查询卡的接入状态和pci.ids信息 Data 1卡的接入状态 0x01:接入 0x00:移除 Data 2:3卡的厂商号。 Data 4:5卡的设备号。 Data 6:7卡的子厂商号。 Data 8:9卡的子设备号。 |