Changeset 2e9eae2 in mainline for genarch/src
- Timestamp:
- 2006-06-23T16:03:53Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 757551a3
- Parents:
- a832dd7
- Location:
- genarch/src
- Files:
-
- 3 edited
-
fb/fb.c (modified) (1 diff)
-
mm/as_pt.c (modified) (2 diffs)
-
mm/page_pt.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
genarch/src/fb/fb.c
ra832dd7 r2e9eae2 395 395 order = fnzb(pages-1)+1; 396 396 397 pfn_t frame = frame_alloc_rc(order,FRAME_ATOMIC,&rc); 398 if (!rc) 399 dbbuffer = (void *)PA2KA(PFN2ADDR(frame)); 400 else 397 dbbuffer = frame_alloc_rc(order,FRAME_ATOMIC | FRAME_KA, &rc); 398 if (!dbbuffer) 401 399 printf("Failed to allocate scroll buffer.\n"); 402 400 dboffset = 0; -
genarch/src/mm/as_pt.c
ra832dd7 r2e9eae2 74 74 ipl_t ipl; 75 75 76 dst_ptl0 = (pte_t *) PA2KA(PFN2ADDR(frame_alloc(ONE_FRAME, FRAME_KA | FRAME_PANIC)));76 dst_ptl0 = (pte_t *) frame_alloc(ONE_FRAME, FRAME_KA | FRAME_PANIC); 77 77 78 78 if (flags & FLAG_AS_KERNEL) { … … 109 109 void ptl0_destroy(pte_t *page_table) 110 110 { 111 frame_free( ADDR2PFN((__address) page_table));111 frame_free((__address)page_table); 112 112 } 113 113 -
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.
