Skip to content

Commit 3daef7b

Browse files
committed
[ot] hw/opentitan: ot_aon_timer: Connect watchdog bark NMI
The aon timer should send an NMI signal to Ibex when its watchdog timer barks. Now that the NMI functionality is in place, we can appropriately hook up this signal, which should appear before the equivalent IRQ. Signed-off-by: Alex Jones <[email protected]>
1 parent 70bde01 commit 3daef7b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

hw/opentitan/ot_aon_timer.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ static void ot_aon_timer_update_irqs(OtAonTimerState *s)
203203
trace_ot_aon_timer_irqs(s->ot_id, wkup, bark, s->wdog_bite);
204204

205205
ibex_irq_set(&s->irq_wkup, wkup);
206-
ibex_irq_set(&s->irq_bark, bark);
207206
ibex_irq_set(&s->nmi_bark, bark);
207+
ibex_irq_set(&s->irq_bark, bark);
208208
ibex_irq_set(&s->pwrmgr_wkup, wkup);
209209
ibex_irq_set(&s->pwrmgr_bite, s->wdog_bite);
210210
}

hw/riscv/ot_earlgrey.c

+2
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,8 @@ static const IbexDeviceDef ot_eg_soc_devices[] = {
791791
OT_PWRMGR_WKUP, OT_PWRMGR_WAKEUP_AON_TIMER),
792792
OT_EG_SOC_SIGNAL(OT_AON_TIMER_BITE, 0, PWRMGR, \
793793
OT_PWRMGR_RST, OT_EG_RESET_AON_TIMER),
794+
OT_EG_SOC_SIGNAL(OT_AON_TIMER_BARK, 0, IBEX_WRAPPER, \
795+
OT_IBEX_WRAPPER_NMI, OT_IBEX_NMI_WDOG),
794796
OT_EG_SOC_GPIO_ALERT(0, 31)
795797
),
796798
.prop = IBEXDEVICEPROPDEFS(

0 commit comments

Comments
 (0)