- Timestamp:
- Jul 18, 2017, 3:28:20 PM (7 years ago)
- Location:
- trunk/hal/x86_64/core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_exception.c
r143 r233 58 58 * Hexception handler. 59 59 */ 60 void hal_exception_entry( struct small_trapframe *tf)60 void hal_exception_entry(hal_cpu_context_t *ctx) 61 61 { 62 uint64_t excno = tf->tf_trapno;62 uint64_t excno = ctx->tf_trapno; 63 63 const char *buf; 64 64 … … 71 71 x86_printf("\n****** EXCEPTION OCCURRED ******\n"); 72 72 x86_printf("%s\n", (char *)buf); 73 x86_printf("-> rip = %Z\n", tf->tf_rip);74 x86_printf("-> rsp = %Z\n", tf->tf_rsp);75 x86_printf("-> err = %Z\n", tf->tf_err);73 x86_printf("-> rip = %Z\n", ctx->tf_rip); 74 x86_printf("-> rsp = %Z\n", ctx->tf_rsp); 75 x86_printf("-> err = %Z\n", ctx->tf_err); 76 76 if (excno == T_PAGEFLT) 77 77 x86_printf("-> va = %Z\n", rcr2()); -
trunk/hal/x86_64/core/hal_kentry.S
r220 r233 191 191 192 192 /* 193 * Arguments pushed on the stack: 194 * tf_trapno 195 * tf_err: Dummy inserted if not defined 196 * tf_rip 197 * tf_cs 198 * tf_rflags 199 * tf_rsp 200 * tf_ss 193 * Common entry point for exceptions. 201 194 */ 202 195 alltraps: 196 INTR_SAVE_REGS 197 203 198 movq %rsp,%rdi 204 199 call hal_exception_entry -
trunk/hal/x86_64/core/hal_kentry.h
r193 r233 129 129 uint64_t tf_trapno; 130 130 131 /* Pushed by the hardware if trap*/132 uint64_t tf_err; 131 /* Pushed by the hardware if exception */ 132 uint64_t tf_err; /* in fact, this one may not... */ 133 133 uint64_t tf_rip; 134 134 uint64_t tf_cs; … … 139 139 uint64_t tf_ss; 140 140 } hal_cpu_context_t; 141 142 /*143 * Our small trap frame.144 */145 struct small_trapframe {146 uint64_t tf_trapno;147 148 /* These are pushed for a trap */149 uint64_t tf_err; /* in fact, this one may not... */150 uint64_t tf_rip;151 uint64_t tf_cs;152 uint64_t tf_rflags;153 154 /* These are always pushed */155 uint64_t tf_rsp;156 uint64_t tf_ss;157 };158 141 159 142 #else
Note: See TracChangeset
for help on using the changeset viewer.