Changeset e3038b4 in mainline for kernel/arch/amd64/src
- Timestamp:
- 2010-06-28T22:45:51Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 49eb681
- Parents:
- 05e3cb8 (diff), e4a4b44 (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/arch/amd64/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/asm_utils.S
r05e3cb8 re3038b4 51 51 .global interrupt_handlers 52 52 .global syscall_entry 53 .global panic_printf54 55 panic_printf:56 movabsq $halt, %rax57 movq %rax, (%rsp)58 jmp printf59 60 53 .global cpuid 61 54 .global has_cpuid … … 234 227 save_all_gpr 235 228 cld 236 237 # Stop stack traces here 238 xorq %rbp, %rbp 239 240 movq $(\i), %rdi # %rdi - first parameter 241 movq %rsp, %rsi # %rsi - pointer to istate 242 call exc_dispatch # exc_dispatch(i, istate) 229 230 # 231 # Stop stack traces here if we came from userspace. 232 # 233 movq %cs, %rax 234 xorq %rdx, %rdx 235 cmpq %rax, IREGISTER_SPACE+16(%rsp) 236 cmovneq %rdx, %rbp 237 238 movq $(\i), %rdi # %rdi - first parameter 239 movq %rsp, %rsi # %rsi - pointer to istate 240 call exc_dispatch # exc_dispatch(i, istate) 243 241 244 242 restore_all_gpr … … 290 288 pushq %rcx 291 289 pushq %r11 292 293 movq %r10, %rcx # Copy the 4th argument where it is expected 290 pushq %rbp 291 292 xorq %rbp, %rbp # stop the stack traces here 293 294 movq %r10, %rcx # Copy the 4th argument where it is expected 294 295 pushq %rax 295 296 call syscall_handler 296 297 addq $8, %rsp 297 298 299 popq %rbp 298 300 popq %r11 299 301 popq %rcx -
kernel/arch/amd64/src/interrupt.c
r05e3cb8 re3038b4 63 63 void (* eoi_function)(void) = NULL; 64 64 65 void decode_istate(int n, istate_t *istate) 66 { 67 const char *symbol = symtab_fmt_name_lookup(istate->rip); 68 69 printf("-----EXCEPTION(%d) OCCURED----- ( %s )\n", n, __func__); 70 printf("%%rip: %#llx (%s)\n", istate->rip, symbol); 71 printf("ERROR_WORD=%#llx\n", istate->error_word); 72 printf("%%cs=%#llx, rflags=%#llx, %%cr0=%#llx\n", istate->cs, 73 istate->rflags, read_cr0()); 74 printf("%%rax=%#llx, %%rcx=%#llx, %%rdx=%#llx\n", istate->rax, 65 void istate_decode(istate_t *istate) 66 { 67 printf("error_word=%#llx\n", istate->error_word); 68 printf("cs =%#0.16llx\trflags=%#0.16llx\n", istate->cs, 69 istate->rflags); 70 printf("rax=%#0.16llx\trbx=%#0.16llx\trcx=%#0.16llx\n", istate->rax, 75 71 istate->rcx, istate->rdx); 76 printf(" %%rsi=%#llx, %%rdi=%#llx, %%r8=%#llx\n", istate->rsi,72 printf("rsi=%#0.16llx\trdi=%#0.16llx\tr8 =%#0.16llx\n", istate->rsi, 77 73 istate->rdi, istate->r8); 78 printf(" %%r9=%#llx, %%r10=%#llx, %%r11=%#llx\n", istate->r9,74 printf("r9 =%#0.16llx\tr10=%#0.16llx\tr11=%#0.16llx\n", istate->r9, 79 75 istate->r10, istate->r11); 80 printf("%%rsp=%#llx\n", &istate->stack[0]);81 82 stack_trace_istate(istate);83 76 } 84 77 … … 95 88 { 96 89 fault_if_from_uspace(istate, "Unserviced interrupt: %u.", n); 97 decode_istate(n, istate); 98 panic("Unserviced interrupt."); 90 panic_badtrap(istate, n, "Unserviced interrupt."); 99 91 } 100 92 … … 102 94 { 103 95 fault_if_from_uspace(istate, "Divide error."); 104 decode_istate(n, istate); 105 panic("Divide error."); 96 panic_badtrap(istate, n, "Divide error."); 106 97 } 107 98 … … 129 120 fault_if_from_uspace(istate, "General protection fault."); 130 121 } 131 132 decode_istate(n, istate); 133 panic("General protection fault."); 122 panic_badtrap(istate, n, "General protection fault."); 134 123 } 135 124 … … 137 126 { 138 127 fault_if_from_uspace(istate, "Stack fault."); 139 decode_istate(n, istate); 140 panic("Stack fault."); 128 panic_badtrap(istate, n, "Stack fault."); 141 129 } 142 130 -
kernel/arch/amd64/src/mm/page.c
r05e3cb8 re3038b4 89 89 90 90 if (as_page_fault(page, access, istate) == AS_PF_FAULT) { 91 fault_if_from_uspace(istate, "Page fault: %p.", page); 92 decode_istate(n, istate); 93 panic("Page fault: %p", page); 91 fault_if_from_uspace(istate, "Page fault: %#x.", page); 92 panic_memtrap(istate, access, page, "Page fault."); 94 93 } 95 94 }
Note:
See TracChangeset
for help on using the changeset viewer.