Changeset 25d7709 in mainline for arch/ia64/src/interrupt.c
- Timestamp:
- 2006-03-13T20:08:16Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 631ca4d
- Parents:
- 45d6add
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia64/src/interrupt.c
r45d6add r25d7709 109 109 110 110 static char *vector_to_string(__u16 vector); 111 static void dump_interrupted_context( struct exception_regdump *pstate);111 static void dump_interrupted_context(istate_t *istate); 112 112 113 113 char *vector_to_string(__u16 vector) … … 121 121 } 122 122 123 void dump_interrupted_context( struct exception_regdump *pstate)123 void dump_interrupted_context(istate_t *istate) 124 124 { 125 125 char *ifa, *iipa, *iip; 126 126 127 ifa = get_symtab_entry( pstate->cr_ifa);128 iipa = get_symtab_entry( pstate->cr_iipa);129 iip = get_symtab_entry( pstate->cr_iip);127 ifa = get_symtab_entry(istate->cr_ifa); 128 iipa = get_symtab_entry(istate->cr_iipa); 129 iip = get_symtab_entry(istate->cr_iip); 130 130 131 131 putchar('\n'); 132 132 printf("Interrupted context dump:\n"); 133 printf("ar.bsp=%P\tar.bspstore=%P\n", pstate->ar_bsp, pstate->ar_bspstore);134 printf("ar.rnat=%Q\tar.rsc=%Q\n", pstate->ar_rnat, pstate->ar_rsc);135 printf("ar.ifs=%Q\tar.pfs=%Q\n", pstate->ar_ifs, pstate->ar_pfs);136 printf("cr.isr=%Q\tcr.ipsr=%Q\t\n", pstate->cr_isr.value, pstate->cr_ipsr);133 printf("ar.bsp=%P\tar.bspstore=%P\n", istate->ar_bsp, istate->ar_bspstore); 134 printf("ar.rnat=%Q\tar.rsc=%Q\n", istate->ar_rnat, istate->ar_rsc); 135 printf("ar.ifs=%Q\tar.pfs=%Q\n", istate->ar_ifs, istate->ar_pfs); 136 printf("cr.isr=%Q\tcr.ipsr=%Q\t\n", istate->cr_isr.value, istate->cr_ipsr); 137 137 138 printf("cr.iip=%Q, #%d\t(%s)\n", pstate->cr_iip, pstate->cr_isr.ei ,iip ? iip : "?");139 printf("cr.iipa=%Q\t(%s)\n", pstate->cr_iipa, iipa ? iipa : "?");140 printf("cr.ifa=%Q\t(%s)\n", pstate->cr_ifa, ifa ? ifa : "?");141 } 142 143 void general_exception(__u64 vector, struct exception_regdump *pstate)138 printf("cr.iip=%Q, #%d\t(%s)\n", istate->cr_iip, istate->cr_isr.ei ,iip ? iip : "?"); 139 printf("cr.iipa=%Q\t(%s)\n", istate->cr_iipa, iipa ? iipa : "?"); 140 printf("cr.ifa=%Q\t(%s)\n", istate->cr_ifa, ifa ? ifa : "?"); 141 } 142 143 void general_exception(__u64 vector, istate_t *istate) 144 144 { 145 145 char *desc = ""; 146 146 147 dump_interrupted_context( pstate);148 149 switch ( pstate->cr_isr.ge_code) {147 dump_interrupted_context(istate); 148 149 switch (istate->cr_isr.ge_code) { 150 150 case GE_ILLEGALOP: 151 151 desc = "Illegal Operation fault"; … … 175 175 176 176 /** Handle syscall. */ 177 int break_instruction(__u64 vector, struct exception_regdump *pstate)177 int break_instruction(__u64 vector, istate_t *istate) 178 178 { 179 179 /* 180 180 * Move to next instruction after BREAK. 181 181 */ 182 if ( pstate->cr_ipsr.ri == 2) {183 pstate->cr_ipsr.ri = 0;184 pstate->cr_iip += 16;182 if (istate->cr_ipsr.ri == 2) { 183 istate->cr_ipsr.ri = 0; 184 istate->cr_iip += 16; 185 185 } else { 186 pstate->cr_ipsr.ri++;186 istate->cr_ipsr.ri++; 187 187 } 188 188 189 if ( pstate->in0< SYSCALL_END)190 return syscall_table[ pstate->in0](pstate->in1, pstate->in2, pstate->in3);189 if (istate->in3 < SYSCALL_END) 190 return syscall_table[istate->in3](istate->in0, istate->in1, istate->in2); 191 191 else 192 panic("Undefined syscall %d", pstate->in0);192 panic("Undefined syscall %d", istate->in3); 193 193 194 194 return -1; 195 195 } 196 196 197 void universal_handler(__u64 vector, struct exception_regdump *pstate)198 { 199 dump_interrupted_context( pstate);197 void universal_handler(__u64 vector, istate_t *istate) 198 { 199 dump_interrupted_context(istate); 200 200 panic("Interruption: %W (%s)\n", (__u16) vector, vector_to_string(vector)); 201 201 } 202 202 203 void external_interrupt(__u64 vector, struct exception_regdump *pstate)203 void external_interrupt(__u64 vector, istate_t *istate) 204 204 { 205 205 cr_ivr_t ivr;
Note:
See TracChangeset
for help on using the changeset viewer.