Changeset ef67bab in mainline for genarch/src/mm/page_pt.c
- Timestamp:
- 2006-02-01T00:02:16Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 071a8ae6
- Parents:
- fc1e4f6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
genarch/src/mm/page_pt.c
rfc1e4f6 ref67bab 30 30 #include <mm/page.h> 31 31 #include <mm/frame.h> 32 #include <mm/as.h> 32 33 #include <arch/mm/page.h> 33 34 #include <arch/mm/as.h> … … 37 38 #include <memstr.h> 38 39 39 static void pt_mapping_insert(as_t *as, __address page, __address frame, int flags , __address root);40 static pte_t *pt_mapping_find(as_t *as, __address page , __address root);40 static void pt_mapping_insert(as_t *as, __address page, __address frame, int flags); 41 static pte_t *pt_mapping_find(as_t *as, __address page); 41 42 42 43 page_operations_t page_pt_operations = { … … 50 51 * using 'flags'. 51 52 * 52 * @param as Ignored. 53 * The address space must be locked and interrupts must be disabled. 54 * 55 * @param as Address space to wich page belongs. 53 56 * @param page Virtual address of the page to be mapped. 54 57 * @param frame Physical address of memory frame to which the mapping is done. 55 58 * @param flags Flags to be used for mapping. 56 * @param root Explicit PTL0 address.57 59 */ 58 void pt_mapping_insert(as_t *as, __address page, __address frame, int flags , __address root)60 void pt_mapping_insert(as_t *as, __address page, __address frame, int flags) 59 61 { 60 62 pte_t *ptl0, *ptl1, *ptl2, *ptl3; 61 63 __address newpt; 62 64 63 ptl0 = (pte_t *) PA2KA( root ? root : (__address) GET_PTL0_ADDRESS());65 ptl0 = (pte_t *) PA2KA((__address) as->page_table); 64 66 65 67 if (GET_PTL1_FLAGS(ptl0, PTL0_INDEX(page)) & PAGE_NOT_PRESENT) { … … 98 100 * Find mapping for virtual page. 99 101 * 100 * @param as Ignored. 102 * The address space must be locked and interrupts must be disabled. 103 * 104 * @param as Address space to which page belongs. 101 105 * @param page Virtual page. 102 * @param root PTL0 address if non-zero.103 106 * 104 107 * @return NULL if there is no such mapping; entry from PTL3 describing the mapping otherwise. 105 108 */ 106 pte_t *pt_mapping_find(as_t *as, __address page , __address root)109 pte_t *pt_mapping_find(as_t *as, __address page) 107 110 { 108 111 pte_t *ptl0, *ptl1, *ptl2, *ptl3; 109 112 110 ptl0 = (pte_t *) PA2KA( root ? root : (__address) GET_PTL0_ADDRESS());113 ptl0 = (pte_t *) PA2KA((__address) as->page_table); 111 114 112 115 if (GET_PTL1_FLAGS(ptl0, PTL0_INDEX(page)) & PAGE_NOT_PRESENT)
Note:
See TracChangeset
for help on using the changeset viewer.