Changeset e60293d in mainline
- Timestamp:
- 2006-10-17T15:50:37Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8513ad7
- Parents:
- 79f30e4f
- Location:
- kernel/arch/ppc64
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc64/Makefile.inc
r79f30e4f re60293d 70 70 arch/$(ARCH)/src/mm/memory_init.c \ 71 71 arch/$(ARCH)/src/mm/page.c \ 72 arch/$(ARCH)/src/mm/tlb.c 72 arch/$(ARCH)/src/mm/tlb.c \ 73 arch/$(ARCH)/src/drivers/pic.c -
kernel/arch/ppc64/include/interrupt.h
r79f30e4f re60293d 38 38 #include <arch/exception.h> 39 39 40 #define IRQ_COUNT 1 41 #define IVT_ITEMS 15 42 #define INT_OFFSET 0 40 #define IVT_ITEMS 16 41 #define IVT_FIRST 0 43 42 44 #define VECTOR_DECREMENTER 10 43 #define VECTOR_DATA_STORAGE 2 44 #define VECTOR_INSTRUCTION_STORAGE 3 45 #define VECTOR_EXTERNAL 4 46 #define VECTOR_DECREMENTER 8 45 47 46 48 extern void start_decrementer(void); 47 49 extern void interrupt_init(void); 50 extern void extint_handler(int n, istate_t *istate); 48 51 49 52 #endif -
kernel/arch/ppc64/src/interrupt.c
r79f30e4f re60293d 33 33 */ 34 34 35 #include <ddi/irq.h> 35 36 #include <interrupt.h> 36 37 #include <arch/interrupt.h> … … 39 40 #include <time/clock.h> 40 41 #include <ipc/sysipc.h> 42 #include <arch/drivers/pic.h> 43 #include <arch/mm/tlb.h> 44 #include <print.h> 41 45 42 46 … … 48 52 : "r" (1000) 49 53 ); 54 } 55 56 57 /** Handler of external interrupts */ 58 static void exception_external(int n, istate_t *istate) 59 { 60 int inum; 61 62 while ((inum = pic_get_pending()) != -1) { 63 irq_t *irq = irq_dispatch_and_lock(inum); 64 if (irq) { 65 /* 66 * The IRQ handler was found. 67 */ 68 irq->handler(irq, irq->arg); 69 spinlock_unlock(&irq->lock); 70 } else { 71 /* 72 * Spurious interrupt. 73 */ 74 #ifdef CONFIG_DEBUG 75 printf("cpu%d: spurious interrupt (inum=%d)\n", CPU->id, inum); 76 #endif 77 } 78 pic_ack_interrupt(inum); 79 } 50 80 } 51 81 … … 61 91 void interrupt_init(void) 62 92 { 93 exc_register(VECTOR_EXTERNAL, "external", exception_external); 63 94 exc_register(VECTOR_DECREMENTER, "timer", exception_decrementer); 64 }65 66 67 /* Reregister irq to be IPC-ready */68 void irq_ipc_bind_arch(unative_t irq)69 {70 panic("not implemented\n");71 /* TODO */72 95 } 73 96
Note:
See TracChangeset
for help on using the changeset viewer.