so I'm currently working on a kernel-call delay implementation. Now the delay function is really very simple and just a timer counting down.
The svc call is issued form EL0 and trapped to EL1 where the delay fn is implemented. Now my problem is that when I'm in EL1 for longer amount of time, the timer irq(which calls the scheduler) fires while I'm still in the timers svc call.
Since the timer irq is not fired when I'm in el1, the scheduler does not get called and the process is stuck. Generally when I'm in a kernel process(so EL1) the timer irq does still get called, only when I'm in the svc call it doesn't.
I'm specifically enabling irqs in the daif reg before counting down, which other config regs could conflict?
PSTATE.I (the IRQ mask) is set automatically on taking an exception. Are you clearing it in your SVC handler? If not, that would explain why the IRQ is not taken while you are in EL1.
You might also find this page useful for background: https://developer.arm.com/documentation/102412/0103/Handling-exceptions/Exception-handling-examples?lang=en#md331-exception-handling-examples__exception-masking-and-non-maskable-interrupts-nmi. (Exception masking and non-maskable interrupts)