Lines Matching refs:esf
186 static void esf_dump(const struct arch_esf *esf) in esf_dump() argument
188 LOG_ERR("x0: 0x%016llx x1: 0x%016llx", esf->x0, esf->x1); in esf_dump()
189 LOG_ERR("x2: 0x%016llx x3: 0x%016llx", esf->x2, esf->x3); in esf_dump()
190 LOG_ERR("x4: 0x%016llx x5: 0x%016llx", esf->x4, esf->x5); in esf_dump()
191 LOG_ERR("x6: 0x%016llx x7: 0x%016llx", esf->x6, esf->x7); in esf_dump()
192 LOG_ERR("x8: 0x%016llx x9: 0x%016llx", esf->x8, esf->x9); in esf_dump()
193 LOG_ERR("x10: 0x%016llx x11: 0x%016llx", esf->x10, esf->x11); in esf_dump()
194 LOG_ERR("x12: 0x%016llx x13: 0x%016llx", esf->x12, esf->x13); in esf_dump()
195 LOG_ERR("x14: 0x%016llx x15: 0x%016llx", esf->x14, esf->x15); in esf_dump()
196 LOG_ERR("x16: 0x%016llx x17: 0x%016llx", esf->x16, esf->x17); in esf_dump()
197 LOG_ERR("x18: 0x%016llx lr: 0x%016llx", esf->x18, esf->lr); in esf_dump()
204 static void walk_stackframe(arm64_stacktrace_cb cb, void *cookie, const struct arch_esf *esf, in walk_stackframe() argument
230 if (esf != NULL) { in walk_stackframe()
231 fp = (uint64_t *) esf->fp; in walk_stackframe()
246 const struct k_thread *thread, const struct arch_esf *esf) in arch_stack_walk() argument
250 walk_stackframe((arm64_stacktrace_cb)callback_fn, cookie, esf, in arch_stack_walk()
272 static void esf_unwind(const struct arch_esf *esf) in esf_unwind() argument
278 walk_stackframe(print_trace_address, &i, esf, CONFIG_ARCH_STACKWALK_MAX_FRAMES); in esf_unwind()
284 static bool z_arm64_stack_corruption_check(struct arch_esf *esf, uint64_t esr, uint64_t far) in z_arm64_stack_corruption_check() argument
313 sp = esf->sp; in z_arm64_stack_corruption_check()
325 static bool is_recoverable(struct arch_esf *esf, uint64_t esr, uint64_t far, in is_recoverable() argument
328 if (!esf) { in is_recoverable()
338 if (esf->elr >= start && esf->elr < end) { in is_recoverable()
339 esf->elr = (uint64_t)(exceptions[i].fixup); in is_recoverable()
348 void z_arm64_fatal_error(unsigned int reason, struct arch_esf *esf) in z_arm64_fatal_error() argument
374 if (z_arm64_stack_corruption_check(esf, esr, far)) { in z_arm64_fatal_error()
381 z_arm64_do_demand_paging(esf, esr, far)) { in z_arm64_fatal_error()
400 if (is_recoverable(esf, esr, far, elr) && in z_arm64_fatal_error()
408 if (esf != NULL) { in z_arm64_fatal_error()
409 esf_dump(esf); in z_arm64_fatal_error()
413 esf_unwind(esf); in z_arm64_fatal_error()
417 z_fatal_error(reason, esf); in z_arm64_fatal_error()
428 void z_arm64_do_kernel_oops(struct arch_esf *esf) in z_arm64_do_kernel_oops() argument
431 unsigned int reason = esf->x8; in z_arm64_do_kernel_oops()
444 z_arm64_fatal_error(reason, esf); in z_arm64_do_kernel_oops()