Cpu halts when enabling osxsave
Posted: Sat Feb 19, 2022 10:00 am
I'm trying to enable extended processor features, when emulating on qemu with "Cascadelake-Server" i got the AVX, SSE Features but when emulating with normal cpu, it exactly halts when enabling OSXSAVE bit[18] on CR4
Here is the code :
Here is the code :
Code: Select all
mov eax, 1
cpuid
test ecx, 1 << 26
je .enable_osxsave
.enable_osxsave:
push rax
mov rax, cr4
or rax, 1 << 18 ; Anything another than this bit works fine
mov cr4, rax ; Cpu Shutdown without any message by qemu and in debug the "halt" instruction is not executed
cli
hlt
jmp ,ret0