Ignore:
File:
1 edited

Legend:

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

    r7e752b2 r00287cc  
    2727 */
    2828
    29 /** @addtogroup arm32mm
     29/** @addtogroup arm32mm 
    3030 * @{
    3131 */
     
    4141#include <arch/exception.h>
    4242#include <typedefs.h>
     43#include <arch/types.h>
    4344#include <interrupt.h>
    4445#include <arch/mm/frame.h>
     
    5354        int flags = PAGE_CACHEABLE;
    5455        page_mapping_operations = &pt_mapping_operations;
    55 
    56         page_table_lock(AS_KERNEL, true);
    5756       
    5857        uintptr_t cur;
    5958        /* Kernel identity mapping */
    60         for (cur = PHYSMEM_START_ADDR; cur < last_frame; cur += FRAME_SIZE)
     59        for (cur = 0; cur < last_frame; cur += FRAME_SIZE)
    6160                page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);
    6261       
     
    6867#error "Only high exception vector supported now"
    6968#endif
    70         cur = ALIGN_DOWN(0x50008010, FRAME_SIZE);
    71         page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);
    72 
    73         page_table_unlock(AS_KERNEL, true);
    7469       
    7570        as_switch(NULL, AS_KERNEL);
     
    9388            KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH)) {
    9489                panic("Unable to map physical memory %p (%d bytes).",
    95                     (void *) physaddr, size);
     90                    physaddr, size)
    9691        }
    9792       
    9893        uintptr_t virtaddr = PA2KA(last_frame);
    9994        pfn_t i;
    100 
    101         page_table_lock(AS_KERNEL, true);
    10295        for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++) {
    10396                page_mapping_insert(AS_KERNEL, virtaddr + PFN2ADDR(i),
     
    10598                    PAGE_NOT_CACHEABLE | PAGE_READ | PAGE_WRITE | PAGE_KERNEL);
    10699        }
    107         page_table_unlock(AS_KERNEL, true);
    108100       
    109101        last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE);
Note: See TracChangeset for help on using the changeset viewer.