it seems rbx is corrupted during interrupt handlers. This appears on first call to thread_continue()
Signed-off-by: Luca Dariz <l...@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