TT Zephyr Platforms 18.11.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
fwupdate.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
11
12#ifndef TENSTORRENT_FWUPDATE_H_
13#define TENSTORRENT_FWUPDATE_H_
14
15#include <stdbool.h>
16#include <zephyr/device.h>
17#include <zephyr/drivers/gpio.h>
18
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#if !defined(CONFIG_BOARD_QEMU_X86) || defined(__DOXYGEN__)
35int tt_fwupdate_init(const struct device *dev, struct gpio_dt_spec mux);
36
43int tt_fwupdate_complete(void);
44#endif
45
63int tt_fwupdate(const char *tag, bool dry_run, bool reboot);
64
71int tt_fwupdate_confirm(void);
72
88
97
109
121
122#ifdef CONFIG_TT_FWUPDATE_TEST
123int tt_fwupdate_create_test_fs(const char *tag);
124#endif
125
126#ifdef __cplusplus
127}
128#endif
129
130#endif
int tt_fwupdate_init(const struct device *dev, struct gpio_dt_spec mux)
Set the external flash device and set the passed spi mux (if not null) to allow communication with th...
Definition fwupdate.c:60
int tt_fwupdate_confirm(void)
Confirm that the current firmware has booted successfully.
Definition fwupdate.c:302
int tt_fwupdate_flash_image(const tt_boot_fs_fd *fd)
Flash the image described by the provided boot filesystem file descriptor.
Definition fwupdate.c:319
int tt_fwupdate_validate_fd(const tt_boot_fs_fd *fd)
Validate the provided boot filesystem file descriptor.
Definition fwupdate.c:354
int tt_fwupdate_validate_image(const tt_boot_fs_fd *fd)
Validate the image described by the provided boot filesystem file descriptor.
Definition fwupdate.c:383
int tt_fwupdate_is_confirmed(void)
Check if the currently running firmware has been confirmed.
Definition fwupdate.c:349
int tt_fwupdate_complete(void)
Called on the completion of the fwupdate operation, disables the spi mux if initialized in tt_fwupdat...
Definition fwupdate.c:77
int tt_fwupdate(const char *tag, bool dry_run, bool reboot)
Search for, verify, and apply firmware updates.
Definition fwupdate.c:182
Definition tt_boot_fs.h:52