diff options
| author | 2020-04-17 16:33:08 -0400 | |
|---|---|---|
| committer | 2020-04-17 16:33:08 -0400 | |
| commit | b8f5c71f2d7f819821acf036175cce65ab1ae12c (patch) | |
| tree | 151d7ed4e47536dc0e149a7117387b6a502d7da6 /src/core/loader/nro.cpp | |
| parent | Merge pull request #3682 from lioncash/uam (diff) | |
| parent | core: hle: Address various feedback & code cleanup. (diff) | |
| download | yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.tar.gz yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.tar.xz yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.zip | |
Merge pull request #3666 from bunnei/new-vmm
Implement a new virtual memory manager
Diffstat (limited to 'src/core/loader/nro.cpp')
| -rw-r--r-- | src/core/loader/nro.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp index 175898b91..5d7e8136e 100644 --- a/src/core/loader/nro.cpp +++ b/src/core/loader/nro.cpp | |||
| @@ -16,8 +16,8 @@ | |||
| 16 | #include "core/file_sys/vfs_offset.h" | 16 | #include "core/file_sys/vfs_offset.h" |
| 17 | #include "core/gdbstub/gdbstub.h" | 17 | #include "core/gdbstub/gdbstub.h" |
| 18 | #include "core/hle/kernel/code_set.h" | 18 | #include "core/hle/kernel/code_set.h" |
| 19 | #include "core/hle/kernel/memory/page_table.h" | ||
| 19 | #include "core/hle/kernel/process.h" | 20 | #include "core/hle/kernel/process.h" |
| 20 | #include "core/hle/kernel/vm_manager.h" | ||
| 21 | #include "core/hle/service/filesystem/filesystem.h" | 21 | #include "core/hle/service/filesystem/filesystem.h" |
| 22 | #include "core/loader/nro.h" | 22 | #include "core/loader/nro.h" |
| 23 | #include "core/loader/nso.h" | 23 | #include "core/loader/nso.h" |
| @@ -127,7 +127,7 @@ FileType AppLoader_NRO::IdentifyType(const FileSys::VirtualFile& file) { | |||
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | static constexpr u32 PageAlignSize(u32 size) { | 129 | static constexpr u32 PageAlignSize(u32 size) { |
| 130 | return (size + Memory::PAGE_MASK) & ~Memory::PAGE_MASK; | 130 | return (size + Core::Memory::PAGE_MASK) & ~Core::Memory::PAGE_MASK; |
| 131 | } | 131 | } |
| 132 | 132 | ||
| 133 | static bool LoadNroImpl(Kernel::Process& process, const std::vector<u8>& data, | 133 | static bool LoadNroImpl(Kernel::Process& process, const std::vector<u8>& data, |
| @@ -208,7 +208,7 @@ AppLoader_NRO::LoadResult AppLoader_NRO::Load(Kernel::Process& process) { | |||
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | // Load NRO | 210 | // Load NRO |
| 211 | const VAddr base_address = process.VMManager().GetCodeRegionBaseAddress(); | 211 | const VAddr base_address = process.PageTable().GetCodeRegionStart(); |
| 212 | 212 | ||
| 213 | if (!LoadNro(process, *file, base_address)) { | 213 | if (!LoadNro(process, *file, base_address)) { |
| 214 | return {ResultStatus::ErrorLoadingNRO, {}}; | 214 | return {ResultStatus::ErrorLoadingNRO, {}}; |
| @@ -221,7 +221,7 @@ AppLoader_NRO::LoadResult AppLoader_NRO::Load(Kernel::Process& process) { | |||
| 221 | 221 | ||
| 222 | is_loaded = true; | 222 | is_loaded = true; |
| 223 | return {ResultStatus::Success, | 223 | return {ResultStatus::Success, |
| 224 | LoadParameters{Kernel::THREADPRIO_DEFAULT, Memory::DEFAULT_STACK_SIZE}}; | 224 | LoadParameters{Kernel::THREADPRIO_DEFAULT, Core::Memory::DEFAULT_STACK_SIZE}}; |
| 225 | } | 225 | } |
| 226 | 226 | ||
| 227 | ResultStatus AppLoader_NRO::ReadIcon(std::vector<u8>& buffer) { | 227 | ResultStatus AppLoader_NRO::ReadIcon(std::vector<u8>& buffer) { |