Changeset 8f00329 in mainline for genarch/src/mm/page_pt.c
- Timestamp:
- 2006-02-09T21:59:31Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a3eeceb6
- Parents:
- bfb87df
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
genarch/src/mm/page_pt.c
rbfb87df r8f00329 39 39 40 40 static void pt_mapping_insert(as_t *as, __address page, __address frame, int flags); 41 static void pt_mapping_remove(as_t *as, __address page); 41 42 static pte_t *pt_mapping_find(as_t *as, __address page); 42 43 43 44 page_mapping_operations_t pt_mapping_operations = { 44 45 .mapping_insert = pt_mapping_insert, 46 .mapping_remove = pt_mapping_remove, 45 47 .mapping_find = pt_mapping_find 46 48 }; … … 96 98 } 97 99 100 /** Remove mapping of page from hierarchical page tables. 101 * 102 * Remove any mapping of 'page' within address space 'as'. 103 * TLB shootdown should follow in order to make effects of 104 * this call visible. 105 * 106 * The address space must be locked and interrupts must be disabled. 107 * 108 * @param as Address space to wich page belongs. 109 * @param page Virtual address of the page to be demapped. 110 */ 111 void pt_mapping_remove(as_t *as, __address page) 112 { 113 pte_t *ptl0, *ptl1, *ptl2, *ptl3; 114 115 ptl0 = (pte_t *) PA2KA((__address) as->page_table); 116 117 if (GET_PTL1_FLAGS(ptl0, PTL0_INDEX(page)) & PAGE_NOT_PRESENT) 118 return; 119 120 ptl1 = (pte_t *) PA2KA(GET_PTL1_ADDRESS(ptl0, PTL0_INDEX(page))); 121 122 if (GET_PTL2_FLAGS(ptl1, PTL1_INDEX(page)) & PAGE_NOT_PRESENT) 123 return; 124 125 ptl2 = (pte_t *) PA2KA(GET_PTL2_ADDRESS(ptl1, PTL1_INDEX(page))); 126 127 if (GET_PTL3_FLAGS(ptl2, PTL2_INDEX(page)) & PAGE_NOT_PRESENT) 128 return; 129 130 ptl3 = (pte_t *) PA2KA(GET_PTL3_ADDRESS(ptl2, PTL2_INDEX(page))); 131 132 /* Destroy the mapping. Setting to PAGE_NOT_PRESENT is not sufficient. */ 133 memsetb((__address) &ptl3[PTL3_INDEX(page)], sizeof(pte_t), 0); 134 } 135 98 136 /** Find mapping for virtual page in hierarchical page tables. 99 137 *
Note:
See TracChangeset
for help on using the changeset viewer.