Changeset c2efbb4 in mainline for kernel/arch/abs32le/include/mm/page.h
- Timestamp:
- 2010-02-20T20:54:53Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 721d4e85, 95c4776
- Parents:
- f516bc2 (diff), b03a666 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/abs32le/include/mm/page.h
rf516bc2 rc2efbb4 43 43 #ifdef KERNEL 44 44 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 45 #define KA2PA(x) (((uintptr_t) (x)) - 0x80000000) 46 #define PA2KA(x) (((uintptr_t) (x)) + 0x80000000) 52 47 53 48 /* … … 122 117 #define PTE_EXECUTABLE_ARCH(p) 1 123 118 124 #ifndef __ASM__125 126 119 #include <mm/mm.h> 127 120 #include <arch/interrupt.h> … … 129 122 #include <typedefs.h> 130 123 131 /* Page fault error codes. */132 133 /** When bit on this position is 0, the page fault was caused by a not-present134 * 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 147 124 /** Page Table Entry. */ 148 125 typedef struct { 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; 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; 162 141 163 142 static inline unsigned int get_pt_flags(pte_t *pt, size_t i) … … 192 171 193 172 extern void page_arch_init(void); 194 extern void page_fault(int n, istate_t *istate); 195 196 #endif /* __ASM__ */ 173 extern void page_fault(int, istate_t *); 197 174 198 175 #endif /* KERNEL */
Note:
See TracChangeset
for help on using the changeset viewer.