Limit of IPI sending?
Posted: Fri May 22, 2015 7:28 am
I send an IPI from a CPU to another, that's fine. Real mode.
But as I saw, I can only send 2 IPIs one after another.
The third one is not generating an interrupt to the target CPU.
What could be the problem?
Update: If I have some spin loop before the call, only 1 IPI can be sent.
Is there some limitations on spinloops related to IPIs?
But as I saw, I can only send 2 IPIs one after another.
The third one is not generating an interrupt to the target CPU.
What could be the problem?
Code: Select all
SendIPIF: ; bl = APIC ID, ECX = IPI. Called with BL = 1 and IPI = 0x0F1 to generate INT 0xF1 to target CPU.
PUSHAD
; Write it to 0x310
MOV EDI,[DS:LocalApic] ; default 0xFEE00000
ADD EDI,0x310
MOV EDX,[FS:EDI] ; FS is an unreal mode seg
AND EDX,0xFFFFFF
XOR EAX,EAX
MOV AL,BL
SHL EAX,24
OR EDX,EAX
MOV [FS:EDI],EDX
; Write it to 0x300
MOV EDI,[DS:LocalApic]
ADD EDI,0x300
MOV [FS:EDI],ECX
; Verify it got delivered
.Verify:
PAUSE
MOV EAX,[FS:EDI];
SHR EAX,12
TEST EAX,1
JNZ .Verify
; Write to 0xB0 (EOI)
MOV EDI,[DS:LocalApic]
ADD EDI,0xB0
MOV dword [FS:EDI],0
POPAD
RETF
Is there some limitations on spinloops related to IPIs?