summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-04-09 05:37:24 +0200
committerbunnei <bunneidev@gmail.com>2020-04-17 06:59:35 +0200
commita8292f6cd9f8b4088ee85b59a87e5bf0ce387cf0 (patch)
treeff88e12685101a4f451b5bb56894ff4e7128d0ce /src/core/hle
parentkernel: svc: Updates for new VMM. (diff)
downloadyuzu-a8292f6cd9f8b4088ee85b59a87e5bf0ce387cf0.tar
yuzu-a8292f6cd9f8b4088ee85b59a87e5bf0ce387cf0.tar.gz
yuzu-a8292f6cd9f8b4088ee85b59a87e5bf0ce387cf0.tar.bz2
yuzu-a8292f6cd9f8b4088ee85b59a87e5bf0ce387cf0.tar.lz
yuzu-a8292f6cd9f8b4088ee85b59a87e5bf0ce387cf0.tar.xz
yuzu-a8292f6cd9f8b4088ee85b59a87e5bf0ce387cf0.tar.zst
yuzu-a8292f6cd9f8b4088ee85b59a87e5bf0ce387cf0.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/memory/page_table.cpp4
-rw-r--r--src/core/hle/kernel/memory/page_table.h4
2 files changed, 3 insertions, 5 deletions
diff --git a/src/core/hle/kernel/memory/page_table.cpp b/src/core/hle/kernel/memory/page_table.cpp
index 93e7253e2..941ecda21 100644
--- a/src/core/hle/kernel/memory/page_table.cpp
+++ b/src/core/hle/kernel/memory/page_table.cpp
@@ -936,10 +936,6 @@ ResultVal<VAddr> PageTable::AllocateAndMapMemory(std::size_t needed_num_pages, s
return MakeResult<VAddr>(addr);
}
-PAddr PageTable::GetPhysicalAddr(VAddr addr) {
- return system.DeviceMemory().GetPhysicalAddr(addr);
-}
-
ResultCode PageTable::InitializeMemoryLayout(VAddr start, VAddr end) {
block_manager = std::make_unique<MemoryBlockManager>(start, end);
diff --git a/src/core/hle/kernel/memory/page_table.h b/src/core/hle/kernel/memory/page_table.h
index 6c3a3c275..80384ab0f 100644
--- a/src/core/hle/kernel/memory/page_table.h
+++ b/src/core/hle/kernel/memory/page_table.h
@@ -53,7 +53,6 @@ public:
bool is_map_only, VAddr region_start,
std::size_t region_num_pages, MemoryState state,
MemoryPermission perm, PAddr map_addr = 0);
- PAddr GetPhysicalAddr(VAddr addr);
Common::PageTable& PageTableImpl() {
return page_table_impl;
@@ -211,6 +210,9 @@ public:
constexpr bool IsInsideASLRRegion(VAddr address, std::size_t size) const {
return !IsOutsideASLRRegion(address, size);
}
+ constexpr PAddr GetPhysicalAddr(VAddr addr) {
+ return page_table_impl.backing_addr[addr >> Memory::PageBits] + addr;
+ }
private:
constexpr bool Contains(VAddr addr) const {