Changeset 1b03ed3 in mainline
- Timestamp:
- 2007-11-16T16:20:45Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 454889c
- Parents:
- 9c2fb97
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/include/interrupt.h
r9c2fb97 r1b03ed3 114 114 115 115 /* 116 * The following variables are defined only for break_instruction handler. 116 * The following variables are defined only for break_instruction 117 * handler. 117 118 */ 118 119 uint64_t in0; … … 121 122 uint64_t in3; 122 123 uint64_t in4; 124 uint64_t in5; 125 uint64_t in6; 123 126 } istate_t; 124 127 -
kernel/arch/ia64/src/interrupt.c
r9c2fb97 r1b03ed3 127 127 128 128 if (vector >= VECTORS_16_BUNDLE_START) 129 return vector_names_16_bundle[(vector-VECTORS_16_BUNDLE_START)/(16*BUNDLE_SIZE)]; 129 return vector_names_16_bundle[(vector - 130 VECTORS_16_BUNDLE_START) / (16 * BUNDLE_SIZE)]; 130 131 else 131 return vector_names_64_bundle[vector /(64*BUNDLE_SIZE)];132 return vector_names_64_bundle[vector / (64 * BUNDLE_SIZE)]; 132 133 } 133 134 … … 142 143 putchar('\n'); 143 144 printf("Interrupted context dump:\n"); 144 printf("ar.bsp=%p\tar.bspstore=%p\n", istate->ar_bsp, istate->ar_bspstore); 145 printf("ar.rnat=%#018llx\tar.rsc=%#018llx\n", istate->ar_rnat, istate->ar_rsc); 146 printf("ar.ifs=%#018llx\tar.pfs=%#018llx\n", istate->ar_ifs, istate->ar_pfs); 147 printf("cr.isr=%#018llx\tcr.ipsr=%#018llx\t\n", istate->cr_isr.value, istate->cr_ipsr); 145 printf("ar.bsp=%p\tar.bspstore=%p\n", istate->ar_bsp, 146 istate->ar_bspstore); 147 printf("ar.rnat=%#018llx\tar.rsc=%#018llx\n", istate->ar_rnat, 148 istate->ar_rsc); 149 printf("ar.ifs=%#018llx\tar.pfs=%#018llx\n", istate->ar_ifs, 150 istate->ar_pfs); 151 printf("cr.isr=%#018llx\tcr.ipsr=%#018llx\t\n", istate->cr_isr.value, 152 istate->cr_ipsr); 148 153 149 printf("cr.iip=%#018llx, #%d\t(%s)\n", istate->cr_iip, istate->cr_isr.ei, iip); 154 printf("cr.iip=%#018llx, #%d\t(%s)\n", istate->cr_iip, 155 istate->cr_isr.ei, iip); 150 156 printf("cr.iipa=%#018llx\t(%s)\n", istate->cr_iipa, iipa); 151 157 printf("cr.ifa=%#018llx\t(%s)\n", istate->cr_ifa, ifa); … … 191 197 scheduler_fpu_lazy_request(); 192 198 #else 193 fault_if_from_uspace(istate, "Interruption: %#hx (%s)", (uint16_t) vector, vector_to_string(vector)); 199 fault_if_from_uspace(istate, "Interruption: %#hx (%s)", 200 (uint16_t) vector, vector_to_string(vector)); 194 201 dump_interrupted_context(istate); 195 panic("Interruption: %#hx (%s)\n", (uint16_t) vector, vector_to_string(vector)); 202 panic("Interruption: %#hx (%s)\n", (uint16_t) vector, 203 vector_to_string(vector)); 196 204 #endif 197 205 } … … 214 222 } 215 223 216 return syscall_handler(istate->in0, istate->in1, istate->in2, istate->in3, istate->in4); 224 return syscall_handler(istate->in0, istate->in1, istate->in2, 225 istate->in3, istate->in4, istate->in5, istate->in6); 217 226 } 218 227 219 228 void universal_handler(uint64_t vector, istate_t *istate) 220 229 { 221 fault_if_from_uspace(istate,"Interruption: %#hx (%s)\n",(uint16_t) vector, vector_to_string(vector)); 230 fault_if_from_uspace(istate, "Interruption: %#hx (%s)\n", 231 (uint16_t) vector, vector_to_string(vector)); 222 232 dump_interrupted_context(istate); 223 panic("Interruption: %#hx (%s)\n", (uint16_t) vector, vector_to_string(vector)); 233 panic("Interruption: %#hx (%s)\n", (uint16_t) vector, 234 vector_to_string(vector)); 224 235 } 225 236 … … 245 256 246 257 default: 247 panic("\nUnhandled External Interrupt Vector %d\n", ivr.vector); 258 panic("\nUnhandled External Interrupt Vector %d\n", 259 ivr.vector); 248 260 break; 249 261 } -
kernel/arch/ia64/src/ivt.S
r9c2fb97 r1b03ed3 34 34 35 35 #define FRS_TO_SAVE 30 36 #define STACK_ITEMS ( 19 + FRS_TO_SAVE*2)36 #define STACK_ITEMS (21 + FRS_TO_SAVE * 2) 37 37 #define STACK_FRAME_SIZE ALIGN_UP((STACK_ITEMS*STACK_ITEM_SIZE) + STACK_SCRATCH_AREA_SIZE, STACK_ALIGNMENT) 38 38 … … 136 136 */ 137 137 mov R_TMP = 0x2c00 ;; 138 cmp.eq p6, p5 = R_OFFS, R_TMP ;;139 140 /* 141 * From now on, if this is break_instruction handler, p6 is true and p5 is false.142 * Otherwise p6 is false and p5 is true.138 cmp.eq p6, p5 = R_OFFS, R_TMP ;; 139 140 /* 141 * From now on, if this is break_instruction handler, p6 is true and p5 142 * is false. Otherwise p6 is false and p5 is true. 143 143 * Note that p5 is a preserved predicate register and we make use of it. 144 144 */ 145 145 146 (p6) st8 [r31] = r38, -8 ;; /* save in6 */ 147 (p6) st8 [r31] = r37, -8 ;; /* save in5 */ 146 148 (p6) st8 [r31] = r36, -8 ;; /* save in4 */ 147 149 (p6) st8 [r31] = r35, -8 ;; /* save in3 */ … … 149 151 (p6) st8 [r31] = r33, -8 ;; /* save in1 */ 150 152 (p6) st8 [r31] = r32, -8 ;; /* save in0 */ 151 (p5) add r31 = - 40, r31 ;;153 (p5) add r31 = -56, r31 ;; 152 154 153 155 st8 [r31] = r30, -8 ;; /* save old stack pointer */ … … 179 181 180 182 /* 181 * Inspect BSPSTORE to figure out whether it is necessary to switch to kernel BSPSTORE. 183 * Inspect BSPSTORE to figure out whether it is necessary to switch to 184 * kernel BSPSTORE. 182 185 */ 183 186 (p1) shr.u r30 = r28, VRN_SHIFT ;; … … 206 209 207 210 /* 16. RSE switch to interrupted context */ 208 cover /* allocate zer ro size frame (step 1 (from Intel Docs)) */209 210 add r31 = (STACK_SCRATCH_AREA_SIZE +(FRS_TO_SAVE*2*8)), r12 ;;211 cover /* allocate zero size frame (step 1 (from Intel Docs)) */ 212 213 add r31 = (STACK_SCRATCH_AREA_SIZE + (FRS_TO_SAVE * 2 * 8)), r12 ;; 211 214 212 215 ld8 r30 = [r31], +8 ;; /* load ar.bsp */ -
uspace/lib/libc/arch/ia64/src/syscall.S
r9c2fb97 r1b03ed3 39 39 .global __syscall 40 40 __syscall: 41 alloc r14 = ar.pfs, 5, 0, 0, 0 ;;41 alloc r14 = ar.pfs, 7, 0, 0, 0 ;; 42 42 break SYSCALL_IMM 43 43 mov ar.pfs = r14 ;;
Note:
See TracChangeset
for help on using the changeset viewer.