Changeset 11e9061d in mainline
- Timestamp:
- 2008-06-11T19:00:55Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 80dabb8d
- Parents:
- f1fa2657
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/page.c
rf1fa2657 r11e9061d 46 46 #include <mm/as.h> 47 47 #include <mm/frame.h> 48 #include <arch/barrier.h> 48 49 #include <arch/types.h> 49 50 #include <arch/asm.h> … … 66 67 * of page boundaries. 67 68 * 68 * @param s 69 * @param size 69 * @param s Address of the structure. 70 * @param size Size of the structure. 70 71 */ 71 72 void map_structure(uintptr_t s, size_t size) … … 77 78 78 79 for (i = 0; i < cnt; i++) 79 page_mapping_insert(AS_KERNEL, s + i * PAGE_SIZE, s + i * PAGE_SIZE, PAGE_NOT_CACHEABLE | PAGE_WRITE); 80 page_mapping_insert(AS_KERNEL, s + i * PAGE_SIZE, 81 s + i * PAGE_SIZE, PAGE_NOT_CACHEABLE | PAGE_WRITE); 80 82 83 /* Repel prefetched accesses to the old mapping. */ 84 memory_barrier(); 81 85 } 82 86 … … 88 92 * The page table must be locked and interrupts must be disabled. 89 93 * 90 * @param as Address space to wich page belongs. 91 * @param page Virtual address of the page to be mapped. 92 * @param frame Physical address of memory frame to which the mapping is done. 93 * @param flags Flags to be used for mapping. 94 * @param as Address space to wich page belongs. 95 * @param page Virtual address of the page to be mapped. 96 * @param frame Physical address of memory frame to which the mapping is 97 * done. 98 * @param flags Flags to be used for mapping. 94 99 */ 95 100 void page_mapping_insert(as_t *as, uintptr_t page, uintptr_t frame, int flags) … … 99 104 100 105 page_mapping_operations->mapping_insert(as, page, frame, flags); 106 107 /* Repel prefetched accesses to the old mapping. */ 108 memory_barrier(); 101 109 } 102 110 … … 109 117 * The page table must be locked and interrupts must be disabled. 110 118 * 111 * @param as 112 * @param page 119 * @param as Address space to wich page belongs. 120 * @param page Virtual address of the page to be demapped. 113 121 */ 114 122 void page_mapping_remove(as_t *as, uintptr_t page) … … 118 126 119 127 page_mapping_operations->mapping_remove(as, page); 128 129 /* Repel prefetched accesses to the old mapping. */ 130 memory_barrier(); 120 131 } 121 132 … … 126 137 * The page table must be locked and interrupts must be disabled. 127 138 * 128 * @param as 129 * @param page 139 * @param as Address space to wich page belongs. 140 * @param page Virtual page. 130 141 * 131 * @return NULL if there is no such mapping; requested mapping otherwise. 142 * @return NULL if there is no such mapping; requested mapping 143 * otherwise. 132 144 */ 133 145 pte_t *page_mapping_find(as_t *as, uintptr_t page)
Note:
See TracChangeset
for help on using the changeset viewer.