Changeset beb16cfa in mainline
- Timestamp:
- 2014-08-28T13:06:02Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0871296
- Parents:
- 3a7db87
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/Makefile.inc
r3a7db87 rbeb16cfa 59 59 arch/$(KARCH)/src/mm/tlb.c \ 60 60 arch/$(KARCH)/src/drivers/pic.c 61 62 ARCH_AUTOGENS_AG = \ 63 arch/$(KARCH)/include/arch/istate_struct.ag 64 -
kernel/arch/ppc32/include/arch/istate.h
r3a7db87 rbeb16cfa 40 40 #ifdef KERNEL 41 41 42 #include < typedefs.h>42 #include <arch/istate_struct.h> 43 43 #include <arch/msr.h> 44 44 45 45 #else /* KERNEL */ 46 46 47 #include < sys/types.h>47 #include <libarch/istate_struct.h> 48 48 #include <libarch/msr.h> 49 49 50 50 #endif /* KERNEL */ 51 52 typedef struct istate {53 uint32_t r0;54 uint32_t r2;55 uint32_t r3;56 uint32_t r4;57 uint32_t r5;58 uint32_t r6;59 uint32_t r7;60 uint32_t r8;61 uint32_t r9;62 uint32_t r10;63 uint32_t r11;64 uint32_t r13;65 uint32_t r14;66 uint32_t r15;67 uint32_t r16;68 uint32_t r17;69 uint32_t r18;70 uint32_t r19;71 uint32_t r20;72 uint32_t r21;73 uint32_t r22;74 uint32_t r23;75 uint32_t r24;76 uint32_t r25;77 uint32_t r26;78 uint32_t r27;79 uint32_t r28;80 uint32_t r29;81 uint32_t r30;82 uint32_t r31;83 uint32_t cr;84 uint32_t pc;85 uint32_t srr1;86 uint32_t lr;87 uint32_t ctr;88 uint32_t xer;89 uint32_t dar;90 uint32_t r12;91 uint32_t sp;92 } istate_t;93 51 94 52 NO_TRACE static inline void istate_set_retaddr(istate_t *istate, -
kernel/arch/ppc32/include/arch/stack.h
r3a7db87 rbeb16cfa 40 40 #define MEM_STACK_SIZE STACK_SIZE 41 41 42 #define STACK_ALIGNMENT 16 43 42 44 #endif 43 45 -
kernel/arch/ppc32/src/asm.S
r3a7db87 rbeb16cfa 29 29 #include <arch/asm/regname.h> 30 30 #include <arch/msr.h> 31 #include <arch/istate_struct.h> 31 32 32 33 .text … … 85 86 mtmsr r31 86 87 87 lwz r0, 8(sp)88 lwz r2, 12(sp)89 lwz r3, 16(sp)90 lwz r4, 20(sp)91 lwz r5, 24(sp)92 lwz r6, 28(sp)93 lwz r7, 32(sp)94 lwz r8, 36(sp)95 lwz r9, 40(sp)96 lwz r10, 44(sp)97 lwz r11, 48(sp)98 lwz r13, 52(sp)99 lwz r14, 56(sp)100 lwz r15, 60(sp)101 lwz r16, 64(sp)102 lwz r17, 68(sp)103 lwz r18, 72(sp)104 lwz r19, 76(sp)105 lwz r20, 80(sp)106 lwz r21, 84(sp)107 lwz r22, 88(sp)108 lwz r23, 92(sp)109 lwz r24, 96(sp)110 lwz r25, 100(sp)111 lwz r26, 104(sp)112 lwz r27, 108(sp)113 lwz r28, 112(sp)114 lwz r29, 116(sp)115 lwz r30, 120(sp)116 lwz r31, 124(sp)117 118 lwz r12, 128(sp)88 lwz r0, ISTATE_OFFSET_R0(sp) 89 lwz r2, ISTATE_OFFSET_R2(sp) 90 lwz r3, ISTATE_OFFSET_R3(sp) 91 lwz r4, ISTATE_OFFSET_R4(sp) 92 lwz r5, ISTATE_OFFSET_R5(sp) 93 lwz r6, ISTATE_OFFSET_R6(sp) 94 lwz r7, ISTATE_OFFSET_R7(sp) 95 lwz r8, ISTATE_OFFSET_R8(sp) 96 lwz r9, ISTATE_OFFSET_R9(sp) 97 lwz r10, ISTATE_OFFSET_R10(sp) 98 lwz r11, ISTATE_OFFSET_R11(sp) 99 lwz r13, ISTATE_OFFSET_R13(sp) 100 lwz r14, ISTATE_OFFSET_R14(sp) 101 lwz r15, ISTATE_OFFSET_R15(sp) 102 lwz r16, ISTATE_OFFSET_R16(sp) 103 lwz r17, ISTATE_OFFSET_R17(sp) 104 lwz r18, ISTATE_OFFSET_R18(sp) 105 lwz r19, ISTATE_OFFSET_R19(sp) 106 lwz r20, ISTATE_OFFSET_R20(sp) 107 lwz r21, ISTATE_OFFSET_R21(sp) 108 lwz r22, ISTATE_OFFSET_R22(sp) 109 lwz r23, ISTATE_OFFSET_R23(sp) 110 lwz r24, ISTATE_OFFSET_R24(sp) 111 lwz r25, ISTATE_OFFSET_R25(sp) 112 lwz r26, ISTATE_OFFSET_R26(sp) 113 lwz r27, ISTATE_OFFSET_R27(sp) 114 lwz r28, ISTATE_OFFSET_R28(sp) 115 lwz r29, ISTATE_OFFSET_R29(sp) 116 lwz r30, ISTATE_OFFSET_R30(sp) 117 lwz r31, ISTATE_OFFSET_R31(sp) 118 119 lwz r12, ISTATE_OFFSET_CR(sp) 119 120 mtcr r12 120 121 121 lwz r12, 132(sp)122 lwz r12, ISTATE_OFFSET_PC(sp) 122 123 mtsrr0 r12 123 124 124 lwz r12, 136(sp)125 lwz r12, ISTATE_OFFSET_SRR1(sp) 125 126 mtsrr1 r12 126 127 127 lwz r12, 140(sp)128 lwz r12, ISTATE_OFFSET_LR(sp) 128 129 mtlr r12 129 130 130 lwz r12, 144(sp)131 lwz r12, ISTATE_OFFSET_CTR(sp) 131 132 mtctr r12 132 133 133 lwz r12, 148(sp)134 lwz r12, ISTATE_OFFSET_XER(sp) 134 135 mtxer r12 135 136 136 lwz r12, 156(sp)137 lwz sp, 160(sp)137 lwz r12, ISTATE_OFFSET_R12(sp) 138 lwz sp, ISTATE_OFFSET_SP(sp) 138 139 139 140 rfi … … 152 153 mtmsr r31 153 154 154 lwz r0, 8(sp)155 lwz r2, 12(sp)156 lwz r4, 20(sp)157 lwz r5, 24(sp)158 lwz r6, 28(sp)159 lwz r7, 32(sp)160 lwz r8, 36(sp)161 lwz r9, 40(sp)162 lwz r10, 44(sp)163 lwz r11, 48(sp)164 lwz r13, 52(sp)165 lwz r14, 56(sp)166 lwz r15, 60(sp)167 lwz r16, 64(sp)168 lwz r17, 68(sp)169 lwz r18, 72(sp)170 lwz r19, 76(sp)171 lwz r20, 80(sp)172 lwz r21, 84(sp)173 lwz r22, 88(sp)174 lwz r23, 92(sp)175 lwz r24, 96(sp)176 lwz r25, 100(sp)177 lwz r26, 104(sp)178 lwz r27, 108(sp)179 lwz r28, 112(sp)180 lwz r29, 116(sp)181 lwz r30, 120(sp)182 lwz r31, 124(sp)183 184 lwz r12, 128(sp)155 lwz r0, ISTATE_OFFSET_R0(sp) 156 lwz r2, ISTATE_OFFSET_R2(sp) 157 lwz r4, ISTATE_OFFSET_R4(sp) 158 lwz r5, ISTATE_OFFSET_R5(sp) 159 lwz r6, ISTATE_OFFSET_R6(sp) 160 lwz r7, ISTATE_OFFSET_R7(sp) 161 lwz r8, ISTATE_OFFSET_R8(sp) 162 lwz r9, ISTATE_OFFSET_R9(sp) 163 lwz r10, ISTATE_OFFSET_R10(sp) 164 lwz r11, ISTATE_OFFSET_R11(sp) 165 lwz r13, ISTATE_OFFSET_R13(sp) 166 lwz r14, ISTATE_OFFSET_R14(sp) 167 lwz r15, ISTATE_OFFSET_R15(sp) 168 lwz r16, ISTATE_OFFSET_R16(sp) 169 lwz r17, ISTATE_OFFSET_R17(sp) 170 lwz r18, ISTATE_OFFSET_R18(sp) 171 lwz r19, ISTATE_OFFSET_R19(sp) 172 lwz r20, ISTATE_OFFSET_R20(sp) 173 lwz r21, ISTATE_OFFSET_R21(sp) 174 lwz r22, ISTATE_OFFSET_R22(sp) 175 lwz r23, ISTATE_OFFSET_R23(sp) 176 lwz r24, ISTATE_OFFSET_R24(sp) 177 lwz r25, ISTATE_OFFSET_R25(sp) 178 lwz r26, ISTATE_OFFSET_R26(sp) 179 lwz r27, ISTATE_OFFSET_R27(sp) 180 lwz r28, ISTATE_OFFSET_R28(sp) 181 lwz r29, ISTATE_OFFSET_R29(sp) 182 lwz r30, ISTATE_OFFSET_R30(sp) 183 lwz r31, ISTATE_OFFSET_R31(sp) 184 185 lwz r12, ISTATE_OFFSET_CR(sp) 185 186 mtcr r12 186 187 187 lwz r12, 132(sp)188 lwz r12, ISTATE_OFFSET_PC(sp) 188 189 mtsrr0 r12 189 190 190 lwz r12, 136(sp)191 lwz r12, ISTATE_OFFSET_SRR1(sp) 191 192 mtsrr1 r12 192 193 193 lwz r12, 140(sp)194 lwz r12, ISTATE_OFFSET_LR(sp) 194 195 mtlr r12 195 196 196 lwz r12, 144(sp)197 lwz r12, ISTATE_OFFSET_CTR(sp) 197 198 mtctr r12 198 199 199 lwz r12, 148(sp)200 lwz r12, ISTATE_OFFSET_XER(sp) 200 201 mtxer r12 201 202 202 lwz r12, 156(sp)203 lwz sp, 160(sp)203 lwz r12, ISTATE_OFFSET_R12(sp) 204 lwz sp, ISTATE_OFFSET_SP(sp) 204 205 205 206 rfi -
kernel/arch/ppc32/src/exception.S
r3a7db87 rbeb16cfa 30 30 #include <arch/msr.h> 31 31 #include <arch/mm/page.h> 32 #include <arch/istate_struct.h> 33 #include <align.h> 34 #include <arch/stack.h> 32 35 33 36 .section K_UNMAPPED_TEXT_START, "ax" … … 62 65 2: 63 66 64 subi sp, sp, 17665 stw r0, 8(sp)66 stw r2, 12(sp)67 stw r3, 16(sp)68 stw r4, 20(sp)69 stw r5, 24(sp)70 stw r6, 28(sp)71 stw r7, 32(sp)72 stw r8, 36(sp)73 stw r9, 40(sp)74 stw r10, 44(sp)75 stw r11, 48(sp)76 stw r13, 52(sp)77 stw r14, 56(sp)78 stw r15, 60(sp)79 stw r16, 64(sp)80 stw r17, 68(sp)81 stw r18, 72(sp)82 stw r19, 76(sp)83 stw r20, 80(sp)84 stw r21, 84(sp)85 stw r22, 88(sp)86 stw r23, 92(sp)87 stw r24, 96(sp)88 stw r25, 100(sp)89 stw r26, 104(sp)90 stw r27, 108(sp)91 stw r28, 112(sp)92 stw r29, 116(sp)93 stw r30, 120(sp)94 stw r31, 124(sp)95 96 stw r12, 128(sp)67 subi sp, sp, ALIGN_UP(ISTATE_SIZE, STACK_ALIGNMENT) 68 stw r0, ISTATE_OFFSET_R0(sp) 69 stw r2, ISTATE_OFFSET_R2(sp) 70 stw r3, ISTATE_OFFSET_R3(sp) 71 stw r4, ISTATE_OFFSET_R4(sp) 72 stw r5, ISTATE_OFFSET_R5(sp) 73 stw r6, ISTATE_OFFSET_R6(sp) 74 stw r7, ISTATE_OFFSET_R7(sp) 75 stw r8, ISTATE_OFFSET_R8(sp) 76 stw r9, ISTATE_OFFSET_R9(sp) 77 stw r10, ISTATE_OFFSET_R10(sp) 78 stw r11, ISTATE_OFFSET_R11(sp) 79 stw r13, ISTATE_OFFSET_R13(sp) 80 stw r14, ISTATE_OFFSET_R14(sp) 81 stw r15, ISTATE_OFFSET_R15(sp) 82 stw r16, ISTATE_OFFSET_R16(sp) 83 stw r17, ISTATE_OFFSET_R17(sp) 84 stw r18, ISTATE_OFFSET_R18(sp) 85 stw r19, ISTATE_OFFSET_R19(sp) 86 stw r20, ISTATE_OFFSET_R20(sp) 87 stw r21, ISTATE_OFFSET_R21(sp) 88 stw r22, ISTATE_OFFSET_R22(sp) 89 stw r23, ISTATE_OFFSET_R23(sp) 90 stw r24, ISTATE_OFFSET_R24(sp) 91 stw r25, ISTATE_OFFSET_R25(sp) 92 stw r26, ISTATE_OFFSET_R26(sp) 93 stw r27, ISTATE_OFFSET_R27(sp) 94 stw r28, ISTATE_OFFSET_R28(sp) 95 stw r29, ISTATE_OFFSET_R29(sp) 96 stw r30, ISTATE_OFFSET_R30(sp) 97 stw r31, ISTATE_OFFSET_R31(sp) 98 99 stw r12, ISTATE_OFFSET_CR(sp) 97 100 98 101 mfsrr0 r12 99 stw r12, 132(sp)102 stw r12, ISTATE_OFFSET_PC(sp) 100 103 101 104 mfsrr1 r12 102 stw r12, 136(sp)105 stw r12, ISTATE_OFFSET_SRR1(sp) 103 106 104 107 mflr r12 105 stw r12, 140(sp)108 stw r12, ISTATE_OFFSET_LR(sp) 106 109 107 110 mfctr r12 108 stw r12, 144(sp)111 stw r12, ISTATE_OFFSET_CTR(sp) 109 112 110 113 mfxer r12 111 stw r12, 148(sp)114 stw r12, ISTATE_OFFSET_XER(sp) 112 115 113 116 mfdar r12 114 stw r12, 152(sp)117 stw r12, ISTATE_OFFSET_DAR(sp) 115 118 116 119 mfsprg1 r12 117 stw r12, 156(sp)120 stw r12, ISTATE_OFFSET_R12(sp) 118 121 119 122 mfsprg2 r12 120 stw r12, 160(sp)123 stw r12, ISTATE_OFFSET_SP(sp) 121 124 122 125 li r12, 0 123 stw r12, 0(sp) 126 stw r12, ISTATE_OFFSET_LR_FRAME(sp) 127 stw r12, ISTATE_OFFSET_SP_FRAME(sp) 124 128 .endm 125 129 … … 270 274 addis sp, sp, 0x8000 271 275 mr r4, sp 272 addi r4, r4, 8273 276 274 277 rfi
Note:
See TracChangeset
for help on using the changeset viewer.