Changeset 2e9eae2 in mainline for genarch/src/mm/page_pt.c
- Timestamp:
- 2006-06-23T16:03:53Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 757551a3
- Parents:
- a832dd7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
genarch/src/mm/page_pt.c
ra832dd7 r2e9eae2 72 72 { 73 73 pte_t *ptl0, *ptl1, *ptl2, *ptl3; 74 __addressnewpt;74 pte_t *newpt; 75 75 76 76 ptl0 = (pte_t *) PA2KA((__address) as->page_table); 77 77 78 78 if (GET_PTL1_FLAGS(ptl0, PTL0_INDEX(page)) & PAGE_NOT_PRESENT) { 79 newpt = PA2KA(PFN2ADDR(frame_alloc(ONE_FRAME, FRAME_KA)));80 memsetb( newpt, PAGE_SIZE, 0);79 newpt = (pte_t *)frame_alloc(ONE_FRAME, FRAME_KA); 80 memsetb((__address)newpt, PAGE_SIZE, 0); 81 81 SET_PTL1_ADDRESS(ptl0, PTL0_INDEX(page), KA2PA(newpt)); 82 82 SET_PTL1_FLAGS(ptl0, PTL0_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE | PAGE_WRITE); … … 86 86 87 87 if (GET_PTL2_FLAGS(ptl1, PTL1_INDEX(page)) & PAGE_NOT_PRESENT) { 88 newpt = PA2KA(PFN2ADDR(frame_alloc(ONE_FRAME, FRAME_KA)));89 memsetb( newpt, PAGE_SIZE, 0);88 newpt = (pte_t *)frame_alloc(ONE_FRAME, FRAME_KA); 89 memsetb((__address)newpt, PAGE_SIZE, 0); 90 90 SET_PTL2_ADDRESS(ptl1, PTL1_INDEX(page), KA2PA(newpt)); 91 91 SET_PTL2_FLAGS(ptl1, PTL1_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE | PAGE_WRITE); … … 95 95 96 96 if (GET_PTL3_FLAGS(ptl2, PTL2_INDEX(page)) & PAGE_NOT_PRESENT) { 97 newpt = PA2KA(PFN2ADDR(frame_alloc(ONE_FRAME, FRAME_KA)));98 memsetb( newpt, PAGE_SIZE, 0);97 newpt = (pte_t *)frame_alloc(ONE_FRAME, FRAME_KA); 98 memsetb((__address)newpt, PAGE_SIZE, 0); 99 99 SET_PTL3_ADDRESS(ptl2, PTL2_INDEX(page), KA2PA(newpt)); 100 100 SET_PTL3_FLAGS(ptl2, PTL2_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE | PAGE_WRITE); … … 166 166 * Release the frame and remove PTL3 pointer from preceding table. 167 167 */ 168 frame_free( ADDR2PFN(KA2PA((__address) ptl3)));168 frame_free(KA2PA((__address) ptl3)); 169 169 if (PTL2_ENTRIES) 170 170 memsetb((__address) &ptl2[PTL2_INDEX(page)], sizeof(pte_t), 0); … … 195 195 * Release the frame and remove PTL2 pointer from preceding table. 196 196 */ 197 frame_free( ADDR2PFN(KA2PA((__address) ptl2)));197 frame_free(KA2PA((__address) ptl2)); 198 198 if (PTL1_ENTRIES) 199 199 memsetb((__address) &ptl1[PTL1_INDEX(page)], sizeof(pte_t), 0); … … 224 224 * Release the frame and remove PTL1 pointer from preceding table. 225 225 */ 226 frame_free( ADDR2PFN(KA2PA((__address) ptl1)));226 frame_free(KA2PA((__address) ptl1)); 227 227 memsetb((__address) &ptl0[PTL0_INDEX(page)], sizeof(pte_t), 0); 228 228 }
Note:
See TracChangeset
for help on using the changeset viewer.