summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-12-23 09:03:39 +0100
committerbunnei <bunneidev@gmail.com>2021-12-23 09:03:39 +0100
commita0c7d93b844f664631cfa663f691cd71c7e51215 (patch)
tree798d61f46cfbd0813bda66e055f186cbfeb75762 /src/core/hle/kernel
parentMerge pull request #7616 from bunnei/fix-get-idle-ticks (diff)
downloadyuzu-a0c7d93b844f664631cfa663f691cd71c7e51215.tar
yuzu-a0c7d93b844f664631cfa663f691cd71c7e51215.tar.gz
yuzu-a0c7d93b844f664631cfa663f691cd71c7e51215.tar.bz2
yuzu-a0c7d93b844f664631cfa663f691cd71c7e51215.tar.lz
yuzu-a0c7d93b844f664631cfa663f691cd71c7e51215.tar.xz
yuzu-a0c7d93b844f664631cfa663f691cd71c7e51215.tar.zst
yuzu-a0c7d93b844f664631cfa663f691cd71c7e51215.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/k_thread.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp
index 752592e2e..b8c993748 100644
--- a/src/core/hle/kernel/k_thread.cpp
+++ b/src/core/hle/kernel/k_thread.cpp
@@ -26,6 +26,7 @@
#include "core/hle/kernel/k_resource_limit.h"
#include "core/hle/kernel/k_scheduler.h"
#include "core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h"
+#include "core/hle/kernel/k_system_control.h"
#include "core/hle/kernel/k_thread.h"
#include "core/hle/kernel/k_thread_queue.h"
#include "core/hle/kernel/kernel.h"
@@ -50,6 +51,7 @@ static void ResetThreadContext64(Core::ARM_Interface::ThreadContext64& context,
VAddr entry_point, u64 arg) {
context = {};
context.cpu_registers[0] = arg;
+ context.cpu_registers[18] = Kernel::KSystemControl::GenerateRandomU64() | 1;
context.pc = entry_point;
context.sp = stack_top;
// TODO(merry): Perform a hardware test to determine the below value.