Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2071 | Rev 2089 | ||
---|---|---|---|
Line 119... | Line 119... | ||
119 | #define PTE_WRITABLE_ARCH(p) ((p)->writeable != 0) |
119 | #define PTE_WRITABLE_ARCH(p) ((p)->writeable != 0) |
120 | #define PTE_EXECUTABLE_ARCH(p) 1 |
120 | #define PTE_EXECUTABLE_ARCH(p) 1 |
121 | 121 | ||
122 | #ifndef __ASM__ |
122 | #ifndef __ASM__ |
123 | 123 | ||
124 | #include <mm/page.h> |
124 | #include <mm/mm.h> |
125 | #include <arch/types.h> |
- | |
126 | #include <arch/mm/frame.h> |
- | |
127 | #include <typedefs.h> |
- | |
128 | #include <arch/hypercall.h> |
125 | #include <arch/hypercall.h> |
- | 126 | #include <arch/interrupt.h> |
|
129 | 127 | ||
130 | /* Page fault error codes. */ |
128 | /* Page fault error codes. */ |
131 | 129 | ||
132 | /** When bit on this position is 0, the page fault was caused by a not-present page. */ |
130 | /** When bit on this position is 0, the page fault was caused by a not-present page. */ |
133 | #define PFERR_CODE_P (1 << 0) |
131 | #define PFERR_CODE_P (1 << 0) |
Line 139... | Line 137... | ||
139 | #define PFERR_CODE_US (1 << 2) |
137 | #define PFERR_CODE_US (1 << 2) |
140 | 138 | ||
141 | /** When bit on this position is 1, a reserved bit was set in page directory. */ |
139 | /** When bit on this position is 1, a reserved bit was set in page directory. */ |
142 | #define PFERR_CODE_RSVD (1 << 3) |
140 | #define PFERR_CODE_RSVD (1 << 3) |
143 | 141 | ||
144 | /** Page Table Entry. */ |
- | |
145 | struct page_specifier { |
- | |
146 | unsigned present : 1; |
- | |
147 | unsigned writeable : 1; |
- | |
148 | unsigned uaccessible : 1; |
- | |
149 | unsigned page_write_through : 1; |
- | |
150 | unsigned page_cache_disable : 1; |
- | |
151 | unsigned accessed : 1; |
- | |
152 | unsigned dirty : 1; |
- | |
153 | unsigned pat : 1; |
- | |
154 | unsigned global : 1; |
- | |
155 | unsigned soft_valid : 1; /**< Valid content even if the present bit is not set. */ |
- | |
156 | unsigned avl : 2; |
- | |
157 | unsigned frame_address : 20; |
- | |
158 | } __attribute__ ((packed)); |
- | |
159 | - | ||
160 | typedef struct { |
142 | typedef struct { |
161 | uint64_t ptr; /**< Machine address of PTE */ |
143 | uint64_t ptr; /**< Machine address of PTE */ |
162 | union { /**< New contents of PTE */ |
144 | union { /**< New contents of PTE */ |
163 | uint64_t val; |
145 | uint64_t val; |
164 | pte_t pte; |
146 | pte_t pte; |