title: How to identify the core which is running the interrupt handler?
body: <p>This is specific to XILINX-7000 family boards which has dual core A9 cortex CPU.  In the function OEMInterruptHandler I want to find out the core on which the current code is executing. This is for debug purpose as I found out that when the GPIO IRQ is targeted to CORE0 everything works fine but on CORE1 the GPIO IRQ is being preempted. The priority of GPIO IRQ is 0. The priority of all other IRQs are 0xA0. IRQs 0-31 are targeted on both cores and all other SPI except GPIO are targeted to core0. The OS is Windows CE 2013. Here is code from OEMInterruptHandler</p>
  
  <pre><code>    ULONG sys_intr = SYSINTR_NOP;
      UINT32 gic_iar = 0;
      UINT32 core;
      UINT32 irq = 0;
  
      gic_iar = (INREG32(&amp;g_GICCpu-&gt;INTACK));
      irq = ((gic_iar &amp; GIC_CPU_INTACK_INTID_MASK) &lt;&lt; GIC_CPU_INTACK_INTID_SHIFT);
      // read the core 
      core = readcore();
      // enable interrupts
      INTERRUPTS_ON();
      ....
  </code></pre>
  
  <p>I am looking for the implementation of readcore() function.</p>
  
  <p>Thanks</p>