Changeset 6843a9c in mainline for kernel/arch/ppc32/src/mm/page.c


Ignore:
Timestamp:
2012-06-29T13:02:14Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
722912e
Parents:
ba72f2b (diff), 0bbd13e (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

Trivial conflicts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/src/mm/page.c

    rba72f2b r6843a9c  
    4646}
    4747
    48 uintptr_t hw_map(uintptr_t physaddr, size_t size)
    49 {
    50         if (last_frame + ALIGN_UP(size, PAGE_SIZE) >
    51             KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH))
    52                 panic("Unable to map physical memory %p (%zu bytes).",
    53                     (void *) physaddr, size);
    54        
    55         uintptr_t virtaddr = PA2KA(last_frame);
    56         pfn_t i;
    57         page_table_lock(AS_KERNEL, true);
    58         for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++)
    59                 page_mapping_insert(AS_KERNEL, virtaddr + PFN2ADDR(i),
    60                     physaddr + PFN2ADDR(i), PAGE_NOT_CACHEABLE | PAGE_WRITE);
    61         page_table_unlock(AS_KERNEL, true);
    62        
    63         last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE);
    64        
    65         return virtaddr;
    66 }
    67 
    6848/** @}
    6949 */
Note: See TracChangeset for help on using the changeset viewer.