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


Ignore:
Timestamp:
2013-07-11T08:21:10Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
64e63ce1
Parents:
80445cf (diff), c8bb1633 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes

File:
1 edited

Legend:

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

    r80445cf r4c53333  
    7171        for (cur = 0; cur < min(config.identity_size, config.physmem_end);
    7272            cur += FRAME_SIZE) {
    73                 flags = PAGE_CACHEABLE | PAGE_WRITE;
    74                 if ((PA2KA(cur) >= config.base) &&
    75                     (PA2KA(cur) < config.base + config.kernel_size))
    76                         flags |= PAGE_GLOBAL;
     73                flags = PAGE_GLOBAL | PAGE_CACHEABLE | PAGE_WRITE | PAGE_READ;
    7774                page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);
    7875        }
     
    8784void page_fault(unsigned int n __attribute__((unused)), istate_t *istate)
    8885{
    89         uintptr_t page;
     86        uintptr_t badvaddr;
    9087        pf_access_t access;
    9188       
    92         page = read_cr2();
     89        badvaddr = read_cr2();
    9390               
    9491        if (istate->error_word & PFERR_CODE_RSVD)
     
    10097                access = PF_ACCESS_READ;
    10198       
    102         if (as_page_fault(page, access, istate) == AS_PF_FAULT) {
    103                 fault_if_from_uspace(istate, "Page fault: %#x.", page);
    104                 panic_memtrap(istate, access, page, NULL);
    105         }
     99        (void) as_page_fault(badvaddr, access, istate);
    106100}
    107101
Note: See TracChangeset for help on using the changeset viewer.