Rev 1708 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1708 | Rev 1735 | ||
---|---|---|---|
Line 468... | Line 468... | ||
468 | /* |
468 | /* |
469 | * Forward the page fault to address space page fault handler. |
469 | * Forward the page fault to address space page fault handler. |
470 | */ |
470 | */ |
471 | page_table_unlock(AS, true); |
471 | page_table_unlock(AS, true); |
472 | if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) { |
472 | if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) { |
473 | fault_if_from_uspace(istate,"Page fault at %P",va); |
473 | fault_if_from_uspace(istate,"Page fault at %p",va); |
474 | panic("%s: va=%p, rid=%d, iip=%p\n", __FUNCTION__, va, rid, istate->cr_iip); |
474 | panic("%s: va=%p, rid=%d, iip=%p\n", __FUNCTION__, va, rid, istate->cr_iip); |
475 | } |
475 | } |
476 | } |
476 | } |
477 | } |
477 | } |
478 | 478 | ||
Line 515... | Line 515... | ||
515 | /* |
515 | /* |
516 | * Forward the page fault to address space page fault handler. |
516 | * Forward the page fault to address space page fault handler. |
517 | */ |
517 | */ |
518 | page_table_unlock(AS, true); |
518 | page_table_unlock(AS, true); |
519 | if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) { |
519 | if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) { |
520 | fault_if_from_uspace(istate,"Page fault at %P",va); |
520 | fault_if_from_uspace(istate,"Page fault at %p",va); |
521 | panic("%s: va=%p, rid=%d, iip=%p\n", __FUNCTION__, va, rid, istate->cr_iip); |
521 | panic("%s: va=%p, rid=%d, iip=%p\n", __FUNCTION__, va, rid, istate->cr_iip); |
522 | } |
522 | } |
523 | } |
523 | } |
524 | } |
524 | } |
525 | 525 | ||
Line 561... | Line 561... | ||
561 | */ |
561 | */ |
562 | t->d = true; |
562 | t->d = true; |
563 | dtc_pte_copy(t); |
563 | dtc_pte_copy(t); |
564 | } else { |
564 | } else { |
565 | if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) { |
565 | if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) { |
566 | fault_if_from_uspace(istate,"Page fault at %P",va); |
566 | fault_if_from_uspace(istate,"Page fault at %p",va); |
567 | panic("%s: va=%p, rid=%d, iip=%p\n", __FUNCTION__, va, rid, istate->cr_iip); |
567 | panic("%s: va=%p, rid=%d, iip=%p\n", __FUNCTION__, va, rid, istate->cr_iip); |
568 | t->d = true; |
568 | t->d = true; |
569 | dtc_pte_copy(t); |
569 | dtc_pte_copy(t); |
570 | } |
570 | } |
571 | } |
571 | } |
Line 598... | Line 598... | ||
598 | */ |
598 | */ |
599 | t->a = true; |
599 | t->a = true; |
600 | itc_pte_copy(t); |
600 | itc_pte_copy(t); |
601 | } else { |
601 | } else { |
602 | if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) { |
602 | if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) { |
603 | fault_if_from_uspace(istate,"Page fault at %P",va); |
603 | fault_if_from_uspace(istate,"Page fault at %p",va); |
604 | panic("%s: va=%p, rid=%d, iip=%p\n", __FUNCTION__, va, rid, istate->cr_iip); |
604 | panic("%s: va=%p, rid=%d, iip=%p\n", __FUNCTION__, va, rid, istate->cr_iip); |
605 | t->a = true; |
605 | t->a = true; |
606 | itc_pte_copy(t); |
606 | itc_pte_copy(t); |
607 | } |
607 | } |
608 | } |
608 | } |
Line 635... | Line 635... | ||
635 | */ |
635 | */ |
636 | t->a = true; |
636 | t->a = true; |
637 | dtc_pte_copy(t); |
637 | dtc_pte_copy(t); |
638 | } else { |
638 | } else { |
639 | if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) { |
639 | if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) { |
640 | fault_if_from_uspace(istate,"Page fault at %P",va); |
640 | fault_if_from_uspace(istate,"Page fault at %p",va); |
641 | panic("%s: va=%p, rid=%d, iip=%p\n", __FUNCTION__, va, rid, istate->cr_iip); |
641 | panic("%s: va=%p, rid=%d, iip=%p\n", __FUNCTION__, va, rid, istate->cr_iip); |
642 | t->a = true; |
642 | t->a = true; |
643 | itc_pte_copy(t); |
643 | itc_pte_copy(t); |
644 | } |
644 | } |
645 | } |
645 | } |
Line 677... | Line 677... | ||
677 | dtc_pte_copy(t); |
677 | dtc_pte_copy(t); |
678 | page_table_unlock(AS, true); |
678 | page_table_unlock(AS, true); |
679 | } else { |
679 | } else { |
680 | page_table_unlock(AS, true); |
680 | page_table_unlock(AS, true); |
681 | if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) { |
681 | if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) { |
682 | fault_if_from_uspace(istate,"Page fault at %P",va); |
682 | fault_if_from_uspace(istate,"Page fault at %p",va); |
683 | panic("%s: va=%p, rid=%d\n", __FUNCTION__, va, rid); |
683 | panic("%s: va=%p, rid=%d\n", __FUNCTION__, va, rid); |
684 | } |
684 | } |
685 | } |
685 | } |
686 | } |
686 | } |
687 | 687 |