MerryMage
c02bbb7030
memory: Add GetCurrentPageTable/SetCurrentPageTable
Don't expose Memory::current_page_table as a global.
8 years ago
Subv
f18a176b60
Kernel/Memory: Make IsValidPhysicalAddress not go through the current process' virtual memory mapping.
9 years ago
Subv
214150f00c
Kernel/Memory: Changed GetPhysicalPointer so that it doesn't go through the current process' page table to obtain a pointer.
9 years ago
Subv
6d2734a074
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.
9 years ago
danzel
8266064796
Use recursive_mutex instead of mutex to fix #2902
8 years ago
Subv
f484927ed0
Kernel/Memory: Acquire the global HLE lock when a memory read/write operation falls outside of the fast path, for it might perform an MMIO operation.
9 years ago
Yuri Kunde Schlesner
d553135748
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.
9 years ago
Yuri Kunde Schlesner
f2a5a77e27
Memory: Fix crash when unmapping a VMA covering cached surfaces
Unmapping pages tries to flush any cached GPU surfaces touching that
region. When a cached page is invalidated, GetPointerFromVMA() is used
to restore the original pagetable pointer. However, since that VMA has
already been deleted, this hits an UNREACHABLE case in that function.
Now when this happens, just set the page type to Unmapped and continue,
which arrives at the correct end result.
9 years ago
Yuri Kunde Schlesner
6ae0086b39
Memory: Add TryVirtualToPhysicalAddress, returning a boost::optional
9 years ago
Yuri Kunde Schlesner
326e7c7020
Memory: Make PhysicalToVirtualAddress return a boost::optional
And fix a few places in the code to take advantage of that.
9 years ago
Yuri Kunde Schlesner
d3db770cad
Memory: Add constants for the n3DS additional RAM
This is 4MB of extra, separate memory that was added on the New 3DS.
9 years ago
bunnei
4798b1d04d
Revert "Memory: Always flush whole pages from surface cache"
9 years ago
Yuri Kunde Schlesner
f2b9be9bd3
Memory: Always flush whole pages from surface cache
This prevents individual writes touching a cached page, but which don't
overlap the surface, from constantly hitting the surface cache lookup.
9 years ago
James Rowe
bbe57a66ca
Expose page table to dynarmic for optimized reads and writes to the JIT
9 years ago
wwylele
3f87d70f0e
memory: fix IsValidVirtualAddress for RasterizerCachedMemory
RasterizerCachedMemory doesn't has pointer but should be considered as valid
9 years ago
Yuri Kunde Schlesner
84fbbe2629
Use negative priorities to avoid special-casing the self-include
9 years ago
Emmanuel Gil Peyrot
ebdae19fd2
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.
9 years ago
Emmanuel Gil Peyrot
dc8479928c
Sources: Run clang-format on everything.
9 years ago
wwylele
b2df959733
Memory: add ReadCString function
10 years ago
Subv
0aef634a54
Memory: Handle RasterizerCachedMemory and RasterizerCachedSpecial page types in the memory block manipulation functions.
10 years ago
Subv
660499ac01
Memory: Make ReadBlock and WriteBlock accept void pointers.
10 years ago
MerryMage
31d49e0109
Memory: CopyBlock
10 years ago
MerryMage
ca17df5757
Memory: ZeroBlock
10 years ago
MerryMage
3873b36db3
Memory: ReadBlock/WriteBlock
10 years ago
MerryMage
c084fc824c
Memory: IsValidVirtualAddress/IsValidPhysicalAddress
10 years ago
tfarley
22f3a7e94c
HWRasterizer: Texture forwarding
10 years ago
Yuri Kunde Schlesner
6aa90e13f9
Memory: Do correct Phys->Virt address translation for non-APP linheap
10 years ago
MerryMage
2b93313348
Memory: Implement MMIO
10 years ago
Gareth Poole
be217bca70
Fixed spelling errors
10 years ago
Lioncash
9cf1cfe3fd
memory: Get rid of pointer casts
10 years ago
Yuri Kunde Schlesner
74d4bc0af1
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.
11 years ago
Yuri Kunde Schlesner
e2c7954be5
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.
11 years ago
Yuri Kunde Schlesner
51820691e7
Memory: Fix unmapping of pages
11 years ago
Emmanuel Gil Peyrot
2d044a67c9
Common: Cleanup memory and misc includes.
11 years ago
Yuri Kunde Schlesner
0a60aa75c2
Kernel: Add VMManager to manage process address spaces
This enables more dynamic management of the process address space,
compared to just directly configuring the page table for major areas.
This will serve as the foundation upon which the rest of the Kernel
memory management functions will be built.
11 years ago
Yuri Kunde Schlesner
dd4430609a
Memory: Use a table based lookup scheme to read from memory regions
11 years ago
Yuri Kunde Schlesner
52158c1b8d
Memory: Read SharedPage directly from Memory::Read
11 years ago
Yuri Kunde Schlesner
ec514b16a6
Memory: Read ConfigMem directly from Memory::Read
11 years ago
Yuri Kunde Schlesner
7ada357b2d
Memmap: Re-organize memory function in two files
memory.cpp/h contains definitions related to acessing memory and
configuring the address space
mem_map.cpp/h contains higher-level definitions related to configuring
the address space accoording to the kernel and allocating memory.
11 years ago
Yuri Kunde Schlesner
a251721bf3
Memmap: Remove unused declarations
11 years ago
Yuri Kunde Schlesner
28a9e4c1d5
Memory: Support more regions in the VAddr-PAddr translation functions
Also adds better documentation and removes the one-off reimplementation
of the function in pica.h.
11 years ago
Yuri Kunde Schlesner
1c0b87edc2
Memory: Re-organize and rename memory area address constants
11 years ago
Yuri Kunde Schlesner
e1fbac3ca1
Common: Remove common.h
11 years ago
bunnei
bbabed8e98
Memory: Properly cleanup & shutdown.
11 years ago
Yuri Kunde Schlesner
34b009cf38
Clean-up mem_map constants and fix framebuffer translation errors
11 years ago
Lioncash
9fdb311d6e
dyncom: Make Load/Store instructions support big endian
11 years ago
Kevin Hartman
05c098a9e7
Cleaned up unaligned access.
11 years ago
archshift
ef24e72b26
Asserts: break/crash program, fit to style guide; log.h->assert.h
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)
Also removed some GEKKO cruft.
11 years ago
Zhuowei Zhang
edb8450420
Add some support for the shared page (currently 3d slider is implemented)
11 years ago
purpasmart96
d5049cbba5
MemMap: Add support for DSP Read & Writes in the memory map
11 years ago