mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-22 05:10:56 +00:00
fix(core/bootloader): reporting bootloader lock state on U5
[no changelog]
This commit is contained in:
parent
f3b78e9c7a
commit
422b376ebd
@ -37,10 +37,16 @@ secbool secret_ensure_initialized(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
secbool secret_bootloader_locked(void) {
|
secbool secret_bootloader_locked(void) {
|
||||||
#ifdef FIRMWARE
|
#if defined BOOTLOADER || defined BOARDLOADER
|
||||||
return (TAMP->BKP8R != 0) * sectrue;
|
return secret_optiga_present();
|
||||||
#else
|
#else
|
||||||
|
const volatile uint32_t *reg1 = &TAMP->BKP8R;
|
||||||
|
for (int i = 0; i < 8; i++) {
|
||||||
|
if (reg1[i] != 0) {
|
||||||
return sectrue;
|
return sectrue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return secfalse;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user