Support SSE extension in my OS
Posted: Wed Nov 20, 2019 1:34 am
Hi.
I have a minimal 32-bit OS completely work in kernel mode (no user mode implemented).
I recently came across using SSE usage in assembly for my OS. It means that I had used a lot SIMD operations on the same physical machine
on Windows and Linux OSs, therefore, I am aware that my CPU supports the SSE extension (and not SSE2, 3, 4, AVX, etc.).
I have a piece of code in NASM that as soon as reaching to the first movaps xmm0, [SOME_16_BYTE_ALIGNED_MEMORY], generates "General Fault".
Apparently, as expected, my OS does not support SSE by default (is this right?) and should be activated. In OsDev wiki link: https://wiki.osdev.org/SSE, there is a whole explanation about it, but since I am new in this regard, I would like to ask some questions.
- My OS does not support user mode, as I said, so, no task switch. Then what is the deal with FXSAVE and FXRSTOR?
- Could someone explain (or possibly list) the bare minimum MUSTs to add the SSE support, while your OS is all in kernel mode?
I really appreciate any explanations.
Best regards.
Iman.
I have a minimal 32-bit OS completely work in kernel mode (no user mode implemented).
I recently came across using SSE usage in assembly for my OS. It means that I had used a lot SIMD operations on the same physical machine
on Windows and Linux OSs, therefore, I am aware that my CPU supports the SSE extension (and not SSE2, 3, 4, AVX, etc.).
I have a piece of code in NASM that as soon as reaching to the first movaps xmm0, [SOME_16_BYTE_ALIGNED_MEMORY], generates "General Fault".
Apparently, as expected, my OS does not support SSE by default (is this right?) and should be activated. In OsDev wiki link: https://wiki.osdev.org/SSE, there is a whole explanation about it, but since I am new in this regard, I would like to ask some questions.
- My OS does not support user mode, as I said, so, no task switch. Then what is the deal with FXSAVE and FXRSTOR?
- Could someone explain (or possibly list) the bare minimum MUSTs to add the SSE support, while your OS is all in kernel mode?
I really appreciate any explanations.
Best regards.
Iman.