GICv2 IRQ ID 1023

131 views Asked by At

I am just trying my rk3328 (armv8) bare metal os. I am use irq routines for wait the vblank and to draw the frame. The VOP (graphics PU) trigs the IRQ. The GIC intercepts the signal , and it calls the correct routine. But immediately the GIC intercept the IRQ with ID 1023 and my board freeze. Here's the code

irqstat = REGW(GIC_BASE+GIC_CPU_INTACK);
irqnr = irqstat & GICC_IAR_INT_ID_MASK;
if(irqnr > 15 && irqnr < 1020){
    REGW(GIC_BASE + GIC_CPU_EOI) = irqstat;
    if(irq_map[irqnr])
        irq_map[irqnr]();
}

In irq routine these lines

u32 irqstat = VOP_REGW(VOP_INTR_STATUS0) & 0xFFFF;
if(irqstat){
    VOP_REGW(VOP_INTR_CLEAR0) = irqstat|(irqstat<< 16);
    if((irqstat & 0x1000) )
        VOP_REG_SET(VOP_SYS_CTRL1,0x3,0x1b,0x0);
}

Just clear the VOP registers

You can find the complete code on my github https://github.com/linoma/rk3328-bare-metal Thanks for answers

0

There are 0 answers