Changes in kernel/arch/abs32le/include/mm/page.h [fb52db8:50fda24] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/abs32le/include/mm/page.h
rfb52db8 r50fda24 43 43 #ifdef KERNEL 44 44 45 #define KA2PA(x) (((uintptr_t) (x)) - 0x80000000) 46 #define PA2KA(x) (((uintptr_t) (x)) + 0x80000000) 45 #ifndef __ASM__ 46 #define KA2PA(x) (((uintptr_t) (x)) - 0x80000000) 47 #define PA2KA(x) (((uintptr_t) (x)) + 0x80000000) 48 #else 49 #define KA2PA(x) ((x) - 0x80000000) 50 #define PA2KA(x) ((x) + 0x80000000) 51 #endif 47 52 48 53 /* … … 117 122 #define PTE_EXECUTABLE_ARCH(p) 1 118 123 124 #ifndef __ASM__ 125 119 126 #include <mm/mm.h> 120 127 #include <arch/interrupt.h> … … 122 129 #include <typedefs.h> 123 130 131 /* Page fault error codes. */ 132 133 /** When bit on this position is 0, the page fault was caused by a not-present 134 * page. 135 */ 136 #define PFERR_CODE_P (1 << 0) 137 138 /** When bit on this position is 1, the page fault was caused by a write. */ 139 #define PFERR_CODE_RW (1 << 1) 140 141 /** When bit on this position is 1, the page fault was caused in user mode. */ 142 #define PFERR_CODE_US (1 << 2) 143 144 /** When bit on this position is 1, a reserved bit was set in page directory. */ 145 #define PFERR_CODE_RSVD (1 << 3) 146 124 147 /** Page Table Entry. */ 125 148 typedef struct { 126 unsigned int present : 1; 127 unsigned int writeable : 1; 128 unsigned int uaccessible : 1; 129 unsigned int page_write_through : 1; 130 unsigned int page_cache_disable : 1; 131 unsigned int accessed : 1; 132 unsigned int dirty : 1; 133 unsigned int pat : 1; 134 unsigned int global : 1; 135 136 /** Valid content even if the present bit is not set. */ 137 unsigned int soft_valid : 1; 138 unsigned int avl : 2; 139 unsigned int frame_address : 20; 140 } __attribute__((packed)) pte_t; 149 unsigned present : 1; 150 unsigned writeable : 1; 151 unsigned uaccessible : 1; 152 unsigned page_write_through : 1; 153 unsigned page_cache_disable : 1; 154 unsigned accessed : 1; 155 unsigned dirty : 1; 156 unsigned pat : 1; 157 unsigned global : 1; 158 unsigned soft_valid : 1; /**< Valid content even if the present bit is not set. */ 159 unsigned avl : 2; 160 unsigned frame_address : 20; 161 } __attribute__ ((packed)) pte_t; 141 162 142 163 static inline unsigned int get_pt_flags(pte_t *pt, size_t i) … … 171 192 172 193 extern void page_arch_init(void); 173 extern void page_fault(int, istate_t *); 194 extern void page_fault(int n, istate_t *istate); 195 196 #endif /* __ASM__ */ 174 197 175 198 #endif /* KERNEL */
Note:
See TracChangeset
for help on using the changeset viewer.