diff options
author | Lioncash <mathew1800@gmail.com> | 2019-04-09 23:03:04 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-04-12 04:11:41 +0200 |
commit | 612e1388df3bed64081488f2a99cce522c80c76d (patch) | |
tree | 2d2782d0df46e9458ec2a2728f5cd66f27963ea9 /src/core/hle/kernel/process.cpp | |
parent | core/process: Remove unideal page table setting from LoadFromMetadata() (diff) | |
download | yuzu-612e1388df3bed64081488f2a99cce522c80c76d.tar yuzu-612e1388df3bed64081488f2a99cce522c80c76d.tar.gz yuzu-612e1388df3bed64081488f2a99cce522c80c76d.tar.bz2 yuzu-612e1388df3bed64081488f2a99cce522c80c76d.tar.lz yuzu-612e1388df3bed64081488f2a99cce522c80c76d.tar.xz yuzu-612e1388df3bed64081488f2a99cce522c80c76d.tar.zst yuzu-612e1388df3bed64081488f2a99cce522c80c76d.zip |
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
-rw-r--r-- | src/core/hle/kernel/process.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index bf0d479af..9825274b4 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp @@ -28,12 +28,12 @@ namespace { * * @param owner_process The parent process for the main thread * @param kernel The kernel instance to create the main thread under. - * @param entry_point The address at which the thread should start execution * @param priority The priority to give the main thread */ -void SetupMainThread(Process& owner_process, KernelCore& kernel, VAddr entry_point, u32 priority) { - // Initialize new "main" thread - const VAddr stack_top = owner_process.VMManager().GetTLSIORegionEndAddress(); +void SetupMainThread(Process& owner_process, KernelCore& kernel, u32 priority) { + const auto& vm_manager = owner_process.VMManager(); + const VAddr entry_point = vm_manager.GetCodeRegionBaseAddress(); + const VAddr stack_top = vm_manager.GetTLSIORegionEndAddress(); auto thread_res = Thread::Create(kernel, "main", entry_point, priority, 0, owner_process.GetIdealCore(), stack_top, owner_process); @@ -117,7 +117,7 @@ ResultCode Process::LoadFromMetadata(const FileSys::ProgramMetadata& metadata) { return handle_table.SetSize(capabilities.GetHandleTableSize()); } -void Process::Run(VAddr entry_point, s32 main_thread_priority, u64 stack_size) { +void Process::Run(s32 main_thread_priority, u64 stack_size) { // The kernel always ensures that the given stack size is page aligned. main_thread_stack_size = Common::AlignUp(stack_size, Memory::PAGE_SIZE); @@ -133,7 +133,7 @@ void Process::Run(VAddr entry_point, s32 main_thread_priority, u64 stack_size) { vm_manager.LogLayout(); ChangeStatus(ProcessStatus::Running); - SetupMainThread(*this, kernel, entry_point, main_thread_priority); + SetupMainThread(*this, kernel, main_thread_priority); } void Process::PrepareForTermination() { |