Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1594 → Rev 1595

/kernel/trunk/arch/mips32/include/exception.h
34,6 → 34,7
#endif
 
#include <typedefs.h>
#include <arch/cp0.h>
 
#define EXC_Int 0
#define EXC_Mod 1
98,6 → 99,16
istate->epc = retaddr;
}
 
/** Return true if exception happened while in userspace */
static inline int istate_from_uspace(istate_t *istate)
{
return istate->status & cp0_status_um_bit;
}
static inline __native istate_get_pc(istate_t *istate)
{
return istate->epc;
}
 
extern void exception(istate_t *istate);
extern void tlb_refill_entry(void);
extern void exception_entry(void);
/kernel/trunk/arch/mips32/include/arg.h
44,6 → 44,8
#define va_arg(ap, type) \
(((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? ((__address)((ap) + 2*4 - 1) & (~3)) : ((__address)((ap) + 2*8 -1) & (~7)) )))[-1])
 
#define va_copy(dst,src) ((dst)=(src))
 
#define va_end(ap)
 
#endif
/kernel/trunk/arch/mips32/src/exception.c
78,6 → 78,8
 
static void unhandled_exception(int n, istate_t *istate)
{
fault_if_from_uspace(istate, "unhandled exception %s", exctable[n]);
print_regdump(istate);
panic("unhandled exception %s\n", exctable[n]);
}
119,8 → 121,10
{
if (cp0_cause_coperr(cp0_cause_read()) == fpu_cop_id)
scheduler_fpu_lazy_request();
else
else {
fault_if_from_uspace(istate, "unhandled Coprocessor Unusable Exception");
panic("unhandled Coprocessor Unusable Exception\n");
}
}
#endif
 
/kernel/trunk/arch/mips32/src/mm/tlb.c
39,6 → 39,7
#include <print.h>
#include <debug.h>
#include <align.h>
#include <interrupt.h>
 
static void tlb_refill_fail(istate_t *istate);
static void tlb_invalid_fail(istate_t *istate);
336,6 → 337,8
s = get_symtab_entry(istate->ra);
if (s)
sym2 = s;
 
fault_if_from_uspace(istate, "TLB Refill Exception on %P", cp0_badvaddr_read());
panic("%X: TLB Refill Exception at %X(%s<-%s)\n", cp0_badvaddr_read(), istate->epc, symbol, sym2);
}
 
347,6 → 350,7
char *s = get_symtab_entry(istate->epc);
if (s)
symbol = s;
fault_if_from_uspace(istate, "TLB Invalid Exception on %P", cp0_badvaddr_read());
panic("%X: TLB Invalid Exception at %X(%s)\n", cp0_badvaddr_read(), istate->epc, symbol);
}
 
357,6 → 361,7
char *s = get_symtab_entry(istate->epc);
if (s)
symbol = s;
fault_if_from_uspace(istate, "TLB Modified Exception on %P", cp0_badvaddr_read());
panic("%X: TLB Modified Exception at %X(%s)\n", cp0_badvaddr_read(), istate->epc, symbol);
}