Hi,
As we know SGI is edge trigger. Anyone know possible SGI miss/ignore scenario on GIC600?
Not specific to GIC-600, but:
To add...
There are also lots of reasons an SGI might be successfully registered but not cause an interrupt exception on the target CPU. For example, the SGI might be individually disabled, it might be lower priority than an interrupt already being handled, the CPU might interrupts masked...
Thank you Martin for prompt reply.
Any idea about below scenario
system wakeup(wakeup core 0) --> hotplug of secondary core --> primary core 0 send SGI to secondary core 1.
Here SGI missed. What will be possible reason
I'm not very knowledge-able about the specifics of hot plug/wake-up... so I'll stick to the GIC side.
My starting point would be to check if the GIC has registered the SGI as being pending for the receiving CPU. Knowing that will tell you which side the problem is on.
GICR_ISPENDR0 holds the pending state for SGIs. This is a Redistributor register, and you need to check the Redistributor of the receiver. Ideally start before the SGI is sent, checking that the SGI isn't yet pending. Then send the SGI and see if the pending bit gets set.
If GICR_ISPENDR0 shows the SGI as pending, the interrupt reached the Redistributor and was registered. If not, then either the SGI didn't reach the Redistributor or the Redistributor dropped it.
If the SGI is NOT shown as pending:
If the SGI is pending: the interrupt was registered by the GIC:
The last one (GICR_WAKER) is interesting and comes down what is meant to happen on the SGI being sent. As I said, I'm not familiar with the hot plug side flows. If the link is offline, then the GIC will raise a wake-request for the CPU (which is a signal, probably to a power controller). If the link is online, the GIC should be sending the SGI (modulo Enable, Priority, Group...) to the CPU.
Of course, it might not be a GIC problem, it might be related to software/firmware. But it's worth checking the GIC is at least registering the interrupt.
"If the link is offline, then the GIC will raise a wake-request for the CPU (which is a signal, probably to a power controller)"
in case of link offline , Does SGI in Pending state?
Yes. The link being online/offline affects what the Redistributor does in response to an interrupt becoming pending (forward to the CPU vs raise wake request). It doesn't change whether the interrupt is recorded as pending or not.
Thank you so much for detailed explaination.
One Last question .
In my system, Redistributor is powering up/making online using waker register.
Suppose core 0 redistributor is online and core 1 redistributor is offline. SGI sent from core 0 to core 1. After that core 1 redistributor online using waker register, does SGI forward to the core 1? meaning is SGI in pending state ?
Thank you in advance for your time and help
The GICR_WAKER register isn't doing power control of the Redistributor itself. Rather it controls whether the connection to the core is online or not.
Namu said:Suppose core 0 redistributor is online and core 1 redistributor is offline. SGI sent from core 0 to core 1. After that core 1 redistributor online using waker register, does SGI forward to the core 1? meaning is SGI in pending state ?
Yes. The SGI would be recorded as pending on core 1's Redistributor. This could cause the Redistributor to assert the wake-request signal.
The SGI would remain pending until either it was manually cleared (something writes to GICR_ICPENDR0) or the interrupt is taken+acked by the core 1.
Core 1 will only be able to take and ack the interrupt if the link is first brought on line via writing to GICR_WAKER. But being able to take the interrupt also depends on a bunch of other factors such as the SGI's priority, individual enable...
Martin Weidmann, Thank for your help.
I want to know 2 question.
1) After the redistributor link offline, does all the below register set to default value?
GICR_IPRIORITYR0GICR_IPRIORITYR1GICR_IPRIORITYR2GICR_IPRIORITYR3
GICR_ICFGR0GICR_IGROUPR0GICR_IGRPMODR0GICR_ISENABLER0
2) Which sequence is correct sequence for redistributor?
a. Configure the above redistributor register --> Make redistributor link online.
b. Make redistributor link online --> Configure the above redistributor register.
c. sequence doesn't matter.
Thank you in advance. Waiting for your reply
Namu said:1) After the redistributor link offline, does all the below register set to default value?
No, changing GICR_WAKER (whether taking online or offline) has no effect on the values in the GICR_IxyzR registers.
Namu said:2) Which sequence is correct sequence for redistributor? a. Configure the above redistributor register --> Make redistributor link online. b. Make redistributor link online --> Configure the above redistributor register. c. sequence doesn't matter.
From a pure GIC perspective, they're independent tasks and the behaviour is defined for both orders.
It might matter to your software flow. For example, if you start configuring interrupts and sending SGIs you might see the GIC generate wake-requests. What (if anything) happens in response to the wake-request is specific to the SoC.
Thank you for your reply.
I have raised another question. Can you please help to find the answer there?
community.arm.com/.../gicd_igrpmodr-0-register-read-as-0