summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-04-09 20:01:34 +0200
committerbunnei <bunneidev@gmail.com>2020-04-17 06:59:35 +0200
commit83761d5316465cb634e16dadea14d3d5060855d5 (patch)
tree4ed389c60e36b9b22701497a64caf936b1b36e04
parentservice: ldr: Updates for new VMM. (diff)
downloadyuzu-83761d5316465cb634e16dadea14d3d5060855d5.tar
yuzu-83761d5316465cb634e16dadea14d3d5060855d5.tar.gz
yuzu-83761d5316465cb634e16dadea14d3d5060855d5.tar.bz2
yuzu-83761d5316465cb634e16dadea14d3d5060855d5.tar.lz
yuzu-83761d5316465cb634e16dadea14d3d5060855d5.tar.xz
yuzu-83761d5316465cb634e16dadea14d3d5060855d5.tar.zst
yuzu-83761d5316465cb634e16dadea14d3d5060855d5.zip
-rw-r--r--src/core/loader/elf.cpp4
-rw-r--r--src/core/loader/kip.cpp4
-rw-r--r--src/core/loader/nro.cpp4
3 files changed, 7 insertions, 5 deletions
diff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cpp
index b01400325..1e9ed2837 100644
--- a/src/core/loader/elf.cpp
+++ b/src/core/loader/elf.cpp
@@ -10,8 +10,8 @@
#include "common/file_util.h"
#include "common/logging/log.h"
#include "core/hle/kernel/code_set.h"
+#include "core/hle/kernel/memory/page_table.h"
#include "core/hle/kernel/process.h"
-#include "core/hle/kernel/vm_manager.h"
#include "core/loader/elf.h"
#include "core/memory.h"
@@ -393,7 +393,7 @@ AppLoader_ELF::LoadResult AppLoader_ELF::Load(Kernel::Process& process) {
return {ResultStatus::ErrorIncorrectELFFileSize, {}};
}
- const VAddr base_address = process.VMManager().GetCodeRegionBaseAddress();
+ const VAddr base_address = process.PageTable().GetCodeRegionStart();
ElfReader elf_reader(&buffer[0]);
Kernel::CodeSet codeset = elf_reader.LoadInto(base_address);
const VAddr entry_point = codeset.entrypoint;
diff --git a/src/core/loader/kip.cpp b/src/core/loader/kip.cpp
index dce342ce2..40fa03ad1 100644
--- a/src/core/loader/kip.cpp
+++ b/src/core/loader/kip.cpp
@@ -7,8 +7,10 @@
#include "core/file_sys/program_metadata.h"
#include "core/gdbstub/gdbstub.h"
#include "core/hle/kernel/code_set.h"
+#include "core/hle/kernel/memory/page_table.h"
#include "core/hle/kernel/process.h"
#include "core/loader/kip.h"
+#include "core/memory.h"
namespace Loader {
@@ -68,7 +70,7 @@ AppLoader::LoadResult AppLoader_KIP::Load(Kernel::Process& process) {
kip->GetMainThreadCpuCore(), kip->GetMainThreadStackSize(),
kip->GetTitleID(), 0xFFFFFFFFFFFFFFFF, kip->GetKernelCapabilities());
- const VAddr base_address = process.VMManager().GetCodeRegionBaseAddress();
+ const VAddr base_address = process.PageTable().GetCodeRegionStart();
Kernel::CodeSet codeset;
Kernel::PhysicalMemory program_image;
diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp
index bc41fe161..5d7e8136e 100644
--- a/src/core/loader/nro.cpp
+++ b/src/core/loader/nro.cpp
@@ -16,8 +16,8 @@
#include "core/file_sys/vfs_offset.h"
#include "core/gdbstub/gdbstub.h"
#include "core/hle/kernel/code_set.h"
+#include "core/hle/kernel/memory/page_table.h"
#include "core/hle/kernel/process.h"
-#include "core/hle/kernel/vm_manager.h"
#include "core/hle/service/filesystem/filesystem.h"
#include "core/loader/nro.h"
#include "core/loader/nso.h"
@@ -208,7 +208,7 @@ AppLoader_NRO::LoadResult AppLoader_NRO::Load(Kernel::Process& process) {
}
// Load NRO
- const VAddr base_address = process.VMManager().GetCodeRegionBaseAddress();
+ const VAddr base_address = process.PageTable().GetCodeRegionStart();
if (!LoadNro(process, *file, base_address)) {
return {ResultStatus::ErrorLoadingNRO, {}};