Cases where my IPI works:
- When a core sends an IPI to itself, but only if not used while in an interrupt handler.
Cases where my IPI does not work:
- When a core sends an IPI to another core (it may actually even lock up afterwards).
Anyone know any possible causes for such troublesome interrupts?
The vector i try to send is my software-yield interrupt, which sends an EOI in it's interrupt handler.
I would like to add, the core it sends to is just idling (in a halt-loop with interrupts enabled). The IPI is trying to wake it up by inducing a Yield-interrupt.
My IPI code:
Code: Select all
/* Setup flags
* Logical Destination
* Fixed Delivery
* Assert
* Edge Sensitive */
IpiLow |= IrqVector;
IpiLow |= (1 << 11);
IpiLow |= (1 << 14);
/* Setup Destination */
IpiHigh |= ((ApicGetCpuMask(CpuTarget) << 24));
/* Wait */
ApicWaitForIcr();
/* Disable interrupts */
IntStatus_t IntStatus = InterruptDisable();
/* Write upper 32 bits to ICR1 */
ApicWriteLocal(APIC_ICR_HIGH, IpiHigh);
/* Write lower 32 bits to ICR0 */
ApicWriteLocal(APIC_ICR_LOW, IpiLow);
/* Enable */
InterruptRestoreState(IntStatus);