mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 14:28:07 +00:00
mpu: rename mpu_config to mpu_config_firmware
This commit is contained in:
parent
7e82f27553
commit
a00c7f9720
@ -130,7 +130,7 @@ int main(void)
|
||||
timer_init();
|
||||
#ifdef APPVER
|
||||
// enable MPU (Memory Protection Unit)
|
||||
mpu_config();
|
||||
mpu_config_firmware();
|
||||
#endif
|
||||
} else {
|
||||
collect_hw_entropy(false);
|
||||
|
2
setup.c
2
setup.c
@ -162,7 +162,7 @@ void setupApp(void)
|
||||
#define SRAM_BASE (0x20000000U)
|
||||
|
||||
// Never use in bootloader! Disables access to PPB (including MPU, NVIC, SCB)
|
||||
void mpu_config(void)
|
||||
void mpu_config_firmware(void)
|
||||
{
|
||||
#if MEMORY_PROTECT
|
||||
// Disable MPU
|
||||
|
2
setup.h
2
setup.h
@ -27,6 +27,6 @@ extern uint32_t __stack_chk_guard;
|
||||
void setup(void);
|
||||
void setupApp(void);
|
||||
|
||||
void mpu_config(void);
|
||||
void mpu_config_firmware(void);
|
||||
|
||||
#endif
|
||||
|
2
util.h
2
util.h
@ -64,7 +64,7 @@ static inline void __attribute__((noreturn)) jump_to_firmware(const vector_table
|
||||
// Set stack pointer
|
||||
__asm__ volatile("msr msp, %0" :: "r" (vector_table->initial_sp_value));
|
||||
} else { // untrusted firmware
|
||||
mpu_config(); // * configure MPU
|
||||
mpu_config_firmware(); // * configure MPU for the firmware
|
||||
__asm__ volatile("msr msp, %0" :: "r" (_stack));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user