Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions arch/xtensa/core/coredump.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ void arch_coredump_info_dump(const struct arch_esf *esf)
xtensa_coredump_fault_sp = (uint32_t)esf;
#endif

__asm__ volatile("rsr.exccause %0" : "=r"(arch_blk.r.exccause));

_xtensa_irq_stack_frame_raw_t *frame = (void *)esf;
_xtensa_irq_bsa_t *bsa = frame->ptr_to_bsa;
uintptr_t num_high_regs;
Expand All @@ -150,7 +148,7 @@ void arch_coredump_info_dump(const struct arch_esf *esf)
regs_blk_remaining = (int)num_high_regs / 4;

arch_blk.r.pc = bsa->pc;
__asm__ volatile("rsr.excvaddr %0" : "=r"(arch_blk.r.excvaddr));
arch_blk.r.excvaddr = bsa->excvaddr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, so was this the reason for wrong EXCVADDR values in my dumps? nice!

arch_blk.r.ps = bsa->ps;
#if XCHAL_HAVE_S32C1I
arch_blk.r.scompare1 = bsa->scompare1;
Expand All @@ -160,6 +158,7 @@ void arch_coredump_info_dump(const struct arch_esf *esf)
arch_blk.r.a1 = (uint32_t)((char *)bsa) + sizeof(*bsa);
arch_blk.r.a2 = bsa->a2;
arch_blk.r.a3 = bsa->a3;
arch_blk.r.exccause = bsa->exccause;
if (regs_blk_remaining > 0) {
regs_blk_remaining--;

Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/core/gen_zsr.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def parse_args():

NEEDED = ["A0SAVE", "CPU"]
if args.mmu:
NEEDED += ["DBLEXC", "DEPC_SAVE", "EXCCAUSE_SAVE"]
NEEDED += ["DBLEXC", "DEPC_SAVE"]
if args.flush_reg:
NEEDED += ["FLUSH"]

Expand Down
1 change: 1 addition & 0 deletions arch/xtensa/core/offsets/offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ GEN_OFFSET_SYM(_xtensa_irq_bsa_t, a2);
GEN_OFFSET_SYM(_xtensa_irq_bsa_t, a3);

GEN_OFFSET_SYM(_xtensa_irq_bsa_t, exccause);
GEN_OFFSET_SYM(_xtensa_irq_bsa_t, excvaddr);
GEN_OFFSET_SYM(_xtensa_irq_bsa_t, pc);
GEN_OFFSET_SYM(_xtensa_irq_bsa_t, ps);
GEN_OFFSET_SYM(_xtensa_irq_bsa_t, sar);
Expand Down
Loading