mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-10 23:09:18 +00:00
Refactor gsTCB struct for debugging and update usage in related files
This commit is contained in:
@ -452,7 +452,7 @@ namespace Tasking
|
||||
sf->rax = si->tf.rax;
|
||||
sf->Flags = si->tf.rflags.raw;
|
||||
sf->ReturnAddress = si->tf.rip;
|
||||
gs->TempStack = si->tf.rsp;
|
||||
gs->TempStack = (void *)si->tf.rsp;
|
||||
|
||||
SignalMask.store(si->SignalMask);
|
||||
|
||||
|
@ -508,10 +508,13 @@ namespace Tasking
|
||||
this->Stack = new Memory::StackGuard(true, this->vma);
|
||||
|
||||
gsTCB *gsT = (gsTCB *)this->vma->RequestPages(TO_PAGES(sizeof(gsTCB)));
|
||||
#ifdef DEBUG
|
||||
gsT->__stub = 0xFFFFFFFFFFFFFFFF;
|
||||
#endif
|
||||
|
||||
gsT->ScPages = TO_PAGES(STACK_SIZE);
|
||||
gsT->SyscallStackBase = this->vma->RequestPages(gsT->ScPages);
|
||||
gsT->SyscallStack = (uintptr_t)gsT->SyscallStackBase + STACK_SIZE - 0x10;
|
||||
gsT->SyscallStack = (void *)((uintptr_t)gsT->SyscallStackBase + STACK_SIZE - 0x10);
|
||||
debug("New syscall stack created: %#lx (base: %#lx) with gs base at %#lx",
|
||||
gsT->SyscallStack, gsT->SyscallStackBase, gsT);
|
||||
|
||||
|
Reference in New Issue
Block a user