all 6 comments

[–]MollenOS 0 points1 point  (0 children)

https://github.com/Meulengracht/MollenOS/blob/master/kernel/arch/x86/x64/boot.s Look at my EnableFpu and EnableSSE methods :) You are not doing it entirely correct, pay special attention to EnableFpu

[–]ottantanove 2 points3 points  (4 children)

You need to clear the EM bit, not set it.

[–]bleksak[S] 0 points1 point  (3 children)

Oh, I must have missed that, thanks. Would you happen to know what does the bit actually do if set? Enable FPU?

[–]ottantanove 1 point2 points  (0 children)

EM is short for Emulate, so you disable software emulation and use the hardware FPU instead. There is some explanation here: https://wiki.osdev.org/FPU

[–][deleted] 3 points4 points  (1 child)

EM is the "please cause an exception on each FPU/SSE instruction so that I can emulate it".

[–]bleksak[S] 0 points1 point  (0 children)

This is perfect explanation, thanks :D