![]() |
TT-System-Firmware APIs 19.15.99
Tenstorrent Firmware
|
Tenstorrent Grendel die-to-die (D2D) firmware loading APIs. More...


Go to the source code of this file.
Functions | |
| int | tt_d2d_reset_release (const struct device *dev) |
| Deassert a D2D tile's subsystem resets. | |
| int | tt_d2d_load_fw (const struct device *dev, const uint8_t *img, size_t img_size) |
| Load firmware into a D2D tile, leaving it halted. | |
| int | tt_d2d_start (const struct device *dev) |
| Release a D2D tile's Rocket so loaded firmware begins executing. | |
Tenstorrent Grendel die-to-die (D2D) firmware loading APIs.
Bringing a D2D link up takes three steps, kept separate because each has to be sequenced against work this driver does not own:
Step 3 is deliberately not folded into step 2. Both ends of a link must be started close together, and with sideband synchronisation disabled (as it is under emulation) there is nothing in hardware to make that happen: starting each Rocket as soon as its own image landed has been observed to leave Keraunos and the far Mimir unable to train. The caller is expected to load every tile first and start them as a group.
Two things have to be true before any of this works, and neither is done here because neither belongs to a single tile:
Until both hold, the tile does not answer at all and tt_d2d_load_fw() will fail its reachability probe with -ENODEV rather than appearing to succeed.
Load firmware into a D2D tile, leaving it halted.
Holds the tile's Rocket in reset, clears its SRAM, copies img in, optionally reads it back to confirm it landed, and writes the configuration block the firmware reads at startup. Call tt_d2d_start() to run it.
| dev | D2D tile device |
| img | Firmware image |
| img_size | Size of img in bytes. Must be a multiple of 4 and must leave the configuration block at the top of SRAM untouched. |
| 0 | on success |
| -EINVAL | if img is NULL, empty, or not a multiple of 4 bytes |
| -ENOSPC | if img would overrun the configuration block |
| -ENODEV | if the tile does not answer a write to its SRAM |
| -EIO | if the image read back from SRAM does not match img |
| int tt_d2d_reset_release | ( | const struct device * | dev | ) |
Deassert a D2D tile's subsystem resets.
Brings the tile's NOC, APB, system, link-layer, AXI and QNP resets out one at a time, in the order the hardware requires. Until this runs the tile does not reliably answer accesses, so it must precede tt_d2d_load_fw().
| dev | D2D tile device |
| 0 | on success |
| int tt_d2d_start | ( | const struct device * | dev | ) |
Release a D2D tile's Rocket so loaded firmware begins executing.
| dev | D2D tile device |
| 0 | on success |