Changeset 982f0fe in mainline
- Timestamp:
- 2006-06-01T10:21:00Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bd571f44
- Parents:
- 80d31883
- Location:
- arch/ppc32
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ppc32/Makefile.inc
r80d31883 r982f0fe 79 79 arch/$(ARCH)/src/mm/memory_init.c \ 80 80 arch/$(ARCH)/src/mm/page.c \ 81 arch/$(ARCH)/src/mm/tlb.c 81 arch/$(ARCH)/src/mm/tlb.c \ 82 arch/$(ARCH)/src/drivers/pic.c -
arch/ppc32/include/drivers/cuda.h
r80d31883 r982f0fe 32 32 #include <arch/types.h> 33 33 34 #define CUDA_IRQ 10 35 34 36 extern void cuda_init(void); 35 37 extern void cuda_packet(const __u8 data); -
arch/ppc32/include/interrupt.h
r80d31883 r982f0fe 32 32 #include <arch/exception.h> 33 33 34 #define IRQ_COUNT 1 35 #define IVT_ITEMS 15 36 #define INT_OFFSET 0 34 #define IRQ_COUNT 64 35 36 37 #define IVT_ITEMS (16 + IRQ_COUNT) 38 #define INT_OFFSET 16 39 40 #define int_register(it, name, handler) exc_register(((it)+INT_OFFSET),name,handler) 37 41 38 42 #define VECTOR_DECREMENTER 10 … … 40 44 extern void start_decrementer(void); 41 45 extern void interrupt_init(void); 46 extern void extint_handler(int n, istate_t *istate); 42 47 43 48 #endif -
arch/ppc32/src/drivers/cuda.c
r80d31883 r982f0fe 31 31 #include <console/chardev.h> 32 32 #include <console/console.h> 33 #include <arch/drivers/pic.h> 34 #include <interrupt.h> 33 35 34 36 #define CUDA_PACKET 0x01 … … 48 50 static volatile __u8 *cuda = (__u8 *) 0xf2000000; 49 51 52 #include <print.h> 53 static void cuda_irq(int n, istate_t *istate) 54 { 55 printf("Got cuda msg\n"); 56 } 50 57 51 58 void cuda_init(void) 52 59 { 60 int_register(CUDA_IRQ, "cuda", cuda_irq); 61 pic_enable_interrupt(CUDA_IRQ); 53 62 } 54 63 -
arch/ppc32/src/exception.S
r80d31883 r982f0fe 186 186 .global exc_external 187 187 exc_external: 188 b exc_external 188 CONTEXT_STORE 189 190 lis r12, extint_handler@ha 191 addi r12, r12, extint_handler@l 192 mtsrr0 r12 193 194 li r3, 0 195 b jump_to_kernel 189 196 190 197 .org 0x600 -
arch/ppc32/src/interrupt.c
r80d31883 r982f0fe 33 33 #include <time/clock.h> 34 34 #include <ipc/sysipc.h> 35 #include <arch/drivers/pic.h> 35 36 36 37 … … 65 66 /* TODO */ 66 67 } 68 69 #include <print.h> 70 /** Handler of externul interrupts */ 71 void extint_handler(int n, istate_t *istate) 72 { 73 int inum; 74 75 while ((inum = pic_get_pending()) != -1) { 76 exc_dispatch(inum+INT_OFFSET, istate); 77 pic_ack_interrupt(inum); 78 } 79 } -
arch/ppc32/src/ppc32.c
r80d31883 r982f0fe 36 36 #include <proc/uarg.h> 37 37 #include <console/console.h> 38 #include <arch/drivers/pic.h> 38 39 39 40 bootinfo_t bootinfo; … … 56 57 /* Initialize dispatch table */ 57 58 interrupt_init(); 58 59 59 60 /* Start decrementer */ 60 61 start_decrementer(); 61 cuda_init();62 62 } 63 63 … … 67 67 fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline); 68 68 69 /* Initialize PIC */ 70 pic_init(); 71 72 cuda_init(); 69 73 /* Merge all zones to 1 big zone */ 70 74 zone_merge_all();
Note:
See TracChangeset
for help on using the changeset viewer.