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


Ignore:
Timestamp:
2013-09-11T18:09:18Z (11 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d5f774f6
Parents:
5759975a
Message:

allocate frames for the page tables on naturally aligned addresses

File:
1 edited

Legend:

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

    r5759975a rf18d01b6  
    7474{
    7575        pte_t *dst_ptl0 = (pte_t *)
    76             PA2KA(frame_alloc(PTL0_FRAMES, FRAME_LOWMEM, 0));
    77         size_t table_size = FRAMES2SIZE(PTL0_FRAMES);
     76            PA2KA(frame_alloc(PTL0_FRAMES, FRAME_LOWMEM, PTL0_SIZE - 1));
    7877       
    7978        if (flags & FLAG_AS_KERNEL)
    80                 memsetb(dst_ptl0, table_size, 0);
     79                memsetb(dst_ptl0, PTL0_SIZE, 0);
    8180        else {
    8281                /*
     
    9493                    &dst_ptl0[PTL0_INDEX(KERNEL_ADDRESS_SPACE_START)];
    9594               
    96                 memsetb(dst_ptl0, table_size, 0);
     95                memsetb(dst_ptl0, PTL0_SIZE, 0);
    9796                memcpy((void *) dst, (void *) src,
    98                     table_size - (src - (uintptr_t) src_ptl0));
     97                    PTL0_SIZE - (src - (uintptr_t) src_ptl0));
    9998               
    10099                mutex_unlock(&AS_KERNEL->lock);
Note: See TracChangeset for help on using the changeset viewer.