Changeset 7ed2d8f in mainline
- Timestamp:
- 2009-01-07T22:55:52Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c571f42
- Parents:
- 06b2b7f
- Location:
- kernel
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/interrupt.c
r06b2b7f r7ed2d8f 101 101 static void null_interrupt(int n, istate_t *istate) 102 102 { 103 fault_if_from_uspace(istate, " unserviced interrupt: %d", n);103 fault_if_from_uspace(istate, "Unserviced interrupt: %d", n); 104 104 decode_istate(n, istate); 105 panic(" unserviced interrupt\n");105 panic("Unserviced interrupt\n"); 106 106 } 107 107 … … 127 127 return; 128 128 } 129 fault_if_from_uspace(istate, " general protection fault");129 fault_if_from_uspace(istate, "General protection fault"); 130 130 } 131 131 132 132 decode_istate(n, istate); 133 panic(" general protection fault\n");133 panic("General protection fault\n"); 134 134 } 135 135 136 136 static void ss_fault(int n, istate_t *istate) 137 137 { 138 fault_if_from_uspace(istate, " stack fault");138 fault_if_from_uspace(istate, "Stack fault"); 139 139 decode_istate(n, istate); 140 panic(" stack fault\n");140 panic("Stack fault\n"); 141 141 } 142 142 … … 146 146 scheduler_fpu_lazy_request(); 147 147 #else 148 fault_if_from_uspace(istate, " fpufault");149 panic(" fpufault");148 fault_if_from_uspace(istate, "FPU fault"); 149 panic("FPU fault"); 150 150 #endif 151 151 } -
kernel/arch/amd64/src/mm/page.c
r06b2b7f r7ed2d8f 195 195 decode_istate(n, istate); 196 196 printf("Page fault address: %llx\n", page); 197 panic(" page fault\n");197 panic("Page fault\n"); 198 198 } 199 199 } -
kernel/arch/arm32/src/mm/page_fault.c
r06b2b7f r7ed2d8f 190 190 191 191 fault_if_from_uspace(istate, "Page fault: %#x", badvaddr); 192 panic(" page fault\n");192 panic("Page fault\n"); 193 193 } 194 194 } -
kernel/arch/ia32/src/interrupt.c
r06b2b7f r7ed2d8f 96 96 static void null_interrupt(int n, istate_t *istate) 97 97 { 98 fault_if_from_uspace(istate, " unserviced interrupt: %d", n);99 100 decode_istate(istate); 101 panic(" unserviced interrupt: %d\n", n);98 fault_if_from_uspace(istate, "Unserviced interrupt: %d", n); 99 100 decode_istate(istate); 101 panic("Unserviced interrupt: %d\n", n); 102 102 } 103 103 … … 123 123 return; 124 124 } 125 fault_if_from_uspace(istate, " general protection fault");125 fault_if_from_uspace(istate, "General protection fault"); 126 126 } 127 127 128 128 decode_istate(istate); 129 panic(" general protection fault\n");129 panic("General protection fault\n"); 130 130 } 131 131 132 132 static void ss_fault(int n __attribute__((unused)), istate_t *istate) 133 133 { 134 fault_if_from_uspace(istate, " stack fault");135 136 decode_istate(istate); 137 panic(" stack fault\n");134 fault_if_from_uspace(istate, "Stack fault"); 135 136 decode_istate(istate); 137 panic("Stack fault\n"); 138 138 } 139 139 … … 158 158 scheduler_fpu_lazy_request(); 159 159 #else 160 fault_if_from_uspace(istate, " fpufault");161 panic(" fpufault");160 fault_if_from_uspace(istate, "FPU fault"); 161 panic("FPU fault"); 162 162 #endif 163 163 } -
kernel/arch/ia32xen/src/interrupt.c
r06b2b7f r7ed2d8f 95 95 static void null_interrupt(int n, istate_t *istate) 96 96 { 97 fault_if_from_uspace(istate, " unserviced interrupt: %d", n);98 99 decode_istate(istate); 100 panic(" unserviced interrupt: %d\n", n);97 fault_if_from_uspace(istate, "Unserviced interrupt: %d", n); 98 99 decode_istate(istate); 100 panic("Unserviced interrupt: %d\n", n); 101 101 } 102 102 … … 122 122 return; 123 123 } 124 fault_if_from_uspace(istate, " general protection fault");124 fault_if_from_uspace(istate, "General protection fault"); 125 125 } 126 126 127 127 decode_istate(istate); 128 panic(" general protection fault\n");128 panic("General protection fault\n"); 129 129 } 130 130 131 131 static void ss_fault(int n, istate_t *istate) 132 132 { 133 fault_if_from_uspace(istate, " stack fault");134 135 decode_istate(istate); 136 panic(" stack fault\n");133 fault_if_from_uspace(istate, "Stack fault"); 134 135 decode_istate(istate); 136 panic("Stack fault\n"); 137 137 } 138 138 … … 158 158 scheduler_fpu_lazy_request(); 159 159 #else 160 fault_if_from_uspace(istate, " fpufault");161 panic(" fpufault");160 fault_if_from_uspace(istate, "FPU fault"); 161 panic("FPU fault"); 162 162 #endif 163 163 } -
kernel/arch/ia32xen/src/mm/page.c
r06b2b7f r7ed2d8f 78 78 79 79 decode_istate(istate); 80 printf(" page fault address: %#x\n", page);81 panic(" page fault\n");80 printf("Page fault address: %#x\n", page); 81 panic("Page fault\n"); 82 82 } 83 83 } -
kernel/arch/ia64/src/interrupt.c
r06b2b7f r7ed2d8f 229 229 void universal_handler(uint64_t vector, istate_t *istate) 230 230 { 231 fault_if_from_uspace(istate, "Interruption: %#hx (%s) \n",231 fault_if_from_uspace(istate, "Interruption: %#hx (%s)", 232 232 (uint16_t) vector, vector_to_string(vector)); 233 233 dump_interrupted_context(istate); -
kernel/arch/mips32/src/exception.c
r06b2b7f r7ed2d8f 89 89 static void unhandled_exception(int n, istate_t *istate) 90 90 { 91 fault_if_from_uspace(istate, " unhandled exception %s", exctable[n]);91 fault_if_from_uspace(istate, "Unhandled exception %s", exctable[n]); 92 92 93 93 print_regdump(istate); 94 panic(" unhandled exception %s\n", exctable[n]);94 panic("Unhandled exception %s.\n", exctable[n]); 95 95 } 96 96 … … 133 133 scheduler_fpu_lazy_request(); 134 134 else { 135 fault_if_from_uspace(istate, " unhandled Coprocessor Unusable Exception");136 panic(" unhandled Coprocessor Unusable Exception\n");135 fault_if_from_uspace(istate, "Unhandled Coprocessor Unusable Exception"); 136 panic("Unhandled Coprocessor Unusable Exception.\n"); 137 137 } 138 138 } -
kernel/arch/mips32/src/mm/tlb.c
r06b2b7f r7ed2d8f 333 333 fault_if_from_uspace(istate, "TLB Refill Exception on %p", 334 334 cp0_badvaddr_read()); 335 panic("%x: TLB Refill Exception at %x(%s<-%s) \n", cp0_badvaddr_read(),335 panic("%x: TLB Refill Exception at %x(%s<-%s).\n", cp0_badvaddr_read(), 336 336 istate->epc, symbol, sym2); 337 337 } … … 347 347 fault_if_from_uspace(istate, "TLB Invalid Exception on %p", 348 348 cp0_badvaddr_read()); 349 panic("%x: TLB Invalid Exception at %x(%s) \n", cp0_badvaddr_read(),349 panic("%x: TLB Invalid Exception at %x(%s).\n", cp0_badvaddr_read(), 350 350 istate->epc, symbol); 351 351 } … … 360 360 fault_if_from_uspace(istate, "TLB Modified Exception on %p", 361 361 cp0_badvaddr_read()); 362 panic("%x: TLB Modified Exception at %x(%s) \n", cp0_badvaddr_read(),362 panic("%x: TLB Modified Exception at %x(%s).\n", cp0_badvaddr_read(), 363 363 istate->epc, symbol); 364 364 } -
kernel/arch/ppc32/src/mm/tlb.c
r06b2b7f r7ed2d8f 120 120 121 121 fault_if_from_uspace(istate, 122 "%p: PHT Refill Exception at %p (%s<-%s) \n", badvaddr,122 "%p: PHT Refill Exception at %p (%s<-%s)", badvaddr, 123 123 istate->pc, symbol, sym2); 124 124 panic("%p: PHT Refill Exception at %p (%s<-%s)\n", badvaddr, -
kernel/arch/sparc64/src/mm/tlb.c
r06b2b7f r7ed2d8f 425 425 const char *str) 426 426 { 427 fault_if_from_uspace(istate, "%s \n", str);427 fault_if_from_uspace(istate, "%s", str); 428 428 dump_istate(istate); 429 429 panic("%s\n", str); … … 437 437 va = tag.vpn << MMU_PAGE_WIDTH; 438 438 if (tag.context) { 439 fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d) \n", str, va,439 fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d)", str, va, 440 440 tag.context); 441 441 } … … 453 453 454 454 if (tag.context) { 455 fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d) \n", str, va,455 fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d)", str, va, 456 456 tag.context); 457 457 } -
kernel/arch/sparc64/src/trap/exception.c
r06b2b7f r7ed2d8f 54 54 void instruction_access_exception(int n, istate_t *istate) 55 55 { 56 fault_if_from_uspace(istate, "%s \n", __func__);56 fault_if_from_uspace(istate, "%s", __func__); 57 57 dump_istate(istate); 58 58 panic("%s\n", __func__); … … 62 62 void instruction_access_error(int n, istate_t *istate) 63 63 { 64 fault_if_from_uspace(istate, "%s \n", __func__);64 fault_if_from_uspace(istate, "%s", __func__); 65 65 dump_istate(istate); 66 66 panic("%s\n", __func__); … … 70 70 void illegal_instruction(int n, istate_t *istate) 71 71 { 72 fault_if_from_uspace(istate, "%s \n", __func__);72 fault_if_from_uspace(istate, "%s", __func__); 73 73 dump_istate(istate); 74 74 panic("%s\n", __func__); … … 78 78 void privileged_opcode(int n, istate_t *istate) 79 79 { 80 fault_if_from_uspace(istate, "%s \n", __func__);80 fault_if_from_uspace(istate, "%s", __func__); 81 81 dump_istate(istate); 82 82 panic("%s\n", __func__); … … 86 86 void unimplemented_LDD(int n, istate_t *istate) 87 87 { 88 fault_if_from_uspace(istate, "%s \n", __func__);88 fault_if_from_uspace(istate, "%s", __func__); 89 89 dump_istate(istate); 90 90 panic("%s\n", __func__); … … 94 94 void unimplemented_STD(int n, istate_t *istate) 95 95 { 96 fault_if_from_uspace(istate, "%s \n", __func__);96 fault_if_from_uspace(istate, "%s", __func__); 97 97 dump_istate(istate); 98 98 panic("%s\n", __func__); … … 114 114 scheduler_fpu_lazy_request(); 115 115 #else 116 fault_if_from_uspace(istate, "%s \n", __func__);116 fault_if_from_uspace(istate, "%s", __func__); 117 117 dump_istate(istate); 118 118 panic("%s\n", __func__); … … 123 123 void fp_exception_ieee_754(int n, istate_t *istate) 124 124 { 125 fault_if_from_uspace(istate, "%s \n", __func__);125 fault_if_from_uspace(istate, "%s", __func__); 126 126 dump_istate(istate); 127 127 panic("%s\n", __func__); … … 131 131 void fp_exception_other(int n, istate_t *istate) 132 132 { 133 fault_if_from_uspace(istate, "%s \n", __func__);133 fault_if_from_uspace(istate, "%s", __func__); 134 134 dump_istate(istate); 135 135 panic("%s\n", __func__); … … 139 139 void tag_overflow(int n, istate_t *istate) 140 140 { 141 fault_if_from_uspace(istate, "%s \n", __func__);141 fault_if_from_uspace(istate, "%s", __func__); 142 142 dump_istate(istate); 143 143 panic("%s\n", __func__); … … 147 147 void division_by_zero(int n, istate_t *istate) 148 148 { 149 fault_if_from_uspace(istate, "%s \n", __func__);149 fault_if_from_uspace(istate, "%s", __func__); 150 150 dump_istate(istate); 151 151 panic("%s\n", __func__); … … 155 155 void data_access_exception(int n, istate_t *istate) 156 156 { 157 fault_if_from_uspace(istate, "%s \n", __func__);157 fault_if_from_uspace(istate, "%s", __func__); 158 158 dump_istate(istate); 159 159 dump_sfsr_and_sfar(); … … 164 164 void data_access_error(int n, istate_t *istate) 165 165 { 166 fault_if_from_uspace(istate, "%s \n", __func__);166 fault_if_from_uspace(istate, "%s", __func__); 167 167 dump_istate(istate); 168 168 panic("%s\n", __func__); … … 172 172 void mem_address_not_aligned(int n, istate_t *istate) 173 173 { 174 fault_if_from_uspace(istate, "%s \n", __func__);174 fault_if_from_uspace(istate, "%s", __func__); 175 175 dump_istate(istate); 176 176 panic("%s\n", __func__); … … 180 180 void LDDF_mem_address_not_aligned(int n, istate_t *istate) 181 181 { 182 fault_if_from_uspace(istate, "%s \n", __func__);182 fault_if_from_uspace(istate, "%s", __func__); 183 183 dump_istate(istate); 184 184 panic("%s\n", __func__); … … 188 188 void STDF_mem_address_not_aligned(int n, istate_t *istate) 189 189 { 190 fault_if_from_uspace(istate, "%s \n", __func__);190 fault_if_from_uspace(istate, "%s", __func__); 191 191 dump_istate(istate); 192 192 panic("%s\n", __func__); … … 196 196 void privileged_action(int n, istate_t *istate) 197 197 { 198 fault_if_from_uspace(istate, "%s \n", __func__);198 fault_if_from_uspace(istate, "%s", __func__); 199 199 dump_istate(istate); 200 200 panic("%s\n", __func__); … … 204 204 void LDQF_mem_address_not_aligned(int n, istate_t *istate) 205 205 { 206 fault_if_from_uspace(istate, "%s \n", __func__);206 fault_if_from_uspace(istate, "%s", __func__); 207 207 dump_istate(istate); 208 208 panic("%s\n", __func__); … … 212 212 void STQF_mem_address_not_aligned(int n, istate_t *istate) 213 213 { 214 fault_if_from_uspace(istate, "%s \n", __func__);214 fault_if_from_uspace(istate, "%s", __func__); 215 215 dump_istate(istate); 216 216 panic("%s\n", __func__); -
kernel/generic/include/interrupt.h
r06b2b7f r7ed2d8f 45 45 typedef void (* iroutine)(int n, istate_t *istate); 46 46 47 #define fault_if_from_uspace(istate, cmd, ...) \47 #define fault_if_from_uspace(istate, fmt, ...) \ 48 48 { \ 49 49 if (istate_from_uspace(istate)) { \ 50 50 task_t *task = TASK; \ 51 51 printf("Task %" PRIu64 " killed due to an exception at %p.", task->taskid, istate_get_pc(istate)); \ 52 printf(" " cmd, ##__VA_ARGS__); \52 printf(" " fmt "\n", ##__VA_ARGS__); \ 53 53 task_kill(task->taskid); \ 54 54 thread_exit(); \ -
kernel/generic/src/interrupt/interrupt.c
r06b2b7f r7ed2d8f 106 106 static void exc_undef(int n, istate_t *istate) 107 107 { 108 fault_if_from_uspace(istate, "Unhandled exception %d .", n);109 panic("Unhandled exception %d .", n);108 fault_if_from_uspace(istate, "Unhandled exception %d", n); 109 panic("Unhandled exception %d", n); 110 110 } 111 111
Note:
See TracChangeset
for help on using the changeset viewer.