Changeset e3ce39b in mainline for kernel/arch/ia32/src/mm/page.c


Ignore:
Timestamp:
2010-05-31T19:08:26Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6e2bf29
Parents:
a820bf7
Message:

Lock the page tables before working with them on ia32.

File:
1 edited

Legend:

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

    ra820bf7 re3ce39b  
    6161                 * PA2KA(identity) mapping for all frames until last_frame.
    6262                 */
     63                page_table_lock(AS_KERNEL, true);
    6364                for (cur = 0; cur < last_frame; cur += FRAME_SIZE) {
    6465                        flags = PAGE_CACHEABLE | PAGE_WRITE;
     
    6768                        page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);
    6869                }
     70                page_table_unlock(AS_KERNEL, true);
    6971               
    7072                exc_register(14, "page_fault", (iroutine) page_fault);
     
    8486        uintptr_t virtaddr = PA2KA(last_frame);
    8587        pfn_t i;
     88        page_table_lock(AS_KERNEL, true);
    8689        for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++) {
    8790                uintptr_t addr = PFN2ADDR(i);
    8891                page_mapping_insert(AS_KERNEL, virtaddr + addr, physaddr + addr, PAGE_NOT_CACHEABLE | PAGE_WRITE);
    8992        }
     93        page_table_unlock(AS_KERNEL, true);
    9094       
    9195        last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE);
Note: See TracChangeset for help on using the changeset viewer.