mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-21 16:39:39 +00:00
hw: enable FPU during CPU startup on x86
Also disable TS (task switch) flag in cr0 during kernel initialization, so FPU faults are not raised. This became necessary since GCC lately aggressively generates FPU instructions at arbitrary places and also at early kernel-bootstrapping stages. fixes #3365
This commit is contained in:
committed by
Christian Helmuth
parent
e60b597af5
commit
f18285205c
@ -21,7 +21,12 @@ void Genode::Fpu::init()
|
||||
|
||||
Cpu::Cr0::Mp::set(cr0_value);
|
||||
Cpu::Cr0::Em::clear(cr0_value);
|
||||
Cpu::Cr0::Ts::set(cr0_value);
|
||||
|
||||
/*
|
||||
* Clear task switched so we do not gnerate FPU faults during kernel
|
||||
* initialisation, it will be turned on by Fpu::disable
|
||||
*/
|
||||
Cpu::Cr0::Ts::clear(cr0_value);
|
||||
Cpu::Cr0::Ne::set(cr0_value);
|
||||
Cpu::Cr0::write(cr0_value);
|
||||
|
||||
|
Reference in New Issue
Block a user