Changeset 925be4e in mainline for kernel/arch/ia64/src/mm/tlb.c


Ignore:
Timestamp:
2009-07-07T21:12:54Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1f0db02e
Parents:
80a3bd9
Message:

The ia64 kernel needs to handle the Data Access Rights fault.

File:
1 edited

Legend:

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

    r80a3bd9 r925be4e  
    711711}
    712712
     713/** Data access rights fault handler.
     714 *
     715 * @param vector Interruption vector.
     716 * @param istate Structure with saved interruption state.
     717 */
     718void data_access_rights_fault(uint64_t vector, istate_t *istate)
     719{
     720        region_register rr;
     721        rid_t rid;
     722        uintptr_t va;
     723        pte_t *t;
     724
     725        va = istate->cr_ifa;    /* faulting address */
     726        rr.word = rr_read(VA2VRN(va));
     727        rid = rr.map.rid;
     728
     729        /*
     730         * Assume a write to a read-only page.
     731         */
     732        page_table_lock(AS, true);
     733        t = page_mapping_find(AS, va);
     734        ASSERT(t && t->p);
     735        ASSERT(!t->w);
     736        if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) {
     737                fault_if_from_uspace(istate, "Page fault at %p.", va);
     738                panic("%s: va=%p, rid=%d, iip=%p.", __func__, va, rid,
     739                    istate->cr_iip);
     740        }
     741        page_table_unlock(AS, true);
     742}
     743
    713744/** Page not present fault handler.
    714745 *
Note: See TracChangeset for help on using the changeset viewer.