From 827f1a171fb47ae318d73eaa9acc98a341c8009a Mon Sep 17 00:00:00 2001 From: Achilleas Anagnostopoulos Date: Wed, 21 Jun 2017 17:29:29 +0100 Subject: [PATCH] Load SS register value to DS_SEG when setting up GDT If not set then the CPU wil generate a GPF exception when returning from an interrupt handler --- arch/x86_64/asm/rt0_32.s | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86_64/asm/rt0_32.s b/arch/x86_64/asm/rt0_32.s index 59ffdc2..8480a1f 100644 --- a/arch/x86_64/asm/rt0_32.s +++ b/arch/x86_64/asm/rt0_32.s @@ -321,6 +321,7 @@ _rt0_enter_long_mode: mov es, ax mov fs, ax mov gs, ax + mov ss, ax jmp CS_SEG:.flush_gdt - PAGE_OFFSET .flush_gdt: