armv8m: fix up_secure_irq failed for NVIC_IRQ_BUSFAULT
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
7a0ef1d0ca
commit
b445029cf2
@ -49,6 +49,8 @@
|
|||||||
|
|
||||||
void up_secure_irq(int irq, bool secure)
|
void up_secure_irq(int irq, bool secure)
|
||||||
{
|
{
|
||||||
|
uint32_t keymask = 0;
|
||||||
|
uint32_t keyval = 0;
|
||||||
uint32_t regaddr;
|
uint32_t regaddr;
|
||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
uint32_t regbit;
|
uint32_t regbit;
|
||||||
@ -60,6 +62,8 @@ void up_secure_irq(int irq, bool secure)
|
|||||||
case NVIC_IRQ_BUSFAULT:
|
case NVIC_IRQ_BUSFAULT:
|
||||||
regaddr = NVIC_AIRCR;
|
regaddr = NVIC_AIRCR;
|
||||||
regbit = NVIC_AIRCR_BFHFNMINS;
|
regbit = NVIC_AIRCR_BFHFNMINS;
|
||||||
|
keymask = NVIC_AIRCR_VECTKEY_MASK;
|
||||||
|
keyval = NVIC_AIRCR_VECTKEY;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NVIC_IRQ_DBGMONITOR:
|
case NVIC_IRQ_DBGMONITOR:
|
||||||
@ -85,6 +89,7 @@ void up_secure_irq(int irq, bool secure)
|
|||||||
regval |= regbit;
|
regval |= regbit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
regval = (regval & ~keymask) | keyval;
|
||||||
putreg32(regval, regaddr);
|
putreg32(regval, regaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user