[Zion] Add task switching for SSE registers and enable them in userspace.

This commit is contained in:
Drew Galbraith 2023-11-21 15:50:31 -08:00
parent 2a984a93ec
commit 96063126cb
7 changed files with 43 additions and 5 deletions

View file

@ -43,6 +43,8 @@ class Thread : public KernelObject, public glcr::IntrusiveListNode<Thread> {
uint64_t* Rsp0Ptr() { return &rsp0_; }
uint64_t Rsp0Start() { return rsp0_start_; }
uint8_t* FxData() { return fx_data_; }
// Switches the thread's state to runnable and enqueues it.
void Start(uint64_t entry, uint64_t arg1, uint64_t arg2);
@ -86,5 +88,8 @@ class Thread : public KernelObject, public glcr::IntrusiveListNode<Thread> {
// I don't think me mind clobbering the stack here.
uint64_t rsp0_start_;
// Pointer to a 512 byte region for FXSAVE and FXRSTOR
uint8_t* fx_data_ = nullptr;
glcr::IntrusiveList<Thread> blocked_threads_;
};