summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrChat <arkolbed@gmail.com>2018-02-14 21:58:05 -0600
committerDrChat <arkolbed@gmail.com>2018-02-14 21:58:05 -0600
commit0cc2b0fc9f12e222d4da00926e14c90c0bf891b3 (patch)
tree857dabb08093dacd8fdc5d8d23a0d227e6aaac51
parentb17d6f5088976b5aed12e45d44bf5c73d91bc41d (diff)
[Core] Protect the last 64kb of memory
-rw-r--r--src/xenia/memory.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xenia/memory.cc b/src/xenia/memory.cc
index 5461f027a..87f135682 100644
--- a/src/xenia/memory.cc
+++ b/src/xenia/memory.cc
@@ -171,12 +171,14 @@ bool Memory::Initialize() {
heaps_.vE0000000.Initialize(virtual_membase_, 0xE0000000, 0x1FD00000, 4096,
&heaps_.physical);
- // Protect the first 64kb of memory.
+ // Protect the first and last 64kb of memory.
heaps_.v00000000.AllocFixed(
- 0x00000000, 64 * 1024, 64 * 1024,
+ 0x00000000, 0x10000, 0x10000,
kMemoryAllocationReserve | kMemoryAllocationCommit,
!FLAGS_protect_zero ? kMemoryProtectRead | kMemoryProtectWrite
: kMemoryProtectNoAccess);
+ heaps_.physical.AllocFixed(0x1FFF0000, 0x10000, 0x10000,
+ kMemoryAllocationReserve, kMemoryProtectNoAccess);
// GPU writeback.
// 0xC... is physical, 0x7F... is virtual. We may need to overlay these.