From 3a6147244fa0fcadec05e3426a35660682858df8 Mon Sep 17 00:00:00 2001 From: Luca Dariz Date: Wed, 4 Sep 2024 22:18:06 +0200 Subject: x86_64: fix double fault handler * x86_64/locore.S: adjust to the changes in the thread state structure (segment registers), and add the missing opcode. Message-ID: <20240904201806.510082-3-luca@orpolo.org> --- x86_64/locore.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'x86_64') diff --git a/x86_64/locore.S b/x86_64/locore.S index 8f39a677..376f41c1 100644 --- a/x86_64/locore.S +++ b/x86_64/locore.S @@ -435,10 +435,10 @@ ENTRY(start_timer) ENTRY(t_dbl_fault) INT_FIX cli /* disable interrupts that might corrupt the state*/ + pushq $(T_DOUBLE_FAULT) /* indicate fault type */ pusha movq %cr2,%rax movq %rax,R_CR2-R_R15(%rsp) /* CR2 might contain the faulting address */ - subq $48,%rsp // FIXME remove when segments are cleaned up movq %rsp,%rdi /* pass the saved state */ call handle_double_fault jmp cpu_shutdown /* reset */ -- cgit v1.2.3