diff options
author | bunnei <bunneidev@gmail.com> | 2018-08-30 16:02:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-30 16:02:50 +0200 |
commit | 5094dfa081c7275e35496374a42996b11f0f6005 (patch) | |
tree | 8cdfb8c270c6299a1b172fb9c14856684bedf084 /src/core/loader/nso.cpp | |
parent | Merge pull request #1202 from FearlessTobi/port-3825 (diff) | |
parent | kernel: Eliminate kernel global state (diff) | |
download | yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar.gz yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar.bz2 yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar.lz yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar.xz yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar.zst yuzu-5094dfa081c7275e35496374a42996b11f0f6005.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/loader/nso.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index a94558ac5..0c992d662 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp @@ -100,7 +100,8 @@ VAddr AppLoader_NSO::LoadModule(FileSys::VirtualFile file, VAddr load_base) { return {}; // Build program image - Kernel::SharedPtr<Kernel::CodeSet> codeset = Kernel::CodeSet::Create(""); + auto& kernel = Core::System::GetInstance().Kernel(); + Kernel::SharedPtr<Kernel::CodeSet> codeset = Kernel::CodeSet::Create(kernel, ""); std::vector<u8> program_image; for (std::size_t i = 0; i < nso_header.segments.size(); ++i) { const std::vector<u8> compressed_data = @@ -151,9 +152,10 @@ ResultStatus AppLoader_NSO::Load(Kernel::SharedPtr<Kernel::Process>& process) { LoadModule(file, Memory::PROCESS_IMAGE_VADDR); LOG_DEBUG(Loader, "loaded module {} @ 0x{:X}", file->GetName(), Memory::PROCESS_IMAGE_VADDR); + auto& kernel = Core::System::GetInstance().Kernel(); process->svc_access_mask.set(); process->resource_limit = - Kernel::ResourceLimit::GetForCategory(Kernel::ResourceLimitCategory::APPLICATION); + kernel.ResourceLimitForCategory(Kernel::ResourceLimitCategory::APPLICATION); process->Run(Memory::PROCESS_IMAGE_VADDR, THREADPRIO_DEFAULT, Memory::DEFAULT_STACK_SIZE); is_loaded = true; |