summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/device_memory.cpp5
-rw-r--r--src/core/device_memory.h4
-rw-r--r--src/core/memory.cpp3
3 files changed, 5 insertions, 7 deletions
diff --git a/src/core/device_memory.cpp b/src/core/device_memory.cpp
index f19c0515f..e6bc63086 100644
--- a/src/core/device_memory.cpp
+++ b/src/core/device_memory.cpp
@@ -3,10 +3,13 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "core/device_memory.h" 5#include "core/device_memory.h"
6#include "hle/kernel/board/nintendo/nx/k_system_control.h"
6 7
7namespace Core { 8namespace Core {
8 9
9DeviceMemory::DeviceMemory() : buffer{DramMemoryMap::Size, 1ULL << 39} {} 10DeviceMemory::DeviceMemory()
11 : buffer{Kernel::Board::Nintendo::Nx::KSystemControl::Init::GetIntendedMemorySize(),
12 1ULL << 39} {}
10DeviceMemory::~DeviceMemory() = default; 13DeviceMemory::~DeviceMemory() = default;
11 14
12} // namespace Core 15} // namespace Core
diff --git a/src/core/device_memory.h b/src/core/device_memory.h
index c4d17705f..daeb551ea 100644
--- a/src/core/device_memory.h
+++ b/src/core/device_memory.h
@@ -12,12 +12,8 @@ namespace Core {
12namespace DramMemoryMap { 12namespace DramMemoryMap {
13enum : u64 { 13enum : u64 {
14 Base = 0x80000000ULL, 14 Base = 0x80000000ULL,
15 Size = 0x100000000ULL,
16 End = Base + Size,
17 KernelReserveBase = Base + 0x60000, 15 KernelReserveBase = Base + 0x60000,
18 SlabHeapBase = KernelReserveBase + 0x85000, 16 SlabHeapBase = KernelReserveBase + 0x85000,
19 SlapHeapSize = 0xa21000,
20 SlabHeapEnd = SlabHeapBase + SlapHeapSize,
21}; 17};
22}; // namespace DramMemoryMap 18}; // namespace DramMemoryMap
23 19
diff --git a/src/core/memory.cpp b/src/core/memory.cpp
index 88d6ec908..28d30eee2 100644
--- a/src/core/memory.cpp
+++ b/src/core/memory.cpp
@@ -39,8 +39,7 @@ struct Memory::Impl {
39 void MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size, PAddr target) { 39 void MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size, PAddr target) {
40 ASSERT_MSG((size & PAGE_MASK) == 0, "non-page aligned size: {:016X}", size); 40 ASSERT_MSG((size & PAGE_MASK) == 0, "non-page aligned size: {:016X}", size);
41 ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: {:016X}", base); 41 ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: {:016X}", base);
42 ASSERT_MSG(target >= DramMemoryMap::Base && target < DramMemoryMap::End, 42 ASSERT_MSG(target >= DramMemoryMap::Base, "Out of bounds target: {:016X}", target);
43 "Out of bounds target: {:016X}", target);
44 MapPages(page_table, base / PAGE_SIZE, size / PAGE_SIZE, target, Common::PageType::Memory); 43 MapPages(page_table, base / PAGE_SIZE, size / PAGE_SIZE, target, Common::PageType::Memory);
45 44
46 if (Settings::IsFastmemEnabled()) { 45 if (Settings::IsFastmemEnabled()) {