aboutsummaryrefslogtreecommitdiff
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
parent22f2a7160fa0795894b0d50de4c216add33e5f2b (diff)
downloadgnumach-c9e2acff14cbacce707f07410744fad575f4b78b.tar.gz
gnumach-c9e2acff14cbacce707f07410744fad575f4b78b.tar.bz2
gnumach-c9e2acff14cbacce707f07410744fad575f4b78b.zip
interrupt.S: No nested interrupts during IPIs && more x86_64 smp support
Message-Id: <20230805154843.2003098-1-damien@zamaudio.com>
-rw-r--r--i386/i386at/interrupt.S1
-rw-r--r--x86_64/interrupt.S10
2 files changed, 11 insertions, 0 deletions
diff --git a/i386/i386at/interrupt.S b/i386/i386at/interrupt.S
index 55f4fa0f..1f661f8d 100644
--- a/i386/i386at/interrupt.S
+++ b/i386/i386at/interrupt.S
@@ -123,6 +123,7 @@ _no_eoi:
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
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: