Rev 3788 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3788 | Rev 3790 | ||
---|---|---|---|
Line 64... | Line 64... | ||
64 | pf_access_t access; |
64 | pf_access_t access; |
65 | 65 | ||
66 | page = read_cr2(); |
66 | page = read_cr2(); |
67 | 67 | ||
68 | if (istate->error_word & PFERR_CODE_RSVD) |
68 | if (istate->error_word & PFERR_CODE_RSVD) |
69 | panic("Reserved bit set in page directory.\n"); |
69 | panic("Reserved bit set in page directory."); |
70 | 70 | ||
71 | if (istate->error_word & PFERR_CODE_RW) |
71 | if (istate->error_word & PFERR_CODE_RW) |
72 | access = PF_ACCESS_WRITE; |
72 | access = PF_ACCESS_WRITE; |
73 | else |
73 | else |
74 | access = PF_ACCESS_READ; |
74 | access = PF_ACCESS_READ; |
75 | 75 | ||
76 | if (as_page_fault(page, access, istate) == AS_PF_FAULT) { |
76 | if (as_page_fault(page, access, istate) == AS_PF_FAULT) { |
77 | fault_if_from_uspace(istate, "Page fault: %#x", page); |
77 | fault_if_from_uspace(istate, "Page fault: %#x.", page); |
78 | 78 | ||
79 | decode_istate(istate); |
79 | decode_istate(istate); |
80 | printf("Page fault address: %#x\n", page); |
80 | printf("Page fault address: %#x.\n", page); |
81 | panic("Page fault\n"); |
81 | panic("Page fault."); |
82 | } |
82 | } |
83 | } |
83 | } |
84 | 84 | ||
85 | /** @} |
85 | /** @} |
86 | */ |
86 | */ |