Commit graph

101 commits

Author SHA1 Message Date
bunnei
31748079de gl_rasterizer_cache: Update to be based on GPU addresses, not CPU addresses. 2018-04-24 22:31:45 -04:00
bunnei
36cdd5a39c memory: Fix stack region. 2018-03-31 16:06:45 -04:00
bunnei
49b3b519fc memory: Add RasterizerMarkRegionCached code and cleanup. 2018-03-26 21:16:57 -04:00
bunnei
79b3adba8e Merge pull request #265 from bunnei/tegra-progress-2
Tegra progress 2
2018-03-23 23:30:48 -04:00
bunnei
6131f96f6a rasterizer: Flush and invalidate regions should be 64-bit. 2018-03-23 15:01:45 -04:00
bunnei
c9c232727c memory: Port RasterizerFlushVirtualRegion from Citra. 2018-03-22 22:56:41 -04:00
N00byKing
35d617d342 Remove more N3DS References 2018-03-22 21:25:06 +01:00
bunnei
89312134f6 memory: Add regions for map region, "new" map region, etc. 2018-03-16 18:32:22 -04:00
MerryMage
2a0362fe5d arm_dynarmic: Support direct page table access 2018-02-12 21:53:32 +00:00
MerryMage
7a23a53396 memory: Replace all memory hooking with Special regions 2018-01-27 15:16:39 +00:00
David
f10082f410 Update memory.h 2018-01-16 15:27:13 -08:00
David Marcec
57523d6fab Increased heap size and changed tls area vaddr 2018-01-16 13:53:43 -08:00
bunnei
4728cc141a core/video_core: Fix a bunch of u64 -> u32 warnings. 2018-01-01 15:40:35 -05:00
bunnei
58cf9d847a svc: Implement MapMemory. 2017-12-28 21:38:38 -05:00
bunnei
ec6eb66383 memory: Support 32-bit paging, move heap address space up. 2017-10-22 23:17:59 -04:00
bunnei
775cf60729 Merge remote-tracking branch 'upstream/master' into nx
# Conflicts:
#	src/core/CMakeLists.txt
#	src/core/arm/dynarmic/arm_dynarmic.cpp
#	src/core/arm/dyncom/arm_dyncom.cpp
#	src/core/hle/kernel/process.cpp
#	src/core/hle/kernel/thread.cpp
#	src/core/hle/kernel/thread.h
#	src/core/hle/kernel/vm_manager.cpp
#	src/core/loader/3dsx.cpp
#	src/core/loader/elf.cpp
#	src/core/loader/ncch.cpp
#	src/core/memory.cpp
#	src/core/memory.h
#	src/core/memory_setup.h
2017-10-09 23:56:20 -04:00
bunnei
e36ccd5ff1 loader: Various improvements for NSO/NRO loaders. 2017-10-09 21:39:32 -04:00
Subv
1265575db5 Memory: Make WriteBlock take a Process parameter on which to operate 2017-10-01 14:18:36 -05:00
Subv
bf55d2f57e Memory: Make ReadBlock take a Process parameter on which to operate 2017-10-01 14:18:36 -05:00
bunnei
e5731e94d6 core: Various changes to support 64-bit addressing. 2017-09-30 14:28:54 -04:00
Subv
3cb2bf08c3 Memory: Allow IsValidVirtualAddress to be called with a specific process parameter.
There is still an overload of IsValidVirtualAddress that only takes the VAddr and will default to the current process.
2017-09-26 17:27:44 -05:00
MerryMage
ecf27fbf82 memory: Remove GetCurrentPageTablePointers 2017-09-24 22:43:28 +01:00
MerryMage
6b8ad273fc memory: Add GetCurrentPageTable/SetCurrentPageTable
Don't expose Memory::current_page_table as a global.
2017-09-24 22:42:42 +01:00
Subv
71281c2114 Kernel/Memory: Changed GetPhysicalPointer so that it doesn't go through the current process' page table to obtain a pointer. 2017-09-15 14:26:13 -05:00
Subv
36100ec791 Kernel/Memory: Give each Process its own page table.
The loader is in charge of setting the newly created process's page table as the main one during the loading process.
2017-09-10 15:13:41 -05:00
Yuri Kunde Schlesner
1423b3b10e Memory: Add function to flush a virtual range from the rasterizer cache
This is slightly more ergonomic to use, correctly handles virtual
regions which are disjoint in physical addressing space, and checks only
regions which can be cached by the rasterizer.
2017-06-21 22:57:12 -07:00
Yuri Kunde Schlesner
75be7907c1 Memory: Add TryVirtualToPhysicalAddress, returning a boost::optional 2017-06-21 22:55:18 -07:00
Yuri Kunde Schlesner
1dd91e371b Memory: Make PhysicalToVirtualAddress return a boost::optional
And fix a few places in the code to take advantage of that.
2017-06-21 22:55:17 -07:00
Yuri Kunde Schlesner
2cb9a2538b Memory: Add enum definitions for the n3DS FCRAM size 2017-06-20 22:03:25 -07:00
Yuri Kunde Schlesner
2af0a2a4b7 Memory: Add constants for the n3DS additional RAM
This is 4MB of extra, separate memory that was added on the New 3DS.
2017-05-09 21:43:59 -07:00
James Rowe
13888eac06 Expose page table to dynarmic for optimized reads and writes to the JIT 2016-11-24 20:41:18 -07:00
Emmanuel Gil Peyrot
1138ec0d49 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
2016-09-21 11:15:47 +09:00
Emmanuel Gil Peyrot
628ed4376a Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
wwylele
3008911345 Memory: add ReadCString function 2016-08-27 21:38:06 +08:00
Subv
9d36016350 Memory: Make ReadBlock and WriteBlock accept void pointers. 2016-05-28 13:52:49 -05:00
MerryMage
c3ad268edc Memory: CopyBlock 2016-05-28 13:44:49 -05:00
MerryMage
73cc880444 Memory: ZeroBlock 2016-05-21 11:14:09 -05:00
MerryMage
c1c78c27c2 Memory: ReadBlock/WriteBlock 2016-05-21 11:12:36 -05:00
MerryMage
b6feee037b Memory: IsValidVirtualAddress/IsValidPhysicalAddress 2016-05-21 11:12:35 -05:00
bunnei
1302ffa822 Merge pull request #1695 from Subv/tls_alloc
Kernel/Threads: Dynamically allocate the TLS region for threads.
2016-05-12 21:51:35 -04:00
Subv
d9baef11f2 Kernel/Threads: Dynamically allocate the TLS region for threads in the BASE region of the linear heap.
Each thread gets a 0x200-byte area from the 0x1000-sized page, when all 8 thread slots in a single page are used up, the kernel allocates a new page to hold another 8 entries.

