Changeset e13ba75 in mainline
- Timestamp:
- 2013-08-06T22:46:12Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 46db5c51
- Parents:
- f9f758e
- Location:
- kernel/arch/arm32/include/arch/mm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/include/arch/mm/page.h
rf9f758e re13ba75 95 95 /* Set PTE address accessors for each level. */ 96 96 #define SET_PTL0_ADDRESS_ARCH(ptl0) \ 97 (set_ptl0_addr((pte_t *) (ptl0)))97 set_ptl0_addr((pte_t *) (ptl0)) 98 98 #define SET_PTL1_ADDRESS_ARCH(ptl0, i, a) \ 99 (((pte_t *) (ptl0))[(i)].l0.coarse_table_addr = (a) >> 10)99 set_ptl1_addr((pte_t*) (ptl0), i, a) 100 100 #define SET_PTL2_ADDRESS_ARCH(ptl1, i, a) 101 101 #define SET_PTL3_ADDRESS_ARCH(ptl2, i, a) 102 102 #define SET_FRAME_ADDRESS_ARCH(ptl3, i, a) \ 103 (((pte_t *) (ptl3))[(i)].l1.frame_base_addr = (a) >> 12)103 set_ptl3_addr((pte_t*) (ptl3), i, a) 104 104 105 105 /* Get PTE flags accessors for each level. */ -
kernel/arch/arm32/include/arch/mm/page_armv4.h
rf9f758e re13ba75 131 131 { 132 132 TTBR0_write((uint32_t)pt); 133 } 134 135 NO_TRACE static inline void set_ptl1_addr(pte_t *pt, size_t i, uintptr_t address) 136 { 137 pt[i].l0.coarse_table_addr = address >> 10; 138 } 139 140 NO_TRACE static inline void set_ptl3_addr(pte_t *pt, size_t i, uintptr_t address) 141 { 142 pt[i].l1.frame_base_addr = address >> 12; 133 143 } 134 144 -
kernel/arch/arm32/include/arch/mm/page_armv6.h
rf9f758e re13ba75 127 127 #define PTE_DESCRIPTOR_SMALL_PAGE_NX 3 128 128 129 130 //TODO: DCCMVAU should be enough but it does not work. 131 #define pt_coherence_m(pt, count) \ 132 do { \ 133 for (unsigned i = 0; i < count; ++i) \ 134 DCCMVAC_write((uintptr_t)(pt + i)); \ 135 read_barrier(); \ 136 } while (0) 137 #define pt_coherence(page) pt_coherence_m(page, 1) 138 129 139 /** Sets the address of level 0 page table. 130 140 * … … 135 145 { 136 146 TTBR0_write((uint32_t)pt); 147 } 148 149 NO_TRACE static inline void set_ptl1_addr(pte_t *pt, size_t i, uintptr_t address) 150 { 151 pt[i].l0.coarse_table_addr = address >> 10; 152 pt_coherence(&pt[i]); 153 } 154 155 NO_TRACE static inline void set_ptl3_addr(pte_t *pt, size_t i, uintptr_t address) 156 { 157 pt[i].l1.frame_base_addr = address >> 12; 158 pt_coherence(&pt[i]); 137 159 } 138 160 … … 205 227 p->ns = 0; 206 228 } 207 DCCMVAC_write((uint32_t)p); 208 //TODO: DCCMVAU should be enough but it does not work. 229 pt_coherence(p); 209 230 } 210 231 … … 269 290 p->access_permission_1 = PTE_AP1_RO; 270 291 } 271 DCCMVAC_write((uint32_t)p); 272 //TODO: DCCMVAU should be enough but it does not work. 292 pt_coherence(p); 273 293 } 274 294 … … 281 301 write_barrier(); 282 302 p->descriptor_type = PTE_DESCRIPTOR_COARSE_TABLE; 283 DCCMVAC_write((uint32_t)p); 284 //TODO: DCCMVAU should be enough but it does not work. 303 pt_coherence(p); 285 304 } 286 305 … … 290 309 291 310 p->descriptor_type = PTE_DESCRIPTOR_SMALL_PAGE; 292 DCCMVAC_write((uint32_t)p); 293 //TODO: DCCMVAU should be enough but it does not work. 311 pt_coherence(p); 294 312 } 295 313
Note:
See TracChangeset
for help on using the changeset viewer.