Changeset 317 for trunk/hal/tsar_mips32/core/hal_exception.c
- Timestamp:
- Aug 4, 2017, 2:03:44 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/core/hal_exception.c
r296 r317 72 72 { 73 73 case XCODE_DBE: // can be non fatal 74 case XCODE_IBE: // ca n be non fatal74 case XCODE_IBE: // call generic excepton handler for a MMU exception 75 75 { 76 // call generic excepton handler for a MMU exception77 76 error = do_exception( this , true ); 78 77 } … … 80 79 81 80 case XCODE_CPU: // can be non fatal 81 // call generic excepton handler for a FPU exception 82 82 { 83 83 if( ((regs_tbl[UZ_CR] >> 28) & 0x3) == 1 ) // unavailable FPU 84 84 { 85 // call generic excepton handler for a FPU exception86 85 error = do_exception( this , false ); 87 86 } 88 87 else 89 88 { 90 printk("\n[ERROR] in thread %x / unsupported coprocessor type\n",91 this->trdid );92 89 error = EXCP_USER_ERROR; 93 90 } … … 96 93 97 94 case XCODE_OVR: // user fatal error 95 case XCODE_RI: // user fatal error 96 case XCODE_ADEL: // user fatal error 97 case XCODE_ADES: // kill process 98 98 { 99 printk("\n[ERROR] in thread %x / arithmetic overflow\n",100 this->trdid );101 99 error = EXCP_USER_ERROR; 102 100 } 103 101 break; 104 102 105 case XCODE_RI: // user fatal error106 {107 printk("\n[ERROR] in thread %x / Illegal Codop\n",108 this->trdid );109 error = EXCP_USER_ERROR;110 }111 break;112 113 case XCODE_ADEL: // user fatal error114 115 case XCODE_ADES:116 {117 printk("\n[ERROR] in thread %x / illegal address\n",118 this->trdid );119 error = EXCP_USER_ERROR;120 }121 break;122 123 103 default: 124 104 { 125 printk("\n[PANIC] in %s for thread %x / illegal XCODE value = %x\n", 126 __FUNCTION__ , this->trdid , excCode ); 127 error = EXCP_USER_ERROR; 105 error = EXCP_KERNEL_PANIC; 128 106 } 129 107 } 130 108 131 109 // analyse error code 132 if( error == EXCP_USER_ERROR ) // user error => kill the user process and return110 if( error == EXCP_USER_ERROR ) // user error => kill user process 133 111 { 134 112 hal_exception_dump( this , regs_tbl ); … … 150 128 151 129 if( this->type == THREAD_USER ) 152 printk("\n================= USER ERROR =======================================\n"); 130 printk("\n================= USER ERROR / cycle %d ====================\n", 131 hal_time_stamp() ); 153 132 else 154 printk("\n================= KERNEL PANIC =====================================\n"); 133 printk("\n================= KERNEL PANIC / cycle %d ==================\n", 134 hal_time_stamp() ); 155 135 156 136 printk(" thread type = %s / trdid = %x / pid %x / core[%x,%d]\n"
Note: See TracChangeset
for help on using the changeset viewer.