mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
mpu_config: depend on MEMORY_PROTECT
This commit is contained in:
parent
e907cb87bc
commit
14233fcc26
2
setup.c
2
setup.c
@ -163,6 +163,7 @@ void setupApp(void)
|
|||||||
// 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(void)
|
||||||
{
|
{
|
||||||
|
#if MEMORY_PROTECT
|
||||||
// Disable MPU
|
// Disable MPU
|
||||||
MPU_CTRL = 0;
|
MPU_CTRL = 0;
|
||||||
|
|
||||||
@ -206,4 +207,5 @@ void mpu_config(void)
|
|||||||
|
|
||||||
// Switch to unprivileged software execution to prevent access to MPU
|
// Switch to unprivileged software execution to prevent access to MPU
|
||||||
set_mode_unprivileged();
|
set_mode_unprivileged();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user