Rev 3777 | Rev 3940 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3777 | Rev 3790 | ||
---|---|---|---|
Line 470... | Line 470... | ||
470 | /* |
470 | /* |
471 | * Forward the page fault to address space page fault handler. |
471 | * Forward the page fault to address space page fault handler. |
472 | */ |
472 | */ |
473 | page_table_unlock(AS, true); |
473 | page_table_unlock(AS, true); |
474 | if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) { |
474 | if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) { |
475 | fault_if_from_uspace(istate,"Page fault at %p",va); |
475 | fault_if_from_uspace(istate,"Page fault at %p.",va); |
476 | panic("%s: va=%p, rid=%d, iip=%p\n", __func__, va, rid, |
476 | panic("%s: va=%p, rid=%d, iip=%p.", __func__, va, rid, |
477 | istate->cr_iip); |
477 | istate->cr_iip); |
478 | } |
478 | } |
479 | } |
479 | } |
480 | } |
480 | } |
481 | 481 | ||
Line 529... | Line 529... | ||
529 | 529 | ||
530 | dtc_mapping_insert(page, TASK->as->asid, entry); |
530 | dtc_mapping_insert(page, TASK->as->asid, entry); |
531 | return 1; |
531 | return 1; |
532 | } else { |
532 | } else { |
533 | fault_if_from_uspace(istate, |
533 | fault_if_from_uspace(istate, |
534 | "IO access fault at %p", va); |
534 | "IO access fault at %p.", va); |
535 | } |
535 | } |
536 | } |
536 | } |
537 | } |
537 | } |
538 | 538 | ||
539 | return 0; |
539 | return 0; |
Line 581... | Line 581... | ||
581 | /* |
581 | /* |
582 | * Forward the page fault to the address space page fault |
582 | * Forward the page fault to the address space page fault |
583 | * handler. |
583 | * handler. |
584 | */ |
584 | */ |
585 | if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) { |
585 | if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) { |
586 | fault_if_from_uspace(istate,"Page fault at %p",va); |
586 | fault_if_from_uspace(istate,"Page fault at %p.",va); |
587 | panic("%s: va=%p, rid=%d, iip=%p\n", __func__, va, rid, |
587 | panic("%s: va=%p, rid=%d, iip=%p.", __func__, va, rid, |
588 | istate->cr_iip); |
588 | istate->cr_iip); |
589 | } |
589 | } |
590 | } |
590 | } |
591 | } |
591 | } |
592 | 592 | ||
Line 597... | Line 597... | ||
597 | * @param vector Interruption vector. |
597 | * @param vector Interruption vector. |
598 | * @param istate Structure with saved interruption state. |
598 | * @param istate Structure with saved interruption state. |
599 | */ |
599 | */ |
600 | void data_nested_tlb_fault(uint64_t vector, istate_t *istate) |
600 | void data_nested_tlb_fault(uint64_t vector, istate_t *istate) |
601 | { |
601 | { |
602 | panic("%s\n", __func__); |
602 | panic("%s.", __func__); |
603 | } |
603 | } |
604 | 604 | ||
605 | /** Data Dirty bit fault handler. |
605 | /** Data Dirty bit fault handler. |
606 | * |
606 | * |
607 | * @param vector Interruption vector. |
607 | * @param vector Interruption vector. |
Line 628... | Line 628... | ||
628 | */ |
628 | */ |
629 | t->d = true; |
629 | t->d = true; |
630 | dtc_pte_copy(t); |
630 | dtc_pte_copy(t); |
631 | } else { |
631 | } else { |
632 | if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) { |
632 | if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) { |
633 | fault_if_from_uspace(istate,"Page fault at %p",va); |
633 | fault_if_from_uspace(istate,"Page fault at %p.",va); |
634 | panic("%s: va=%p, rid=%d, iip=%p\n", __func__, va, rid, |
634 | panic("%s: va=%p, rid=%d, iip=%p.", __func__, va, rid, |
635 | istate->cr_iip); |
635 | istate->cr_iip); |
636 | } |
636 | } |
637 | } |
637 | } |
638 | page_table_unlock(AS, true); |
638 | page_table_unlock(AS, true); |
639 | } |
639 | } |
Line 664... | Line 664... | ||
664 | */ |
664 | */ |
665 | t->a = true; |
665 | t->a = true; |
666 | itc_pte_copy(t); |
666 | itc_pte_copy(t); |
667 | } else { |
667 | } else { |
668 | if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) { |
668 | if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) { |
669 | fault_if_from_uspace(istate, "Page fault at %p", va); |
669 | fault_if_from_uspace(istate, "Page fault at %p.", va); |
670 | panic("%s: va=%p, rid=%d, iip=%p\n", __func__, va, rid, |
670 | panic("%s: va=%p, rid=%d, iip=%p.", __func__, va, rid, |
671 | istate->cr_iip); |
671 | istate->cr_iip); |
672 | } |
672 | } |
673 | } |
673 | } |
674 | page_table_unlock(AS, true); |
674 | page_table_unlock(AS, true); |
675 | } |
675 | } |
Line 700... | Line 700... | ||
700 | */ |
700 | */ |
701 | t->a = true; |
701 | t->a = true; |
702 | dtc_pte_copy(t); |
702 | dtc_pte_copy(t); |
703 | } else { |
703 | } else { |
704 | if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) { |
704 | if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) { |
705 | fault_if_from_uspace(istate, "Page fault at %p", va); |
705 | fault_if_from_uspace(istate, "Page fault at %p.", va); |
706 | panic("%s: va=%p, rid=%d, iip=%p\n", __func__, va, rid, |
706 | panic("%s: va=%p, rid=%d, iip=%p.", __func__, va, rid, |
707 | istate->cr_iip); |
707 | istate->cr_iip); |
708 | } |
708 | } |
709 | } |
709 | } |
710 | page_table_unlock(AS, true); |
710 | page_table_unlock(AS, true); |
711 | } |
711 | } |
Line 741... | Line 741... | ||
741 | dtc_pte_copy(t); |
741 | dtc_pte_copy(t); |
742 | page_table_unlock(AS, true); |
742 | page_table_unlock(AS, true); |
743 | } else { |
743 | } else { |
744 | page_table_unlock(AS, true); |
744 | page_table_unlock(AS, true); |
745 | if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) { |
745 | if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) { |
746 | fault_if_from_uspace(istate, "Page fault at %p", va); |
746 | fault_if_from_uspace(istate, "Page fault at %p.", va); |
747 | panic("%s: va=%p, rid=%d\n", __func__, va, rid); |
747 | panic("%s: va=%p, rid=%d.", __func__, va, rid); |
748 | } |
748 | } |
749 | } |
749 | } |
750 | } |
750 | } |
751 | 751 | ||
752 | /** @} |
752 | /** @} |