/SPARTAN/trunk/arch/ia32/src/ia32.c |
---|
56,6 → 56,10 |
i8254_init(); /* hard clock */ |
trap_register(VECTOR_SYSCALL, syscall); |
#ifdef __SMP__ |
trap_register(VECTOR_TLB_SHUTDOWN, tlb_shutdown_ipi); |
#endif /* __SMP__ */ |
} |
} |
/SPARTAN/trunk/arch/ia32/src/smp/apic.c |
---|
142,6 → 142,29 |
} |
/* |
* Send all CPUs excluding the->cpu IPI vector. |
*/ |
int l_apic_broadcast_custom_ipi(__u8 vector) |
{ |
__u32 lo; |
/* |
* Read the ICR register in and zero all non-reserved fields. |
*/ |
lo = l_apic[ICRlo] & ICRloClear; |
lo |= DLVRMODE_FIXED | DESTMODE_LOGIC | LEVEL_ASSERT | SHORTHAND_EXCL | TRGRMODE_LEVEL | vector; |
l_apic[ICRlo] = lo; |
lo = l_apic[ICRlo] & ICRloClear; |
if (lo & SEND_PENDING) |
printf("IPI is pending.\n"); |
return apic_poll_errors(); |
} |
/* |
* Universal Start-up Algorithm for bringing up the AP processors. |
*/ |
int l_apic_send_init_ipi(__u8 apicid) |
/SPARTAN/trunk/arch/ia32/src/mm/tlb.c |
---|
29,7 → 29,19 |
#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_shutdown_ipi_send(void) |
{ |
(void) l_apic_broadcast_custom_ipi(VECTOR_TLB_SHUTDOWN); |
} |
#endif /* __SMP__ */ |
/SPARTAN/trunk/arch/ia32/src/mm/page.c |
---|
134,6 → 134,4 |
pt[pte].page_cache_disable = !(flags & PAGE_CACHEABLE); |
pt[pte].uaccessible = (flags & PAGE_USER) != 0; |
pt[pte].writeable = (flags & PAGE_WRITE) != 0; |
tlb_invalidate(0); |
} |
/SPARTAN/trunk/arch/ia32/src/interrupt.c |
---|
33,6 → 33,7 |
#include <func.h> |
#include <cpu.h> |
#include <arch/asm.h> |
#include <mm/tlb.h> |
/* |
* Interrupt and exception dispatching. |
93,6 → 94,12 |
thread_sleep(1); |
} |
void tlb_shutdown_ipi(__u8 n, __u32 stack[]) |
{ |
trap_virtual_eoi(); |
tlb_shutdown_ipi_recv(); |
} |
void trap_virtual_enable_irqs(__u16 irqmask) |
{ |
if (enable_irqs_function) |