|
TT Zephyr Platforms 19.5.0-rc1
Tenstorrent Firmware
|
#include "functional_efuse.h"#include "eth.h"#include "harvesting.h"#include "init.h"#include "noc.h"#include "noc_init.h"#include "noc2axi.h"#include "reg.h"#include "serdes_eth.h"#include <tenstorrent/post_code.h>#include <tenstorrent/spi_flash_buf.h>#include <tenstorrent/sys_init_defines.h>#include <tenstorrent/tt_boot_fs.h>#include <zephyr/kernel.h>#include <zephyr/logging/log.h>#include <zephyr/init.h>#include <zephyr/drivers/misc/bh_fwtable.h>#include <zephyr/drivers/dma.h>#include <zephyr/drivers/dma/dma_tt_bh_noc.h>#include <zephyr/drivers/dma/dma_arc_hs.h>Data Structures | |
| struct | RESET_UNIT_PCIE_MISC_CNTL3_reg_t |
| union | RESET_UNIT_PCIE_MISC_CNTL3_reg_u |
Macros | |
| #define | ETH_SETUP_TLB 0 |
| #define | ETH_PARAM_ADDR 0x7c000 |
| #define | ERISC_L1_SIZE (512 * 1024) |
| #define | ETH_RESET_PC_0 0xFFB14000 |
| #define | ETH_END_PC_0 0xFFB14004 |
| #define | ETH_RESET_PC_1 0xFFB14008 |
| #define | ETH_END_PC_1 0xFFB1400C |
| #define | ETH_RISC_DEBUG_SOFT_RESET_0 0xFFB121B0 |
| #define | ETH_MAC_ADDR_ORG 0x208C47 /* 20:8C:47 */ |
| #define | ETH_FW_CFG_TAG "ethfwcfg" |
| #define | ETH_FW_TAG "ethfw" |
| #define | ETH_SD_REG_TAG "ethsdreg" |
| #define | ETH_SD_FW_TAG "ethsdfw" |
| #define | RESET_UNIT_PCIE_MISC_CNTL3_REG_DEFAULT 0x00000000 |
| #define | RESET_UNIT_PCIE1_MISC_CNTL_3_REG_ADDR 0x8003050C |
| #define | RESET_UNIT_PCIE_MISC_CNTL_3_REG_ADDR 0x8003009C |
Functions | |
| LOG_MODULE_REGISTER (eth, CONFIG_TT_APP_LOG_LEVEL) | |
| static void | SetupEthTlb (uint32_t eth_inst, uint32_t ring, uint64_t addr) |
| void | SetupEthSerdesMux (uint32_t eth_enabled) |
| uint32_t | GetEthSel (uint32_t eth_enabled) |
| uint64_t | GetMacAddressBase (void) |
| void | ReleaseEthReset (uint32_t eth_inst, uint32_t ring) |
| int | LoadEthFw (uint32_t eth_inst, uint32_t ring, uint8_t *buf, size_t buf_size, size_t spi_address, size_t image_size) |
| int | LoadEthFwCfg (uint32_t eth_inst, uint32_t ring, uint8_t *buf, uint32_t eth_enabled, size_t spi_address, size_t image_size) |
| Load the ETH FW configuration data into ETH L1 memory. | |
| static void | SerdesEthInit (void) |
| static void | wipe_l1 (void) |
| static void | EthInit (void) |
| static int | eth_init (void) |
| SYS_INIT_APP (eth_init) | |
Variables | |
| static const struct device *const | fwtable_dev = DEVICE_DT_GET(DT_NODELABEL(fwtable)) |
| static const struct device * | flash = DEVICE_DT_GET_OR_NULL(DT_NODELABEL(spi_flash)) |
| static const struct device *const | arc_dma_dev = DEVICE_DT_GET_OR_NULL(DT_NODELABEL(dma0)) |
| static const struct device * | dma_noc = DEVICE_DT_GET(DT_NODELABEL(dma1)) |
| #define ERISC_L1_SIZE (512 * 1024) |
| #define ETH_END_PC_0 0xFFB14004 |
| #define ETH_END_PC_1 0xFFB1400C |
| #define ETH_FW_CFG_TAG "ethfwcfg" |
| #define ETH_FW_TAG "ethfw" |
| #define ETH_MAC_ADDR_ORG 0x208C47 /* 20:8C:47 */ |
| #define ETH_PARAM_ADDR 0x7c000 |
| #define ETH_RESET_PC_0 0xFFB14000 |
| #define ETH_RESET_PC_1 0xFFB14008 |
| #define ETH_RISC_DEBUG_SOFT_RESET_0 0xFFB121B0 |
| #define ETH_SD_FW_TAG "ethsdfw" |
| #define ETH_SD_REG_TAG "ethsdreg" |
| #define ETH_SETUP_TLB 0 |
| #define RESET_UNIT_PCIE1_MISC_CNTL_3_REG_ADDR 0x8003050C |
| #define RESET_UNIT_PCIE_MISC_CNTL3_REG_DEFAULT 0x00000000 |
| #define RESET_UNIT_PCIE_MISC_CNTL_3_REG_ADDR 0x8003009C |
|
static |
|
static |
| uint64_t GetMacAddressBase | ( | void | ) |
| int LoadEthFw | ( | uint32_t | eth_inst, |
| uint32_t | ring, | ||
| uint8_t * | buf, | ||
| size_t | buf_size, | ||
| size_t | spi_address, | ||
| size_t | image_size ) |
| int LoadEthFwCfg | ( | uint32_t | eth_inst, |
| uint32_t | ring, | ||
| uint8_t * | buf, | ||
| uint32_t | eth_enabled, | ||
| size_t | spi_address, | ||
| size_t | image_size ) |
Load the ETH FW configuration data into ETH L1 memory.
| eth_inst | ETH instance to load the FW config for |
| ring | Load over NOC 0 or NOC 1 |
| eth_enabled | Bitmask of enabled ETH instances |
| fw_cfg_image | Pointer to the FW config data |
| fw_cfg_size | Size of the FW config data |
| LOG_MODULE_REGISTER | ( | eth | , |
| CONFIG_TT_APP_LOG_LEVEL | ) |
|
static |
| void SetupEthSerdesMux | ( | uint32_t | eth_enabled | ) |
| SYS_INIT_APP | ( | eth_init | ) |
|
static |
|
static |
|
static |
|
static |
|
static |