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


Ignore:
Timestamp:
2013-12-25T22:54:29Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b51cf2c
Parents:
f7a33de (diff), ac36aed (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes

File:
1 edited

Legend:

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

    rf7a33de r0c2d9bb  
    7373pte_t *ptl0_create(unsigned int flags)
    7474{
    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));
    7877       
    7978        if (flags & FLAG_AS_KERNEL)
    80                 memsetb(dst_ptl0, table_size, 0);
     79                memsetb(dst_ptl0, PTL0_SIZE, 0);
    8180        else {
    8281                /*
    8382                 * Copy the kernel address space portion to new PTL0.
    84                  *
    8583                 */
    8684               
     
    9593                    &dst_ptl0[PTL0_INDEX(KERNEL_ADDRESS_SPACE_START)];
    9694               
    97                 memsetb(dst_ptl0, table_size, 0);
     95                memsetb(dst_ptl0, PTL0_SIZE, 0);
    9896                memcpy((void *) dst, (void *) src,
    99                     table_size - (src - (uintptr_t) src_ptl0));
     97                    PTL0_SIZE - (src - (uintptr_t) src_ptl0));
    10098               
    10199                mutex_unlock(&AS_KERNEL->lock);
     
    114112void ptl0_destroy(pte_t *page_table)
    115113{
    116         frame_free((uintptr_t) page_table);
     114        frame_free((uintptr_t) page_table, PTL0_FRAMES);
    117115}
    118116
Note: See TracChangeset for help on using the changeset viewer.