Telemetry
In Chip Management Firmware, telemetry reporting is done in the common file telemetry.c, with the per-SoC table and data collection in telemetry_bh.c (Blackhole) and telemetry_gr.c (Grendel). The versioned telemetry table contains a tag-to-offset mapping followed by the telemetry data. The table location and its discovery mechanism are SoC-specific.
See telemetry table for information.
On Blackhole, a Zephyr work item refreshes the telemetry data every 100 ms by default; the host can change the interval.
Procedure to Read Telemetry
Find
telemetry_tableby reading the telemetry-table scratch register for the SoC.Check
telemetry_table.entry_countto find out how manytag_tableentries there are.Read through all
tag_tableentries and keep the tag-offset mapping around. These will not change unless the firmware gets updated and the chip is reset.To find specific telemetry entries: - Look up the offset in the tag-offset mapping. - Read 4 bytes from the telemetry data array at that offset.
Telemetry Discovery Registers
SoC |
Telemetry table |
Telemetry data |
|---|---|---|
Wormhole |
|
|
Blackhole |
|
|
Grendel |
|
The data array follows the tag table within |
Via SMBUS
(i.e., from DMC or Galaxy UBB CPLD)
Write the tag ID you wish to read to SMBUS address
0x26. This register is 8 bits wide—the SMBUS write should include a PEC.The tag ID is persistent, so it can be programmed once, and the telemetry data can be read multiple times from address
0x27.Read the telemetry tag data via SMBUS by issuing a block read to address
0x27. This register is 32 bits wide.
Register |
Address |
Usage |
|---|---|---|
TELEMETRY_TAG |
0x26 |
Write only. Write with telemetry tag value to select which telemetry field will be read when reading from TELEMETRY_DATA register. |
TELEMETRY_DATA |
0x27 |
Read only. Read to get the latest telemetry data for the tag programmed to the TELEMETRY_TAG register. |
Via west attach
You can print telemetry_table.telemetry[<OFFSET>] in gdb, where <OFFSET> is the offset
for the tag in telemetry_table.tag_table.
west attach
(gdb) print telemetry_table.tag_table
(gdb) print telemetry_table.telemetry[7]
$6 = 47
Tag IDs
Tag IDs are permanent in the sense that they’ll never change meaning, but may not be present.
See telemetry group for more details.