Skip to content

Commit

Permalink
plat-stm32mp1: CFG_WARN_INSECURE=y allows insecure configuration
Browse files Browse the repository at this point in the history
Changes STM32MP1 shared resources to allow insecure RCC protection
with peripherals assigned to secure world when CFG_WARN_INSECURE is
enabled. This means for example that some SoC resources can be assigned
to OP-TEE without their clock and reset controllers being effectively
protected from non-secure accesses. Such configuration can be useful
for development and test purposes.

This change does not affect devices provisioned with secret that are
in so-called SEC_CLOSED state (BSEC fuses). Indeed this configuration
mandates currently RCC protection to be enabled as already implemented
in function check_rcc_secure_configuration().

Signed-off-by: Etienne Carriere <[email protected]>
  • Loading branch information
etienne-lms committed Nov 13, 2023
1 parent b501c00 commit e3ef5cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/arch/arm/plat-stm32mp1/shared_resources.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,12 @@ static void check_rcc_secure_configuration(void)
}
}

if (have_error)
panic();
if (have_error) {
if (IS_ENABLED(CFG_WARN_INSECURE))
EMSG("Warning: CFG_WARN_INSECURE allows insecure RCC configuration");
else
panic();
}
}

static void set_gpio_secure_configuration(void)
Expand Down

0 comments on commit e3ef5cd

Please sign in to comment.