initialize sse state in new tasks (seems to hang later on fxrstor still)

This commit is contained in:
2023-10-19 10:27:40 +02:00
parent de92cd294b
commit 12ee6f929a

View File

@@ -175,6 +175,7 @@ struct Task *new_ktask(void(*fn), char *name) {
new->frame.ip = (uint64_t) fn;
new->frame.cs = GDTSEL(gdt_code);
new->frame.ss = GDTSEL(gdt_data);
__builtin_ia32_fxsave64((void *) (((uintptr_t) (new->frame.ssestate) + 32) & 0xFFFFFFFFFFFFFFF0));
new->frame.flags = flags();
new->frame.guard = IDT_GUARD;
new->addressSpace = KERN_AddressSpace;