From 69dcb84d4e26780fc9d20ef736cb35e1f11642a7 Mon Sep 17 00:00:00 2001 From: cepetr Date: Thu, 31 Oct 2024 09:23:37 +0100 Subject: [PATCH] fix(core): fix sram_u region clearing [no changelog] --- core/embed/trezorhal/stm32u5/mpu.c | 4 ++-- core/embed/trezorhal/stm32u5/secure_aes.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/embed/trezorhal/stm32u5/mpu.c b/core/embed/trezorhal/stm32u5/mpu.c index 8baa72449b..01f83f172d 100644 --- a/core/embed/trezorhal/stm32u5/mpu.c +++ b/core/embed/trezorhal/stm32u5/mpu.c @@ -154,8 +154,8 @@ static void mpu_set_attributes(void) { #endif #ifdef SYSCALL_DISPATCH -extern uint32_t _uflash_start; -extern uint32_t _uflash_end; +extern uint8_t _uflash_start; +extern uint8_t _uflash_end; #define KERNEL_RAM_U_START (KERNEL_RAM_START + KERNEL_RAM_SIZE) #define KERNEL_RAM_U_SIZE KERNEL_U_RAM_SIZE #define KERNEL_FLASH_U_START (uint32_t) & _uflash_start diff --git a/core/embed/trezorhal/stm32u5/secure_aes.c b/core/embed/trezorhal/stm32u5/secure_aes.c index 036c3958a3..264473ba04 100644 --- a/core/embed/trezorhal/stm32u5/secure_aes.c +++ b/core/embed/trezorhal/stm32u5/secure_aes.c @@ -141,8 +141,8 @@ saes_invoke(void) { return 0; } -extern uint32_t sram_u_start; -extern uint32_t sram_u_end; +extern uint8_t sram_u_start; +extern uint8_t sram_u_end; secbool unpriv_encrypt(const uint8_t* input, size_t size, uint8_t* output, secure_aes_keysel_t key) {