Changeset 91d5ad6 in mainline
- Timestamp:
- 2006-03-15T00:55:05Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 286e03d
- Parents:
- d1e414c
- Files:
-
- 1 deleted
- 12 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/Makefile.inc
rd1e414c r91d5ad6 84 84 85 85 ARCH_SOURCES = \ 86 arch/$(ARCH)/src/dummy.s \87 86 arch/$(ARCH)/src/fpu_context.c \ 88 87 arch/$(ARCH)/src/boot/boot.S \ -
arch/ppc32/Makefile.inc
rd1e414c r91d5ad6 63 63 arch/$(ARCH)/src/dummy.s \ 64 64 arch/$(ARCH)/src/exception.S \ 65 arch/$(ARCH)/src/interrupt.c \ 65 66 arch/$(ARCH)/src/asm.S \ 66 67 arch/$(ARCH)/src/cpu/cpu.c \ -
arch/ppc32/include/asm/regname.h
rd1e414c r91d5ad6 190 190 #define prv 287 191 191 192 /* MSR bits */ 193 #define msr_ir (1 << 4) 194 #define msr_dr (1 << 5) 195 192 196 #endif -
arch/ppc32/include/drivers/cuda.h
rd1e414c r91d5ad6 30 30 #define __CUDA_H__ 31 31 32 #include <arch/types.h> 32 33 33 void cuda_init(void);34 34 extern void cuda_init(void); 35 extern void cuda_packet(const __u8 data); 35 36 36 37 #endif -
arch/ppc32/include/interrupt.h
rd1e414c r91d5ad6 30 30 #define __ppc32_INTERRUPT_H__ 31 31 32 extern void interrupt(void); 32 #define IVT_ITEMS 15 33 #define INT_OFFSET 0 34 35 #define VECTOR_DECREMENTER 10 36 37 extern void interrupt_init(void); 33 38 34 39 #endif -
arch/ppc32/src/asm.S
rd1e414c r91d5ad6 32 32 33 33 .global cpu_sleep 34 .global iret 34 35 .global memsetb 35 36 .global memcpy … … 38 39 b cpu_sleep 39 40 41 iret: 42 lwz r3, 144(sp) 43 mtxer r3 44 45 lwz r3, 140(sp) 46 mtctr r3 47 48 lwz r3, 136(sp) 49 mtcr r3 50 51 lwz r3, 132(sp) 52 mtlr r3 53 54 lwz r3, 128(sp) 55 mtspr srr1, r3 56 57 lwz r3, 124(sp) 58 mtspr srr0, r3 59 60 lwz r0, 0(sp) 61 lwz r2, 4(sp) 62 lwz r3, 8(sp) 63 lwz r4, 12(sp) 64 lwz r5, 16(sp) 65 lwz r6, 20(sp) 66 lwz r7, 24(sp) 67 lwz r8, 28(sp) 68 lwz r9, 32(sp) 69 lwz r10, 36(sp) 70 lwz r11, 40(sp) 71 lwz r12, 44(sp) 72 lwz r13, 48(sp) 73 lwz r14, 52(sp) 74 lwz r15, 56(sp) 75 lwz r16, 60(sp) 76 lwz r17, 64(sp) 77 lwz r18, 68(sp) 78 lwz r19, 72(sp) 79 lwz r20, 76(sp) 80 lwz r21, 80(sp) 81 lwz r22, 84(sp) 82 lwz r23, 88(sp) 83 lwz r24, 92(sp) 84 lwz r25, 96(sp) 85 lwz r26, 100(sp) 86 lwz r27, 104(sp) 87 lwz r28, 108(sp) 88 lwz r29, 112(sp) 89 lwz r30, 116(sp) 90 lwz r31, 120(sp) 91 92 mfspr sp, sprg1 93 94 rfi 95 40 96 memsetb: 41 97 rlwimi r5, r5, 8, 16, 23 -
arch/ppc32/src/boot/boot.S
rd1e414c r91d5ad6 28 28 29 29 #include <arch/asm/regname.h> 30 #include <arch/asm/spr.h>31 30 #include <arch/boot/boot.h> 32 31 #include <arch/boot/memmap.h> -
arch/ppc32/src/drivers/cuda.c
rd1e414c r91d5ad6 54 54 55 55 56 staticvoid cuda_packet(const __u8 data)56 void cuda_packet(const __u8 data) 57 57 { 58 58 cuda[B] = cuda[B] | TIP; … … 70 70 71 71 void cpu_halt(void) { 72 #ifdef CONFIG_POWEROFF 72 73 cuda_packet(CUDA_POWERDOWN); 73 74 #endif 74 75 cpu_sleep(); 75 76 } -
arch/ppc32/src/exception.S
rd1e414c r91d5ad6 28 28 29 29 #include <arch/asm/regname.h> 30 #include <arch/ asm/spr.h>30 #include <arch/mm/page.h> 31 31 32 32 .section K_UNMAPPED_TEXT_START, "ax" … … 85 85 .global exc_decrementer 86 86 exc_decrementer: 87 mtspr sprg1, sp 88 89 subis sp, sp, 0x8000 90 91 subi sp, sp, 144 92 stw r0, 0(sp) 93 stw r2, 4(sp) 94 stw r3, 8(sp) 95 stw r4, 12(sp) 96 stw r5, 16(sp) 97 stw r6, 20(sp) 98 stw r7, 24(sp) 99 stw r8, 28(sp) 100 stw r9, 32(sp) 101 stw r10, 36(sp) 102 stw r11, 40(sp) 103 stw r12, 44(sp) 104 stw r13, 48(sp) 105 stw r14, 52(sp) 106 stw r15, 56(sp) 107 stw r16, 60(sp) 108 stw r17, 64(sp) 109 stw r18, 68(sp) 110 stw r19, 72(sp) 111 stw r20, 76(sp) 112 stw r21, 80(sp) 113 stw r22, 84(sp) 114 stw r23, 88(sp) 115 stw r24, 92(sp) 116 stw r25, 96(sp) 117 stw r26, 100(sp) 118 stw r27, 104(sp) 119 stw r28, 108(sp) 120 stw r29, 112(sp) 121 stw r30, 116(sp) 122 stw r31, 120(sp) 123 124 mfspr r3, srr0 125 stw r3, 124(sp) 126 127 mfspr r3, srr1 128 stw r3, 128(sp) 129 130 mflr r3 131 stw r3, 132(sp) 132 133 mfcr r3 134 stw r3, 136(sp) 135 136 mfctr r3 137 stw r3, 140(sp) 138 139 mfxer r3 140 stw r3, 144(sp) 141 142 lis r3, exc_dispatch@ha 143 addi r3, r3, exc_dispatch@l 144 mtspr srr0, r3 145 146 mfmsr r3 147 ori r3, r3, (msr_ir | msr_dr)@l 148 mtspr srr1, r3 149 150 lis r3, iret@ha 151 addi r3, r3, iret@l 152 mtlr r3 153 154 addis sp, sp, 0x8000 155 li r3, 10 87 156 rfi 88 b exc_decrementer89 157 90 158 .org 0xa00 -
arch/ppc32/src/interrupt.c
rd1e414c r91d5ad6 1 1 /* 2 * Copyright (C) 2006 Ondrej Palkovsky2 * Copyright (C) 2006 Martin Decky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 #ifndef __ppc32_SPR_H__ 30 #define __ppc32_SPR_H__ 29 #include <interrupt.h> 30 #include <arch/interrupt.h> 31 #include <arch/types.h> 32 #include <arch.h> 33 #include <time/clock.h> 34 #include <print.h> 31 35 32 #define MSR_IR (1 << 4) 33 #define MSR_DR (1 << 5) 36 static void exception_decrementer(int n, istate_t *istate) 37 { 38 clock(); 39 } 34 40 35 #define SPRN_SRR0 0x1a36 #define SPRN_SRR1 0x1b37 41 38 /* Works for PPC32 */ 39 #define L1_CACHE_BYTES (1 << 5) 40 41 #endif 42 /* Initialize basic tables for exception dispatching */ 43 void interrupt_init(void) 44 { 45 exc_register(VECTOR_DECREMENTER, "timer", exception_decrementer); 46 } -
arch/ppc32/src/ppc32.c
rd1e414c r91d5ad6 31 31 #include <arch/drivers/cuda.h> 32 32 #include <arch/mm/memory_init.h> 33 #include <arch/interrupt.h> 33 34 34 35 void arch_pre_mm_init(void) 35 36 { 37 /* Initialize dispatch table */ 38 interrupt_init(); 39 36 40 ppc32_console_init(); 37 41 cuda_init(); -
arch/ppc32/src/proc/scheduler.c
rd1e414c r91d5ad6 27 27 */ 28 28 29 #include <arch/mm/page.h> 29 30 #include <proc/scheduler.h> 31 #include <proc/thread.h> 32 #include <arch.h> 33 34 __address supervisor_sp; 35 __address supervisor_sp_physical; 30 36 31 37 void before_thread_runs_arch(void) 32 38 { 39 supervisor_sp = (__address) &THREAD->kstack[THREAD_STACK_SIZE - SP_DELTA]; 40 supervisor_sp_physical = KA2PA(supervisor_sp_physical); 33 41 } 34 42 -
kernel.config
rd1e414c r91d5ad6 60 60 ! [(ARCH=mips32&MIPS_MACHINE!=msim&MIPS_MACHINE!=simics)|ARCH=amd64|ARCH=ia32] CONFIG_FPU_LAZY (y/n) 61 61 62 # Power off on halt 63 ! [ARCH=ppc32] CONFIG_POWEROFF (y/n) 64 62 65 ## Debugging configuration directives 63 66
Note:
See TracChangeset
for help on using the changeset viewer.