aboutsummaryrefslogtreecommitdiff
path: root/src/core/device_memory.h
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2022-10-19 16:27:43 -0400
committerGitHub <noreply@github.com>2022-10-19 16:27:43 -0400
commit560bca57a203c45acb1c589699b472223e8b68fd (patch)
tree98ef4a0d62a368614075463d13c4220b11af9760 /src/core/device_memory.h
parentb8a70c9999b9a09d7028a617040719bf5341cf6d (diff)
parent97879faea43c1fad6cbb0b63573c75644705e2e9 (diff)
Merge pull request #9071 from bunnei/mp-mm
Kernel Multiprocess (Part 1) - Persist memory & core timing
Diffstat (limited to 'src/core/device_memory.h')
-rw-r--r--src/core/device_memory.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/device_memory.h b/src/core/device_memory.h
index df61b0c0b..90510733c 100644
--- a/src/core/device_memory.h
+++ b/src/core/device_memory.h
@@ -31,12 +31,14 @@ public:
DramMemoryMap::Base;
}
- u8* GetPointer(PAddr addr) {
- return buffer.BackingBasePointer() + (addr - DramMemoryMap::Base);
+ template <typename T>
+ T* GetPointer(PAddr addr) {
+ return reinterpret_cast<T*>(buffer.BackingBasePointer() + (addr - DramMemoryMap::Base));
}
- const u8* GetPointer(PAddr addr) const {
- return buffer.BackingBasePointer() + (addr - DramMemoryMap::Base);
+ template <typename T>
+ const T* GetPointer(PAddr addr) const {
+ return reinterpret_cast<T*>(buffer.BackingBasePointer() + (addr - DramMemoryMap::Base));
}
Common::HostMemory buffer;