title: GICv2 IRQ ID 1023
body: <p>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</p>
  <pre><code>irqstat = REGW(GIC_BASE+GIC_CPU_INTACK);
  irqnr = irqstat &amp; GICC_IAR_INT_ID_MASK;
  if(irqnr &gt; 15 &amp;&amp; irqnr &lt; 1020){
      REGW(GIC_BASE + GIC_CPU_EOI) = irqstat;
      if(irq_map[irqnr])
          irq_map[irqnr]();
  }
  </code></pre>
  <p>In irq routine these lines</p>
  <pre><code>u32 irqstat = VOP_REGW(VOP_INTR_STATUS0) &amp; 0xFFFF;
  if(irqstat){
      VOP_REGW(VOP_INTR_CLEAR0) = irqstat|(irqstat&lt;&lt; 16);
      if((irqstat &amp; 0x1000) )
          VOP_REG_SET(VOP_SYS_CTRL1,0x3,0x1b,0x0);
  }
  </code></pre>
  <p>Just clear the VOP registers</p>
  <p>You can find the complete code on my github <a href="https://github.com/linoma/rk3328-bare-metal" rel="nofollow noreferrer">https://github.com/linoma/rk3328-bare-metal</a>
  Thanks for answers</p>