diff --git a/common/protob/messages-management.proto b/common/protob/messages-management.proto index 790f400d2c..44fa8ba918 100644 --- a/common/protob/messages-management.proto +++ b/common/protob/messages-management.proto @@ -405,3 +405,11 @@ message PreauthorizedRequest { */ message CancelAuthorization { } + +/** + * Request: Reboot firmware to bootloader + * @start + * Can't have response. + */ +message RebootToBootloader { +} diff --git a/common/protob/messages.proto b/common/protob/messages.proto index d6675963aa..bb4483e7fd 100644 --- a/common/protob/messages.proto +++ b/common/protob/messages.proto @@ -278,4 +278,6 @@ enum MessageType { MessageType_WebAuthnCredentials = 801 [(wire_out) = true]; MessageType_WebAuthnAddResidentCredential = 802 [(wire_in) = true]; MessageType_WebAuthnRemoveResidentCredential = 803 [(wire_in) = true]; + + MessageType_RebootToBootloader = 804 [(wire_in) = true]; } diff --git a/legacy/firmware/fsm.c b/legacy/firmware/fsm.c index c36515f69f..e768916878 100644 --- a/legacy/firmware/fsm.c +++ b/legacy/firmware/fsm.c @@ -301,6 +301,12 @@ static bool fsm_layoutAddress(const char *address, const char *desc, } } +void fsm_msgRebootToBootloader(void) { +#if !EMULATOR + svc_reboot_to_bootloader(); +#endif +} + #include "fsm_msg_coin.h" #include "fsm_msg_common.h" #include "fsm_msg_crypto.h" diff --git a/legacy/firmware/fsm.h b/legacy/firmware/fsm.h index 10c15f5126..c20855be7d 100644 --- a/legacy/firmware/fsm.h +++ b/legacy/firmware/fsm.h @@ -138,4 +138,6 @@ void fsm_msgStellarAccountMergeOp(const StellarAccountMergeOp *msg); void fsm_msgStellarManageDataOp(const StellarManageDataOp *msg); void fsm_msgStellarBumpSequenceOp(const StellarBumpSequenceOp *msg); +void fsm_msgRebootToBootloader(void); + #endif