- Timestamp:
- 2006-06-06T07:40:51Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0dbc4e7
- Parents:
- 6f9a9bc
- Location:
- arch
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/include/interrupt.h
r6f9a9bc r874621f 87 87 }; 88 88 89 /** Return true if exception happened while in userspace */ 90 static inline int istate_from_uspace(istate_t *istate) 91 { 92 return !(istate->rip & 0x8000000000000000); 93 } 94 89 95 static inline void istate_set_retaddr(istate_t *istate, __address retaddr) 90 96 { 91 97 istate->rip = retaddr; 98 } 99 static inline __native istate_get_pc(istate_t *istate) 100 { 101 return istate->rip; 92 102 } 93 103 -
arch/amd64/src/interrupt.c
r6f9a9bc r874621f 80 80 void null_interrupt(int n, istate_t *istate) 81 81 { 82 fault_if_from_uspace(istate, "unserviced interrupt: %d", n); 82 83 print_info_errcode(n, istate); 83 84 panic("unserviced interrupt\n"); … … 105 106 return; 106 107 } 108 fault_if_from_uspace(istate, "general protection fault"); 107 109 } 108 110 … … 113 115 void ss_fault(int n, istate_t *istate) 114 116 { 117 fault_if_from_uspace(istate, "stack fault"); 115 118 print_info_errcode(n, istate); 116 119 panic("stack fault\n"); … … 122 125 scheduler_fpu_lazy_request(); 123 126 #else 127 fault_if_from_uspace(istate, "fpu fault"); 124 128 panic("fpu fault"); 125 129 #endif -
arch/amd64/src/mm/page.c
r6f9a9bc r874621f 184 184 185 185 if (as_page_fault(page, access, istate) == AS_PF_FAULT) { 186 fault_if_from_uspace(istate, "Page fault: %#x", page); 187 186 188 print_info_errcode(n, istate); 187 189 printf("Page fault address: %llX\n", page); -
arch/ia32/include/interrupt.h
r6f9a9bc r874621f 84 84 }; 85 85 86 /** Return true if exception happened while in userspace */ 87 static inline int istate_from_uspace(istate_t *istate) 88 { 89 return !(istate->eip & 0x80000000); 90 } 91 86 92 static inline void istate_set_retaddr(istate_t *istate, __address retaddr) 87 93 { 88 94 istate->eip = retaddr; 95 } 96 97 static inline __native istate_get_pc(istate_t *istate) 98 { 99 return istate->eip; 89 100 } 90 101 -
arch/ia32/src/interrupt.c
r6f9a9bc r874621f 80 80 void null_interrupt(int n, istate_t *istate) 81 81 { 82 fault_if_from_uspace(istate, "unserviced interrupt: %d", n); 83 82 84 PRINT_INFO_ERRCODE(istate); 83 85 panic("unserviced interrupt: %d\n", n); … … 105 107 return; 106 108 } 109 fault_if_from_uspace(istate, "general protection fault"); 107 110 } 108 111 … … 113 116 void ss_fault(int n, istate_t *istate) 114 117 { 118 fault_if_from_uspace(istate, "stack fault"); 119 115 120 PRINT_INFO_ERRCODE(istate); 116 121 panic("stack fault\n"); … … 119 124 void simd_fp_exception(int n, istate_t *istate) 120 125 { 121 122 PRINT_INFO_ERRCODE(istate);123 126 __u32 mxcsr; 124 127 asm … … 127 130 :"=m"(mxcsr) 128 131 ); 132 fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR: %#zX", 133 (__native)mxcsr); 134 135 PRINT_INFO_ERRCODE(istate); 129 136 printf("MXCSR: %#zX\n",(__native)(mxcsr)); 130 137 panic("SIMD FP exception(19)\n"); … … 136 143 scheduler_fpu_lazy_request(); 137 144 #else 145 fault_if_from_uspace(istate, "fpu fault"); 138 146 panic("fpu fault"); 139 147 #endif -
arch/ia32/src/mm/page.c
r6f9a9bc r874621f 104 104 105 105 if (as_page_fault(page, access, istate) == AS_PF_FAULT) { 106 fault_if_from_uspace(istate, "Page fault: %#x", page); 107 106 108 PRINT_INFO_ERRCODE(istate); 107 109 printf("page fault address: %#x\n", page); -
arch/ia64/include/interrupt.h
r6f9a9bc r874621f 114 114 } 115 115 116 static inline __native istate_get_pc(istate_t *istate) 117 { 118 return istate->cr_iip; 119 } 120 #include <panic.h> 121 static inline int istate_from_uspace(istate_t *istate) 122 { 123 panic("TODO: istate_from_uspace not yet implemented"); 124 return 0; 125 } 126 116 127 extern void *ivt; 117 128 -
arch/ia64/src/interrupt.c
r6f9a9bc r874621f 47 47 #include <ipc/irq.h> 48 48 #include <ipc/ipc.h> 49 #include <interrupt.h> 49 50 50 51 … … 151 152 char *desc = ""; 152 153 153 dump_interrupted_context(istate);154 155 154 switch (istate->cr_isr.ge_code) { 156 155 case GE_ILLEGALOP: … … 177 176 } 178 177 178 fault_if_from_uspace(istate, "General Exception (%s)", desc); 179 180 dump_interrupted_context(istate); 179 181 panic("General Exception (%s)\n", desc); 180 182 } … … 187 189 scheduler_fpu_lazy_request(); 188 190 #else 191 fault_if_from_uspace(istate, "Interruption: %#hx (%s)", (__u16) vector, vector_to_string(vector)); 189 192 dump_interrupted_context(istate); 190 193 panic("Interruption: %#hx (%s)\n", (__u16) vector, vector_to_string(vector)); … … 268 271 /* TODO */ 269 272 } 270 271 272 -
arch/mips32/include/arg.h
r6f9a9bc r874621f 45 45 (((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? ((__address)((ap) + 2*4 - 1) & (~3)) : ((__address)((ap) + 2*8 -1) & (~7)) )))[-1]) 46 46 47 #define va_copy(dst,src) ((dst)=(src)) 48 47 49 #define va_end(ap) 48 50 -
arch/mips32/include/exception.h
r6f9a9bc r874621f 35 35 36 36 #include <typedefs.h> 37 #include <arch/cp0.h> 37 38 38 39 #define EXC_Int 0 … … 99 100 } 100 101 102 /** Return true if exception happened while in userspace */ 103 static inline int istate_from_uspace(istate_t *istate) 104 { 105 return istate->status & cp0_status_um_bit; 106 } 107 static inline __native istate_get_pc(istate_t *istate) 108 { 109 return istate->epc; 110 } 111 101 112 extern void exception(istate_t *istate); 102 113 extern void tlb_refill_entry(void); -
arch/mips32/src/exception.c
r6f9a9bc r874621f 79 79 static void unhandled_exception(int n, istate_t *istate) 80 80 { 81 fault_if_from_uspace(istate, "unhandled exception %s", exctable[n]); 82 81 83 print_regdump(istate); 82 84 panic("unhandled exception %s\n", exctable[n]); … … 120 122 if (cp0_cause_coperr(cp0_cause_read()) == fpu_cop_id) 121 123 scheduler_fpu_lazy_request(); 122 else 124 else { 125 fault_if_from_uspace(istate, "unhandled Coprocessor Unusable Exception"); 123 126 panic("unhandled Coprocessor Unusable Exception\n"); 127 } 124 128 } 125 129 #endif -
arch/mips32/src/mm/tlb.c
r6f9a9bc r874621f 40 40 #include <debug.h> 41 41 #include <align.h> 42 #include <interrupt.h> 42 43 43 44 static void tlb_refill_fail(istate_t *istate); … … 337 338 if (s) 338 339 sym2 = s; 340 341 fault_if_from_uspace(istate, "TLB Refill Exception on %P", cp0_badvaddr_read()); 339 342 panic("%X: TLB Refill Exception at %X(%s<-%s)\n", cp0_badvaddr_read(), istate->epc, symbol, sym2); 340 343 } … … 348 351 if (s) 349 352 symbol = s; 353 fault_if_from_uspace(istate, "TLB Invalid Exception on %P", cp0_badvaddr_read()); 350 354 panic("%X: TLB Invalid Exception at %X(%s)\n", cp0_badvaddr_read(), istate->epc, symbol); 351 355 } … … 358 362 if (s) 359 363 symbol = s; 364 fault_if_from_uspace(istate, "TLB Modified Exception on %P", cp0_badvaddr_read()); 360 365 panic("%X: TLB Modified Exception at %X(%s)\n", cp0_badvaddr_read(), istate->epc, symbol); 361 366 } -
arch/ppc32/include/exception.h
r6f9a9bc r874621f 81 81 istate->pc = retaddr; 82 82 } 83 /** Return true if exception happened while in userspace */ 84 #include <panic.h> 85 static inline int istate_from_uspace(istate_t *istate) 86 { 87 panic("istate_from_uspace not yet implemented"); 88 return 0; 89 } 90 static inline __native istate_get_pc(istate_t *istate) 91 { 92 return istate->pc; 93 } 83 94 84 95 #endif -
arch/ppc32/src/interrupt.c
r6f9a9bc r874621f 67 67 } 68 68 69 #include <print.h>70 69 /** Handler of externul interrupts */ 71 70 void extint_handler(int n, istate_t *istate) -
arch/ppc64/include/exception.h
r6f9a9bc r874621f 81 81 istate->pc = retaddr; 82 82 } 83 /** Return true if exception happened while in userspace */ 84 #include <panic.h> 85 static inline int istate_from_uspace(istate_t *istate) 86 { 87 panic("istate_from_uspace not yet implemented"); 88 return 0; 89 } 90 static inline __native istate_get_pc(istate_t *istate) 91 { 92 return istate->pc; 93 } 83 94 84 95 #endif -
arch/sparc64/include/interrupt.h
r6f9a9bc r874621f 52 52 /* TODO */ 53 53 } 54 static inline int istate_from_uspace(istate_t *istate) 55 { 56 /* TODO */ 57 } 58 static inline __native istate_get_pc(istate_t *istate) 59 { 60 /* TODO */ 61 } 62 54 63 55 64 extern void interrupt_register(int n, const char *name, iroutine f);
Note:
See TracChangeset
for help on using the changeset viewer.