Get Trusted Computing Measurement Information
更新时间: 2026/08/06
在Gitcode上查看源码Get Trusted Computing Measurement Information
Change History
| openUBMC Version | Revision Date | Description |
|---|---|---|
| 25.06 | 2025/06/26 | Initial draft: add command details |
Basic Information
Function Description
Query trusted computing measurement information.
Privilege
ReadOnly
Command Information
Request Information
| Byte | Data Field |
|---|---|
| NetFn | 30h |
| CMD | 93h |
| 1:3 | Manufacturer ID, LS Byte first. The length is fixed to three bytes. For example, if the vendor ID is 2011 and the corresponding hexadecimal value is 0x0007DB, the first byte is DBh, the second byte is 07h, and the third byte is 00h. |
| 4 | Sub command, sub command=93h |
| 5 | Data type. For details, see Table 1. |
| 6:7 | Reserved |
| 8:9 | Offset of the read data, LS Byte first |
| 10 | Length: read length |
Response Information
| Byte | Data Field |
|---|---|
| 1 | Completion Code |
| 2:4 | Manufacturer ID, LS Byte first. The length is fixed to three bytes. For example, if the vendor ID is 2011 and the corresponding hexadecimal value is 0x0007DB, the first byte is DBh, the second byte is 07h, and the third byte is 00h. |
| 2:4 | Manufacturer ID, LS Byte first. The length is fixed to three bytes. For example, if the vendor ID is 2011 and the corresponding hexadecimal value is 0x0007DB, the first byte is DBh, the second byte is 07h, and the third byte is 00h. |
| 5 | End of list, indicating whether the data reading is complete. Long data may need to be read multiple times. This field is used to check whether data is completely read. [7:1]: reserved [0]: End of list 0=last data 1=middle data |
| 6:N | Indicates the data. The returned data may be less than or equal to the read length. |
Table 1 Data types of trusted computing queries
| Data Type | Data Format | Read/Write Type | Subcommand word available channel | Description |
|---|---|---|---|---|
| 0 | See Table 2. | read only | bt/ipmb | Chip version and firmware version. For details, see the version information format in the following table. |
| 1 | See Table 3. | read only | bt/ipmb | BMC basic firmware measurement information |
| 2 | See Table 3. | read only | bt/ipmb | BMC boot firmware measurement information |
| 3 | See Table 3. | read only | bt/ipmb | BMC running firmware measurement information |
| 4 | See Table 3. | read only | bt/ipmb | Firmware measurement information of the BMC security coprocessor |
| 5 | See Table 3. | read only | bt/ipmb | BIOS firmware measurement information |
| 6 | See Table 4. | read only | bt/ipmb | Host Secure Boot Firmware Measurement Information |
| 7 | See Table 4. | read only | bt/ipmb | Host boot firmware measurement information |
| 8 | See Table 4. | read only | bt/ipmb | Host boot firmware configuration measurement information |
| 9 | See Table 4. | read only | bt/ipmb | Host kernel firmware measurement information |
| 10 | See Table 4. | read only | bt/ipmb | Measurement information of the initial root file system of the host |
| 11 | See Table 5. | read only | bt/ipmb | CPU hardware measurement information |
| 12 | See Table 5. | read only | bt/ipmb | NIC hardware measurement information |
| 13 | See Table 5. | read only | bt/ipmb | NPU device hardware measurement information |
| 14 | See Table 5. | read only | bt/ipmb | GPU device hardware measurement information |
Table 2 Version information format
| Byte sequence of Data | Length (byte) | Description |
|---|---|---|
| data 1 | 1 | Information format version number. The current version number is 1. |
| data 2:5 | 4 | TCM chip version (hexadecimal code), LS Byte first |
| data 6:9 | 4 | TCM firmware version (hexadecimal code), LS Byte first |
Table 3 BMC information format
| Byte sequence of Data | Length (byte) | Description |
|---|---|---|
| data 1 | 1 | Information format version number. The current version number is 1. |
| data 2:5 | 4 | TCG-defined type, index value of the platform status register, starting from 1 (LS byte first) |
| data 6:9 | 4 | Type defined by the TCG, indicating the log event type. The value of the current event type is 0xf1, LS Byte first. |
| data 10:41 | 32 | data 46: hash value of N+32 data (hexadecimal code) |
| data 42:45 | 4 | data 46: N+32 data length |
| data 46:49 | 4 | Firmware type. The value can be ** 1 - L1, 2 - UBoot, 3 - Rootfs, 4 - BIOS** or 7 (coprocessor). |
| data 50:53 | 4 | Firmware Quantity |
| data 54:N | 40 x Number of firmwares | Offset (4 bytes), size (4 bytes), and hash value (32 bytes) of each firmware in the storage area |
| data N+1:N+32 | 32 | Hash value calculated after the hash values of all firmware are combined |
| data N+33:N+64 | 32 | Firmware name (character string, including the terminator) |
| data N+65:N+96 | 32 | Actual measurement value (hexadecimal code) |
| data N+97:N+128 | 32 | Base measurement value (hexadecimal code) |
| data N+129 | 1 | Comparison result. 255: not updated/invalid data; 0: successful; 1: failed |
| data N+130 | 1 | Control behavior. 255: not updated/invalid data; 0: startup allowed; 1: startup blocked |
Table 4 OS information format
| Byte sequence of Data | Length (byte) | Description |
|---|---|---|
| data 1 | 1 | Information format version number. The current version number is 1. |
| data 2:33 | 32 | Firmware name (character string, including the terminator) |
| data 34:65 | 32 | Actual measurement value (hexadecimal code) |
| data 66:97 | 32 | Base measurement value (hexadecimal code) |
| data 98 | 1 | Comparison result. 255: not updated/invalid data; 0: successful; 1: failed |
| data 99 | 1 | Control behavior. 255: not updated/invalid data; 0: startup allowed; 1: startup blocked |
Table 5 Hardware measurement information format
| Data Byte Order | Length (Byte) | Description |
|---|---|---|
| data 1 | 1 | Information format version number. The current version number is 1. |
| data 2 | 1 | Number of modules |
| data 3:34 | 32 | Firmware name (character string, including the end character), with the slot ID. |
| data 35:66 | 32 | Actual measurement value (hexadecimal code) |
| data 67:98 | 32 | Base measurement value (hexadecimal code) |
| data 99:130 | 32 | Actual model (character string, including the terminator) |
| data 131:162 | 32 | Base model (character string, including the terminator) |
| data 163:194 | 32 | Actual vendor (character string, including the terminator) |
| data 195:226 | 32 | Benchmark vendor (character string, including the terminator) |
| data 227:290 | 64 | Actual ID (character string, including the terminator) |
| data 291:354 | 64 | Reference ID (character string, including the terminator) |
| data 355 | 1 | Component status. 0: normal; 1: added; 2: removed; 3: changed; others: failed |
| data 356:N | 353 | If there are multiple components, the format is the same as that of data 3:355. |
Command Example
Query the trusted computing version.
Request:
bash
ipmitool raw 0x30 0x93 0xdb 0x07 0x00 0x93 0x00 0x00 0x00 0x00 0x00 0xc0Response:
text
db 07 00 00 01 4e 1b 03 06 23 09 05 10