Changeset 625 for trunk/hal/tsar_mips32/core/hal_exception.c
- Timestamp:
- Apr 10, 2019, 10:09:39 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/core/hal_exception.c
r619 r625 189 189 if( CURRENT_THREAD->type != THREAD_USER ) 190 190 { 191 printk("\n[ KERNELPANIC] in %s : illegal thread type %s\n",191 printk("\n[PANIC] in %s : illegal thread type %s\n", 192 192 __FUNCTION__, thread_type_str(CURRENT_THREAD->type) ); 193 193 … … 250 250 else if( error == EXCP_USER_ERROR ) // illegal vaddr 251 251 { 252 printk("\n[ USERERROR] in %s : thread[%x,%x] on core[%x,%x] / cycle %d\n"252 printk("\n[ERROR] in %s : thread[%x,%x] on core[%x,%x] / cycle %d\n" 253 253 " %s : epc %x / badvaddr %x / is_ins %d\n", 254 254 __FUNCTION__, this->process->pid, this->trdid, local_cxy, … … 260 260 else // error == EXCP_KERNEL_PANIC 261 261 { 262 printk("\n[ KERNELPANIC] in %s : thread[%x,%x] on core[%x,%x] / cycle %d\n"262 printk("\n[PANIC] in %s : thread[%x,%x] on core[%x,%x] / cycle %d\n" 263 263 " %s : epc %x / badvaddr %x / is_ins %d\n", 264 264 __FUNCTION__, this->process->pid, this->trdid, local_cxy, … … 272 272 case MMU_READ_PRIVILEGE_VIOLATION: // illegal 273 273 { 274 printk("\n[ USERERROR] in %s : thread[%x,%x] on core[%x,%x] / cycle %d\n"274 printk("\n[ERROR] in %s : thread[%x,%x] on core[%x,%x] / cycle %d\n" 275 275 " %s : epc %x / badvaddr %x / is_ins %d\n", 276 276 __FUNCTION__, this->process->pid, this->trdid, local_cxy, … … 299 299 else if( error == EXCP_USER_ERROR ) // illegal write access 300 300 { 301 printk("\n[ USERERROR] in %s : thread[%x,%x] on core[%x,%x] / cycle %d\n"301 printk("\n[ERROR] in %s : thread[%x,%x] on core[%x,%x] / cycle %d\n" 302 302 " %s : epc %x / badvaddr %x / is_ins %d\n", 303 303 __FUNCTION__, this->process->pid, this->trdid, local_cxy, … … 309 309 else // error == EXCP_KERNEL_PANIC 310 310 { 311 printk("\n[ KERNELPANIC] in %s : thread[%x,%x] on core[%x,%x] / cycle %d\n"311 printk("\n[PANIC] in %s : thread[%x,%x] on core[%x,%x] / cycle %d\n" 312 312 " %s : epc %x / badvaddr %x / is_ins %d\n", 313 313 __FUNCTION__, this->process->pid, this->trdid, local_cxy, … … 320 320 case MMU_READ_EXEC_VIOLATION: // user error 321 321 { 322 printk("\n[ USERERROR] in %s : thread[%x,%x] on core[%x,%x] / cycle %d\n"322 printk("\n[ERROR] in %s : thread[%x,%x] on core[%x,%x] / cycle %d\n" 323 323 " %s : epc %x / badvaddr %x / is_ins %d\n", 324 324 __FUNCTION__, this->process->pid, this->trdid, local_cxy, … … 330 330 default: // this is a kernel error 331 331 { 332 printk("\n[ KERNELPANIC] in %s : thread[%x,%x] on core[%x,%x] / cycle %d\n"332 printk("\n[PANIC] in %s : thread[%x,%x] on core[%x,%x] / cycle %d\n" 333 333 " %s : epc %x / badvaddr %x / is_ins %d\n", 334 334 __FUNCTION__, this->process->pid, this->trdid, local_cxy, … … 346 346 ////////////////////////////////////////////////////////////////////////////////////////// 347 347 // @ this : pointer on faulty thread descriptor. 348 // @ error : EXCP_USER_ERROR or EXCP_KERNEL_PANIC 349 ////////////////////////////////////////////////////////////////////////////////////////// 350 static void hal_exception_dump( thread_t * this, 351 error_t error ) 348 ////////////////////////////////////////////////////////////////////////////////////////// 349 static void hal_exception_dump( thread_t * this ) 352 350 { 353 351 core_t * core = this->core; … … 366 364 remote_busylock_acquire( lock_xp ); 367 365 368 if( error == EXCP_USER_ERROR ) 369 { 370 nolock_printk("\n=== USER ERROR / thread(%x,%x) / core[%d] / cycle %d ===\n", 371 process->pid, this->trdid, core->lid, (uint32_t)hal_get_cycles() ); 372 } 373 else 374 { 375 nolock_printk("\n=== KERNEL PANIC / thread(%x,%x) / core[%d] / cycle %d ===\n", 376 process->pid, this->trdid, core->lid, (uint32_t)hal_get_cycles() ); 377 } 366 nolock_printk("\n=== thread(%x,%x) / core[%d] / cycle %d ===\n", 367 process->pid, this->trdid, core->lid, (uint32_t)hal_get_cycles() ); 378 368 379 369 nolock_printk("busylocks = %d / blocked_vector = %X / flags = %X\n\n", … … 507 497 if( error == EXCP_USER_ERROR ) // user error => kill user process 508 498 { 509 hal_exception_dump( this , error);499 hal_exception_dump( this ); 510 500 511 501 sys_exit( EXIT_FAILURE ); … … 513 503 else if( error == EXCP_KERNEL_PANIC ) // kernel error => kernel panic 514 504 { 515 hal_exception_dump( this , error);505 hal_exception_dump( this ); 516 506 517 507 hal_core_sleep();
Note: See TracChangeset
for help on using the changeset viewer.