TT-System-Firmware APIs 19.8.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
jtag_bootrom.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Tenstorrent AI ULC
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef TENSTORRENT_JTAG_BOOTROM_H_
8#define TENSTORRENT_JTAG_BOOTROM_H_
9
10#include <stddef.h>
11#include <stdint.h>
12
13#include <zephyr/sys/util.h>
14#include <zephyr/spinlock.h>
15
16#include <tenstorrent/bh_chip.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22const uint8_t *get_bootcode(void);
23const size_t get_bootcode_len(void);
24
25int jtag_bootrom_init(struct bh_chip *chip);
26
27int jtag_bootrom_reset_asic(struct bh_chip *chip);
28
29int jtag_bootrom_patch_offset(struct bh_chip *chip, const uint32_t *patch, size_t patch_len,
30 const uint32_t start_addr);
31int jtag_bootrom_verify(const struct device *dev, const uint32_t *patch, size_t patch_len);
32void jtag_bootrom_soft_reset_arc(struct bh_chip *chip);
34void jtag_bootrom_teardown(const struct bh_chip *chip);
35
36ALWAYS_INLINE int jtag_bootrom_patch(struct bh_chip *chip, const uint32_t *patch, size_t patch_len)
37{
38 return jtag_bootrom_patch_offset(chip, patch, patch_len, 0);
39}
40
41/* for verification via gpio-emul */
42void jtag_bootrom_emul_setup(const uint32_t *buf, size_t buf_len);
46
47#ifdef __cplusplus
48}
49#endif
50
51#endif
#define ALWAYS_INLINE
void jtag_bootrom_teardown(const struct bh_chip *chip)
Definition jtag_bootrom.c:333
void jtag_bootrom_emul_setup(const uint32_t *buf, size_t buf_len)
int jtag_bootrom_emul_axiread(uint32_t addr, uint32_t *value)
void jtag_bootrom_set_cable_power_limit(struct bh_chip *chip, uint16_t power_limit)
Definition jtag_bootrom.c:316
int jtag_bootrom_patch_offset(struct bh_chip *chip, const uint32_t *patch, size_t patch_len, const uint32_t start_addr)
Definition jtag_bootrom.c:192
int jtag_bootrom_verify(const struct device *dev, const uint32_t *patch, size_t patch_len)
Definition jtag_bootrom.c:228
int jtag_bootrom_init(struct bh_chip *chip)
Definition jtag_bootrom.c:137
uint32_t get_dm_init_duration(void)
Definition jtag_bootrom.c:264
uint32_t get_arc_start_time(void)
Definition jtag_bootrom.c:259
int jtag_bootrom_reset_asic(struct bh_chip *chip)
Definition jtag_bootrom.c:87
const uint8_t * get_bootcode(void)
const size_t get_bootcode_len(void)
Definition reset.c:27
void jtag_bootrom_soft_reset_arc(struct bh_chip *chip)
Definition jtag_bootrom.c:270
ALWAYS_INLINE int jtag_bootrom_patch(struct bh_chip *chip, const uint32_t *patch, size_t patch_len)
Definition jtag_bootrom.h:36
static uint8_t buf[1]
Definition log_backend_ringbuf.c:24
__UINT32_TYPE__ uint32_t
__UINT8_TYPE__ uint8_t
__UINT16_TYPE__ uint16_t
Definition bh_chip.h:95
static uint32_t power_limit
Definition throttler.c:22