10-27-2020 06:07 AM
Hello there,
I'm working on ZC7020 Evaluation Board and having DUAL-CORE implementation.
CPU-0 with Linux and CPU-1 with BareMetal.
I have some high speed interrupts from PL to PS and it is mainly for CPU-1.
Refer below snippet of my block diagram.
In my old dual core implementation, where both CPUs were having BareMetal. In there I use to map interrupts to CPU1 from CPU0 and it was working fine.
Similarly, I want to map same interrupts from CPU0 (Linux) to CPU1 (Baremetal).
When I'm creating Petalinux Project, I don't see any interrupts listed in the final system.dts file. (Please find the attachment for the same)
Could anyone please help me with this.??
Looking forward to get a positive response.
Thanks
Lokesh Jadhav
01-04-2021 09:13 PM
Dear All,
I've found the solution for this.
When Linux comes into picture, by default all the interrupts maps to Linux i.e. CPU0. So when CPU1 wants to use some of the interrupts (here interrupts means IRQ_F2P), then you have to first unmap those interrupts and map again to CPU1. This you need to write in Baremetal code which is mainly for CPU1.
Following commands are for mapping and unmapping
#define InterruptNo1 61 // Irq_F2P
/* 1st Unmap*/
XScuGic_InterruptUnmapFromCpu(&GIC, 0, InterruptNo1);
/*then Map */
XScuGic_InterruptMapToCpu(&GIC, 0, InterruptNo1);
01-04-2021 09:13 PM
Dear All,
I've found the solution for this.
When Linux comes into picture, by default all the interrupts maps to Linux i.e. CPU0. So when CPU1 wants to use some of the interrupts (here interrupts means IRQ_F2P), then you have to first unmap those interrupts and map again to CPU1. This you need to write in Baremetal code which is mainly for CPU1.
Following commands are for mapping and unmapping
#define InterruptNo1 61 // Irq_F2P
/* 1st Unmap*/
XScuGic_InterruptUnmapFromCpu(&GIC, 0, InterruptNo1);
/*then Map */
XScuGic_InterruptMapToCpu(&GIC, 0, InterruptNo1);