summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/process.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* svc: Implement svcGetProcessInfoLioncash2018-10-131-3/+18
| | | | | | | A fairly basic service function, which only appears to currently support retrieving the process state. This also alters the ProcessStatus enum to contain all of the values that a kernel process seems to be able of reporting with regards to state.
* kernel/process: Make CodeSet a regular non-inherited objectLioncash2018-10-121-23/+5
| | | | | | | | These only exist to ferry data into a Process instance and end up going out of scope quite early. Because of this, we can just make it a plain struct for holding things and just std::move it into the relevant function. There's no need to make this inherit from the kernel's Object type.
* kernel/process: Add a data member to determine if a process is 64-bit or not.Lioncash2018-09-301-0/+10
| | | | | | | | | | | This will be necessary for the implementation of svcGetThreadContext(), as the kernel checks whether or not the process that owns the thread that has it context being retrieved is a 64-bit or 32-bit process. If the process is 32-bit, then the upper 15 general-purpose registers and upper 16 vector registers are cleared to zero (as AArch32 only has 15 GPRs and 16 128-bit vector registers. not 31 general-purpose registers and 32 128-bit vector registers like AArch64).
* kernel/process: Make data member variables privateLioncash2018-09-301-26/+71
| | | | | | | Makes the public interface consistent in terms of how accesses are done on a process object. It also makes it slightly nicer to reason about the logic of the process class, as we don't want to expose everything to external code.
* process/vm_manager: Amend API to allow reading parameters from NPDM metadataLioncash2018-09-241-0/+12
| | | | | | | | | Rather than hard-code the address range to be 36-bit, we can derive the parameters from supplied NPDM metadata if the supplied exectuable supports it. This is the bare minimum necessary for this to be possible. The following commits will rework the memory code further to adjust to this.
* svc: Move most process termination code to its own function within ProcessLioncash2018-09-211-5/+22
| | | | | Reduces the use of Process class members externally and keeps most code related to tearing down a process with the rest of the process code.
* thread/process: Move TLS slot marking/freeing to the process classLioncash2018-09-211-11/+17
| | | | | | Allows making several members of the process class private, it also avoids going through Core::CurrentProcess() just to retrieve the owning process.
* Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-2/+2
|
* kernel: Eliminate kernel global stateLioncash2018-08-291-13/+8
| | | | | | | | | | | | | | | | | | | | | | As means to pave the way for getting rid of global state within core, This eliminates kernel global state by removing all globals. Instead this introduces a KernelCore class which acts as a kernel instance. This instance lives in the System class, which keeps its lifetime contained to the lifetime of the System class. This also forces the kernel types to actually interact with the main kernel instance itself instead of having transient kernel state placed all over several translation units, keeping everything together. It also has a nice consequence of making dependencies much more explicit. This also makes our initialization a tad bit more correct. Previously we were creating a kernel process before the actual kernel was initialized, which doesn't really make much sense. The KernelCore class itself follows the PImpl idiom, which allows keeping all the implementation details sealed away from everything else, which forces the use of the exposed API and allows us to avoid any unnecessary inclusions within the main kernel header.
* kernel/process: Use std::array where applicableLioncash2018-08-031-1/+2
|
* kernel/process: Use accessors instead of class members for referencing segment arrayLioncash2018-08-031-12/+32
| | | | | | | 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.
* core/memory: Get rid of 3DS leftoversLioncash2018-08-031-13/+4
| | | | Removes leftover code from citra that isn't needed.
* kernel: Move object class to its own source filesLioncash2018-08-021-1/+1
| | | | | | General moving to keep kernel object types separate from the direct kernel code. Also essentially a preliminary cleanup before eliminating global kernel state in the kernel code.
* core: Move process creation out of global state.bunnei2018-03-141-2/+1
|
* Kernel: Store the program id in the Process class instead of the CodeSet class.Subv2018-03-021-4/+5
| | | | There may be many CodeSets per Process, so it's wasteful and overcomplicated to store the program id in each of them.
* Added more svcGetInfo pairsDavid Marcec2018-01-161-0/+2
|
* Threads: Added enum values for the Switch's 4 cpu cores and implemented svcGetInfo(AllowedCpuIdBitmask)Subv2018-01-101-0/+4
|
* svc: Implement svcExitProcess.bunnei2018-01-011-2/+11
|
* svc: Implement svcUnmapMemory.bunnei2017-12-311-0/+3
|
* kernel: Various 64-bit fixes in memory/process/threadbunnei2017-12-291-3/+3
|
* process: Add method to mirror a memory region.bunnei2017-12-291-0/+2
|
* nso: Refactor and allocate .bss section.bunnei2017-09-301-4/+5
|
* process: Support loading multiple codesets.bunnei2017-09-301-1/+7
|
* Kernel: Map special regions according to ExHeaderYuri Kunde Schlesner2017-05-101-1/+1
| | | | | | | 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.
* Remove empty newlines in #include blocks.Emmanuel Gil Peyrot2016-09-211-3/+0
| | | | | | | This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
* Sources: Run clang-format on everything.Emmanuel Gil Peyrot2016-09-181-18/+32
|
* Merge pull request #1695 from Subv/tls_allocbunnei2016-05-131-2/+5
|\ | | | | Kernel/Threads: Dynamically allocate the TLS region for threads.
| * Kernel/Threads: Dynamically allocate the TLS region for threads in the BASE region of the linear heap.Subv2016-05-071-2/+5
| | | | | | | | | | | | 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.
* | Kernel/Threading: Warn when a thread can be scheduled in the Syscore (Core 1).Subv2016-05-071-0/+2
|/ | | | We do not currently implement any cores other than the AppCore (Core 0).
* Memory: Do correct Phys->Virt address translation for non-APP linheapYuri Kunde Schlesner2016-03-061-0/+1
|
* Kernel: Implement svcGetProcessInfo in a basic wayYuri Kunde Schlesner2015-08-161-0/+2
| | | | | This also adds some basic memory usage accounting. These two types are used by Super Smash Bros. during startup.
* Kernel: Add more infrastructure to support different memory layoutsYuri Kunde Schlesner2015-08-161-1/+5
| | | | | | 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.
* Process: Store kernel compatibility version during loadingYuri Kunde Schlesner2015-08-161-0/+2
|
* Kernel: Properly implement ControlMemory FREE and COMMITYuri Kunde Schlesner2015-08-161-5/+26
|
* Core: Fix applet includes using iwyu.Emmanuel Gil Peyrot2015-07-121-0/+1
|
* Core: Properly configure address space when loading a binaryYuri Kunde Schlesner2015-07-121-7/+36
| | | | | | 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.
* Core: Cleanup file_sys includes.Emmanuel Gil Peyrot2015-06-281-1/+2
|
* Core/ResourceLimits: Implemented the basic structure of ResourceLimits.Subv2015-05-151-0/+4
| | | | | | 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.
* Core/Memory: Add TLS support for creating up to 300 threadsSubv2015-05-121-0/+3
|
* fixup!Subv2015-05-121-6/+0
|
* Core/HLE: Implemented the SVCs GetProcessId and GetProcessIdOfThreadSubv2015-05-111-0/+11
|
* Process: Rename StaticAddressMapping => AddressMappingYuri Kunde Schlesner2015-05-091-2/+2
|
* Process: Add more documentation to the class membersYuri Kunde Schlesner2015-05-091-2/+16
|
* Process: Use BitField to store process flagsYuri Kunde Schlesner2015-05-091-6/+20
|
* Process: Support parsing of exheader kernel capsYuri Kunde Schlesner2015-05-091-1/+2
|
* Kernel: Introduce skeleton Process class to hold process dataYuri Kunde Schlesner2015-05-091-0/+61