OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [posix/] [mm0/] [mm/] [arch/] [arm/] [mm.c] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
/*
2
 * Copyright (C) 2007 Bahadir Balban
3
 */
4
#include <task.h>
5
#include <vm_area.h>
6
#include <l4lib/exregs.h>
7
#include __INC_ARCH(mm.h)
8
 
9
#if defined(DEBUG_FAULT_HANDLING)
10
void arch_print_fault_params(struct fault_data *fault)
11
{
12
        printf("%s: Handling %s fault (%s abort) from %d. fault @ 0x%x, generic pte flags: 0x%x\n",
13
               __TASKNAME__, (fault->reason & VM_READ) ? "read" :
14
               (fault->reason & VM_WRITE) ? "write" : "exec",
15
               is_prefetch_abort(fault->kdata->fsr) ? "prefetch" : "data",
16
               fault->task->tid, fault->address, fault->pte_flags);
17
}
18
#else
19
void arch_print_fault_params(struct fault_data *fault) { }
20
#endif
21
 
22
 
23
void fault_handle_error(struct fault_data *fault)
24
{
25
        struct task_ids ids;
26
 
27
        /* Suspend the task */
28
        ids.tid = fault->task->tid;
29
        BUG_ON(l4_thread_control(THREAD_SUSPEND, &ids) < 0);
30
 
31
        BUG();
32
}
33
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.