-
-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): implement rebooting after rsod, simplify shutdown code
[no changelog]
- Loading branch information
Showing
20 changed files
with
385 additions
and
448 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* This file is part of the Trezor project, https://trezor.io/ | ||
* | ||
* Copyright (c) SatoshiLabs | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
// Wipes all SRAM and other sensitive information from the device and reboots | ||
// it. | ||
void __attribute__((noreturn)) wipe_all_and_reboot(void); | ||
|
||
// Wipes all SRAM and other sensitive information (excluding boot args area) | ||
// from the device and reboots it. | ||
void __attribute__((noreturn)) wipe_all_and_reboot_with_args(void); | ||
|
||
// Wipes all SRAM and other sensitive information from the device and | ||
// enters and infinite loop. | ||
void __attribute__((noreturn)) wipe_all_and_stall(void); | ||
|
||
// Wipe all SRAM and other sensition information from the device and | ||
// jumps directly the the bootloader (without rebooting) | ||
// | ||
// This mechanism is used only on STM32F4 devices. | ||
void __attribute__((noreturn)) | ||
jump_to_bootloader(uint32_t vectbl_address, uint32_t command); |
Oops, something went wrong.