[Thread] Set pointer for: stack_kernel

Based on disassembly and info from console it is used to store initial thread data like:
 - start_address, context, etc.
This commit is contained in:
Gliniak
2023-06-12 07:40:52 +02:00
parent 4053f7bb0e
commit 9333373872
2 changed files with 3 additions and 0 deletions

View File

@@ -199,6 +199,7 @@ void XThread::InitializeGuestObject() {
xe::store_and_swap<uint16_t>(p + 0x056, 1);
xe::store_and_swap<uint32_t>(p + 0x05C, stack_base_);
xe::store_and_swap<uint32_t>(p + 0x060, stack_limit_);
xe::store_and_swap<uint32_t>(p + 0x064, stack_base_ - kThreadKernelStackSize);
xe::store_and_swap<uint32_t>(p + 0x068, tls_static_address_);
xe::store_and_swap<uint8_t>(p + 0x06C, 0);
xe::store_and_swap<uint32_t>(p + 0x074, guest_object() + 0x074);