bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/6] fix register corruption in irq on qemu


From: Luca Dariz
Subject: [PATCH 3/6] fix register corruption in irq on qemu
Date: Fri, 28 Jan 2022 19:24:06 +0100

it seems rbx is corrupted during interrupt handlers.
This appears on first call to thread_continue()

Signed-off-by: Luca Dariz <luca@orpolo.org>
---
 x86_64/interrupt.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/x86_64/interrupt.S b/x86_64/interrupt.S
index eab643a5..4ea849af 100644
--- a/x86_64/interrupt.S
+++ b/x86_64/interrupt.S
@@ -35,6 +35,7 @@ ENTRY(interrupt)
        cmpl    $255,%eax               /* was this a spurious intr? */
        je      _no_eoi                 /* if so, just return */
 #endif
+       pushq   %rbx
        pushq   %rax                    /* save irq number */
        call    spl7                    /* set ipl */
        pushq   %rax                    /* save previous ipl */
@@ -89,6 +90,7 @@ ENTRY(interrupt)
        movl    EXT(curr_pic_mask),%eax /* restore original mask */
        outb    %al,$(PIC_MASTER_OCW)   /* unmask master */
 2:
+       popq    %rbx
        ret
 #else
        cmpl    $16,%ecx                /* was this a low ISA intr? */
-- 
2.30.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]