From dadc4ce7ed1172e4a93518681d432aad88651d15 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 18 Jul 2012 20:54:04 +0200 Subject: [PATCH] set task switched flag to support applications, which require FPU support --- arch/x86/kernel/entry32.asm | 5 +++++ arch/x86/kernel/entry64.asm | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/arch/x86/kernel/entry32.asm b/arch/x86/kernel/entry32.asm index 84542d87..c1e90e70 100644 --- a/arch/x86/kernel/entry32.asm +++ b/arch/x86/kernel/entry32.asm @@ -810,6 +810,11 @@ common_switch: add ebx, KERNEL_STACK_SIZE-16 mov [eax+4], ebx + ; set task switched flag + mov eax, cr0 + or eax, 8 + mov cr0, eax + ; call cleanup code call finish_task_switch diff --git a/arch/x86/kernel/entry64.asm b/arch/x86/kernel/entry64.asm index ba38163c..627a8682 100644 --- a/arch/x86/kernel/entry64.asm +++ b/arch/x86/kernel/entry64.asm @@ -1155,6 +1155,11 @@ common_switch: add rbx, KERNEL_STACK_SIZE-16 mov [rax+4], rbx + ; set task switched flag + mov rax, cr0 + or eax, 8 + mov cr0, rax + ; call cleanup code call finish_task_switch