/SPARTAN/trunk/arch/ia32/include/interrupt.h |
---|
58,8 → 58,9 |
#define VECTOR_CLK (IVT_IRQBASE+IRQ_CLK) |
#define VECTOR_KBD (IVT_IRQBASE+IRQ_KBD) |
#define VECTOR_SYSCALL (IVT_FREEBASE+0) |
#define VECTOR_TLB_SHOOTDOWN (IVT_FREEBASE+1) |
#define VECTOR_SYSCALL (IVT_FREEBASE+0) |
#define VECTOR_TLB_SHOOTDOWN_IPI (IVT_FREEBASE+1) |
#define VECTOR_WAKEUP_IPI (IVT_FREEBASE+2) |
typedef void (* iroutine)(__u8 n, __u32 stack[]); |
78,6 → 79,7 |
extern void page_fault(__u8 n, __u32 stack[]); |
extern void syscall(__u8 n, __u32 stack[]); |
extern void tlb_shootdown_ipi(__u8 n, __u32 stack[]); |
extern void wakeup_ipi(__u8 n, __u32 stack[]); |
extern void trap_virtual_enable_irqs(__u16 irqmask); |
extern void trap_virtual_disable_irqs(__u16 irqmask); |
/SPARTAN/trunk/arch/ia32/Makefile.inc |
---|
26,6 → 26,7 |
arch/smp/apic.c \ |
arch/smp/mp.c \ |
arch/smp/atomic.S \ |
arch/smp/ipi.c \ |
arch/ia32.c \ |
arch/interrupt.c \ |
arch/pm.c \ |
/SPARTAN/trunk/arch/ia32/src/ia32.c |
---|
58,7 → 58,8 |
trap_register(VECTOR_SYSCALL, syscall); |
#ifdef __SMP__ |
trap_register(VECTOR_TLB_SHOOTDOWN, tlb_shootdown_ipi); |
trap_register(VECTOR_TLB_SHOOTDOWN_IPI, tlb_shootdown_ipi); |
trap_register(VECTOR_WAKEUP_IPI, wakeup_ipi); |
#endif /* __SMP__ */ |
} |
} |
/SPARTAN/trunk/arch/ia32/src/smp/ipi.c |
---|
0,0 → 1,39 |
/* |
* Copyright (C) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#ifdef __SMP__ |
#include <smp/ipi.h> |
#include <arch/apic.h> |
void ipi_broadcast(int ipi) |
{ |
(void) l_apic_broadcast_custom_ipi((__u8) ipi); |
} |
#endif /* __SMP__ */ |
/SPARTAN/trunk/arch/ia32/src/mm/tlb.c |
---|
29,19 → 29,7 |
#include <mm/tlb.h> |
#include <arch/asm.h> |
#ifdef __SMP__ |
#include <arch/apic.h> |
#include <arch/interrupt.h> |
#endif /* __SMP__ */ |
void tlb_invalidate(int asid) |
{ |
cpu_write_dba(cpu_read_dba()); |
} |
#ifdef __SMP__ |
void tlb_shootdown_ipi_send(void) |
{ |
(void) l_apic_broadcast_custom_ipi(VECTOR_TLB_SHOOTDOWN); |
} |
#endif /* __SMP__ */ |
/SPARTAN/trunk/arch/ia32/src/interrupt.c |
---|
100,6 → 100,11 |
tlb_shootdown_ipi_recv(); |
} |
void wakeup_ipi(__u8 n, __u32 stack[]) |
{ |
trap_virtual_eoi(); |
} |
void trap_virtual_enable_irqs(__u16 irqmask) |
{ |
if (enable_irqs_function) |