This is consistent with what the real kernel does.
2016-05-07 10:18:47 -05:00
tfarley
459035a108 HWRasterizer: Texture forwarding 2016-04-21 17:27:56 -04:00
Yuri Kunde Schlesner
91fcf7f484 Fix broken boot introduced by last-minute change in #1025 2015-08-22 18:12:23 -03:00
Yuri Kunde Schlesner
00e9d19f28 Kernel: Implement svcGetProcessInfo in a basic way
This also adds some basic memory usage accounting. These two types are
used by Super Smash Bros. during startup.
2015-08-16 01:03:48 -03:00
Yuri Kunde Schlesner
e34643a3e4 Kernel: Add more infrastructure to support different memory layouts
This adds some structures necessary to support multiple memory regions
in the future. It also adds support for different system memory types
and the new linear heap mapping at 0x30000000.
2015-08-16 01:03:47 -03:00
Yuri Kunde Schlesner
168d376c67 Memory: Move address type conversion routines to memory.cpp/h
These helpers aren't really part of the kernel, and mem_map.cpp/h is
going to be moved there next.
2015-08-16 01:03:46 -03:00
Yuri Kunde Schlesner
fbcf0558f3 Memory: Move PAGE_MASK and PAGE_BITS to memory.h 2015-08-16 01:03:44 -03:00
Emmanuel Gil Peyrot
2d044a67c9 Common: Cleanup memory and misc includes. 2015-06-28 00:36:54 +01:00
Emmanuel Gil Peyrot
b1503b2020 Remove every trailing whitespace from the project (but externals). 2015-05-29 21:59:29 +01:00
Yuri Kunde Schlesner
dd4430609a Memory: Use a table based lookup scheme to read from memory regions 2015-05-15 00:04:43 -03:00