Changeset e32720ff in mainline for kernel/generic/src
- Timestamp:
- 2012-11-22T22:20:39Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3f6c16fe
- Parents:
- 0ab362c (diff), 908bb96 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- kernel/generic/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/interrupt/interrupt.c
r0ab362c re32720ff 166 166 } 167 167 168 static NO_TRACE void fault_from_uspace_core(istate_t *istate, const char *fmt, va_list args) 169 { 170 if (!TASK->silent_kill) { 171 printf("Task %s (%" PRIu64 ") killed due to an exception at " 172 "program counter %p.\n", TASK->name, TASK->taskid, 173 (void *) istate_get_pc(istate)); 174 175 istate_decode(istate); 176 stack_trace_istate(istate); 177 178 printf("Kill message: "); 179 vprintf(fmt, args); 180 printf("\n"); 181 } 168 static NO_TRACE 169 void fault_from_uspace_core(istate_t *istate, const char *fmt, va_list args) 170 { 171 printf("Task %s (%" PRIu64 ") killed due to an exception at " 172 "program counter %p.\n", TASK->name, TASK->taskid, 173 (void *) istate_get_pc(istate)); 174 175 istate_decode(istate); 176 stack_trace_istate(istate); 177 178 printf("Kill message: "); 179 vprintf(fmt, args); 180 printf("\n"); 182 181 183 182 task_kill_self(true); -
kernel/generic/src/mm/as.c
r0ab362c re32720ff 79 79 #include <syscall/copy.h> 80 80 #include <arch/interrupt.h> 81 #include <interrupt.h> 81 82 82 83 /** … … 1362 1363 int as_page_fault(uintptr_t page, pf_access_t access, istate_t *istate) 1363 1364 { 1365 int rc = AS_PF_FAULT; 1366 1364 1367 if (!THREAD) 1365 return AS_PF_FAULT;1368 goto page_fault; 1366 1369 1367 1370 if (!AS) 1368 return AS_PF_FAULT;1371 goto page_fault; 1369 1372 1370 1373 mutex_lock(&AS->lock); … … 1422 1425 * Resort to the backend page fault handler. 1423 1426 */ 1424 if (area->backend->page_fault(area, page, access) != AS_PF_OK) { 1427 rc = area->backend->page_fault(area, page, access); 1428 if (rc != AS_PF_OK) { 1425 1429 page_table_unlock(AS, false); 1426 1430 mutex_unlock(&area->lock); … … 1443 1447 istate_set_retaddr(istate, 1444 1448 (uintptr_t) &memcpy_to_uspace_failover_address); 1449 } else if (rc == AS_PF_SILENT) { 1450 printf("Killing task %" PRIu64 " due to a " 1451 "failed late reservation request.\n", TASK->taskid); 1452 task_kill_self(true); 1445 1453 } else { 1446 return AS_PF_FAULT; 1454 fault_if_from_uspace(istate, "Page fault: %p.", (void *) page); 1455 panic_memtrap(istate, access, page, NULL); 1447 1456 } 1448 1457 -
kernel/generic/src/mm/backend_anon.c
r0ab362c re32720ff 255 255 * Reserve the memory for this page now. 256 256 */ 257 if (!reserve_try_alloc(1)) { 258 printf("Killing task %" PRIu64 " due to a " 259 "failed late reservation request.\n", 260 TASK->taskid); 261 TASK->silent_kill = true; 262 return AS_PF_FAULT; 263 } 257 if (!reserve_try_alloc(1)) 258 return AS_PF_SILENT; 264 259 } 265 260 -
kernel/generic/src/proc/task.c
r0ab362c re32720ff 197 197 task->kcycles = 0; 198 198 199 task->silent_kill = false;200 201 199 task->ipc_info.call_sent = 0; 202 200 task->ipc_info.call_received = 0;
Note:
See TracChangeset
for help on using the changeset viewer.