armv8-m: add wake_func arm_should_generate_nonsecure_busfault
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
60fc933261
commit
0f02791ae6
@ -81,6 +81,19 @@ static void generate_nonsecure_busfault(void)
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: arm_securefault_should_generate
|
||||
*
|
||||
* Description:
|
||||
* Check whether should generate non-secure IRQ from securefault
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
bool weak_function arm_should_generate_nonsecure_busfault(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: arm_securefault
|
||||
*
|
||||
@ -145,11 +158,15 @@ int arm_securefault(int irq, FAR void *context, FAR void *arg)
|
||||
putreg32(0xff, SAU_SFSR);
|
||||
|
||||
#ifdef CONFIG_DEBUG_SECUREFAULT
|
||||
if (arm_should_generate_nonsecure_busfault())
|
||||
{
|
||||
generate_nonsecure_busfault();
|
||||
#else
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
up_irq_save();
|
||||
PANIC();
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user