Subversion Repositories HelenOS

Rev

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

Rev 4055 Rev 4156
Line 32... Line 32...
32
/** @file
32
/** @file
33
 *  @brief Page fault related functions.
33
 *  @brief Page fault related functions.
34
 */
34
 */
35
#include <panic.h>
35
#include <panic.h>
36
#include <arch/exception.h>
36
#include <arch/exception.h>
37
#include <arch/debug/print.h>
-
 
38
#include <arch/mm/page_fault.h>
37
#include <arch/mm/page_fault.h>
39
#include <mm/as.h>
38
#include <mm/as.h>
40
#include <genarch/mm/page_pt.h>
39
#include <genarch/mm/page_pt.h>
41
#include <arch.h>
40
#include <arch.h>
42
#include <interrupt.h>
41
#include <interrupt.h>
Line 180... Line 179...
180
 
179
 
181
    int ret = as_page_fault(badvaddr, access, istate);
180
    int ret = as_page_fault(badvaddr, access, istate);
182
 
181
 
183
    if (ret == AS_PF_FAULT) {
182
    if (ret == AS_PF_FAULT) {
184
        print_istate(istate);
183
        print_istate(istate);
185
        dprintf("page fault - pc: %x, va: %x, status: %x(%x), "
184
        printf("page fault - pc: %x, va: %x, status: %x(%x), "
186
            "access:%d\n", istate->pc, badvaddr, fsr.status, fsr,
185
            "access:%d\n", istate->pc, badvaddr, fsr.status, fsr,
187
            access);
186
            access);
188
 
187
       
189
        fault_if_from_uspace(istate, "Page fault: %#x.", badvaddr);
188
        fault_if_from_uspace(istate, "Page fault: %#x.", badvaddr);
190
        panic("Page fault.");
189
        panic("Page fault.");
191
    }
190
    }
192
}
191
}
193
 
192
 
Line 199... Line 198...
199
void prefetch_abort(int exc_no, istate_t *istate)
198
void prefetch_abort(int exc_no, istate_t *istate)
200
{
199
{
201
    int ret = as_page_fault(istate->pc, PF_ACCESS_EXEC, istate);
200
    int ret = as_page_fault(istate->pc, PF_ACCESS_EXEC, istate);
202
 
201
 
203
    if (ret == AS_PF_FAULT) {
202
    if (ret == AS_PF_FAULT) {
204
        dprintf("prefetch_abort\n");
203
        printf("prefetch_abort\n");
205
        print_istate(istate);
204
        print_istate(istate);
206
        panic("page fault - prefetch_abort at address: %x.",
205
        panic("page fault - prefetch_abort at address: %x.",
207
            istate->pc);
206
            istate->pc);
208
    }
207
    }
209
}
208
}