Changeset edebc15c in mainline for kernel/arch/mips32/src/mm/tlb.c


Ignore:
Timestamp:
2008-07-27T03:50:53Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4541ae4
Parents:
5e8ddf5
Message:

physical memory detection in MSIM (discontinous regions supported)
remove Sgi Indy (ARC) support — it was unmaintaned, untested for years and without uspace support

File:
1 edited

Legend:

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

    r5e8ddf5 redebc15c  
    5454static pte_t *find_mapping_and_check(uintptr_t badvaddr, int access, istate_t *istate, int *pfrc);
    5555
    56 static void prepare_entry_lo(entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, uintptr_t pfn);
    57 static void prepare_entry_hi(entry_hi_t *hi, asid_t asid, uintptr_t addr);
    58 
    5956/** Initialize TLB
    6057 *
     
    7774                tlbwi();
    7875        }
    79 
    8076               
    8177        /*
     
    132128        pte->a = 1;
    133129
    134         prepare_entry_hi(&hi, asid, badvaddr);
    135         prepare_entry_lo(&lo, pte->g, pte->p, pte->d, pte->cacheable, pte->pfn);
     130        tlb_prepare_entry_hi(&hi, asid, badvaddr);
     131        tlb_prepare_entry_lo(&lo, pte->g, pte->p, pte->d, pte->cacheable, pte->pfn);
    136132
    137133        /*
     
    179175         */
    180176        hi.value = cp0_entry_hi_read();
    181         prepare_entry_hi(&hi, hi.asid, badvaddr);
     177        tlb_prepare_entry_hi(&hi, hi.asid, badvaddr);
    182178        cp0_entry_hi_write(hi.value);
    183179        tlbp();
     
    222218        pte->a = 1;
    223219
    224         prepare_entry_lo(&lo, pte->g, pte->p, pte->d, pte->cacheable, pte->pfn);
     220        tlb_prepare_entry_lo(&lo, pte->g, pte->p, pte->d, pte->cacheable, pte->pfn);
    225221
    226222        /*
     
    263259         */
    264260        hi.value = cp0_entry_hi_read();
    265         prepare_entry_hi(&hi, hi.asid, badvaddr);
     261        tlb_prepare_entry_hi(&hi, hi.asid, badvaddr);
    266262        cp0_entry_hi_write(hi.value);
    267263        tlbp();
     
    313309        pte->d = 1;
    314310
    315         prepare_entry_lo(&lo, pte->g, pte->p, pte->w, pte->cacheable, pte->pfn);
     311        tlb_prepare_entry_lo(&lo, pte->g, pte->p, pte->w, pte->cacheable, pte->pfn);
    316312
    317313        /*
     
    446442}
    447443
    448 void prepare_entry_lo(entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, uintptr_t pfn)
     444void tlb_prepare_entry_lo(entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, uintptr_t pfn)
    449445{
    450446        lo->value = 0;
     
    456452}
    457453
    458 void prepare_entry_hi(entry_hi_t *hi, asid_t asid, uintptr_t addr)
     454void tlb_prepare_entry_hi(entry_hi_t *hi, asid_t asid, uintptr_t addr)
    459455{
    460456        hi->value = ALIGN_DOWN(addr, PAGE_SIZE * 2);
     
    586582        for (i = 0; i < cnt + 1; i += 2) {
    587583                hi.value = 0;
    588                 prepare_entry_hi(&hi, asid, page + i * PAGE_SIZE);
     584                tlb_prepare_entry_hi(&hi, asid, page + i * PAGE_SIZE);
    589585                cp0_entry_hi_write(hi.value);
    590586
Note: See TracChangeset for help on using the changeset viewer.