Ignore:
File:
1 edited

Legend:

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

    rd99c1d2 rf1fc83a  
    5353        int flags = PAGE_CACHEABLE;
    5454        page_mapping_operations = &pt_mapping_operations;
     55
     56        page_table_lock(AS_KERNEL, true);
    5557       
    5658        uintptr_t cur;
    5759        /* Kernel identity mapping */
    58         for (cur = 0; cur < last_frame; cur += FRAME_SIZE)
     60        for (cur = PHYSMEM_START_ADDR; cur < last_frame; cur += FRAME_SIZE)
    5961                page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);
    6062       
     
    6668#error "Only high exception vector supported now"
    6769#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);
    6874       
    6975        as_switch(NULL, AS_KERNEL);
     
    9298        uintptr_t virtaddr = PA2KA(last_frame);
    9399        pfn_t i;
     100
     101        page_table_lock(AS_KERNEL, true);
    94102        for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++) {
    95103                page_mapping_insert(AS_KERNEL, virtaddr + PFN2ADDR(i),
     
    97105                    PAGE_NOT_CACHEABLE | PAGE_READ | PAGE_WRITE | PAGE_KERNEL);
    98106        }
     107        page_table_unlock(AS_KERNEL, true);
    99108       
    100109        last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE);
Note: See TracChangeset for help on using the changeset viewer.