Rev 977 | Rev 1423 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 977 | Rev 1411 | ||
---|---|---|---|
Line 88... | Line 88... | ||
88 | #include <mm/page.h> |
88 | #include <mm/page.h> |
89 | #include <arch/types.h> |
89 | #include <arch/types.h> |
90 | #include <arch/mm/frame.h> |
90 | #include <arch/mm/frame.h> |
91 | #include <typedefs.h> |
91 | #include <typedefs.h> |
92 | 92 | ||
- | 93 | /* Page fault error codes. */ |
|
- | 94 | ||
- | 95 | /** When bit on this position is 0, the page fault was caused by a not-present page. */ |
|
- | 96 | #define PFERR_CODE_P (1<<0) |
|
- | 97 | ||
- | 98 | /** When bit on this position is 1, the page fault was caused by a write. */ |
|
- | 99 | #define PFERR_CODE_RW (1<<1) |
|
- | 100 | ||
- | 101 | /** When bit on this position is 1, the page fault was caused in user mode. */ |
|
- | 102 | #define PFERR_CODE_US (1<<2) |
|
- | 103 | ||
- | 104 | /** When bit on this position is 1, a reserved bit was set in page directory. */ |
|
- | 105 | #define PFERR_CODE_RSVD (1<<3) |
|
- | 106 | ||
93 | /** Page Table Entry. */ |
107 | /** Page Table Entry. */ |
94 | struct page_specifier { |
108 | struct page_specifier { |
95 | unsigned present : 1; |
109 | unsigned present : 1; |
96 | unsigned writeable : 1; |
110 | unsigned writeable : 1; |
97 | unsigned uaccessible : 1; |
111 | unsigned uaccessible : 1; |
Line 136... | Line 150... | ||
136 | */ |
150 | */ |
137 | p->soft_valid = true; |
151 | p->soft_valid = true; |
138 | } |
152 | } |
139 | 153 | ||
140 | extern void page_arch_init(void); |
154 | extern void page_arch_init(void); |
- | 155 | extern void page_fault(int n, istate_t *istate); |
|
141 | 156 | ||
142 | #endif /* __ASM__ */ |
157 | #endif /* __ASM__ */ |
143 | 158 | ||
144 | #endif /* KERNEL */ |
159 | #endif /* KERNEL */ |
145 | 160 |