summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/vm_manager.cpp34
-rw-r--r--src/core/hle/kernel/vm_manager.h18
2 files changed, 51 insertions, 1 deletions
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp
index 9762ef535..dca637dde 100644
--- a/src/core/hle/kernel/vm_manager.cpp
+++ b/src/core/hle/kernel/vm_manager.cpp
@@ -4,6 +4,7 @@
4 4
5#include <iterator> 5#include <iterator>
6#include "common/assert.h" 6#include "common/assert.h"
7#include "common/logging/log.h"
7#include "core/arm/arm_interface.h" 8#include "core/arm/arm_interface.h"
8#include "core/hle/kernel/errors.h" 9#include "core/hle/kernel/errors.h"
9#include "core/hle/kernel/vm_manager.h" 10#include "core/hle/kernel/vm_manager.h"
@@ -62,7 +63,7 @@ void VMManager::Reset() {
62 page_table.attributes.fill(Memory::PageType::Unmapped); 63 page_table.attributes.fill(Memory::PageType::Unmapped);
63 page_table.cached_res_count.fill(0); 64 page_table.cached_res_count.fill(0);
64 65
65 //UpdatePageTableForVMA(initial_vma); 66 UpdatePageTableForVMA(initial_vma);
66} 67}
67 68
68VMManager::VMAHandle VMManager::FindVMA(VAddr target) const { 69VMManager::VMAHandle VMManager::FindVMA(VAddr target) const {
@@ -352,4 +353,35 @@ void VMManager::UpdatePageTableForVMA(const VirtualMemoryArea& vma) {
352 break; 353 break;
353 } 354 }
354} 355}
356
357u64 VMManager::GetTotalMemoryUsage() {
358 LOG_WARNING(Kernel, "(STUBBED) called");
359 return 0x400000;
360}
361
362u64 VMManager::GetTotalHeapUsage() {
363 LOG_WARNING(Kernel, "(STUBBED) called");
364 return 0x10000;
365}
366
367VAddr VMManager::GetAddressSpaceBaseAddr() {
368 LOG_WARNING(Kernel, "(STUBBED) called");
369 return 0x8000000;
370}
371
372u64 VMManager::GetAddressSpaceSize() {
373 LOG_WARNING(Kernel, "(STUBBED) called");
374 return MAX_ADDRESS;
375}
376
377VAddr VMManager::GetNewMapRegionBaseAddr() {
378 LOG_WARNING(Kernel, "(STUBBED) called");
379 return 0x8000000;
355} 380}
381
382u64 VMManager::GetNewMapRegionSize() {
383 LOG_WARNING(Kernel, "(STUBBED) called");
384 return 0x8000000;
385}
386
387} // namespace Kernel
diff --git a/src/core/hle/kernel/vm_manager.h b/src/core/hle/kernel/vm_manager.h
index d3db1ca8d..1f2b129d1 100644
--- a/src/core/hle/kernel/vm_manager.h
+++ b/src/core/hle/kernel/vm_manager.h
@@ -181,6 +181,24 @@ public:
181 /// Dumps the address space layout to the log, for debugging 181 /// Dumps the address space layout to the log, for debugging
182 void LogLayout(Log::Level log_level) const; 182 void LogLayout(Log::Level log_level) const;
183 183
184 /// Gets the total memory usage, used by svcGetInfo
185 u64 GetTotalMemoryUsage();
186
187 /// Gets the total heap usage, used by svcGetInfo
188 u64 GetTotalHeapUsage();
189
190 /// Gets the total address space base address, used by svcGetInfo
191 VAddr GetAddressSpaceBaseAddr();
192
193 /// Gets the total address space address size, used by svcGetInfo
194 u64 GetAddressSpaceSize();
195
196 /// Gets the base address for a new memory region, used by svcGetInfo
197 VAddr GetNewMapRegionBaseAddr();
198
199 /// Gets the size for a new memory region, used by svcGetInfo
200 u64 GetNewMapRegionSize();
201
184 /// Each VMManager has its own page table, which is set as the main one when the owning process 202 /// Each VMManager has its own page table, which is set as the main one when the owning process
185 /// is scheduled. 203 /// is scheduled.
186 Memory::PageTable page_table; 204 Memory::PageTable page_table;