Esempio n. 1
0
static void cpuns_exception(unsigned int n, istate_t *istate)
{
	if (cp0_cause_coperr(cp0_cause_read()) == fpu_cop_id)
		scheduler_fpu_lazy_request();
	else {
		fault_if_from_uspace(istate,
		    "Unhandled Coprocessor Unusable Exception.");
		panic_badtrap(istate, n,
		    "Unhandled Coprocessor Unusable Exception.");
	}
}
Esempio n. 2
0
/** General Protection Fault.
 *
 */
static void gp_fault(unsigned int n, istate_t *istate)
{
	if (TASK) {
		irq_spinlock_lock(&TASK->lock, false);
		size_t ver = TASK->arch.iomapver;
		irq_spinlock_unlock(&TASK->lock, false);
		
		if (CPU->arch.iomapver_copy != ver) {
			/*
			 * This fault can be caused by an early access
			 * to I/O port because of an out-dated
			 * I/O Permission bitmap installed on CPU.
			 * Install the fresh copy and restart
			 * the instruction.
			 */
			io_perm_bitmap_install();
			return;
		}
		fault_if_from_uspace(istate, "General protection fault.");
	}
	panic_badtrap(istate, n, "General protection fault.");
}
Esempio n. 3
0
static void unhandled_exception(unsigned int n, istate_t *istate)
{
	fault_if_from_uspace(istate, "Unhandled exception %s.", exctable[n]);
	panic_badtrap(istate, n, "Unhandled exception %s.", exctable[n]);
}
Esempio n. 4
0
static void ss_fault(unsigned int n, istate_t *istate)
{
	fault_if_from_uspace(istate, "Stack fault.");
	panic_badtrap(istate, n, "Stack fault.");
}
Esempio n. 5
0
static void de_fault(unsigned int n, istate_t *istate)
{
	fault_if_from_uspace(istate, "Divide error.");
	panic_badtrap(istate, n, "Divide error.");
}
Esempio n. 6
0
static void null_interrupt(unsigned int n, istate_t *istate)
{
	fault_if_from_uspace(istate, "Unserviced interrupt: %u.", n);
	panic_badtrap(istate, n, "Unserviced interrupt.");
}