Skip to content

Commit

Permalink
arch/x86_64/intel64: re-enable interrupts before syscall handle
Browse files Browse the repository at this point in the history
arch/x86_64/intel64: re-enable interrupts before syscall handle
  • Loading branch information
szafonimateusz-mi authored and acassis committed Nov 27, 2024
1 parent 908ac75 commit eca40ff
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/x86_64/src/common/x86_64_syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,15 @@ uint64_t *x86_64_syscall(uint64_t *regs)
rtcb->xcp.saved_ursp = regs[REG_RSP];
#endif

/* Re-enable interrupts if enabled before.
* Current task RFLAGS are stored in R11.
*/

if (regs[REG_R11] & X86_64_RFLAGS_IF)
{
up_irq_restore(X86_64_RFLAGS_IF);
}

/* Call syscall function */

ret = stub(nbr, arg1, arg2, arg3, arg4, arg5, arg6);
Expand Down

0 comments on commit eca40ff

Please sign in to comment.