Changeset 6b781c0 in mainline for kernel/genarch/src/mm/as_pt.c
- Timestamp:
- 2007-06-08T15:02:49Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c03ee1c
- Parents:
- 3ee8a075
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/mm/as_pt.c
r3ee8a075 r6b781c0 98 98 pte_t *src_ptl0, *dst_ptl0; 99 99 ipl_t ipl; 100 int table_size; 100 101 101 dst_ptl0 = (pte_t *) frame_alloc(ONE_FRAME, FRAME_KA); 102 dst_ptl0 = (pte_t *) frame_alloc(PTL0_SIZE, FRAME_KA); 103 table_size = FRAME_SIZE << PTL0_SIZE; 102 104 103 105 if (flags & FLAG_AS_KERNEL) { 104 memsetb((uintptr_t) dst_ptl0, PAGE_SIZE, 0);106 memsetb((uintptr_t) dst_ptl0, table_size, 0); 105 107 } else { 106 108 uintptr_t src, dst; … … 117 119 dst = (uintptr_t) &dst_ptl0[PTL0_INDEX(KERNEL_ADDRESS_SPACE_START)]; 118 120 119 memsetb((uintptr_t) dst_ptl0, PAGE_SIZE, 0);120 memcpy((void *) dst, (void *) src, PAGE_SIZE- (src - (uintptr_t) src_ptl0));121 memsetb((uintptr_t) dst_ptl0, table_size, 0); 122 memcpy((void *) dst, (void *) src, table_size - (src - (uintptr_t) src_ptl0)); 121 123 mutex_unlock(&AS_KERNEL->lock); 122 124 interrupts_restore(ipl);
Note:
See TracChangeset
for help on using the changeset viewer.