TT-System-Firmware APIs 19.10.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
42
43/* for verification via gpio-emul */
44void 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:362
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:345
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:227
uint32_t jtag_bootrom_get_perst_start_time(void)
Definition jtag_bootrom.c:294
int jtag_bootrom_verify(const struct device *dev, const uint32_t *patch, size_t patch_len)
Definition jtag_bootrom.c:263
int jtag_bootrom_init(struct bh_chip *chip)
Definition jtag_bootrom.c:172
int jtag_bootrom_reset_asic(struct bh_chip *chip)
Definition jtag_bootrom.c:120
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:299
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:105
static uint32_t power_limit
Definition throttler.c:22