Line 111... |
Line 111... |
volatile unsigned long except_ea;
|
volatile unsigned long except_ea;
|
|
|
/* Eception PC */
|
/* Eception PC */
|
volatile unsigned long except_pc;
|
volatile unsigned long except_pc;
|
|
|
|
unsigned long excpt_buserr;
|
|
unsigned long excpt_dpfault;
|
|
unsigned long excpt_ipfault;
|
|
unsigned long excpt_tick;
|
|
unsigned long excpt_align;
|
|
unsigned long excpt_illinsn;
|
|
unsigned long excpt_int;
|
|
unsigned long excpt_dtlbmiss;
|
|
unsigned long excpt_itlbmiss;
|
|
unsigned long excpt_range;
|
|
unsigned long excpt_syscall;
|
|
unsigned long excpt_break;
|
|
unsigned long excpt_trap;
|
|
|
|
|
void fail (char *func, int line)
|
void fail (char *func, int line)
|
{
|
{
|
#ifndef __FUNCTION__
|
#ifndef __FUNCTION__
|
#define __FUNCTION__ "?"
|
#define __FUNCTION__ "?"
|
#endif
|
#endif
|
Line 707... |
Line 722... |
except_mask = 0;
|
except_mask = 0;
|
except_pc = 0;
|
except_pc = 0;
|
except_ea = 0;
|
except_ea = 0;
|
|
|
/* Set illegal insn */
|
/* Set illegal insn */
|
REG32(RAM_START + 0) = REG32((unsigned long)jump_back + 4);
|
REG32(RAM_START + (RAM_SIZE/2)) = REG32((unsigned long)jump_back + 4);
|
REG32(RAM_START + 4) = 0xffffffff;
|
REG32(RAM_START + (RAM_SIZE/2) + 4) = 0xffffffff;
|
|
|
/* Check if there was illegal insn exception */
|
/* Check if there was illegal insn exception */
|
ret = call (RAM_START + 4, 0 );
|
ret = call (RAM_START + (RAM_SIZE/2) + 4, 0 );
|
ASSERT(except_count == 1);
|
ASSERT(except_count == 1);
|
ASSERT(except_mask == (1 << V_ILLINSN));
|
ASSERT(except_mask == (1 << V_ILLINSN));
|
ASSERT(except_pc == RAM_START + 4);
|
ASSERT(except_pc == (RAM_START + (RAM_SIZE/2) + 4));
|
|
|
/* Reset except counter */
|
/* Reset except counter */
|
except_count = 0;
|
except_count = 0;
|
except_mask = 0;
|
except_mask = 0;
|
except_pc = 0;
|
except_pc = 0;
|
except_ea = 0;
|
except_ea = 0;
|
|
|
/* Check if there was illegal insn exception */
|
/* Check if there was illegal insn exception */
|
ret = call (RAM_START, 0 );
|
ret = call (RAM_START + (RAM_SIZE/2), 0 );
|
ASSERT(except_count == 1);
|
ASSERT(except_count == 1);
|
ASSERT(except_mask == (1 << V_ILLINSN));
|
ASSERT(except_mask == (1 << V_ILLINSN));
|
ASSERT(except_pc == RAM_START);
|
ASSERT(except_pc == RAM_START + (RAM_SIZE/2));
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
/* Align test */
|
/* Align test */
|
Line 956... |
Line 971... |
except_count = 0;
|
except_count = 0;
|
except_mask = 0;
|
except_mask = 0;
|
except_pc = 0;
|
except_pc = 0;
|
except_ea = 0;
|
except_ea = 0;
|
|
|
|
printf("Buserrrrr!\n");
|
/* Check if there was bus error exception */
|
/* Check if there was bus error exception */
|
call (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE), 0);
|
call (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE), 0);
|
ASSERT(except_count == 1);
|
ASSERT(except_count == 1);
|
ASSERT(except_mask == (1 << V_BERR));
|
ASSERT(except_mask == (1 << V_BERR));
|
ASSERT(except_pc == (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE)));
|
ASSERT(except_pc == (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE)));
|