Changeset 0d8269b in mainline
- Timestamp:
- 2012-07-01T22:19:49Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 609a417
- Parents:
- 9432f08
- Location:
- kernel
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/abs32le/include/mm/page.h
r9432f08 r0d8269b 105 105 set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x)) 106 106 107 /* Set PTE present bit accessors for each level. */ 108 #define SET_PTL1_PRESENT_ARCH(ptl0, i) \ 109 set_pt_present((pte_t *) (ptl0), (size_t) (i)) 110 #define SET_PTL2_PRESENT_ARCH(ptl1, i) 111 #define SET_PTL3_PRESENT_ARCH(ptl2, i) 112 #define SET_FRAME_PRESENT_ARCH(ptl3, i) \ 113 set_pt_present((pte_t *) (ptl3), (size_t) (i)) 114 107 115 /* Macros for querying the last level entries. */ 108 116 #define PTE_VALID_ARCH(p) \ … … 173 181 } 174 182 183 NO_TRACE static inline void set_pt_present(pte_t *pt, size_t i) 184 WRITES(ARRAY_RANGE(pt, PTL0_ENTRIES_ARCH)) 185 REQUIRES_ARRAY_MUTABLE(pt, PTL0_ENTRIES_ARCH) 186 { 187 pte_t *p = &pt[i]; 188 189 p->present = 1; 190 } 191 175 192 extern void page_arch_init(void); 176 193 extern void page_fault(unsigned int, istate_t *); -
kernel/arch/amd64/include/mm/page.h
r9432f08 r0d8269b 119 119 set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x)) 120 120 121 /* Set PTE present bit accessors for each level. */ 122 #define SET_PTL1_PRESENT_ARCH(ptl0, i) \ 123 set_pt_present((pte_t *) (ptl0), (size_t) (i)) 124 #define SET_PTL2_PRESENT_ARCH(ptl1, i) \ 125 set_pt_present((pte_t *) (ptl1), (size_t) (i)) 126 #define SET_PTL3_PRESENT_ARCH(ptl2, i) \ 127 set_pt_present((pte_t *) (ptl2), (size_t) (i)) 128 #define SET_FRAME_PRESENT_ARCH(ptl3, i) \ 129 set_pt_present((pte_t *) (ptl3), (size_t) (i)) 130 121 131 /* Macros for querying the last-level PTE entries. */ 122 132 #define PTE_VALID_ARCH(p) \ … … 215 225 } 216 226 227 NO_TRACE static inline void set_pt_present(pte_t *pt, size_t i) 228 { 229 pte_t *p = &pt[i]; 230 231 p->present = 1; 232 } 233 217 234 extern void page_arch_init(void); 218 235 extern void page_fault(unsigned int, istate_t *); -
kernel/arch/arm32/include/mm/page.h
r9432f08 r0d8269b 40 40 #include <mm/mm.h> 41 41 #include <arch/exception.h> 42 #include <arch/barrier.h> 42 43 #include <trace.h> 43 44 … … 109 110 #define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \ 110 111 set_pt_level1_flags((pte_t *) (ptl3), (size_t) (i), (x)) 112 113 /* Set PTE present bit accessors for each level. */ 114 #define SET_PTL1_PRESENT_ARCH(ptl0, i) \ 115 set_pt_level0_present((pte_t *) (ptl0), (size_t) (i)) 116 #define SET_PTL2_PRESENT_ARCH(ptl1, i) 117 #define SET_PTL3_PRESENT_ARCH(ptl2, i) 118 #define SET_FRAME_PRESENT_ARCH(ptl3, i) \ 119 set_pt_level1_present((pte_t *) (ptl3), (size_t) (i)) 111 120 112 121 /* Macros for querying the last-level PTE entries. */ … … 267 276 } 268 277 278 NO_TRACE static inline void set_pt_level0_present(pte_t *pt, size_t i) 279 { 280 pte_level0_t *p = &pt[i].l0; 281 282 p->should_be_zero = 0; 283 write_barrier(); 284 p->descriptor_type = PTE_DESCRIPTOR_COARSE_TABLE; 285 } 269 286 270 287 /** Sets flags of level 1 page table entry. … … 283 300 pte_level1_t *p = &pt[i].l1; 284 301 285 if (flags & PAGE_NOT_PRESENT) {302 if (flags & PAGE_NOT_PRESENT) 286 303 p->descriptor_type = PTE_DESCRIPTOR_NOT_PRESENT; 287 p->access_permission_3 = 1; 288 } else { 304 else 289 305 p->descriptor_type = PTE_DESCRIPTOR_SMALL_PAGE; 290 p->access_permission_3 = p->access_permission_0;291 }292 306 293 307 p->cacheable = p->bufferable = (flags & PAGE_CACHEABLE) != 0; … … 312 326 } 313 327 314 328 NO_TRACE static inline void set_pt_level1_present(pte_t *pt, size_t i) 329 { 330 pte_level1_t *p = &pt[i].l1; 331 332 p->descriptor_type = PTE_DESCRIPTOR_SMALL_PAGE; 333 } 334 315 335 extern void page_arch_init(void); 316 336 317 318 337 #endif /* __ASM__ */ 319 338 -
kernel/arch/ia32/include/mm/page.h
r9432f08 r0d8269b 115 115 set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x)) 116 116 117 /* Set PTE present bit accessors for each level. */ 118 #define SET_PTL1_PRESENT_ARCH(ptl0, i) \ 119 set_pt_present((pte_t *) (ptl0), (size_t) (i)) 120 #define SET_PTL2_PRESENT_ARCH(ptl1, i) 121 #define SET_PTL3_PRESENT_ARCH(ptl2, i) 122 #define SET_FRAME_PRESENT_ARCH(ptl3, i) \ 123 set_pt_present((pte_t *) (ptl3), (size_t) (i)) 124 117 125 /* Macros for querying the last level entries. */ 118 126 #define PTE_VALID_ARCH(p) \ … … 194 202 } 195 203 204 NO_TRACE static inline void set_pt_present(pte_t *pt, size_t i) 205 { 206 pte_t *p = &pt[i]; 207 208 p->present = 1; 209 } 210 196 211 extern void page_arch_init(void); 197 212 extern void page_fault(unsigned int, istate_t *); -
kernel/arch/mips32/include/mm/page.h
r9432f08 r0d8269b 128 128 set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x)) 129 129 130 /* Set PTE present bit accessors for each level. */ 131 #define SET_PTL1_PRESENT_ARCH(ptl0, i) \ 132 set_pt_present((pte_t *) (ptl0), (size_t) (i)) 133 #define SET_PTL2_PRESENT_ARCH(ptl1, i) 134 #define SET_PTL3_PRESENT_ARCH(ptl2, i) 135 #define SET_FRAME_PRESENT_ARCH(ptl3, i) \ 136 set_pt_present((pte_t *) (ptl3), (size_t) (i)) 137 130 138 /* Last-level info macros. */ 131 139 #define PTE_VALID_ARCH(pte) (*((uint32_t *) (pte)) != 0) … … 182 190 } 183 191 192 NO_TRACE static inline void set_pt_present(pte_t *pt, size_t i) 193 { 194 pte_t *p = &pt[i]; 195 196 p->p = 1; 197 } 198 199 184 200 extern void page_arch_init(void); 185 201 -
kernel/arch/ppc32/include/mm/page.h
r9432f08 r0d8269b 128 128 #define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \ 129 129 set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x)) 130 131 /* Set PTE present accessors for each level. */ 132 #define SET_PTL1_PRESENT_ARCH(ptl0, i) \ 133 set_pt_present((pte_t *) (ptl0), (size_t) (i)) 134 135 #define SET_PTL2_PRESENT_ARCH(ptl1, i) 136 #define SET_PTL3_PRESENT_ARCH(ptl2, i) 137 138 #define SET_FRAME_PRESENT_ARCH(ptl3, i) \ 139 set_pt_present((pte_t *) (ptl3), (size_t) (i)) 130 140 131 141 /* Macros for querying the last-level PTEs. */ … … 175 185 } 176 186 187 NO_TRACE static inline void set_pt_present(pte_t *pt, size_t i) 188 { 189 pte_t *entry = &pt[i]; 190 191 entry->present = 1; 192 } 193 177 194 extern void page_arch_init(void); 178 195 -
kernel/genarch/include/mm/page_pt.h
r9432f08 r0d8269b 115 115 116 116 /* 117 * These macros are provided to set the present bit within the page tables. 118 * 119 */ 120 #define SET_PTL1_PRESENT(ptl0, i) SET_PTL1_PRESENT_ARCH(ptl0, i) 121 #define SET_PTL2_PRESENT(ptl1, i) SET_PTL2_PRESENT_ARCH(ptl1, i) 122 #define SET_PTL3_PRESENT(ptl2, i) SET_PTL3_PRESENT_ARCH(ptl2, i) 123 #define SET_FRAME_PRESENT(ptl3, i) SET_FRAME_PRESENT_ARCH(ptl3, i) 124 125 /* 117 126 * Macros for querying the last-level PTEs. 118 127 *
Note:
See TracChangeset
for help on using the changeset viewer.