Commit Graph

58 Commits (2beda7c2b3d2fe70ff36edf178d9bb2f5b308bf9)

Author SHA1 Message Date
Lioncash 2beda7c2b3 kernel/process: Use accessors instead of class members for referencing segment array
Using member variables for referencing the segments array increases the
size of the class in memory for little benefit. The same behavior can be
achieved through the use of accessors that just return the relevant
segment.
7 years ago
Lioncash 26de4bb521 core/memory: Get rid of 3DS leftovers
Removes leftover code from citra that isn't needed.
7 years ago
James Rowe 638956aa81 Rename logging macro back to LOG_* 7 years ago
Lioncash 7c9644646f
general: Make formatting of logged hex values more straightforward
This makes the formatting expectations more obvious (e.g. any zero padding specified
is padding that's entirely dedicated to the value being printed, not any pretty-printing
that also gets tacked on).
7 years ago
Lioncash 843dd62c81
core: Replace usages of LOG_GENERIC with new fmt-capable equivalents 7 years ago
Lioncash 40dee76c57
kernel: Migrate logging macros to fmt-compatible ones 7 years ago
bunnei b27ab46bde memory: Fix stack region. 7 years ago
bunnei cc6f22e0e4 process: MirrorMemory should use MemoryState::Mapped. 7 years ago
bunnei e9a857ce82 process: Unmap previously allocated heap. 7 years ago
bunnei 8581404482 kernel: Move stack region outside of application heap. 7 years ago
bunnei 3923b0f589 process: Fix stack memory state. 7 years ago
bunnei 8be7131033 MemoryState: Add additional memory states and improve naming. 7 years ago
bunnei 7d6653268f core: Move process creation out of global state. 7 years ago
Subv 827f8ca3c7 Kernel: Store the program id in the Process class instead of the CodeSet class.
There may be many CodeSets per Process, so it's wasteful and overcomplicated to store the program id in each of them.
7 years ago
bunnei aa7c824ea4 svc: Implement svcExitProcess. 8 years ago
bunnei 3a91a62b8f svc: Implement svcUnmapMemory. 8 years ago
bunnei ebd4b1422d kernel: Various 64-bit fixes in memory/process/thread 8 years ago
bunnei 3421e1617e process: Add method to mirror a memory region. 8 years ago
bunnei dcd6bb82f7 hle: Fix QueryMemory response for MemoryInfo. 8 years ago
bunnei b1d5db1cf6 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
8 years ago
bunnei 23ce4f5afc loader: Various improvements for NSO/NRO loaders. 8 years ago
bunnei 8c92435ded nso: Refactor and allocate .bss section. 8 years ago
bunnei fa1c7c7ee1 process: Support loading multiple codesets. 8 years ago
Subv 3165466b66 Kernel/Thread: Allow specifying which process a thread belongs to when creating it.
Don't automatically assume that Thread::Create will only be called when the parent process is currently scheduled. This assumption will be broken when applets or system modules are loaded.
8 years ago
Yuri Kunde Schlesner 90b8d4dd36 Kernel: Add comment about the extended linear heap area 8 years ago
Yuri Kunde Schlesner 2cdb40d709 Kernel: Centralize error definitions in errors.h 8 years ago
Yuri Kunde Schlesner f18d454eb6 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.
8 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
Yuri Kunde Schlesner 396a8d91a4 Manually tweak source formatting and then re-run clang-format 9 years ago
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 9 years ago
Subv 42a50da76b Kernel/SVC: Fixed the register order for svcCreateMemoryBlock.
R0 is used as the last parameter instead of R4.
9 years ago
MerryMage a06dcfeb61 Common: Remove Common::make_unique, use std::make_unique 9 years ago
Yuri Kunde Schlesner 6aa90e13f9 Memory: Do correct Phys->Virt address translation for non-APP linheap 9 years ago
MerryMage 6c71858c5c BitField: Make trivially copyable and remove assignment operator 10 years ago
Yuri Kunde Schlesner 84a22cb594 Kernel: Implement svcGetSystemInfo
This makes smealum/ctrulib@b96dd51d33 work
with Citra.
10 years ago
Yuri Kunde Schlesner 0ee3e2c25e Kernel: Fix wrong linear heap base on titles using newer kernels
Typo which sneaked in through review on #1025
10 years ago
Yuri Kunde Schlesner 12390eb155 Kernel: Fix assertion failure when ControlMemory is called with size=0 10 years ago
Yuri Kunde Schlesner 14eca982f4 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.
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.
10 years ago
Yuri Kunde Schlesner 69c3021a8d Move core/mem_map.{cpp,h} => core/hle/kernel/memory.{cpp,h} 10 years ago
Yuri Kunde Schlesner a12a30c9e0 Process: Store kernel compatibility version during loading 10 years ago
Yuri Kunde Schlesner cdeeecf080 Kernel: Properly implement ControlMemory FREE and COMMIT 10 years ago
Yuri Kunde Schlesner b9a9ad9742 VMManager: Make LogLayout log level configurable as a parameter 10 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.
10 years ago
bunnei f0365f28c2 Merge pull request #772 from lioncash/warn
core/video_core: Fix a few warnings when compiling on MSVC.
10 years ago
Subv d3634d4bf4 Core/ResourceLimits: Implemented the basic structure of ResourceLimits.
Implemented svcs GetResourceLimit, GetResourceLimitCurrentValues and GetResourceLimitLimitValues.

Note that the resource limits do not currently keep track of used objects, since we have no way to distinguish between an object created by the application, and an object created by some HLE module once we're inside Kernel::T::Create.
10 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.
10 years ago
Lioncash 150e700729 process: Get rid of warnings
Sign mismatches and "forcing value to bool" warnings.
10 years ago
Yuri Kunde Schlesner 820b97787c Merge pull request #750 from Subv/process_svc
Core/HLE: Implemented the SVCs GetProcessId and GetProcessIdOfThread
10 years ago