Changeset 029e3cc in mainline for boot/arch/arm32/src/mm.c
- Timestamp:
- 2013-01-01T11:44:47Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4a46ccc
- Parents:
- a4afc8d (diff), b5a3b50 (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
-
boot/arch/arm32/src/mm.c
ra4afc8d r029e3cc 38 38 #include <arch/mm.h> 39 39 40 /** Check if caching can be enabled for a given memory section. 41 * 42 * Memory areas used for I/O are excluded from caching. 43 * At the moment caching is enabled only on GTA02. 44 * 45 * @param section The section number. 46 * 47 * @return 1 if the given section can be mapped as cacheable, 0 otherwise. 48 */ 49 static inline int section_cacheable(pfn_t section) 50 { 51 #ifdef MACHINE_gta02 52 unsigned long address = section << PTE_SECTION_SHIFT; 53 54 if (address >= GTA02_IOMEM_START && address < GTA02_IOMEM_END) 55 return 0; 56 else 57 return 1; 58 #else 59 return 0; 60 #endif 61 } 62 40 63 /** Initialize "section" page table entry. 41 64 * … … 55 78 pte->descriptor_type = PTE_DESCRIPTOR_SECTION; 56 79 pte->bufferable = 1; 57 pte->cacheable = 0;80 pte->cacheable = section_cacheable(frame); 58 81 pte->xn = 0; 59 82 pte->domain = 0; … … 130 153 "ldr r1, =0x00000805\n" 131 154 #else 155 #ifdef MACHINE_gta02 156 /* Mask to enable paging (bit 0), 157 D-cache (bit 2), I-cache (bit 12) */ 158 "ldr r1, =0x00001005\n" 159 #else 132 160 /* Mask to enable paging and branch prediction */ 133 161 "ldr r1, =0x00000801\n" 162 #endif 134 163 #endif 135 164 "orr r0, r0, r1\n"
Note:
See TracChangeset
for help on using the changeset viewer.