/kernel/trunk/arch/mips32/include/exception.h |
---|
34,7 → 34,6 |
#endif |
#include <typedefs.h> |
#include <arch/cp0.h> |
#define EXC_Int 0 |
#define EXC_Mod 1 |
99,16 → 98,6 |
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,8 → 44,6 |
#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/mm/tlb.c |
---|
39,7 → 39,6 |
#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); |
337,8 → 336,6 |
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); |
} |
350,7 → 347,6 |
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); |
} |
361,7 → 357,6 |
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); |
} |
/kernel/trunk/arch/mips32/src/exception.c |
---|
78,8 → 78,6 |
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]); |
} |
121,10 → 119,8 |
{ |
if (cp0_cause_coperr(cp0_cause_read()) == fpu_cop_id) |
scheduler_fpu_lazy_request(); |
else { |
fault_if_from_uspace(istate, "unhandled Coprocessor Unusable Exception"); |
else |
panic("unhandled Coprocessor Unusable Exception\n"); |
} |
} |
#endif |