Commit Graph

128 Commits

Author SHA1 Message Date
Triang3l
a73592c2ef [Memory/CPU] UWP: Support separate code execution and write memory, FromApp functions + other Windows memory fixes 2020-11-24 22:18:50 +03:00
Gliniak
a6868d1f8a [Memory] Removed redundant BaseHeap::IsGuestPhysicalHeap 2020-11-22 15:43:53 -06:00
Gliniak
c071500ff4 [Base] Specify heap type on initialization 2020-11-22 15:43:53 -06:00
Triang3l
86ae42919d [Memory] Close shared memory FD and properly handle its invalid value 2020-11-22 14:17:37 +03:00
Sandy Carter
49e194009b [memory linux] Properly unlink shared memory
shm_unlink(name) is the proper way to close a shared memory in linux.
Prior to this, xenia was creating and not cleaning up shared memory handle
which would accumulate in /dev/shm. shm_unlink is the proper way of doing
this.
Add filename to CloseFileMappingHandle signature.
Add simple test to open and close.
2020-11-22 13:54:00 +03:00
Sandy Carter
2c7009ca80 [memory] Move "Local\\" prefix to win impl
CreateFileMappingHandle now takes shared memory name without a prefix.
The doc of shm_open recommends not using slashes and prefixing with "/".
The prefixing has been moved to the os implementation layer.
Invocations of CreateFileMappingHandle were all using "Local\\" so these
prefixes were removed.
2020-11-22 13:54:00 +03:00
Triang3l
52efbcf741 [Memory] Fix Protect range calculation 2020-09-01 12:44:37 +03:00
gibbed
a48bb71c2f Overhaul logging. 2020-04-07 16:09:41 -05:00
gibbed
5bf0b34445 C++17ification.
C++17ification!

- Filesystem interaction now uses std::filesystem::path.
- Usage of const char*, std::string have been changed to
  std::string_view where appropriate.
- Usage of printf-style functions changed to use fmt.
2020-04-07 16:09:41 -05:00
Triang3l
c156616103 [Memory] Invalidate physical memory in Release/Decommit (#1559) 2020-02-24 01:04:30 +03:00
Triang3l
d156c3275d [Memory] Fix incorrect comparison in QueryRangeAccess 2020-02-22 18:12:46 +03:00
Triang3l
f858631245 [Kernel] Trigger memory callbacks after file read 2020-02-22 18:06:56 +03:00
Triang3l
028c784c5c [Memory] Make heap_size actually mean size rather than high address 2020-02-22 14:55:28 +03:00
Triang3l
8ec813de82 [Memory, D3D12] Various refactoring from data provider development 2020-02-15 21:35:24 +03:00
Triang3l
8ba6f3fc37 [Memory] Trigger watches when making pages writable, not the other way around 2019-11-10 14:21:36 +03:00
Triang3l
7e6bf8022f [Memory] Refactor GetPhysicalAddress and use it for XMA, resolve #1448 2019-08-24 17:42:06 +03:00
Triang3l
e35c609224 Revert "[APU] Temp XMA context allocation region workaround"
This reverts commit 968c337d22.
2019-08-16 21:11:55 +03:00
Triang3l
968c337d22 [APU] Temp XMA context allocation region workaround 2019-08-16 09:47:28 +03:00
Triang3l
126978d960 [Memory] Fix memory watch addresses 2019-08-16 08:49:48 +03:00
Triang3l
834ced0d63 [Memory] 0xE0000000: Fix a typo, re-enable and cleanup 2019-08-15 23:55:33 +03:00
Triang3l
e862169156 [Memory] BaseHeap::TranslateRelative including host address offset 2019-08-15 00:31:21 +03:00
Triang3l
0451153760 [Memory] Temporarily disable allocation in 0xE0000000 2019-08-15 00:06:27 +03:00
Triang3l
003c02c640 [CPU, Memory] 0xE0000000 adjustment by @elad335 and mapping 2019-08-14 21:37:52 +03:00
Triang3l
0067f5561d [Kernel] More TranslateVirtual/HostToGuestVirtual usage 2019-08-14 08:28:30 +03:00
Triang3l
2152c79965 [Memory] 0xE… adjustment in TranslateVirtual 2019-08-14 00:07:27 +03:00
Triang3l
741b5ae2ec [Memory] Add HostToGuestVirtual and use it in a couple of places 2019-08-13 23:49:49 +03:00
Triang3l
cb0e18c7dc [Memory] BaseHeap::host_address_offset 2019-08-04 23:55:54 +03:00
Triang3l
25675cb8b8 [Memory] E0000000 adjustment in watches only for Windows 2019-08-04 23:10:59 +03:00
Triang3l
d20c2fa9da [Memory/Vulkan] Move old memory watches to the Vulkan backend 2019-08-03 21:06:59 +03:00
Triang3l
0370f8bbd9 [Memory] Pass exact_range to watch callbacks 2019-08-03 19:16:04 +03:00
Triang3l
352f12f92e [D3D12] Switch from gflags to cvars 2019-08-03 16:53:23 +03:00
Jonathan Goyvaerts
c1af632562 Replace all gflag implementations with cvar implementations 2019-08-03 02:34:07 +02:00
Triang3l
9d0986030f [Memory] Don't mark non-writable pages as watched 2019-07-31 08:40:26 +03:00
Triang3l
24383b9137 [Memory/D3D12] Unwatch up to 256 KB ranges 2019-07-31 00:18:12 +03:00
Triang3l
b5fb84473d [Memory] Replace forgotten InvalidateRange in NtReadFile 2019-07-30 09:06:23 +03:00
Triang3l
4aceeb73c4 [Memory] Move new watches to heap-aware Memory from MMIOHandler 2019-07-30 08:00:20 +03:00
Triang3l
6e36101b42 [D3D12] Experimental write watch implementation for shared memory 2018-09-24 23:18:16 +03:00
Triang3l
db625892ea [D3D12] Shared memory typo fix and improvements 2018-08-01 01:09:51 +03:00
Triang3l
4f7edff19d [D3D12] SHM: Watches prototype, some uploading 2018-07-26 22:52:26 +03:00
DrChat
db53559611 Merge branch 'master' 2018-02-16 16:34:17 -06:00
DrChat
0cc2b0fc9f [Core] Protect the last 64kb of memory 2018-02-14 21:58:05 -06:00
DrChat
d0460122f4 [Core] BaseHeap::QueryBaseAndSize 2018-02-10 21:58:44 -06:00
DrChat
e3787c05c1 [Core] QueryRegionInfo - report the original allocation size 2018-02-10 19:14:58 -06:00
DrChat
325599948a [Core] Remove hardcoded type field from HeapAllocationInfo 2018-02-10 16:47:53 -06:00
DrChat
4db94473ec [Core] Memory::GetPhysicalHeap 2018-02-10 16:45:06 -06:00
DrChat
063db77346 [Core] Don't pass in old protection pointer if the caller doesn't need it 2017-12-20 17:54:31 -06:00
DrChat
aaf281351d Format all code with new clang-format 2017-12-14 20:44:43 -06:00
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