1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00

mpu: rename mpu_config to mpu_config_firmware

This commit is contained in:
Pavol Rusnak 2019-02-19 17:52:29 +01:00
parent 7e82f27553
commit a00c7f9720
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
4 changed files with 4 additions and 4 deletions

View File

@ -130,7 +130,7 @@ int main(void)
timer_init(); timer_init();
#ifdef APPVER #ifdef APPVER
// enable MPU (Memory Protection Unit) // enable MPU (Memory Protection Unit)
mpu_config(); mpu_config_firmware();
#endif #endif
} else { } else {
collect_hw_entropy(false); collect_hw_entropy(false);

View File

@ -162,7 +162,7 @@ void setupApp(void)
#define SRAM_BASE (0x20000000U) #define SRAM_BASE (0x20000000U)
// Never use in bootloader! Disables access to PPB (including MPU, NVIC, SCB) // Never use in bootloader! Disables access to PPB (including MPU, NVIC, SCB)
void mpu_config(void) void mpu_config_firmware(void)
{ {
#if MEMORY_PROTECT #if MEMORY_PROTECT
// Disable MPU // Disable MPU

View File

@ -27,6 +27,6 @@ extern uint32_t __stack_chk_guard;
void setup(void); void setup(void);
void setupApp(void); void setupApp(void);
void mpu_config(void); void mpu_config_firmware(void);
#endif #endif

2
util.h
View File

@ -64,7 +64,7 @@ static inline void __attribute__((noreturn)) jump_to_firmware(const vector_table
// Set stack pointer // Set stack pointer
__asm__ volatile("msr msp, %0" :: "r" (vector_table->initial_sp_value)); __asm__ volatile("msr msp, %0" :: "r" (vector_table->initial_sp_value));
} else { // untrusted firmware } else { // untrusted firmware
mpu_config(); // * configure MPU mpu_config_firmware(); // * configure MPU for the firmware
__asm__ volatile("msr msp, %0" :: "r" (_stack)); __asm__ volatile("msr msp, %0" :: "r" (_stack));
} }