Subversion Repositories HelenOS-historic

Rev

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

Rev 299 Rev 309
Line 36... Line 36...
36
#include <arch/asm.h>
36
#include <arch/asm.h>
37
#include <mm/tlb.h>
37
#include <mm/tlb.h>
38
#include <arch.h>
38
#include <arch.h>
39
#include <symtab.h>
39
#include <symtab.h>
40
#include <arch/asm.h>
40
#include <arch/asm.h>
41
 
-
 
-
 
41
#include <proc/scheduler.h>
42
 
42
 
43
 
43
 
44
static void messy_stack_trace(__native *stack)
44
static void messy_stack_trace(__native *stack)
45
{
45
{
46
    __native *upper_limit = (__native *)(((__native)get_stack_base()) + STACK_SIZE);
46
    __native *upper_limit = (__native *)(((__native)get_stack_base()) + STACK_SIZE);
Line 136... Line 136...
136
}
136
}
137
 
137
 
138
 
138
 
139
void nm_fault(__u8 n, __native stack[])
139
void nm_fault(__u8 n, __native stack[])
140
{
140
{
141
    reset_TS_flag();
-
 
142
    if (CPU->fpu_owner != NULL) {  
141
#ifdef FPU_LAZY     
143
        fpu_lazy_context_save(&CPU->fpu_owner->saved_fpu_context);
-
 
144
        /* don't prevent migration */
-
 
145
        CPU->fpu_owner->fpu_context_engaged=0;
-
 
146
    }
-
 
147
    if (THREAD->fpu_context_exists)
142
    scheduler_fpu_lazy_request();
148
        fpu_lazy_context_restore(&THREAD->saved_fpu_context);
-
 
149
    else {
143
#else
150
        fpu_init();
144
    panic("fpu fault");
151
        THREAD->fpu_context_exists=1;
-
 
152
    }
145
#endif
153
    CPU->fpu_owner=THREAD;
-
 
154
    THREAD->fpu_context_engaged = 1;
-
 
155
}
146
}
156
 
147
 
157
 
148
 
158
 
149
 
159
void page_fault(__u8 n, __native stack[])
150
void page_fault(__u8 n, __native stack[])