Home
last modified time | relevance | path

Searched refs:esf (Results 1 – 25 of 68) sorted by relevance

123

/Zephyr-latest/arch/mips/core/
Dfatal.c12 const struct arch_esf *esf) in z_mips_fatal_error() argument
15 if (esf != NULL) { in z_mips_fatal_error()
17 esf->at, esf->v0, esf->v1); in z_mips_fatal_error()
19 esf->a0, esf->a1, esf->a2, esf->a3); in z_mips_fatal_error()
21 esf->t0, esf->t1, esf->t2, esf->t3); in z_mips_fatal_error()
23 esf->t4, esf->t5, esf->t6, esf->t7); in z_mips_fatal_error()
26 esf->t8, esf->t9); in z_mips_fatal_error()
28 esf->gp, esf->ra); in z_mips_fatal_error()
30 LOG_ERR("EPC : %08lx\n", esf->epc); in z_mips_fatal_error()
32 LOG_ERR("Status: %08lx\n", esf->status); in z_mips_fatal_error()
[all …]
/Zephyr-latest/arch/arc/core/
Dfatal.c26 static void dump_arc_esf(const struct arch_esf *esf) in dump_arc_esf() argument
29 " r3: 0x%" PRIxPTR "", esf->r0, esf->r1, esf->r2, esf->r3); in dump_arc_esf()
31 " r7: 0x%" PRIxPTR "", esf->r4, esf->r5, esf->r6, esf->r7); in dump_arc_esf()
33 " r11: 0x%" PRIxPTR "", esf->r8, esf->r9, esf->r10, esf->r11); in dump_arc_esf()
35 esf->r12, esf->r13, esf->pc); in dump_arc_esf()
37 esf->blink, esf->status32); in dump_arc_esf()
40 " lp_count: 0x%" PRIxPTR "", esf->lp_end, esf->lp_start, esf->lp_count); in dump_arc_esf()
45 void z_arc_fatal_error(unsigned int reason, const struct arch_esf *esf) in z_arc_fatal_error() argument
48 if (esf != NULL) { in z_arc_fatal_error()
49 dump_arc_esf(esf); in z_arc_fatal_error()
[all …]
Dfault.c349 void _Fault(struct arch_esf *esf, uint32_t old_sp) in _Fault() argument
360 if (esf->pc >= start && esf->pc < end) { in _Fault()
361 esf->pc = (uint32_t)(exceptions[i].fixup); in _Fault()
378 if ((esf->status32 & _ARC_V2_STATUS32_U) && in _Fault()
379 esf->r0 != K_ERR_STACK_CHK_FAIL) { in _Fault()
380 esf->r0 = K_ERR_KERNEL_OOPS; in _Fault()
384 z_arc_fatal_error(esf->r0, esf); in _Fault()
403 z_arc_fatal_error(K_ERR_STACK_CHK_FAIL, esf); in _Fault()
412 z_arc_fatal_error(K_ERR_STACK_CHK_FAIL, esf); in _Fault()
417 z_arc_fatal_error(K_ERR_CPU_EXCEPTION, esf); in _Fault()
/Zephyr-latest/arch/x86/core/
Dfatal.c38 static inline uintptr_t esf_get_sp(const struct arch_esf *esf) in esf_get_sp() argument
41 return esf->rsp; in esf_get_sp()
43 return esf->esp; in esf_get_sp()
130 const struct arch_esf *esf, int max_frames) in walk_stackframe() argument
137 if (esf != NULL) { in walk_stackframe()
139 base_ptr = esf->rbp; in walk_stackframe()
141 base_ptr = esf->ebp; in walk_stackframe()
143 cs = esf->cs; in walk_stackframe()
188 const struct k_thread *thread, const struct arch_esf *esf) in arch_stack_walk() argument
192 walk_stackframe(callback_fn, cookie, esf, in arch_stack_walk()
[all …]
/Zephyr-latest/arch/nios2/core/
Dfatal.c15 const struct arch_esf *esf) in z_nios2_fatal_error() argument
18 if (esf != NULL) { in z_nios2_fatal_error()
26 LOG_ERR("Faulting instruction: 0x%08x", esf->instr - 4); in z_nios2_fatal_error()
28 esf->r1, esf->r2, esf->r3, esf->r4); in z_nios2_fatal_error()
30 esf->r5, esf->r6, esf->r7, esf->r8); in z_nios2_fatal_error()
32 esf->r9, esf->r10, esf->r11, esf->r12); in z_nios2_fatal_error()
34 esf->r13, esf->r14, esf->r15, esf->ra); in z_nios2_fatal_error()
35 LOG_ERR("estatus: %08x", esf->estatus); in z_nios2_fatal_error()
39 z_fatal_error(reason, esf); in z_nios2_fatal_error()
105 FUNC_NORETURN void _Fault(const struct arch_esf *esf) in _Fault() argument
[all …]
/Zephyr-latest/arch/arm/core/
Dfatal.c21 static void esf_dump(const struct arch_esf *esf) in esf_dump() argument
24 esf->basic.a1, esf->basic.a2, esf->basic.a3); in esf_dump()
26 esf->basic.a4, esf->basic.ip, esf->basic.lr); in esf_dump()
27 LOG_ERR(" xpsr: 0x%08x", esf->basic.xpsr); in esf_dump()
29 for (int i = 0; i < ARRAY_SIZE(esf->fpu.s); i += 4) { in esf_dump()
32 i, (uint32_t)esf->fpu.s[i], in esf_dump()
33 i + 1, (uint32_t)esf->fpu.s[i + 1], in esf_dump()
34 i + 2, (uint32_t)esf->fpu.s[i + 2], in esf_dump()
35 i + 3, (uint32_t)esf->fpu.s[i + 3]); in esf_dump()
38 for (int i = 0; i < ARRAY_SIZE(esf->fpu.d); i += 4) { in esf_dump()
[all …]
Dgdbstub.c45 void z_gdb_entry(struct arch_esf *esf, unsigned int exc_cause) in z_gdb_entry() argument
52 ctx.registers[R0] = esf->basic.r0; in z_gdb_entry()
53 ctx.registers[R1] = esf->basic.r1; in z_gdb_entry()
54 ctx.registers[R2] = esf->basic.r2; in z_gdb_entry()
55 ctx.registers[R3] = esf->basic.r3; in z_gdb_entry()
57 ctx.registers[R4] = esf->extra_info.callee->v1; in z_gdb_entry()
58 ctx.registers[R5] = esf->extra_info.callee->v2; in z_gdb_entry()
59 ctx.registers[R6] = esf->extra_info.callee->v3; in z_gdb_entry()
60 ctx.registers[R7] = esf->extra_info.callee->v4; in z_gdb_entry()
61 ctx.registers[R8] = esf->extra_info.callee->v5; in z_gdb_entry()
[all …]
/Zephyr-latest/arch/sparc/core/
Dfatal.c125 static void print_trap_type(const struct arch_esf *esf) in print_trap_type() argument
127 const int tt = (esf->tbr & TBR_TT) >> TBR_TT_BIT; in print_trap_type()
145 static void print_integer_registers(const struct arch_esf *esf) in print_integer_registers() argument
147 const struct savearea *flushed = (struct savearea *) esf->out[6]; in print_integer_registers()
156 esf->out[i], in print_integer_registers()
157 esf->global[i] in print_integer_registers()
162 static void print_special_registers(const struct arch_esf *esf) in print_special_registers() argument
166 esf->psr, esf->wim, esf->tbr, esf->y in print_special_registers()
168 LOG_ERR(" pc: %08x npc: %08x", esf->pc, esf->npc); in print_special_registers()
171 static void print_backtrace(const struct arch_esf *esf) in print_backtrace() argument
[all …]
/Zephyr-latest/arch/riscv/core/
Dfatal.c32 void z_riscv_unwind_stack(const struct arch_esf *esf, const _callee_saved_t *csf);
34 uintptr_t z_riscv_get_sp_before_exc(const struct arch_esf *esf) in z_riscv_get_sp_before_exc() argument
40 uintptr_t sp = (uintptr_t)esf + sizeof(struct arch_esf); in z_riscv_get_sp_before_exc()
43 if ((esf->mstatus & MSTATUS_MPP) == PRV_U) { in z_riscv_get_sp_before_exc()
48 sp = esf->sp; in z_riscv_get_sp_before_exc()
81 const struct arch_esf *esf) in z_riscv_fatal_error() argument
83 z_riscv_fatal_error_csf(reason, esf, NULL); in z_riscv_fatal_error()
86 FUNC_NORETURN void z_riscv_fatal_error_csf(unsigned int reason, const struct arch_esf *esf, in z_riscv_fatal_error_csf() argument
105 if (esf != NULL) { in z_riscv_fatal_error_csf()
106 LOG_ERR(" a0: " PR_REG " t0: " PR_REG, esf->a0, esf->t0); in z_riscv_fatal_error_csf()
[all …]
Dcoredump.c71 void arch_coredump_info_dump(const struct arch_esf *esf) in arch_coredump_info_dump() argument
80 if (esf == NULL) { in arch_coredump_info_dump()
91 arch_blk.r.ra = esf->ra; in arch_coredump_info_dump()
92 arch_blk.r.t0 = esf->t0; in arch_coredump_info_dump()
93 arch_blk.r.t1 = esf->t1; in arch_coredump_info_dump()
94 arch_blk.r.t2 = esf->t2; in arch_coredump_info_dump()
95 arch_blk.r.a0 = esf->a0; in arch_coredump_info_dump()
96 arch_blk.r.a1 = esf->a1; in arch_coredump_info_dump()
97 arch_blk.r.a2 = esf->a2; in arch_coredump_info_dump()
98 arch_blk.r.a3 = esf->a3; in arch_coredump_info_dump()
[all …]
Dstacktrace.c15 uintptr_t z_riscv_get_sp_before_exc(const struct arch_esf *esf);
74 const struct arch_esf *esf) in in_stack_bound() argument
76 ARG_UNUSED(esf); in in_stack_bound()
100 const struct arch_esf *esf, stack_verify_fn vrfy, in walk_stackframe() argument
107 if (esf != NULL) { in walk_stackframe()
109 fp = esf->s0; in walk_stackframe()
110 ra = esf->mepc; in walk_stackframe()
121 for (int i = 0; (i < MAX_STACK_FRAMES) && vrfy(fp, thread, esf) && (fp > last_fp); i++) { in walk_stackframe()
130 if ((i == 0) && (esf != NULL)) { in walk_stackframe()
132 if (in_text_region(esf->ra) && !cb(cookie, esf->ra, fp)) { in walk_stackframe()
[all …]
/Zephyr-latest/arch/arm64/core/
Dcoredump.c53 void arch_coredump_info_dump(const struct arch_esf *esf) in arch_coredump_info_dump() argument
64 if (esf == NULL) { in arch_coredump_info_dump()
74 arch_blk.r.x0 = esf->x0; in arch_coredump_info_dump()
75 arch_blk.r.x1 = esf->x1; in arch_coredump_info_dump()
76 arch_blk.r.x2 = esf->x2; in arch_coredump_info_dump()
77 arch_blk.r.x3 = esf->x3; in arch_coredump_info_dump()
78 arch_blk.r.x4 = esf->x4; in arch_coredump_info_dump()
79 arch_blk.r.x5 = esf->x5; in arch_coredump_info_dump()
80 arch_blk.r.x6 = esf->x6; in arch_coredump_info_dump()
81 arch_blk.r.x7 = esf->x7; in arch_coredump_info_dump()
[all …]
Dfatal.c186 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()
[all …]
Dfpu.c162 static bool simulate_str_q_insn(struct arch_esf *esf) in simulate_str_q_insn() argument
173 uint32_t *pc = (uint32_t *)esf->elr; in simulate_str_q_insn()
175 uintptr_t sp = (uintptr_t)esf + sizeof(*esf); in simulate_str_q_insn()
201 if (pc != (uint32_t *)esf->elr) { in simulate_str_q_insn()
203 esf->elr = (uintptr_t)pc; in simulate_str_q_insn()
224 void z_arm64_fpu_trap(struct arch_esf *esf) in z_arm64_fpu_trap() argument
229 if (simulate_str_q_insn(esf)) { in z_arm64_fpu_trap()
254 esf->spsr |= DAIF_IRQ_BIT; in z_arm64_fpu_trap()
/Zephyr-latest/arch/x86/core/intel64/
Dfatal.c16 __weak bool z_x86_do_kernel_nmi(const struct arch_esf *esf) in z_x86_do_kernel_nmi() argument
18 ARG_UNUSED(esf); in z_x86_do_kernel_nmi()
23 void z_x86_exception(struct arch_esf *esf) in z_x86_exception() argument
25 switch (esf->vector) { in z_x86_exception()
27 z_x86_do_kernel_oops(esf); in z_x86_exception()
30 z_x86_page_fault_handler(esf); in z_x86_exception()
33 if (!z_x86_do_kernel_nmi(esf)) { in z_x86_exception()
34 z_x86_unhandled_cpu_exception(esf->vector, esf); in z_x86_exception()
39 z_x86_unhandled_cpu_exception(esf->vector, esf); in z_x86_exception()
Dcoredump.c50 void arch_coredump_info_dump(const struct arch_esf *esf) in arch_coredump_info_dump() argument
59 if (esf == NULL) { in arch_coredump_info_dump()
65 arch_blk.vector = esf->vector; in arch_coredump_info_dump()
66 arch_blk.code = esf->code; in arch_coredump_info_dump()
75 arch_blk.r.rax = esf->rax; in arch_coredump_info_dump()
76 arch_blk.r.rcx = esf->rcx; in arch_coredump_info_dump()
77 arch_blk.r.rdx = esf->rdx; in arch_coredump_info_dump()
78 arch_blk.r.rsi = esf->rsi; in arch_coredump_info_dump()
79 arch_blk.r.rdi = esf->rdi; in arch_coredump_info_dump()
80 arch_blk.r.rsp = esf->rsp; in arch_coredump_info_dump()
[all …]
/Zephyr-latest/arch/x86/core/ia32/
Dgdbstub.c81 static void z_gdb_interrupt(unsigned int vector, struct arch_esf *esf) in z_gdb_interrupt() argument
85 debug_ctx.registers[GDB_EAX] = esf->eax; in z_gdb_interrupt()
86 debug_ctx.registers[GDB_ECX] = esf->ecx; in z_gdb_interrupt()
87 debug_ctx.registers[GDB_EDX] = esf->edx; in z_gdb_interrupt()
88 debug_ctx.registers[GDB_EBX] = esf->ebx; in z_gdb_interrupt()
89 debug_ctx.registers[GDB_ESP] = esf->esp; in z_gdb_interrupt()
90 debug_ctx.registers[GDB_EBP] = esf->ebp; in z_gdb_interrupt()
91 debug_ctx.registers[GDB_ESI] = esf->esi; in z_gdb_interrupt()
92 debug_ctx.registers[GDB_EDI] = esf->edi; in z_gdb_interrupt()
93 debug_ctx.registers[GDB_PC] = esf->eip; in z_gdb_interrupt()
[all …]
Dcoredump.c38 void arch_coredump_info_dump(const struct arch_esf *esf) in arch_coredump_info_dump() argument
47 if (esf == NULL) { in arch_coredump_info_dump()
54 arch_blk.code = esf->errorCode; in arch_coredump_info_dump()
63 arch_blk.r.eax = esf->eax; in arch_coredump_info_dump()
64 arch_blk.r.ebx = esf->ebx; in arch_coredump_info_dump()
65 arch_blk.r.ecx = esf->ecx; in arch_coredump_info_dump()
66 arch_blk.r.edx = esf->edx; in arch_coredump_info_dump()
67 arch_blk.r.esp = esf->esp; in arch_coredump_info_dump()
68 arch_blk.r.ebp = esf->ebp; in arch_coredump_info_dump()
69 arch_blk.r.esi = esf->esi; in arch_coredump_info_dump()
[all …]
/Zephyr-latest/arch/arm/core/cortex_m/
Dcoredump.c44 void arch_coredump_info_dump(const struct arch_esf *esf) in arch_coredump_info_dump() argument
53 if (esf == NULL) { in arch_coredump_info_dump()
66 arch_blk.r.r0 = esf->basic.r0; in arch_coredump_info_dump()
67 arch_blk.r.r1 = esf->basic.r1; in arch_coredump_info_dump()
68 arch_blk.r.r2 = esf->basic.r2; in arch_coredump_info_dump()
69 arch_blk.r.r3 = esf->basic.r3; in arch_coredump_info_dump()
70 arch_blk.r.r12 = esf->basic.ip; in arch_coredump_info_dump()
71 arch_blk.r.lr = esf->basic.lr; in arch_coredump_info_dump()
72 arch_blk.r.pc = esf->basic.pc; in arch_coredump_info_dump()
73 arch_blk.r.xpsr = esf->basic.xpsr; in arch_coredump_info_dump()
[all …]
Dfault.c101 static void fault_show(const struct arch_esf *esf, int fault) in fault_show() argument
120 static void fault_show(const struct arch_esf *esf, int fault) in fault_show() argument
122 (void)esf; in fault_show()
140 static bool memory_fault_recoverable(struct arch_esf *esf, bool synchronous) in memory_fault_recoverable() argument
156 if (esf->basic.pc >= start && esf->basic.pc < end) { in memory_fault_recoverable()
157 esf->basic.pc = (uint32_t)(exceptions[i].fixup); in memory_fault_recoverable()
183 static uint32_t mem_manage_fault(struct arch_esf *esf, int from_hard_fault, in mem_manage_fault() argument
269 ((uint32_t) &esf[0])); in mem_manage_fault()
328 *recoverable = memory_fault_recoverable(esf, true); in mem_manage_fault()
342 static int bus_fault(struct arch_esf *esf, int from_hard_fault, bool *recoverable) in bus_fault() argument
[all …]
/Zephyr-latest/kernel/
Dfatal.c38 const struct arch_esf *esf) in k_sys_fatal_error_handler() argument
40 ARG_UNUSED(esf); in k_sys_fatal_error_handler()
85 void z_fatal_error(unsigned int reason, const struct arch_esf *esf) in z_fatal_error() argument
108 if ((esf != NULL) && arch_is_in_nested_exception(esf)) { in z_fatal_error()
117 coredump(reason, esf, thread); in z_fatal_error()
119 k_sys_fatal_error_handler(reason, esf); in z_fatal_error()
139 if ((esf != NULL) && arch_is_in_nested_exception(esf)) { in z_fatal_error()
151 if ((esf != NULL) && arch_is_in_nested_exception(esf)) { in z_fatal_error()
/Zephyr-latest/arch/arm/core/cortex_a_r/
Dfault.c211 bool z_arm_fault_undef_instruction(struct arch_esf *esf) in z_arm_fault_undef_instruction() argument
218 esf->fpu.undefined = __get_FPEXC(); in z_arm_fault_undef_instruction()
219 esf->fpu.fpscr = __get_FPSCR(); in z_arm_fault_undef_instruction()
220 z_arm_fpu_caller_save(&esf->fpu); in z_arm_fault_undef_instruction()
224 z_gdb_entry(esf, GDB_EXCEPTION_INVALID_INSTRUCTION); in z_arm_fault_undef_instruction()
237 z_arm_fatal_error(reason, esf); in z_arm_fault_undef_instruction()
248 bool z_arm_fault_prefetch(struct arch_esf *esf) in z_arm_fault_prefetch() argument
267 z_gdb_entry(esf, GDB_EXCEPTION_BREAKPOINT); in z_arm_fault_prefetch()
270 z_gdb_entry(esf, GDB_EXCEPTION_MEMORY_FAULT); in z_arm_fault_prefetch()
286 z_arm_fatal_error(reason, esf); in z_arm_fault_prefetch()
[all …]
/Zephyr-latest/arch/arm/include/cortex_a_r/
Dexception.h41 static ALWAYS_INLINE bool arch_is_in_nested_exception(const struct arch_esf *esf) in arch_is_in_nested_exception() argument
52 static ALWAYS_INLINE void z_arm_set_fault_sp(const struct arch_esf *esf, uint32_t exc_return) in z_arm_set_fault_sp() argument
60 static ALWAYS_INLINE bool z_arm_preempted_thread_in_user_mode(const struct arch_esf *esf) in z_arm_preempted_thread_in_user_mode() argument
62 return ((esf->basic.xpsr & CPSR_M_Msk) == CPSR_M_USR); in z_arm_preempted_thread_in_user_mode()
/Zephyr-latest/arch/xtensa/core/
Dfatal.c87 void xtensa_fatal_error(unsigned int reason, const struct arch_esf *esf) in xtensa_fatal_error() argument
90 if (esf != NULL) { in xtensa_fatal_error()
97 xtensa_dump_stack(esf); in xtensa_fatal_error()
102 xtensa_backtrace_print(100, (int *)esf); in xtensa_fatal_error()
109 z_fatal_error(reason, esf); in xtensa_fatal_error()
/Zephyr-latest/arch/arm/include/cortex_m/
Dexception.h119 static ALWAYS_INLINE bool arch_is_in_nested_exception(const struct arch_esf *esf) in arch_is_in_nested_exception() argument
121 return (esf->basic.xpsr & IPSR_ISR_Msk) ? (true) : (false); in arch_is_in_nested_exception()
131 static ALWAYS_INLINE bool z_arm_preempted_thread_in_user_mode(const struct arch_esf *esf) in z_arm_preempted_thread_in_user_mode() argument
241 static ALWAYS_INLINE void z_arm_set_fault_sp(const struct arch_esf *esf, uint32_t exc_return) in z_arm_set_fault_sp() argument
244 z_arm_coredump_fault_sp = POINTER_TO_UINT(esf); in z_arm_set_fault_sp()
249 z_arm_coredump_fault_sp += sizeof(esf->basic); in z_arm_set_fault_sp()
257 z_arm_coredump_fault_sp += sizeof(esf->fpu); in z_arm_set_fault_sp()
262 if ((esf->basic.xpsr & SCB_CCR_STKALIGN_Msk) == SCB_CCR_STKALIGN_Msk) { in z_arm_set_fault_sp()

123