diff --git a/arch/arc/core/prep_c.c b/arch/arc/core/prep_c.c index e9b39dc54fc..bf3ab454a2c 100644 --- a/arch/arc/core/prep_c.c +++ b/arch/arc/core/prep_c.c @@ -116,6 +116,7 @@ static void dev_state_zero(void) extern FUNC_NORETURN void z_cstart(void); extern void arc_mpu_init(void); +extern void arc_secureshield_init(void); /** * @brief Prepare to and run C code @@ -143,6 +144,9 @@ void z_prep_c(void) #endif #ifdef CONFIG_ARC_MPU arc_mpu_init(); +#endif +#ifdef CONFIG_ARC_SECURE_FIRMWARE + arc_secureshield_init(); #endif z_cstart(); CODE_UNREACHABLE; diff --git a/arch/arc/core/secureshield/arc_sjli.c b/arch/arc/core/secureshield/arc_sjli.c index 22deebc2718..e5b865445ee 100644 --- a/arch/arc/core/secureshield/arc_sjli.c +++ b/arch/arc/core/secureshield/arc_sjli.c @@ -48,7 +48,7 @@ static void sjli_table_init(void) /* * @brief initialization of secureshield related functions. */ -static int arc_secureshield_init(void) +void arc_secureshield_init(void) { sjli_table_init(); @@ -60,9 +60,4 @@ static int arc_secureshield_init(void) * */ __asm__ volatile("sflag 0x20"); - - return 0; } - -SYS_INIT(arc_secureshield_init, PRE_KERNEL_1, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);