diff options
author | bunnei <bunneidev@gmail.com> | 2021-12-25 09:42:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-25 09:42:54 +0100 |
commit | 292dfac25efd8628d47da7150dd1147981829679 (patch) | |
tree | dbc10ed34f0cae19a8ea6ae41c70331086bd822e /src | |
parent | Merge pull request #7623 from ameerj/unused-func (diff) | |
parent | core: hle: kernel: KThread: X18 should be a cryptographically random number. (diff) | |
download | yuzu-292dfac25efd8628d47da7150dd1147981829679.tar yuzu-292dfac25efd8628d47da7150dd1147981829679.tar.gz yuzu-292dfac25efd8628d47da7150dd1147981829679.tar.bz2 yuzu-292dfac25efd8628d47da7150dd1147981829679.tar.lz yuzu-292dfac25efd8628d47da7150dd1147981829679.tar.xz yuzu-292dfac25efd8628d47da7150dd1147981829679.tar.zst yuzu-292dfac25efd8628d47da7150dd1147981829679.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/kernel/k_thread.cpp | 2 |
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. |