cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tdirksens
Adventurer
Adventurer
2,440 Views
Registered: ‎02-12-2017

How to write to GIC Registers

Hello everyone,

 

how can I write to registers of the general interrupt controller (GIC) of Zynq ARM, specially ICDSGIR to generate software interrupts?

I can't find any example by xilinx or others.

 

Thanks you in advance.

tdirksens

0 Kudos
5 Replies
hpoetzl
Voyager
Voyager
2,427 Views
Registered: ‎06-24-2013

Hey @tdirksens,

 

how can I write to registers of the general interrupt controller (GIC) of Zynq ARM, specially ICDSGIR to generate software interrupts?

The ICDSGIR can be found in the APU block of registers (0xF8F0xxxx) at location 0x1F00.

You can find this information in UG585 section B.24.

 

Here is an example how to trigger a software interrupt under Linux ...

# devmem2 0xF8F01F00 w 0x1000001

You can observe the effect by looking at /proc/interrupts where you will see that the counter for IPI1 will go up.

 

Hope this helps,

Herbert

-------------- Yes, I do this for fun!
tdirksens
Adventurer
Adventurer
2,386 Views
Registered: ‎02-12-2017

@hpoetzl thanks yo very much for help!

 

can I also trigger software interrupts in baremetal applications by just writing values to address  0xF8F01F00? 

0 Kudos
hpoetzl
Voyager
Voyager
2,384 Views
Registered: ‎06-24-2013

Hey @tdirksens,

 

@hpoetzl thanks yo very much for help!

You're welcome!

 

can I also trigger software interrupts in baremetal applications by just writing values to address 0xF8F01F00?

Sure, but somebody has to handle them :)

 

Best,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
tdirksens
Adventurer
Adventurer
2,337 Views
Registered: ‎02-12-2017

@hpoetzl I setup the interrupt controller, then I set a pointer to address 0xF8F01F00 and wrote a value to it, but it seems to be that it doesn't trigger an interrupt

0 Kudos
ericv
Scholar
Scholar
2,324 Views
Registered: ‎04-13-2015

@tdirksens

 

Depending on the interrupt number you are using, you'll also have to set-up the ICDIPTRn register.

I would be useful for you to re-read the whole GIC document in light of what you are becoming aware of.

 

I can assure you that triggering an interrupt by writing ICDSGIR works..

 

Regards

 

 

 

 

0 Kudos