Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 3a2b636 in mainline


Ignore:
Timestamp:
2010-05-31T20:28:52Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
1d432f9
Parents:
b0b2ac1
Message:

Lock the page tables before working with them on arm32.

File:
1 edited

Legend:

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

    rb0b2ac1 r3a2b636  
    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;
     
    6668#error "Only high exception vector supported now"
    6769#endif
     70
     71        page_table_unlock(AS_KERNEL, true);
    6872       
    6973        as_switch(NULL, AS_KERNEL);
     
    9296        uintptr_t virtaddr = PA2KA(last_frame);
    9397        pfn_t i;
     98
     99        page_table_lock(AS_KERNEL, true);
    94100        for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++) {
    95101                page_mapping_insert(AS_KERNEL, virtaddr + PFN2ADDR(i),
     
    97103                    PAGE_NOT_CACHEABLE | PAGE_READ | PAGE_WRITE | PAGE_KERNEL);
    98104        }
     105        page_table_unlock(AS_KERNEL, true);
    99106       
    100107        last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE);
Note: See TracChangeset for help on using the changeset viewer.