Changes in kernel/genarch/src/mm/as_pt.c [9d58539:f18d01b6] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/mm/as_pt.c
r9d58539 rf18d01b6 73 73 pte_t *ptl0_create(unsigned int flags) 74 74 { 75 pte_t *dst_ptl0 = (pte_t *) frame_alloc(PTL0_SIZE, 76 FRAME_LOWMEM | FRAME_KA); 77 size_t table_size = FRAME_SIZE << PTL0_SIZE; 75 pte_t *dst_ptl0 = (pte_t *) 76 PA2KA(frame_alloc(PTL0_FRAMES, FRAME_LOWMEM, PTL0_SIZE - 1)); 78 77 79 78 if (flags & FLAG_AS_KERNEL) 80 memsetb(dst_ptl0, table_size, 0);79 memsetb(dst_ptl0, PTL0_SIZE, 0); 81 80 else { 82 81 /* 83 82 * Copy the kernel address space portion to new PTL0. 84 *85 83 */ 86 84 … … 95 93 &dst_ptl0[PTL0_INDEX(KERNEL_ADDRESS_SPACE_START)]; 96 94 97 memsetb(dst_ptl0, table_size, 0);95 memsetb(dst_ptl0, PTL0_SIZE, 0); 98 96 memcpy((void *) dst, (void *) src, 99 table_size- (src - (uintptr_t) src_ptl0));97 PTL0_SIZE - (src - (uintptr_t) src_ptl0)); 100 98 101 99 mutex_unlock(&AS_KERNEL->lock); … … 114 112 void ptl0_destroy(pte_t *page_table) 115 113 { 116 frame_free((uintptr_t) page_table );114 frame_free((uintptr_t) page_table, PTL0_FRAMES); 117 115 } 118 116
Note:
See TracChangeset
for help on using the changeset viewer.