arc: start secureshield in prep_c, do not use SYS_INIT
Initialize secureshield in prep_c instead of using SYS_INIT. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
2294da24d7
commit
3e616cf4d3
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue