![]() |
TT-System-Firmware APIs 19.8.99
Tenstorrent Firmware
|
Open Chiplet Configuration Protocol (OCCP) implementation. More...
#include <tenstorrent/occp.h>#include "occp_private.h"#include <zephyr/sys/crc.h>#include <zephyr/logging/log.h>Functions | |
| LOG_MODULE_REGISTER (occp, CONFIG_OCCP_LOG_LEVEL) | |
| static void | fill_cmd_header (uint8_t app_id, uint8_t msg_id, uint16_t length, struct occp_header *hdr) |
| int | occp_get_version (const struct occp_backend *backend, uint8_t *major, uint8_t *minor, uint8_t *patch) |
| Get OCCP protocol version. | |
| static int | occp_tx_rx (const struct occp_backend *backend, uint8_t *cmd, size_t cmd_len, uint8_t *response, size_t response_len) |
| static int | occp_run_transaction (const struct occp_backend *backend, uint8_t retry_cnt, uint8_t *cmd, size_t cmd_len, uint8_t *response, size_t response_len) |
| Run an OCCP transaction (send command and read response) Sends an OCCP command, and reads the response. Checks response flags for errors and retries if necessary. | |
| int | occp_write_data (const struct occp_backend *backend, uint64_t address, const uint8_t *data, size_t length) |
| Write data to OCCP device. | |
| int | occp_read_data (const struct occp_backend *backend, uint64_t address, uint8_t *data, size_t length) |
| Read data from OCCP device. | |
| int | occp_execute_image (const struct occp_backend *backend, uint64_t execution_address, uint8_t cpu_id) |
| Execute image at specified address. | |
Variables | |
| uint8_t | occp_rw_buffer [255] |
Open Chiplet Configuration Protocol (OCCP) implementation.
OCCP is a protocol used to communicate with chiplets during early boot. It can support multiple transport layers, implemented as backends within this subsystem.
|
static |
| LOG_MODULE_REGISTER | ( | occp | , |
| CONFIG_OCCP_LOG_LEVEL | ) |
| int occp_execute_image | ( | const struct occp_backend * | backend, |
| uint64_t | execution_address, | ||
| uint8_t | cpu_id ) |
Execute image at specified address.
| backend | OCCP backend to use |
| execution_address | Address to execute image from |
| cpu_id | CPU ID to execute on |
| int occp_get_version | ( | const struct occp_backend * | backend, |
| uint8_t * | major, | ||
| uint8_t * | minor, | ||
| uint8_t * | patch ) |
Get OCCP protocol version.
| backend | OCCP backend to use |
| major | Pointer to store major version |
| minor | Pointer to store minor version |
| patch | Pointer to store patch version |
| int occp_read_data | ( | const struct occp_backend * | backend, |
| uint64_t | address, | ||
| uint8_t * | data, | ||
| size_t | length ) |
Read data from OCCP device.
| backend | OCCP backend to use |
| address | Address to read from |
| data | Pointer to buffer to store read data |
| length | Length of data to read |
|
static |
Run an OCCP transaction (send command and read response) Sends an OCCP command, and reads the response. Checks response flags for errors and retries if necessary.
| backend | OCCP backend to use |
| retry_cnt | Number of times to retry on failure |
| cmd | Pointer to command structure to send |
| cmd_len | Length of command structure |
| response | Pointer to response structure to receive |
| response_len | Length of response structure |
|
static |
| int occp_write_data | ( | const struct occp_backend * | backend, |
| uint64_t | address, | ||
| const uint8_t * | data, | ||
| size_t | length ) |
Write data to OCCP device.
| backend | OCCP backend to use |
| address | Address to write to |
| data | Pointer to data to write |
| length | Length of data to write |
| uint8_t occp_rw_buffer[255] |