From c9e2acff14cbacce707f07410744fad575f4b78b Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Sat, 5 Aug 2023 15:48:53 +0000 Subject: interrupt.S: No nested interrupts during IPIs && more x86_64 smp support Message-Id: <20230805154843.2003098-1-damien@zamaudio.com> --- x86_64/interrupt.S | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'x86_64') 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: -- cgit v1.2.3