mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
fxsave/fxrstor stub
This commit is contained in:
parent
f2b80cd3a9
commit
400a715e94
@ -137,7 +137,7 @@ namespace Tasking
|
||||
{
|
||||
// Save current process and thread registries, gs, fs, fpu, etc...
|
||||
CurrentCPU->CurrentThread->Registers = *Frame;
|
||||
// _fxsave(CurrentCPU->CurrentThread->FXRegion);
|
||||
CPU::x64::fxsave(CurrentCPU->CurrentThread->FXRegion);
|
||||
|
||||
// Set the process & thread as ready if it's running.
|
||||
if (CurrentCPU->CurrentProcess->Status == TaskStatus::Running)
|
||||
@ -264,7 +264,7 @@ namespace Tasking
|
||||
|
||||
*Frame = CurrentCPU->CurrentThread->Registers;
|
||||
CPU::x64::writecr3({.raw = (uint64_t)CurrentCPU->CurrentProcess->PageTable});
|
||||
// _fxrstor(CurrentCPU->CurrentThread->FXRegion);
|
||||
CPU::x64::fxrstor(CurrentCPU->CurrentThread->FXRegion);
|
||||
goto End;
|
||||
}
|
||||
|
||||
@ -295,7 +295,7 @@ namespace Tasking
|
||||
error("Unknown trust level %d.", CurrentCPU->CurrentProcess->Security.TrustLevel);
|
||||
break;
|
||||
}
|
||||
// _fxrstor(CurrentCPU->CurrentThread->FXRegion);
|
||||
CPU::x64::fxrstor(CurrentCPU->CurrentThread->FXRegion);
|
||||
}
|
||||
End:
|
||||
{
|
||||
|
@ -1557,6 +1557,26 @@ namespace CPU
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void fxsave(char *FXSaveArea)
|
||||
{
|
||||
#if defined(__amd64__)
|
||||
// asmv("fxsaveq (%0)"
|
||||
// :
|
||||
// : "r"(FXSaveArea)
|
||||
// : "memory");
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void fxrstor(char *FXRstorArea)
|
||||
{
|
||||
#if defined(__amd64__)
|
||||
// asmv("fxrstorq (%0)"
|
||||
// :
|
||||
// : "r"(FXRstorArea)
|
||||
// : "memory");
|
||||
#endif
|
||||
}
|
||||
|
||||
/** @brief EXPERIMENTAL IMPLEMENTATION */
|
||||
namespace Intel
|
||||
{
|
||||
@ -3091,6 +3111,10 @@ namespace CPU
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
namespace aarch64
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !__FENNIX_KERNEL_CPU_H__
|
||||
|
@ -91,6 +91,7 @@ namespace Tasking
|
||||
#endif
|
||||
TaskSecurity Security;
|
||||
TaskInfo Info;
|
||||
char FXRegion[512] __attribute__((aligned(16)));
|
||||
|
||||
void Rename(const char *name)
|
||||
{
|
||||
@ -119,8 +120,8 @@ namespace Tasking
|
||||
TaskInfo Info;
|
||||
Vector<TCB *> Threads;
|
||||
Vector<PCB *> Children;
|
||||
Memory::PageTable *PageTable;
|
||||
HashMap<InterProcessCommunication::IPCPort, uint64_t> *IPCHandles;
|
||||
Memory::PageTable *PageTable;
|
||||
};
|
||||
|
||||
enum TokenTrustLevel
|
||||
|
Loading…
x
Reference in New Issue
Block a user