Skip to content

Commit

Permalink
arm-M: set current regs for crash dump
Browse files Browse the repository at this point in the history
Signed-off-by: ligd <[email protected]>
  • Loading branch information
GUIDINGLI committed Sep 26, 2024
1 parent 6559d01 commit 7a205d4
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/arm/src/armv6-m/arm_doirq.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,18 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
}
else
{
/* Set current regs for crash dump */

up_set_current_regs(regs);

/* Dispatch irq */

tcb->xcp.regs = regs;
irq_dispatch(irq, regs);

/* Clear current regs */

up_set_current_regs(NULL);
}

/* If a context switch occurred while processing the interrupt then
Expand Down
10 changes: 10 additions & 0 deletions arch/arm/src/armv7-m/arm_doirq.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,18 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
}
else
{
/* Set current regs for crash dump */

up_set_current_regs(regs);

/* Dispatch irq */

tcb->xcp.regs = regs;
irq_dispatch(irq, regs);

/* Clear current regs */

up_set_current_regs(NULL);
}

/* If a context switch occurred while processing the interrupt then
Expand Down
10 changes: 10 additions & 0 deletions arch/arm/src/armv8-m/arm_doirq.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,18 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
}
else
{
/* Set current regs for crash dump */

up_set_current_regs(regs);

/* Dispatch irq */

tcb->xcp.regs = regs;
irq_dispatch(irq, regs);

/* Clear current regs */

up_set_current_regs(NULL);
}

/* If a context switch occurred while processing the interrupt then
Expand Down

0 comments on commit 7a205d4

Please sign in to comment.