Subversion Repositories HelenOS

Rev

Rev 2089 | Rev 3635 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2089 Rev 2462
Line 468... Line 468...
468
         * Forward the page fault to address space page fault handler.
468
         * Forward the page fault to address space page fault handler.
469
         */
469
         */
470
        page_table_unlock(AS, true);
470
        page_table_unlock(AS, true);
471
        if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) {
471
        if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) {
472
            fault_if_from_uspace(istate,"Page fault at %p",va);
472
            fault_if_from_uspace(istate,"Page fault at %p",va);
473
            panic("%s: va=%p, rid=%d, iip=%p\n", __FUNCTION__, va, rid, istate->cr_iip);
473
            panic("%s: va=%p, rid=%d, iip=%p\n", __func__, va, rid, istate->cr_iip);
474
        }
474
        }
475
    }
475
    }
476
}
476
}
477
 
477
 
478
/** Data TLB fault handler for faults with VHPT turned off.
478
/** Data TLB fault handler for faults with VHPT turned off.
Line 515... Line 515...
515
         * Forward the page fault to the address space page fault handler.
515
         * Forward the page fault to the address space page fault handler.
516
         */
516
         */
517
        page_table_unlock(AS, true);
517
        page_table_unlock(AS, true);
518
        if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) {
518
        if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) {
519
            fault_if_from_uspace(istate,"Page fault at %p",va);
519
            fault_if_from_uspace(istate,"Page fault at %p",va);
520
            panic("%s: va=%p, rid=%d, iip=%p\n", __FUNCTION__, va, rid, istate->cr_iip);
520
            panic("%s: va=%p, rid=%d, iip=%p\n", __func__, va, rid, istate->cr_iip);
521
        }
521
        }
522
    }
522
    }
523
}
523
}
524
 
524
 
525
/** Data nested TLB fault handler.
525
/** Data nested TLB fault handler.
Line 529... Line 529...
529
 * @param vector Interruption vector.
529
 * @param vector Interruption vector.
530
 * @param istate Structure with saved interruption state.
530
 * @param istate Structure with saved interruption state.
531
 */
531
 */
532
void data_nested_tlb_fault(uint64_t vector, istate_t *istate)
532
void data_nested_tlb_fault(uint64_t vector, istate_t *istate)
533
{
533
{
534
    panic("%s\n", __FUNCTION__);
534
    panic("%s\n", __func__);
535
}
535
}
536
 
536
 
537
/** Data Dirty bit fault handler.
537
/** Data Dirty bit fault handler.
538
 *
538
 *
539
 * @param vector Interruption vector.
539
 * @param vector Interruption vector.
Line 561... Line 561...
561
        t->d = true;
561
        t->d = true;
562
        dtc_pte_copy(t);
562
        dtc_pte_copy(t);
563
    } else {
563
    } else {
564
        if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) {
564
        if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) {
565
            fault_if_from_uspace(istate,"Page fault at %p",va);
565
            fault_if_from_uspace(istate,"Page fault at %p",va);
566
            panic("%s: va=%p, rid=%d, iip=%p\n", __FUNCTION__, va, rid, istate->cr_iip);
566
            panic("%s: va=%p, rid=%d, iip=%p\n", __func__, va, rid, istate->cr_iip);
567
            t->d = true;
567
            t->d = true;
568
            dtc_pte_copy(t);
568
            dtc_pte_copy(t);
569
        }
569
        }
570
    }
570
    }
571
    page_table_unlock(AS, true);
571
    page_table_unlock(AS, true);
Line 598... Line 598...
598
        t->a = true;
598
        t->a = true;
599
        itc_pte_copy(t);
599
        itc_pte_copy(t);
600
    } else {
600
    } else {
601
        if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) {
601
        if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) {
602
            fault_if_from_uspace(istate,"Page fault at %p",va);
602
            fault_if_from_uspace(istate,"Page fault at %p",va);
603
            panic("%s: va=%p, rid=%d, iip=%p\n", __FUNCTION__, va, rid, istate->cr_iip);
603
            panic("%s: va=%p, rid=%d, iip=%p\n", __func__, va, rid, istate->cr_iip);
604
            t->a = true;
604
            t->a = true;
605
            itc_pte_copy(t);
605
            itc_pte_copy(t);
606
        }
606
        }
607
    }
607
    }
608
    page_table_unlock(AS, true);
608
    page_table_unlock(AS, true);
Line 635... Line 635...
635
        t->a = true;
635
        t->a = true;
636
        dtc_pte_copy(t);
636
        dtc_pte_copy(t);
637
    } else {
637
    } else {
638
        if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) {
638
        if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) {
639
            fault_if_from_uspace(istate,"Page fault at %p",va);
639
            fault_if_from_uspace(istate,"Page fault at %p",va);
640
            panic("%s: va=%p, rid=%d, iip=%p\n", __FUNCTION__, va, rid, istate->cr_iip);
640
            panic("%s: va=%p, rid=%d, iip=%p\n", __func__, va, rid, istate->cr_iip);
641
            t->a = true;
641
            t->a = true;
642
            itc_pte_copy(t);
642
            itc_pte_copy(t);
643
        }
643
        }
644
    }
644
    }
645
    page_table_unlock(AS, true);
645
    page_table_unlock(AS, true);
Line 677... Line 677...
677
        page_table_unlock(AS, true);
677
        page_table_unlock(AS, true);
678
    } else {
678
    } else {
679
        page_table_unlock(AS, true);
679
        page_table_unlock(AS, true);
680
        if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) {
680
        if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) {
681
            fault_if_from_uspace(istate,"Page fault at %p",va);
681
            fault_if_from_uspace(istate,"Page fault at %p",va);
682
            panic("%s: va=%p, rid=%d\n", __FUNCTION__, va, rid);
682
            panic("%s: va=%p, rid=%d\n", __func__, va, rid);
683
        }
683
        }
684
    }
684
    }
685
}
685
}
686
 
686
 
687
/** @}
687
/** @}