Changes in kernel/generic/src/mm/page.c [8757be86:d4673296] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/page.c
r8757be86 rd4673296 84 84 } 85 85 86 /** Map memory structure 87 * 88 * Identity-map memory structure 89 * considering possible crossings 90 * of page boundaries. 91 * 92 * @param addr Address of the structure. 93 * @param size Size of the structure. 94 * 95 */ 96 void map_structure(uintptr_t addr, size_t size) 97 { 98 size_t length = size + (addr - (addr & ~(PAGE_SIZE - 1))); 99 size_t cnt = length / PAGE_SIZE + (length % PAGE_SIZE > 0); 100 101 size_t i; 102 for (i = 0; i < cnt; i++) 103 page_mapping_insert(AS_KERNEL, addr + i * PAGE_SIZE, 104 addr + i * PAGE_SIZE, PAGE_NOT_CACHEABLE | PAGE_WRITE); 105 106 /* Repel prefetched accesses to the old mapping. */ 107 memory_barrier(); 108 } 109 86 110 /** Insert mapping of page to frame. 87 111 *
Note:
See TracChangeset
for help on using the changeset viewer.