Subversion Repositories HelenOS-historic

Rev

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

Rev 1477 Rev 1595
Line 77... Line 77...
77
    printf("       %#x, %#x, %#x, %#x\n", istate->stack[4], istate->stack[5], istate->stack[6], istate->stack[7]);
77
    printf("       %#x, %#x, %#x, %#x\n", istate->stack[4], istate->stack[5], istate->stack[6], istate->stack[7]);
78
}
78
}
79
 
79
 
80
void null_interrupt(int n, istate_t *istate)
80
void null_interrupt(int n, istate_t *istate)
81
{
81
{
-
 
82
    fault_if_from_uspace(istate, "unserviced interrupt: %d", n);
-
 
83
 
82
    PRINT_INFO_ERRCODE(istate);
84
    PRINT_INFO_ERRCODE(istate);
83
    panic("unserviced interrupt: %d\n", n);
85
    panic("unserviced interrupt: %d\n", n);
84
}
86
}
85
 
87
 
86
/** General Protection Fault. */
88
/** General Protection Fault. */
Line 102... Line 104...
102
             * the instruction.
104
             * the instruction.
103
             */
105
             */
104
            io_perm_bitmap_install();
106
            io_perm_bitmap_install();
105
            return;
107
            return;
106
        }
108
        }
-
 
109
        fault_if_from_uspace(istate, "general protection fault");
107
    }
110
    }
108
 
111
 
109
    PRINT_INFO_ERRCODE(istate);
112
    PRINT_INFO_ERRCODE(istate);
110
    panic("general protection fault\n");
113
    panic("general protection fault\n");
111
}
114
}
112
 
115
 
113
void ss_fault(int n, istate_t *istate)
116
void ss_fault(int n, istate_t *istate)
114
{
117
{
-
 
118
    fault_if_from_uspace(istate, "stack fault");
-
 
119
 
115
    PRINT_INFO_ERRCODE(istate);
120
    PRINT_INFO_ERRCODE(istate);
116
    panic("stack fault\n");
121
    panic("stack fault\n");
117
}
122
}
118
 
123
 
119
void simd_fp_exception(int n, istate_t *istate)
124
void simd_fp_exception(int n, istate_t *istate)
120
{
125
{
121
 
-
 
122
    PRINT_INFO_ERRCODE(istate);
-
 
123
    __u32 mxcsr;
126
    __u32 mxcsr;
124
    asm
127
    asm
125
    (
128
    (
126
        "stmxcsr %0;\n"
129
        "stmxcsr %0;\n"
127
        :"=m"(mxcsr)
130
        :"=m"(mxcsr)
128
    );
131
    );
-
 
132
    fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR: %#zX",
-
 
133
                 (__native)mxcsr);
-
 
134
 
-
 
135
    PRINT_INFO_ERRCODE(istate);
129
    printf("MXCSR: %#zX\n",(__native)(mxcsr));
136
    printf("MXCSR: %#zX\n",(__native)(mxcsr));
130
    panic("SIMD FP exception(19)\n");
137
    panic("SIMD FP exception(19)\n");
131
}
138
}
132
 
139
 
133
void nm_fault(int n, istate_t *istate)
140
void nm_fault(int n, istate_t *istate)
134
{
141
{
135
#ifdef CONFIG_FPU_LAZY     
142
#ifdef CONFIG_FPU_LAZY     
136
    scheduler_fpu_lazy_request();
143
    scheduler_fpu_lazy_request();
137
#else
144
#else
-
 
145
    fault_if_from_uspace(istate, "fpu fault");
138
    panic("fpu fault");
146
    panic("fpu fault");
139
#endif
147
#endif
140
}
148
}
141
 
149
 
142
void syscall(int n, istate_t *istate)
150
void syscall(int n, istate_t *istate)