summaryrefslogtreecommitdiff
path: root/src/core/memory.cpp
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-07-11 20:07:49 -0700
committerGravatar Yuri Kunde Schlesner2015-07-11 20:07:49 -0700
commit4e900d56f3dd2b5c9871b523689322028123d891 (patch)
tree2b233263cff7c001506f660373e2364c8e702637 /src/core/memory.cpp
parentMerge pull request #914 from yuriks/bitfield-mask (diff)
parentCore: Properly configure address space when loading a binary (diff)
downloadyuzu-4e900d56f3dd2b5c9871b523689322028123d891.tar.gz
yuzu-4e900d56f3dd2b5c9871b523689322028123d891.tar.xz
yuzu-4e900d56f3dd2b5c9871b523689322028123d891.zip
Merge pull request #912 from yuriks/process-loading
Core: Properly configure address space during binary loading
Diffstat (limited to 'src/core/memory.cpp')
-rw-r--r--src/core/memory.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp
index 172ae9054..1f66bb27d 100644
--- a/src/core/memory.cpp
+++ b/src/core/memory.cpp
@@ -59,14 +59,12 @@ static void MapPages(u32 base, u32 size, u8* memory, PageType type) {
59 while (base != end) { 59 while (base != end) {
60 ASSERT_MSG(base < PageTable::NUM_ENTRIES, "out of range mapping at %08X", base); 60 ASSERT_MSG(base < PageTable::NUM_ENTRIES, "out of range mapping at %08X", base);
61 61
62 if (current_page_table->attributes[base] != PageType::Unmapped && type != PageType::Unmapped) {
63 LOG_ERROR(HW_Memory, "overlapping memory ranges at %08X", base * PAGE_SIZE);
64 }
65 current_page_table->attributes[base] = type; 62 current_page_table->attributes[base] = type;
66 current_page_table->pointers[base] = memory; 63 current_page_table->pointers[base] = memory;
67 64
68 base += 1; 65 base += 1;
69 memory += PAGE_SIZE; 66 if (memory != nullptr)
67 memory += PAGE_SIZE;
70 } 68 }
71} 69}
72 70