MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / gicv2_handler

Function gicv2_handler

components/drivers/pic/pic-gicv2.c:433–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431};
432
433static rt_bool_t gicv2_handler(void *data)
434{
435 rt_bool_t res = RT_FALSE;
436 int hwirq;
437 struct gicv2 *gic = data;
438
439 hwirq = HWREG32(gic->cpu_base + GIC_CPU_INTACK) & 0x3ffUL;
440
441 if (!(hwirq >= 1020 && hwirq <= 1023))
442 {
443 struct rt_pic_irq *pirq;
444
445 if (hwirq < GIC_SGI_NR)
446 {
447 rt_hw_rmb();
448
449 pirq = rt_pic_find_ipi(&gic->parent, hwirq);
450 }
451 else
452 {
453 pirq = rt_pic_find_irq(&gic->parent, hwirq - GIC_SGI_NR);
454 }
455
456 gicv2_irq_ack(pirq);
457
458 rt_pic_handle_isr(pirq);
459
460 gicv2_irq_eoi(pirq);
461
462 res = RT_TRUE;
463 }
464
465 return res;
466}
467
468static rt_err_t gicv2_enable_rmw_access(void *data)
469{

Callers

nothing calls this directly

Calls 5

rt_pic_find_ipiFunction · 0.85
rt_pic_find_irqFunction · 0.85
gicv2_irq_ackFunction · 0.85
rt_pic_handle_isrFunction · 0.85
gicv2_irq_eoiFunction · 0.85

Tested by

no test coverage detected