summaryrefslogtreecommitdiff
path: root/x86_64
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2023-08-05 15:48:53 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-08-06 15:37:25 +0200
commitc9e2acff14cbacce707f07410744fad575f4b78b (patch)
tree0b22def779ed72f60496ee006ba86c19b67e15ed /x86_64
parent22f2a7160fa0795894b0d50de4c216add33e5f2b (diff)
interrupt.S: No nested interrupts during IPIs && more x86_64 smp support
Message-Id: <20230805154843.2003098-1-damien@zamaudio.com>
Diffstat (limited to 'x86_64')
-rw-r--r--x86_64/interrupt.S10
1 files changed, 10 insertions, 0 deletions
diff --git a/x86_64/interrupt.S b/x86_64/interrupt.S
index 31f386ec..eabf934e 100644
--- a/x86_64/interrupt.S
+++ b/x86_64/interrupt.S
@@ -42,6 +42,9 @@ ENTRY(interrupt)
#ifdef APIC
cmpl $255,%eax /* was this a spurious intr? */
je _no_eoi /* if so, just return */
+
+ cmpl $CALL_SINGLE_FUNCTION_BASE,%eax /* was this a SMP call single function request? */
+ je _call_single
#endif
subq $16,%rsp /* Two local variables */
movl %eax,S_IRQ /* save irq number */
@@ -112,6 +115,13 @@ ENTRY(interrupt)
_isa_eoi:
movl %ecx,%edi /* load irq number as 1st arg */
call EXT(ioapic_irq_eoi) /* ioapic irq specific EOI */
+ addq $16,%rsp /* pop local variables */
+ ret
+_call_single:
+ cli /* no nested interrupts */
+ call EXT(lapic_eoi) /* lapic EOI before the handler to allow extra update */
+ call EXT(pmap_update_interrupt) /* TODO: Allow other functions */
+ ret
#endif
addq $16,%rsp /* pop local variables */
_no_eoi: