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

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [test_suite0/] [include/] [fault.h] - Blame information for rev 5

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
#ifndef __FAULT_H__
2
#define __FAULT_H__
3
 
4
#include <l4/macros.h>
5
#include <l4/types.h>
6
#include INC_GLUE(memory.h)
7
#include INC_ARCH(exception.h)
8
 
9
/* Protection flags */
10
#define VM_NONE                         (1 << 0)
11
#define VM_READ                         (1 << 1)
12
#define VM_EXEC                         (1 << 2)
13
#define VM_WRITE                        (1 << 3)
14
#define VM_PROT_MASK                    (VM_READ | VM_WRITE | VM_EXEC)
15
 
16
/* Shared copy of a file */
17
#define VMA_SHARED                      (1 << 4)
18
/* VMA that's not file-backed, always maps devzero as VMA_COW */
19
#define VMA_ANONYMOUS                   (1 << 5)
20
/* Private copy of a file */
21
#define VMA_PRIVATE                     (1 << 6)
22
/* For wired pages */
23
#define VMA_FIXED                       (1 << 7)
24
/* For stack, where mmap returns end address */
25
#define VMA_GROWSDOWN                   (1 << 8)
26
 
27
/* Set when the page is dirty in cache but not written to disk */
28
#define VM_DIRTY                        (1 << 9)
29
 
30
/* Fault data specific to this task + ptr to kernel's data */
31
struct fault_data {
32
        fault_kdata_t *kdata;           /* Generic data forged by the kernel */
33
        unsigned int reason;            /* Generic fault reason flags */
34
        unsigned int address;           /* Aborted address */
35
        unsigned int pte_flags;         /* Generic protection flags on pte */
36
        l4id_t sender;                  /* Inittask-related fault data */
37
};
38
 
39
 
40
void set_generic_fault_params(struct fault_data *fault);
41
void arch_print_fault_params(struct fault_data *fault);
42
void fault_handle_error(struct fault_data *fault);
43
 
44
#endif /* __FAULT_H__ */

powered by: WebSVN 2.1.0

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