TT-System-Firmware APIs 19.8.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
occp.h File Reference
#include <stdint.h>
#include <zephyr/drivers/i3c.h>

Go to the source code of this file.

Data Structures

struct  occp_backend
 Open Chiplet Configuration Protocol (OCCP) definitions. More...
struct  occp_backend_i3c

Functions

int occp_backend_i3c_init (struct occp_backend_i3c *backend, struct i3c_device_desc *i3c_dev)
 Initialize I3C backend.
int occp_get_version (const struct occp_backend *backend, uint8_t *major, uint8_t *minor, uint8_t *patch)
 Get OCCP protocol version.
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.

Function Documentation

◆ occp_backend_i3c_init()

int occp_backend_i3c_init ( struct occp_backend_i3c * backend,
struct i3c_device_desc * i3c_dev )

Initialize I3C backend.

Parameters
backendPointer to I3C backend structure
i3c_devPointer to I3C device descriptor
Returns
0 on success, negative error code on failure

◆ occp_execute_image()

int occp_execute_image ( const struct occp_backend * backend,
uint64_t execution_address,
uint8_t cpu_id )

Execute image at specified address.

Parameters
backendOCCP backend to use
execution_addressAddress to execute image from
cpu_idCPU ID to execute on
Returns
0 on success, negative error code on failure

◆ occp_get_version()

int occp_get_version ( const struct occp_backend * backend,
uint8_t * major,
uint8_t * minor,
uint8_t * patch )

Get OCCP protocol version.

Parameters
backendOCCP backend to use
majorPointer to store major version
minorPointer to store minor version
patchPointer to store patch version
Returns
0 on success, negative error code on failure

◆ occp_read_data()

int occp_read_data ( const struct occp_backend * backend,
uint64_t address,
uint8_t * data,
size_t length )

Read data from OCCP device.

Parameters
backendOCCP backend to use
addressAddress to read from
dataPointer to buffer to store read data
lengthLength of data to read
Returns
0 on success, negative error code on failure

◆ occp_write_data()

int occp_write_data ( const struct occp_backend * backend,
uint64_t address,
const uint8_t * data,
size_t length )

Write data to OCCP device.

Parameters
backendOCCP backend to use
addressAddress to write to
dataPointer to data to write
lengthLength of data to write
Returns
0 on success, negative error code on failure