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

refactor(core): rename shutdown to shutdown_privileged

This commit is contained in:
Ondřej Vejpustek 2021-06-14 16:28:13 +02:00
parent 7686eb355a
commit cca9d4b1c4
11 changed files with 18 additions and 18 deletions

View File

@ -55,6 +55,6 @@ reset_handler:
// enter the application code
bl main
b shutdown
b shutdown_privileged
.end

View File

@ -36,6 +36,6 @@ reset_handler:
// enter the application code
bl main
b shutdown
b shutdown_privileged
.end

View File

@ -36,6 +36,6 @@ reset_handler:
// enter the application code
bl main
b shutdown
b shutdown_privileged
.end

View File

@ -52,6 +52,6 @@ reset_handler:
// enter the application code
bl main
b shutdown
b shutdown_privileged
.end

View File

@ -36,6 +36,6 @@ reset_handler:
// enter the application code
bl main
b shutdown
b shutdown_privileged
.end

View File

@ -36,6 +36,6 @@ reset_handler:
// enter the application code
bl main
b shutdown
b shutdown_privileged
.end

View File

@ -29,7 +29,7 @@
#include "stm32f4xx_ll_utils.h"
// from util.s
extern void shutdown(void);
extern void shutdown_privileged(void);
#define COLOR_FATAL_ERROR RGB16(0x7F, 0x00, 0x00)
@ -58,7 +58,7 @@ __fatal_error(const char *expr, const char *msg, const char *file, int line,
rev[4]);
#endif
display_printf("\nPlease contact Trezor support.\n");
shutdown();
shutdown_privileged();
for (;;)
;
}
@ -107,7 +107,7 @@ error_shutdown(const char *line1, const char *line2, const char *line3,
display_printf("\nPlease unplug the device.\n");
#endif
display_backlight(255);
shutdown();
shutdown_privileged();
for (;;)
;
}

View File

@ -45,7 +45,7 @@ https://link.springer.com/content/pdf/10.1007%2F978-3-540-72354-7_3.pdf
#include "rand.h"
// from util.s
extern void shutdown(void);
extern void shutdown_privileged(void);
#define DRBG_RESEED_INTERVAL_CALLS 1000
#define DRBG_TRNG_ENTROPY_LENGTH 50
@ -197,13 +197,13 @@ void wait_random(void) {
volatile int j = wait;
while (i < wait) {
if (i + j != wait) {
shutdown();
shutdown_privileged();
}
++i;
--j;
}
// Double-check loop completion.
if (i != wait || j != 0) {
shutdown();
shutdown_privileged();
}
}

View File

@ -87,9 +87,9 @@ void SystemInit(void) {
}
// from util.s
extern void shutdown(void);
extern void shutdown_privileged(void);
void PVD_IRQHandler(void) {
TIM1->CCR1 = 0; // turn off display backlight
shutdown();
shutdown_privileged();
}

View File

@ -121,9 +121,9 @@ jump_to_unprivileged:
// jump
bx lr
.global shutdown
.type shutdown, STT_FUNC
shutdown:
.global shutdown_privileged
.type shutdown_privileged, STT_FUNC
shutdown_privileged:
cpsid f
ldr r0, =0
mov r1, r0

View File

@ -5,7 +5,7 @@
.global default_handler
.type default_handler, STT_FUNC
default_handler:
b shutdown
b shutdown_privileged
.macro add_handler symbol_name:req
.word \symbol_name