Changeset 392
- Timestamp:
- Aug 16, 2017, 3:35:40 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_exception.c
r382 r392 85 85 static void hal_exception_user(hal_trapframe_t *tf) 86 86 { 87 thread_t *thread = curtls()->tls_thr; 88 process_t *process = thread->process; 89 vseg_t *vseg; 90 intptr_t bad_vaddr; 91 error_t error; 92 87 93 switch (tf->tf_trapno) { 88 94 case T_PAGEFLT: 89 // TODO 90 //do_exception(curtls()->tls_thr, true); 95 bad_vaddr = rcr2(); 96 97 error = vmm_get_vseg(process, bad_vaddr, &vseg); 98 if (error) { 99 x86_panic("vseg not found!"); 100 } 101 102 error = vmm_handle_page_fault(process, vseg, 103 bad_vaddr >> CONFIG_PPM_PAGE_SHIFT); 104 105 x86_printf("VA=%Z ERROR=%Z\n", bad_vaddr, (uint64_t)error); 106 break; 91 107 92 108 default:
Note: See TracChangeset
for help on using the changeset viewer.