Skip to content

Commit a7e36dc

Browse files
nrf_security: drivers: cracen: support direct IRQs for bare_metal
When multithreading is not enabled, the SW ISR table is not required and may be excluded from the build. Use direct ISRs when multithreading is not used. This is the case for NCS-BM. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent d8f7d1b commit a7e36dc

File tree

1 file changed

+12
-0
lines changed
  • subsys/nrf_security/src/drivers/cracen/sxsymcrypt/src/platform/baremetal

1 file changed

+12
-0
lines changed

subsys/nrf_security/src/drivers/cracen/sxsymcrypt/src/platform/baremetal/interrupts.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,24 @@
2222
NRF_SECURITY_EVENT_DEFINE(cracen_irq_event_for_cryptomaster)
2323
NRF_SECURITY_EVENT_DEFINE(cracen_irq_event_for_pke)
2424

25+
#if !defined(CONFIG_MULTITHREADING)
26+
ISR_DIRECT_DECLARE(cracen_direct_isr_handler)
27+
{
28+
cracen_isr_handler(NULL);
29+
return 0;
30+
}
31+
#endif
32+
2533
void cracen_interrupts_init(void)
2634
{
2735
nrf_security_event_init(cracen_irq_event_for_cryptomaster);
2836
nrf_security_event_init(cracen_irq_event_for_pke);
2937

38+
#if defined(CONFIG_MULTITHREADING)
3039
IRQ_CONNECT(CRACEN_IRQn, 0, cracen_isr_handler, NULL, 0);
40+
#else
41+
IRQ_DIRECT_CONNECT(CRACEN_IRQn, 0, cracen_direct_isr_handler, 0);
42+
#endif
3143
}
3244

3345
#ifdef __NRF_TFM__

0 commit comments

Comments
 (0)