Changeset 635 for trunk/hal/tsar_mips32/core/hal_exception.c
- Timestamp:
- Jun 26, 2019, 11:42:37 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/core/hal_exception.c
r632 r635 189 189 uint32_t excp_code; 190 190 191 // check thread type192 if( CURRENT_THREAD->type != THREAD_USER )193 {194 printk("\n[PANIC] in %s : illegal thread type %s\n",195 __FUNCTION__, thread_type_str(CURRENT_THREAD->type) );196 197 return EXCP_KERNEL_PANIC;198 }199 200 191 // get faulty thread process 201 192 process = this->process; … … 447 438 else // undefined coprocessor 448 439 { 449 printk("\n[USER_ERROR] in %s for thread[%x,%x] \n"440 printk("\n[USER_ERROR] in %s for thread[%x,%x] / cycle %d\n" 450 441 " undefined coprocessor / epc %x\n", 451 __FUNCTION__, this->process->pid, this->trdid, excPC ); 442 __FUNCTION__, this->process->pid, this->trdid, 443 (uint32_t)hal_get_cycles() , excPC ); 452 444 453 445 error = EXCP_USER_ERROR; … … 457 449 case XCODE_OVR: // Arithmetic Overflow : user fatal error 458 450 { 459 printk("\n[USER_ERROR] in %s for thread[%x,%x] \n"451 printk("\n[USER_ERROR] in %s for thread[%x,%x] / cycle %d\n" 460 452 " arithmetic overflow / epc %x\n", 461 __FUNCTION__, this->process->pid, this->trdid, excPC ); 453 __FUNCTION__, this->process->pid, this->trdid, 454 (uint32_t)hal_get_cycles() , excPC ); 462 455 463 456 error = EXCP_USER_ERROR; … … 466 459 case XCODE_RI: // Reserved Instruction : user fatal error 467 460 { 468 printk("\n[USER_ERROR] in %s for thread[%x,%x] \n"461 printk("\n[USER_ERROR] in %s for thread[%x,%x] / cycle %d\n" 469 462 " reserved instruction / epc %x\n", 470 __FUNCTION__, this->process->pid, this->trdid, excPC ); 463 __FUNCTION__, this->process->pid, this->trdid, 464 (uint32_t)hal_get_cycles() , excPC ); 471 465 472 466 error = EXCP_USER_ERROR; … … 475 469 case XCODE_ADEL: // user fatal error 476 470 { 477 printk("\n[USER_ERROR] in %s for thread[%x,%x] \n"471 printk("\n[USER_ERROR] in %s for thread[%x,%x] / cycle %d\n" 478 472 " illegal data load address / epc %x / bad_address %x\n", 479 __FUNCTION__, this->process->pid, this->trdid, excPC, hal_get_bad_vaddr() ); 473 __FUNCTION__, this->process->pid, this->trdid, 474 (uint32_t)hal_get_cycles(), excPC, hal_get_bad_vaddr() ); 480 475 481 476 error = EXCP_USER_ERROR; … … 484 479 case XCODE_ADES: // user fatal error 485 480 { 486 printk("\n[USER_ERROR] in %s for thread[%x,%x] \n"481 printk("\n[USER_ERROR] in %s for thread[%x,%x] / cycle %d\n" 487 482 " illegal data store address / epc %x / bad_address %x\n", 488 __FUNCTION__, this->process->pid, this->trdid, excPC, hal_get_bad_vaddr() ); 483 __FUNCTION__, this->process->pid, this->trdid, 484 (uint32_t)hal_get_cycles(), excPC, hal_get_bad_vaddr() ); 489 485 490 486 error = EXCP_USER_ERROR;
Note: See TracChangeset
for help on using the changeset viewer.