UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer pullanlu
Observer
13,157 Views
Registered: ‎04-21-2012

Zynq Software Generated Interrupts (SGI) questions

I have a few questions about SGI:

 

1. Does Xilinx-Linux use Zynq's SGI?

2. If yes to 1, is there a way to register a callback function to execute when an SGI occurs? and how to trigger a SGI interrupt?

3. If no to 1, how do I register an ISR to handle SGI interrupt(s)? and how to trigger a SGI interrupt (other than using devmem to poke SGI register)?

4. Do you have sample code?

 

Thanks

 

Pullan

0 Kudos
10 Replies
12,820 Views
Registered: ‎04-11-2013

Re: Zynq Software Generated Interrupts (SGI) questions

i have the same question. Have you an answer for this problem. i will program in C.

0 Kudos
Highlighted
Visitor zackshef
Visitor
12,740 Views
Registered: ‎05-09-2013

Re: Zynq Software Generated Interrupts (SGI) questions

I'm also looking at doing something similar. I couldn't find much but I found this. It is used for generating interrupts in the PL. Perhaps you and I could learn how to use it for SGI. Looks like it uses the xscugic.h library.


Good luck!

-Zack
-Zack
Tags (4)
0 Kudos
12,229 Views
Registered: ‎11-04-2013

Re: Zynq Software Generated Interrupts (SGI) questions

Did you manage to get this to work? 

0 Kudos
Newbie vipersnh
Newbie
11,056 Views
Registered: ‎12-17-2014

Re: Zynq Software Generated Interrupts (SGI) questions

Even I want the same, except I want to use UIO driver for handling SGI on Linux side.

BTW, i was able to generate SGI interrupts of ID0-ID4 by simply writing to GIC register ICDSGIR manually from Linux mmap'ing the GIC address space.

I saw that interrupts were indeed generated by viewing at /proc/interrupts file

 

 

 

0 Kudos
Observer kenkrz
Observer
10,619 Views
Registered: ‎03-18-2015

Re: Zynq Software Generated Interrupts (SGI) questions

Did you ever get a solution to this problem? It seems like a great idea for an AMP configuration for the BareMetal CPU to signal the Linux CPU through a SGI.

0 Kudos
Xilinx Employee
Xilinx Employee
10,614 Views
Registered: ‎09-10-2008

Re: Zynq Software Generated Interrupts (SGI) questions

Hi,

Yes this does work as we are using it in a newer AMP framework that you'll see more about in the future.

Linux SMP uses IPI to communication between the CPUs.

You can also see some more details about this in the Inter A9 Communications video/PDF out on xilinx.com at

http://www.xilinx.com/member/zynq_videos/index.htm?@playlistCombo=3944811176001&bctid=3946101407001

Thanks,
John
0 Kudos
9,455 Views
Registered: ‎05-16-2015

Re: Zynq Software Generated Interrupts (SGI) questions

Hi,

could you be more specific?


The video you pointed to is about the DMA and doesn't mention anything about SGI.
I also read/watched this: http://www.xilinx.com/member/zynq_videos/pdf/Zynq-Inter-A9-Communication.pdf

It seems that what we want to do is possible, but the video doesn't say anything about any implementation or example available...

 

Generating interrupts from Linux (CPU0) to the Baremetal application (CPU1) is not an issue, it is as easy as:
gic_raise_softirq(cpumask_of(1), <SGI_n>);

 

Generating an interrupt from the CPU0 to CPU1 is also quite simple:

XScuGic_SoftwareIntr(&GicInst,<SGI_N>, XSCUGIC_SPI_CPU0_MASK /*CPU DST*/); //CPU0=1, CPU1=2

 

Doing the same from the Linux application is rather undocumented...

Trying to register a SGI interrupt using:

request_irq()

is always producing an error. Even thaugh /proc/interrupts do not shows that are in use...

 

Do you have any input here?

 

Thanks

0 Kudos
Visitor prasanna_mn
Visitor
4,937 Views
Registered: ‎11-10-2016

Re: Zynq Software Generated Interrupts (SGI) questions

Hi,

 

We are using Zynq7000 in AMP mode, Linux(CPU 0) and Freertos (CPU 1).

 

Need to send interrupt from CPU 0 to CPU 1.

 

In Linux Application when I use #include <asm/irqchip/arm-gic.h>


fatal error: linux/irqchip/arm-gic.h: No such file or directory   

 

Do you have any suggestion, Is any kernel configuration is needed??

 

Thanks

Prasanna

0 Kudos
Visitor moons520
Visitor
1,571 Views
Registered: ‎07-30-2017

Re: Zynq Software Generated Interrupts (SGI) questions

I have the same question. Have you an answer for this problem?

Linux(cpu0) send SGI to Baremetal(cpu1).

 

 

Thanks.

 

moons520

0 Kudos
Visitor age_sdu
Visitor
981 Views
Registered: ‎03-10-2016

Re: Zynq Software Generated Interrupts (SGI) questions

Hi. Did you ever get it working?

:-)

0 Kudos