Changeset 43d6401 in mainline for kernel/arch/ppc32/src


Ignore:
Timestamp:
2009-01-29T18:24:40Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
917c427
Parents:
f817d3a
Message:

ppc32: add support for cache disable page access control

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/src/mm/tlb.c

    rf817d3a r43d6401  
    6767         */     
    6868        pte_t *pte = page_mapping_find(as, badvaddr);
    69         if ((pte) && (pte->p)) {
     69        if ((pte) && (pte->present)) {
    7070                /*
    7171                 * Mapping found in page tables.
     
    8989                        page_table_lock(as, lock);
    9090                        pte = page_mapping_find(as, badvaddr);
    91                         ASSERT((pte) && (pte->p));
     91                        ASSERT((pte) && (pte->present));
    9292                        *pfrc = 0;
    9393                        return pte;
     
    127127
    128128
    129 static void pht_insert(const uintptr_t vaddr, const pfn_t pfn)
     129static void pht_insert(const uintptr_t vaddr, const pte_t *pte)
    130130{
    131131        uint32_t page = (vaddr >> 12) & 0xffff;
     
    190190        phte[base + i].h = h;
    191191        phte[base + i].api = api;
    192         phte[base + i].rpn = pfn;
     192        phte[base + i].rpn = pte->pfn;
    193193        phte[base + i].r = 0;
    194194        phte[base + i].c = 0;
     195        phte[base + i].wimg = (pte->page_cache_disable ? WIMG_NO_CACHE : 0);
    195196        phte[base + i].pp = 2; // FIXME
    196197}
     
    264265        phte_physical[base + i].r = 0;
    265266        phte_physical[base + i].c = 0;
     267        phte_physical[base + i].wimg = 0;
    266268        phte_physical[base + i].pp = 2; // FIXME
    267269}
     
    319321        }
    320322       
    321         pte->a = 1; /* Record access to PTE */
    322         pht_insert(badvaddr, pte->pfn);
     323        pte->accessed = 1; /* Record access to PTE */
     324        pht_insert(badvaddr, pte);
    323325       
    324326        page_table_unlock(as, lock);
Note: See TracChangeset for help on using the changeset viewer.