Changes in kernel/genarch/src/mm/page_pt.c [e943ecf:caed0279] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/mm/page_pt.c
re943ecf rcaed0279 43 43 #include <arch/mm/page.h> 44 44 #include <arch/mm/as.h> 45 #include <arch/barrier.h>46 45 #include <typedefs.h> 47 46 #include <arch/asm.h> … … 87 86 SET_PTL1_ADDRESS(ptl0, PTL0_INDEX(page), KA2PA(newpt)); 88 87 SET_PTL1_FLAGS(ptl0, PTL0_INDEX(page), 89 PAGE_ NOT_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE |88 PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE | 90 89 PAGE_WRITE); 91 write_barrier();92 SET_PTL1_PRESENT(ptl0, PTL0_INDEX(page));93 90 } 94 91 … … 101 98 SET_PTL2_ADDRESS(ptl1, PTL1_INDEX(page), KA2PA(newpt)); 102 99 SET_PTL2_FLAGS(ptl1, PTL1_INDEX(page), 103 PAGE_ NOT_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE |100 PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE | 104 101 PAGE_WRITE); 105 write_barrier();106 SET_PTL2_PRESENT(ptl1, PTL1_INDEX(page));107 102 } 108 103 … … 115 110 SET_PTL3_ADDRESS(ptl2, PTL2_INDEX(page), KA2PA(newpt)); 116 111 SET_PTL3_FLAGS(ptl2, PTL2_INDEX(page), 117 PAGE_ NOT_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE |112 PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE | 118 113 PAGE_WRITE); 119 write_barrier();120 SET_PTL3_PRESENT(ptl2, PTL2_INDEX(page));121 114 } 122 115 … … 124 117 125 118 SET_FRAME_ADDRESS(ptl3, PTL3_INDEX(page), frame); 126 SET_FRAME_FLAGS(ptl3, PTL3_INDEX(page), flags | PAGE_NOT_PRESENT); 127 write_barrier(); 128 SET_FRAME_PRESENT(ptl3, PTL3_INDEX(page)); 119 SET_FRAME_FLAGS(ptl3, PTL3_INDEX(page), flags); 129 120 } 130 121 … … 288 279 if (GET_PTL1_FLAGS(ptl0, PTL0_INDEX(page)) & PAGE_NOT_PRESENT) 289 280 return NULL; 290 291 read_barrier();292 281 293 282 pte_t *ptl1 = (pte_t *) PA2KA(GET_PTL1_ADDRESS(ptl0, PTL0_INDEX(page))); 294 283 if (GET_PTL2_FLAGS(ptl1, PTL1_INDEX(page)) & PAGE_NOT_PRESENT) 295 284 return NULL; 296 297 #if (PTL1_ENTRIES != 0)298 read_barrier();299 #endif300 285 301 286 pte_t *ptl2 = (pte_t *) PA2KA(GET_PTL2_ADDRESS(ptl1, PTL1_INDEX(page))); 302 287 if (GET_PTL3_FLAGS(ptl2, PTL2_INDEX(page)) & PAGE_NOT_PRESENT) 303 288 return NULL; 304 305 #if (PTL2_ENTRIES != 0)306 read_barrier();307 #endif308 289 309 290 pte_t *ptl3 = (pte_t *) PA2KA(GET_PTL3_ADDRESS(ptl2, PTL2_INDEX(page))); … … 365 346 SET_PTL1_ADDRESS(ptl0, PTL0_INDEX(addr), KA2PA(l1)); 366 347 SET_PTL1_FLAGS(ptl0, PTL0_INDEX(addr), 367 PAGE_PRESENT | PAGE_USER | PAGE_ CACHEABLE |368 PAGE_ EXEC | PAGE_WRITE | PAGE_READ);348 PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE | 349 PAGE_WRITE); 369 350 } 370 351 }
Note:
See TracChangeset
for help on using the changeset viewer.