Changeset 567807b1 in mainline for arch/mips32/src/mm/tlb.c


Ignore:
Timestamp:
2006-05-24T17:03:29Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8d6bc2d5
Parents:
82da5f5
Message:

Modify the hierarchy of page fault handlers to pass access mode that caused the fault.
Architectures are required to pass either PF_ACCESS_READ, PF_ACCESS_WRITE or PF_ACCESS_EXEC
to as_page_fault(), depending on the cause of the fault.

File:
1 edited

Legend:

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

    r82da5f5 r567807b1  
    4545static void tlb_modified_fail(istate_t *istate);
    4646
    47 static pte_t *find_mapping_and_check(__address badvaddr, istate_t *istate, int *pfrc);
     47static pte_t *find_mapping_and_check(__address badvaddr, int access, istate_t *istate, int *pfrc);
    4848
    4949static void prepare_entry_lo(entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, __address pfn);
     
    102102        page_table_lock(AS, true);
    103103
    104         pte = find_mapping_and_check(badvaddr, istate, &pfrc);
     104        pte = find_mapping_and_check(badvaddr, PF_ACCESS_READ, istate, &pfrc);
    105105        if (!pte) {
    106106                switch (pfrc) {
     
    187187        }
    188188
    189         pte = find_mapping_and_check(badvaddr, istate, &pfrc);
     189        pte = find_mapping_and_check(badvaddr, PF_ACCESS_READ, istate, &pfrc);
    190190        if (!pte) {
    191191                switch (pfrc) {
     
    271271        }
    272272
    273         pte = find_mapping_and_check(badvaddr, istate, &pfrc);
     273        pte = find_mapping_and_check(badvaddr, PF_ACCESS_WRITE, istate, &pfrc);
    274274        if (!pte) {
    275275                switch (pfrc) {
     
    367367 *
    368368 * @param badvaddr Faulting virtual address.
     369 * @param access Access mode that caused the fault.
    369370 * @param istate Pointer to interrupted state.
    370371 * @param pfrc Pointer to variable where as_page_fault() return code will be stored.
     
    372373 * @return PTE on success, NULL otherwise.
    373374 */
    374 pte_t *find_mapping_and_check(__address badvaddr, istate_t *istate, int *pfrc)
     375pte_t *find_mapping_and_check(__address badvaddr, int access, istate_t *istate, int *pfrc)
    375376{
    376377        entry_hi_t hi;
     
    405406                 */
    406407                page_table_unlock(AS, true);
    407                 switch (rc = as_page_fault(badvaddr, istate)) {
     408                switch (rc = as_page_fault(badvaddr, access, istate)) {
    408409                case AS_PF_OK:
    409410                        /*
Note: See TracChangeset for help on using the changeset viewer.