Commit Graph

81 Commits

Author SHA1 Message Date
Dr. Chat aee5601c68 xboxkrnl: Initial (untested) implementation of NtProtectVirtualMemory 2017-07-24 21:41:47 -05:00
Dr. Chat e388b74dbe BaseHeap::Release: Disallow freeing of 0x0 2017-05-17 04:44:48 -05:00
Dr. Chat 92859f5a28 Protect the first 64kb of virtual memory with no access permissions by default. 2016-08-03 18:46:15 -05:00
gibbed 16a15bab98 Exposed total page count. 2016-06-21 10:10:08 -05:00
gibbed d07e16b056 I'm bad. 2016-06-21 10:09:45 -05:00
gibbed 32e0ef397c Attempt at reporting something of an 'accurate' unreserved physical page
count. Still needs work.
2016-06-21 09:37:21 -05:00
gibbed 6a082c42d3 Fixed top-down memory allocations when alignment > page size. 2016-06-20 12:02:48 -05:00
Dr. Chat 0e3c113375 Physical write watches -> access watches (read and/or write watching) 2016-03-17 21:55:16 -05:00
Ben Vanik 431088d35e Faster clearing of heaps to speed up tests. 2015-12-29 20:26:01 -08:00
Dr. Chat 9ed81b6876 Fix not assigning write access to WriteCombine pages on restore. 2015-12-29 13:09:40 -08:00
Dr. Chat 5ef21d3714 memory: Write no access pages to the savefile. 2015-12-29 13:09:36 -08:00
Ben Vanik bbff23a8bb REBASE: Fixing Memory::Reset(). 2015-12-29 13:09:18 -08:00
Dr. Chat 432e32f7c2 memory Save/Restore 2015-12-29 13:09:18 -08:00
Ben Vanik ca8d658ffe Speeding up PPC tests significantly. 2015-12-27 12:03:30 -08:00
Ben Vanik 295c62c7a4 Guarding protect-on-release behavior behind --protect_on_release.
Workaround for #456 until it can be identified.
2015-12-05 23:27:25 -08:00
Ben Vanik 249b952de9 Adding some comments. 2015-12-02 17:37:48 -08:00
Dr. Chat c98d10545e Invalidate MMIO Ranges when memory is released or access protections are changed. 2015-11-08 19:14:06 -06:00
Dr. Chat a2bc0443f2 Quick-kill the MMIO handler if the fault address is above the mapping range. 2015-09-07 21:26:33 -05:00
Ben Vanik 068b2056ca Explode more gracefully on crashes while crashing. 2015-09-06 13:34:39 -07:00
Ben Vanik 3c96b6fa0a DANGER DANGER. Switching to global critical region.
This changes almost all locks held by guest threads to use a single global
critical region. This emulates the behavior on the PPC of disabling
interrupts (by calls like KeRaiseIrqlToDpcLevel or masking interrupts),
and prevents deadlocks from occuring when threads are suspended or
otherwise blocked.
This has performance implications and a pass is needed to ensure the
locking is as granular as possible. It could also break everything
because it's fundamentally unsound. We'll see.
2015-09-06 09:30:54 -07:00
Rhodan81 9427d03d5a Fix crash in memory allocation when there is no space to fit entire page
range
2015-09-05 15:53:05 +02:00
Ben Vanik 5e08889d93 More style cleanup. 2015-08-06 20:17:01 -07:00
sephiroth99 510a8e59cf memory: fix out of bounds access in BaseHeap::AllocRange
Prevent out of bounds access of page_table_ by making sure the requested
page count fits in the requested page range.
2015-07-30 02:27:55 -04:00
Ben Vanik 12a29371e3 Clang fixes. 2015-07-19 18:32:48 -07:00
Ben Vanik 91d7acf59e Fixing some particularly bad /W4. 2015-07-18 23:04:21 -07:00
Ben Vanik 8154d1dad6 Moving xe::Memory and code cache to abstracted APIs. 2015-07-15 22:10:05 -07:00
Ben Vanik 6cf29b969d Abstraction for VirtualAlloc/VirtualFree. 2015-07-15 19:05:08 -07:00
Ben Vanik 58c3a1ba79 VirtualProtect platform abstraction. 2015-07-15 18:20:05 -07:00
Ben Vanik fc7695f874 Take the whole 64k page at 0x0. 2015-06-23 18:06:37 -07:00
Ben Vanik fb1f4906d9 xb format --all (we are now format clean). Buildbot will yell at you. 2015-06-22 22:26:51 -07:00
Drew DeVault a064ba053e Add missing includes for cstring 2015-06-16 23:16:18 -06:00
Ben Vanik 9d7d6df476 Bail on invalid heap lookups. 2015-06-08 17:49:54 -07:00
Ben Vanik 52b8f4b54b Removing memory reservation value check for load/store. 2015-06-07 21:57:44 -07:00
gibbed dae8aa4386 Added --protect_zero command-line argument to protect page zero from read/writes. 2015-06-05 16:13:34 -05:00
Ben Vanik 53527bef17 Fixing heap frees. 2015-06-04 19:18:00 -07:00
Ben Vanik 319402a11a Re-allow writes to 0. No clue why, but everything does it. 2015-06-04 16:37:17 -07:00
Dr. Chat abacf136a0 Protect page 0 with no access 2015-06-04 16:21:38 -05:00
Ben Vanik a9e2ba16fb Optimizing page allocation (still shit) and adding MmSetAddressProtect. 2015-06-03 21:24:09 -07:00
Ben Vanik 40a6a12800 Attempting to inline a lot of MMIO operations. Works for GPU stuff mainly. 2015-06-02 20:15:43 -07:00
Ben Vanik c4ef5d4eb8 Allow AllocFixed of unreserved ranges. 2015-05-29 21:47:19 -07:00
gibbed d1dbee2052 Consistency in memset calls. 2015-05-28 05:28:59 -05:00
Ben Vanik 8244409501 Refactoring to enable future time scaling, coordinated clocks, etc. 2015-05-26 22:20:58 -07:00
Ben Vanik e3ddcd44e7 Minor fixes and fixing thread names. 2015-05-25 21:10:28 -07:00
Ben Vanik 9607eef9d6 Fixing page alloc in range; only happens right before OOM crash though :/ 2015-05-25 10:28:36 -07:00
Ben Vanik f5a2b85d42 Switching to xe::mutex. 2015-05-25 00:52:21 -07:00
Ben Vanik da655d15b3 Sharing memory. 2015-05-25 00:51:23 -07:00
gibbed ea99ba8e3b 0x7F000000-0x7FFFFFFF is magic. 2015-05-22 02:20:05 -05:00
Ben Vanik b119aa50f5 Fixing thread ID. 2015-05-18 21:24:14 -07:00
Ben Vanik 8bfc43bb0d Trying to do MMIO protects on allocation granularity. 2015-05-18 20:47:41 -07:00
Ben Vanik 7796f5cb60 Fixing page guards to work at system page granularity. 2015-05-18 20:25:15 -07:00