1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 14:28:07 +00:00

refactor(core): rename reboot to reboot_device

[no changelog]
This commit is contained in:
cepetr 2024-10-02 13:38:45 +02:00 committed by cepetr
parent c99988312a
commit a247b4e87a
9 changed files with 12 additions and 12 deletions

View File

@ -346,7 +346,7 @@ void real_jump_to_firmware(void) {
__attribute__((noreturn)) void jump_to_fw_through_reset(void) {
display_fade(display_backlight(-1), 0, 200);
reboot();
reboot_device();
}
#endif

View File

@ -277,7 +277,7 @@ STATIC mp_obj_t mod_trezorutils_reboot_to_bootloader(size_t n_args,
}
} else {
// Just reboot and go through the normal boot sequence
reboot();
reboot_device();
}
#endif

View File

@ -769,7 +769,7 @@ static void test_otp_write_device_variant(const char *args) {
vcp_println("OK");
}
static void test_reboot(void) { reboot(); }
static void test_reboot(void) { reboot_device(); }
void cpuid_read(void) {
uint32_t cpuid[3];

View File

@ -24,7 +24,7 @@
#include <stdint.h>
// Immediately resets the device and initiates the normal boot sequence.
void __attribute__((noreturn)) reboot(void);
void __attribute__((noreturn)) reboot_device(void);
// Resets the device and enters the bootloader,
// halting there and waiting for further user instructions.

View File

@ -173,7 +173,7 @@ void reboot_and_upgrade(const uint8_t hash[32]) {
reboot_with_args(BOOT_COMMAND_INSTALL_UPGRADE, hash, 32);
}
void reboot(void) {
void reboot_device(void) {
bootargs_set(BOOT_COMMAND_NONE, NULL, 0);
#ifdef STM32U5

View File

@ -108,8 +108,8 @@ __attribute((no_stack_protector)) void syscall_handler(uint32_t *args,
case SYSCALL_SECURE_SHUTDOWN:
secure_shutdown();
break;
case SYSCALL_REBOOT:
reboot();
case SYSCALL_REBOOT_DEVICE:
reboot_device();
break;
case SYSCALL_REBOOT_TO_BOOTLOADER:
reboot_to_bootloader();

View File

@ -33,7 +33,7 @@ typedef enum {
SYSCALL_SYSTICK_US_TO_CYCLES,
SYSCALL_SECURE_SHUTDOWN,
SYSCALL_REBOOT,
SYSCALL_REBOOT_DEVICE,
SYSCALL_REBOOT_TO_BOOTLOADER,
SYSCALL_REBOOT_AND_UPGRADE,

View File

@ -92,8 +92,8 @@ void reboot_and_upgrade(const uint8_t hash[32]) {
;
}
void reboot(void) {
syscall_invoke0(SYSCALL_REBOOT);
void reboot_device(void) {
syscall_invoke0(SYSCALL_REBOOT_DEVICE);
while (1)
;
}

View File

@ -141,7 +141,7 @@ static secbool secret_present(uint32_t offset, uint32_t len) {
// read access to it.
static void secret_bhk_load(void) {
if (sectrue == secret_bhk_locked()) {
reboot();
reboot_device();
}
uint32_t secret[SECRET_BHK_LEN / sizeof(uint32_t)] = {0};
@ -355,7 +355,7 @@ void secret_prepare_fw(secbool allow_run_with_secret, secbool trust_all) {
void secret_init(void) {
if (secret_bhk_locked() == sectrue) {
reboot();
reboot_device();
}
secret_ensure_initialized();