Changeset 6b781c0 in mainline for kernel/genarch/src/mm/as_pt.c


Ignore:
Timestamp:
2007-06-08T15:02:49Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c03ee1c
Parents:
3ee8a075
Message:

Merge arm32 into trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/mm/as_pt.c

    r3ee8a075 r6b781c0  
    9898        pte_t *src_ptl0, *dst_ptl0;
    9999        ipl_t ipl;
     100        int table_size;
    100101
    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;
    102104
    103105        if (flags & FLAG_AS_KERNEL) {
    104                 memsetb((uintptr_t) dst_ptl0, PAGE_SIZE, 0);
     106                memsetb((uintptr_t) dst_ptl0, table_size, 0);
    105107        } else {
    106108                uintptr_t src, dst;
     
    117119                dst = (uintptr_t) &dst_ptl0[PTL0_INDEX(KERNEL_ADDRESS_SPACE_START)];
    118120
    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));
    121123                mutex_unlock(&AS_KERNEL->lock);
    122124                interrupts_restore(ipl);
Note: See TracChangeset for help on using the changeset viewer.