cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Adventurer
Adventurer
179 Views
Registered: ‎03-12-2018

How to map interrupts to CPU1 in Linux?

Jump to solution

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.

 Capture.PNG 

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

Lokesh J.
0 Kudos
Reply
1 Solution

Accepted Solutions
Adventurer
Adventurer
66 Views
Registered: ‎03-12-2018

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);

 

Lokesh J.

View solution in original post

0 Kudos
Reply
1 Reply
Adventurer
Adventurer
67 Views
Registered: ‎03-12-2018

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);

 

Lokesh J.

View solution in original post

0 Kudos
Reply