summaryrefslogtreecommitdiffstats
path: root/src/core/loader/nso.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-08-28 18:30:33 +0200
committerLioncash <mathew1800@gmail.com>2018-08-29 04:31:51 +0200
commit0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5 (patch)
tree2d7bb143d490c3984bff6deda426b818bf27d552 /src/core/loader/nso.cpp
parentMerge pull request #1193 from lioncash/priv (diff)
downloadyuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar
yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.gz
yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.bz2
yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.lz
yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.xz
yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.zst
yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.zip
Diffstat (limited to 'src/core/loader/nso.cpp')
-rw-r--r--src/core/loader/nso.cpp6
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;