Changeset b0b2ac1 in mainline for kernel/arch/amd64/src/mm/page.c


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

Lock the page tables before working with them on amd64.

File:
1 edited

Legend:

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

    r6e2bf29 rb0b2ac1  
    8888        if (config.cpu_active == 1) {
    8989                page_mapping_operations = &pt_mapping_operations;
     90
     91                page_table_lock(AS_KERNEL, true);
    9092
    9193                /*
     
    112114                }
    113115
     116                page_table_unlock(AS_KERNEL, true);
     117
    114118                exc_register(14, "page_fault", (iroutine) page_fault);
    115119                write_cr3((uintptr_t) AS_KERNEL->genarch.page_table);
     
    208212        uintptr_t virtaddr = PA2KA(last_frame);
    209213        pfn_t i;
     214
     215        page_table_lock(AS_KERNEL, true);
    210216        for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++)
    211217                page_mapping_insert(AS_KERNEL, virtaddr + PFN2ADDR(i), physaddr + PFN2ADDR(i), PAGE_NOT_CACHEABLE | PAGE_WRITE);
     218        page_table_unlock(AS_KERNEL, true);
    212219       
    213220        last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE);
Note: See TracChangeset for help on using the changeset viewer.