Subversion Repositories HelenOS-historic

Rev

Rev 1221 | Rev 1258 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1221 Rev 1256
Line 38... Line 38...
38
#include <mm/tlb.h>
38
#include <mm/tlb.h>
39
#include <mm/as.h>
39
#include <mm/as.h>
40
#include <arch.h>
40
#include <arch.h>
41
#include <symtab.h>
41
#include <symtab.h>
42
#include <proc/thread.h>
42
#include <proc/thread.h>
-
 
43
#include <proc/task.h>
-
 
44
#include <synch/spinlock.h>
-
 
45
#include <arch/ddi/ddi.h>
43
 
46
 
44
/*
47
/*
45
 * Interrupt and exception dispatching.
48
 * Interrupt and exception dispatching.
46
 */
49
 */
47
 
50
 
Line 76... Line 79...
76
{
79
{
77
    PRINT_INFO_ERRCODE(istate);
80
    PRINT_INFO_ERRCODE(istate);
78
    panic("unserviced interrupt: %d\n", n);
81
    panic("unserviced interrupt: %d\n", n);
79
}
82
}
80
 
83
 
-
 
84
/** General Protection Fault. */
81
void gp_fault(int n, istate_t *istate)
85
void gp_fault(int n, istate_t *istate)
82
{
86
{
-
 
87
    if (TASK) {
-
 
88
        count_t ver;
-
 
89
       
-
 
90
        spinlock_lock(&TASK->lock);
-
 
91
        ver = TASK->arch.iomapver;
-
 
92
        spinlock_unlock(&TASK->lock);
-
 
93
   
-
 
94
        if (CPU->arch.iomapver_copy != ver) {
-
 
95
            /*
-
 
96
             * This fault can be caused by an early access
-
 
97
             * to I/O port because of an out-dated
-
 
98
             * I/O Permission bitmap installed on CPU.
-
 
99
             * Install the fresh copy and restart
-
 
100
             * the instruction.
-
 
101
             */
-
 
102
            io_perm_bitmap_install();
-
 
103
            return;
-
 
104
        }
-
 
105
    }
-
 
106
 
83
    PRINT_INFO_ERRCODE(istate);
107
    PRINT_INFO_ERRCODE(istate);
84
    panic("general protection fault\n");
108
    panic("general protection fault\n");
85
}
109
}
86
 
110
 
87
void ss_fault(int n, istate_t *istate)
111
void ss_fault(int n, istate_t *istate)