Yuri Kunde Schlesner
2668c26a68
Kernel: Map special regions according to ExHeader
This replaces the hardcoded VRAM/DSP mappings with ones made based on
the ExHeader ARM11 Kernel caps list. While this has no visible effect
for most applications (since they use a standard set of mappings) it
does improve support for system modules and n3DS exclusives.
9 years ago
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.
9 years ago
Emmanuel Gil Peyrot
628ed4376a
Sources: Run clang-format on everything.
9 years ago
Yuri Kunde Schlesner
5bed732b03
Kernel: Implement svcGetSystemInfo
This makes smealum/ctrulib@b96dd51d3349961189d4ab1bc2a5c45deff21c09 work
with Citra.
10 years ago
Yuri Kunde Schlesner
984bea6698
Kernel: Remove unused legacy heap MapBlock_* functions
11 years ago
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.
11 years ago
Yuri Kunde Schlesner
6bb23baf0a
Move core/mem_map.{cpp,h} => core/hle/kernel/memory.{cpp,h}
11 years ago
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.
11 years ago
Yuri Kunde Schlesner
5c5cf2f8e0
Core: Properly configure address space when loading a binary
The code now properly configures the process image to match the loaded
binary segments (code, rodata, data) instead of just blindly allocating
a large chunk of dummy memory.
11 years ago
Yuri Kunde Schlesner
88365a23e7
Memmap: Remove unused global pointers to memory areas
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
Subv
dda94e56dd
Core/Memory: Add TLS support for creating up to 300 threads
11 years ago
Yuri Kunde Schlesner
17a8cae003
Memory: Add GetPhysicalPointer helper function
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
e7b6ed7578
Memory: Sort memory region variables by VAddr
11 years ago
Yuri Kunde Schlesner
1c0b87edc2
Memory: Re-organize and rename memory area address constants
11 years ago
Yuri Kunde Schlesner
2af30d465f
Process: Support parsing of exheader kernel caps
11 years ago
Yuri Kunde Schlesner
3396f352cb
Common: Remove mem_arena.cpp/h
It is superfluous for Citra. (It's only really necessary if you're doing
JIT. We were using it but not taking any advantage from it.) This should
make 32-bit builds work again.
11 years ago
Yuri Kunde Schlesner
c0eaa662d4
Clean-up includes
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
Yuri Kunde Schlesner
b5ee4f9df9
Move VAddr/PAddr typedefs to kernel.h
11 years ago
purpasmart96
d5049cbba5
MemMap: Add support for DSP Read & Writes in the memory map
11 years ago
purpasmart96
ebfd831ccb
License change
11 years ago
purpasmart96
23ae8aa4d3
MemMap: Added AXI_WRAM & SHARED_PAGE along with other stuff
Got rid of I/O address's since the I/O addresses range's overlap with other
address's types such as vram, these I/O addresses need to be done in an different
way.
11 years ago
bunnei
4cb7a44d4e
MemMap: Renamed "GSP" heap to "linear", as this is not specific to GSP.
- Linear simply indicates that the mapped physical address is always MappedVAddr+0x0C000000, thus this memory can be used for hardware devices' DMA (such as the GPU).
11 years ago
Lioncash
3ba32d2b53
mem_map: Make enum for addresses use u32 as the underlying type
11 years ago
archshift
a404ad5272
Add stub for ConvertProcessFromDspDram
Should theoretically push retail stuff further along
11 years ago
bunnei
e3886adc22
MemMap: Updated memory map to subtract base address instead of mask.
- More readable, a little less error prone.
Conflicts:
src/core/mem_map.h
src/core/mem_map_funcs.cpp
11 years ago
Lioncash
64cc6cb6cf
Fix documentation of parameters
11 years ago
Lioncash
cfea27a615
mem_map: Add missing prototype for Write64
11 years ago
Yuri Kunde Schlesner
83c3d2bcd1
Introduce VAddr and PAddr typedefs for ARM addresses.
11 years ago
Tony Wasserka
7b6a7d7dfb
Pica/GPU: Change hardware registers to use physical addresses rather than virtual ones.
This cleans up the mess that address reading/writing had become and makes the code a *lot* more sensible.
This adds a physical<->virtual address converter to mem_map.h. For further accuracy, we will want to properly extend this to support a wider range of address regions. For now, this makes simply homebrew applications work in a good manner though.
12 years ago
bunnei
882dc07929
Memory: Removed deprecated MapBlock_Shared function.
12 years ago
bunnei
3013015a0c
mem_map: Updated interface to expose template functions to other modules.
12 years ago
bunnei
6aebd4ac98
MemMap: Added a WriteBlock function to write a buffer of data to memory.
12 years ago
bunnei
4910b6f336
added memory mapped region for system mem - sdk demos load a segment here on ELF load
12 years ago
bunnei
f23e99bb85
added kernel memory to mem_map
12 years ago
bunnei
a3a383cb7a
added mem_map read for config_mem
12 years ago
bunnei
924e7b6af8
fixed a bug where ExeFs code was being incorrectly masked
12 years ago
bunnei
235dddb3f1
added virtual memory map for ExeFS (where ARM11 code is supposed to be loaded)
12 years ago
bunnei
c37390f8e2
reorganized memory regions enum, added regions for ExeFS code
12 years ago
bunnei
af921daa4c
added virtual address conversion for firmware FW0B
12 years ago
bunnei
b2a6ad52f4
added helper functions to mem_map to convert physical addresses to virtual addresses
12 years ago
bunnei
f78794961e
- changed HW IO map to use virtual addresses
- added hooks to catch LCD IO read/writes
12 years ago
bunnei
86a515e5ac
added vram to memory_map
12 years ago
bunnei
890c7261d2
- added preliminary support for svc_MapMemoryBlock
- added shared memory region
- moarrrr cleanups to memory_map
12 years ago
bunnei
b7cd4c9e90
added functions to map Heap and Shared memory space
12 years ago