1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-07-24 07:28:34 +00:00

fix(core): fix firmware hash calculation

[no changelog]
This commit is contained in:
cepetr 2025-06-10 16:02:44 +02:00 committed by cepetr
parent 4095add475
commit 6bea09bbe7
2 changed files with 3 additions and 3 deletions

View File

@ -213,11 +213,11 @@ static void kernel_loop(applet_t *coreapp) {
// defined in linker script
extern uint32_t _kernel_flash_end;
#define KERNEL_END ((uint32_t) & _kernel_flash_end)
#define KERNEL_END COREAPP_CODE_ALIGN((uint32_t) & _kernel_flash_end)
// Initializes coreapp applet
static void coreapp_init(applet_t *applet) {
const uint32_t CODE1_START = COREAPP_CODE_ALIGN(KERNEL_END);
const uint32_t CODE1_START = KERNEL_END;
#ifdef FIRMWARE_P1_START
const uint32_t CODE1_END = FIRMWARE_P1_START + FIRMWARE_P1_MAXSIZE;

View File

@ -157,7 +157,7 @@ extern uint32_t _kernel_flash_end;
#define KERNEL_START FIRMWARE_START
#endif
#define KERNEL_END ((uint32_t) & _kernel_flash_end)
#define KERNEL_END COREAPP_CODE_ALIGN((uint32_t) & _kernel_flash_end)
#define KERNEL_SIZE (KERNEL_END - KERNEL_START)
#endif // KERNEL