diff options
author | Damien Zammit <damien@zamaudio.com> | 2023-08-13 00:51:02 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-08-13 00:51:02 +0200 |
commit | 6dcf01215edfd49a97c86e7c0d49e0d75785cf84 (patch) | |
tree | ca058ebedd32853617f92ced7bb4b3c5944744f7 /i386/i386at | |
parent | 8ff5ff4001e2f6c2361f452db6f7f468ea3a84b9 (diff) | |
download | gnumach-6dcf01215edfd49a97c86e7c0d49e0d75785cf84.tar.gz gnumach-6dcf01215edfd49a97c86e7c0d49e0d75785cf84.tar.bz2 gnumach-6dcf01215edfd49a97c86e7c0d49e0d75785cf84.zip |
i386/x86_64: Add remote AST via IPI mechanism
Diffstat (limited to 'i386/i386at')
-rw-r--r-- | i386/i386at/idt.h | 3 | ||||
-rw-r--r-- | i386/i386at/int_init.c | 4 | ||||
-rw-r--r-- | i386/i386at/interrupt.S | 8 |
3 files changed, 15 insertions, 0 deletions
diff --git a/i386/i386at/idt.h b/i386/i386at/idt.h index f080bb12..1c30eb7d 100644 --- a/i386/i386at/idt.h +++ b/i386/i386at/idt.h @@ -37,6 +37,9 @@ /* IOAPIC spurious interrupt vector set to 0xff */ #define IOAPIC_SPURIOUS_BASE 0xff +/* Remote -> local AST requests */ +#define CALL_LOCAL_AST_BASE 0xfa + /* Currently for TLB shootdowns */ #define CALL_SINGLE_FUNCTION_BASE 0xfb diff --git a/i386/i386at/int_init.c b/i386/i386at/int_init.c index e7fe7e31..e3c4b8c8 100644 --- a/i386/i386at/int_init.c +++ b/i386/i386at/int_init.c @@ -45,6 +45,10 @@ int_fill(struct real_gate *myidt) int_entry_table[i], KERNEL_CS, ACC_PL_K|ACC_INTR_GATE, 0); } + fill_idt_gate(myidt, CALL_LOCAL_AST_BASE, + int_entry_table[i], KERNEL_CS, + ACC_PL_K|ACC_INTR_GATE, 0); + i++; fill_idt_gate(myidt, CALL_SINGLE_FUNCTION_BASE, int_entry_table[i], KERNEL_CS, ACC_PL_K|ACC_INTR_GATE, 0); diff --git a/i386/i386at/interrupt.S b/i386/i386at/interrupt.S index e9e9c0ef..01198bf5 100644 --- a/i386/i386at/interrupt.S +++ b/i386/i386at/interrupt.S @@ -48,6 +48,9 @@ ENTRY(interrupt) cmpl $CALL_SINGLE_FUNCTION_BASE,%eax /* was this a SMP call single function request? */ je _call_single + cmpl $CALL_LOCAL_AST_BASE,%eax /* was this a SMP remote -> local ast request? */ + je _call_local_ast + subl $24,%esp /* Two local variables + 4 parameters */ movl %eax,S_IRQ /* save irq number */ @@ -129,4 +132,9 @@ _call_single: call EXT(lapic_eoi) /* lapic EOI before the handler to allow extra update */ call EXT(pmap_update_interrupt) /* TODO: Allow other functions */ ret + +_call_local_ast: + call EXT(ast_check) /* AST check on this cpu */ + call EXT(lapic_eoi) /* lapic EOI */ + ret END(interrupt) |