Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1255 → Rev 1256

/kernel/trunk/arch/amd64/src/interrupt.c
41,6 → 41,9
#include <arch/asm.h>
#include <proc/scheduler.h>
#include <proc/thread.h>
#include <proc/task.h>
#include <synch/spinlock.h>
#include <arch/ddi/ddi.h>
 
void print_info_errcode(int n, istate_t *istate)
{
78,8 → 81,29
panic("unserviced interrupt\n");
}
 
/** General Protection Fault. */
void gp_fault(int n, istate_t *istate)
{
if (TASK) {
count_t ver;
 
spinlock_lock(&TASK->lock);
ver = TASK->arch.iomapver;
spinlock_unlock(&TASK->lock);
 
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;
}
}
 
print_info_errcode(n, istate);
panic("general protection fault\n");
}