I'm trying to switch cores on my boot-time driver. But it doesn't end well.
Access violation - code c0000005 (!!! second chance !!!)
nt!KiSwapContext+0xf:
fffff800`768a779f 0f29742430 movaps xmmword ptr [rsp+30h],xmm6
Since its an access violation, not even a bugcheck, something is very wrong.
I tried KeSetSystemGroupAffinityThread and KeSetSystemAffinityThread, both resulted in the same outcome. (since KeSetSystemAffinityThread internally calls the former).
I thought I can wait for Win32 to initialize. There was a callback for that, I read somewhere in MSDN. But could not find it. Since this part of the code is not "critical" and can be delayed, I just want to learn how long to delay it for. Or until at least, the boot ends.

