2017-10-11 21:37:28 +00:00
|
|
|
.syntax unified
|
|
|
|
|
2017-03-31 22:22:24 +00:00
|
|
|
#include "version.h"
|
|
|
|
|
2017-10-11 21:37:28 +00:00
|
|
|
.section .header, "a"
|
2017-03-31 22:22:24 +00:00
|
|
|
|
2017-04-01 00:32:05 +00:00
|
|
|
.type g_header, %object
|
|
|
|
.size g_header, .-g_header
|
2017-03-31 22:22:24 +00:00
|
|
|
|
2020-05-14 14:10:42 +00:00
|
|
|
// Firmware header for both Trezor One and Trezor T.
|
|
|
|
// Trezor One must have bootloader version >= 1.8.0 (before that version the hdrlen used to be reset vector)
|
2020-05-11 13:43:43 +00:00
|
|
|
|
2017-03-31 22:22:24 +00:00
|
|
|
g_header:
|
2017-04-01 00:32:05 +00:00
|
|
|
.byte 'T','R','Z','F' // magic
|
|
|
|
.word g_header_end - g_header // hdrlen
|
2022-11-21 13:12:49 +00:00
|
|
|
#ifdef TREZOR_MODEL_T
|
2017-04-01 00:32:05 +00:00
|
|
|
.word 0 // expiry
|
2022-11-21 13:12:49 +00:00
|
|
|
#else
|
|
|
|
.word 1 // expiry
|
|
|
|
#endif
|
2017-04-01 00:32:05 +00:00
|
|
|
.word _codelen // codelen
|
|
|
|
.byte VERSION_MAJOR // vmajor
|
|
|
|
.byte VERSION_MINOR // vminor
|
|
|
|
.byte VERSION_PATCH // vpatch
|
|
|
|
.byte VERSION_BUILD // vbuild
|
2017-12-14 20:29:13 +00:00
|
|
|
.byte FIX_VERSION_MAJOR // fix_vmajor
|
|
|
|
.byte FIX_VERSION_MINOR // fix_vminor
|
|
|
|
.byte FIX_VERSION_PATCH // fix_vpatch
|
|
|
|
.byte FIX_VERSION_BUILD // fix_vbuild
|
2022-11-21 13:12:49 +00:00
|
|
|
.word HW_MODEL // type of the designated hardware
|
|
|
|
.byte HW_REVISION // revision of the designated hardware
|
2024-08-27 10:59:31 +00:00
|
|
|
.byte FIRMWARE_MONOTONIC_VERSION // monotonic version of the binary
|
2022-11-21 13:12:49 +00:00
|
|
|
. = . + 2 // reserved
|
2017-10-26 01:08:18 +00:00
|
|
|
. = . + 512 // hash1 ... hash16
|
2020-05-14 14:10:42 +00:00
|
|
|
|
2022-05-01 11:57:18 +00:00
|
|
|
#if !defined TREZOR_MODEL_1
|
|
|
|
// trezor-core header style
|
2017-10-26 01:08:18 +00:00
|
|
|
. = . + 415 // reserved
|
2017-04-01 00:32:05 +00:00
|
|
|
.byte 0 // sigmask
|
|
|
|
. = . + 64 // sig
|
2022-05-01 11:57:18 +00:00
|
|
|
#else
|
|
|
|
// model 1 compatibility header
|
2020-05-11 13:43:43 +00:00
|
|
|
. = . + 64 // sig1
|
|
|
|
. = . + 64 // sig2
|
|
|
|
. = . + 64 // sig3
|
|
|
|
.byte 0 // sigindex1
|
|
|
|
.byte 0 // sigindex2
|
|
|
|
.byte 0 // sigindex3
|
|
|
|
. = . + 220 // reserved
|
|
|
|
. = . + 65 // reserved
|
2020-05-14 14:10:42 +00:00
|
|
|
#endif
|
|
|
|
|
2020-05-11 13:43:43 +00:00
|
|
|
g_header_end:
|
|
|
|
|