- Feb 16, 2019
-
-
Lioncash authored
Avoids the use of the global accessor in favor of explicitly making the system a dependency within the interface.
-
Lioncash authored
Gets rid of the largest set of mutable global state within the core. This also paves a way for eliminating usages of GetInstance() on the System class as a follow-up. Note that no behavioral changes have been made, and this simply extracts the functionality into a class. This also has the benefit of making dependencies on the core timing functionality explicit within the relevant interfaces.
-
- Feb 12, 2019
-
-
Lioncash authored
Places all of the timing-related functionality under the existing Core namespace to keep things consistent, rather than having the timing utilities sitting in its own completely separate namespace.
-
- Feb 07, 2019
-
-
ReinUsesLisp authored
-
ReinUsesLisp authored
-
ReinUsesLisp authored
-
- Jan 17, 2019
-
-
Lioncash authored
This is a function that definitely doesn't always have a non-modifying behavior across all implementations, so this should be made non-const. This gets rid of the need to mark data members as mutable to work around the fact mutating data members needs to occur.
-
- Jan 08, 2019
-
-
Zach Hilman authored
-
Zach Hilman authored
-
- Dec 28, 2018
-
-
Zach Hilman authored
-
Zach Hilman authored
-
- Dec 03, 2018
-
-
Zach Hilman authored
-
Zach Hilman authored
-
- Nov 22, 2018
-
-
Lioncash authored
Keeps the CPU-specific behavior from being spread throughout the main System class. This will also act as the home to contain member functions that perform operations on all cores. The reason for this being that the following pattern is sort of prevalent throughout sections of the codebase: If clearing the instruction cache for all 4 cores is necessary: Core::System::GetInstance().ArmInterface(0).ClearInstructionCache(); Core::System::GetInstance().ArmInterface(1).ClearInstructionCache(); Core::System::GetInstance().ArmInterface(2).ClearInstructionCache(); Core::System::GetInstance().ArmInterface(3).ClearInstructionCache(); This is kind of... well, silly to copy around whenever it's needed. especially when it can be reduced down to a single line. This change also puts the basics in place to begin "ungrafting" all of the forwarding member functions from the System class that are used to access CPU state or invoke CPU-specific behavior. As such, this change itself makes no changes to the direct external interface of System. This will be covered by another changeset.
-
- Nov 18, 2018
-
-
Zach Hilman authored
-
- Oct 30, 2018
-
-
Frederic L authored
* get rid of boost::optional * Remove optional references * Use std::reference_wrapper for optional references * Fix clang format * Fix clang format part 2 * Adressed feedback * Fix clang format and MacOS build
-
- Oct 28, 2018
-
-
Lioncash authored
Many of the Current<Thing> getters (as well as a few others) were missing const qualified variants, which makes it a pain to retrieve certain things from const qualified references to System.
-
- Oct 18, 2018
-
-
Lioncash authored
CpuCore already does this sort of checking, so we can just call that instead of duplicating the assertions.
-
- Oct 15, 2018
-
-
Lioncash authored
-
Lioncash authored
There's no need for shared ownership here, as the only owning class instance of those Cpu instances is the System class itself. We can also make the thread_to_cpu map use regular pointers instead of shared_ptrs, given that the Cpu instances will always outlive the cases where they're used with that map.
-
Lioncash authored
Like the barrier, this is owned entirely by the System and will always outlive the encompassing state, so shared ownership semantics aren't necessary here.
-
Lioncash authored
This will always outlive the Cpu instances, since it's destroyed after we destroy the Cpu instances on shutdown, so there's no need for shared ownership semantics here.
-
- Oct 13, 2018
-
-
Lioncash authored
filesystem: Make CreateFactories() and InstallInterface() take a VfsFilesystem instance by reference Neither of these functions alter the ownership of the provided pointer, so we can simply make the parameters a reference rather than a direct shared pointer alias. This way we also disallow passing incorrect memory values like nullptr.
-
- Oct 10, 2018
-
-
Lioncash authored
There's no real need to use a shared pointer in these cases, and only makes object management more fragile in terms of how easy it would be to introduce cycles. Instead, just do the simple thing of using a regular pointer. Much of this is just a hold-over from citra anyways. It also doesn't make sense from a behavioral point of view for a process' thread to prolong the lifetime of the process itself (the process is supposed to own the thread, not the other way around).
-
- Sep 29, 2018
-
-
Lioncash authored
A process should never require being reference counted in this situation. If the handle to a process is freed before this function is called, it's definitely a bug with our lifetime management, so we can put the requirement in place for the API that the process must be a valid instance.
-
- Sep 26, 2018
-
-
Lioncash authored
Given these are only added to the class to allow those functions to access the private constructor, it's a better approach to just make them static functions in the interface, to make the dependency explicit.
-
- Sep 15, 2018
-
-
fearlessTobi authored
-
- Sep 07, 2018
-
-
Lioncash authored
Given we now have the kernel as a class, it doesn't make sense to keep the current process pointer within the System class, as processes are related to the kernel. This also gets rid of a subtle case where memory wouldn't be freed on core shutdown, as the current_process pointer would never be reset, causing the pointed to contents to continue to live.
-
- Sep 06, 2018
-
-
Lioncash authored
The only reason this include was necessary, was because the constructor wasn't defaulted in the cpp file and the compiler would inline it wherever it was used. However, given Controller is forward declared, all those inlined constructors would see an incomplete type, causing a compilation failure. So, we just place the constructor in the cpp file, where it can see the complete type definition, allowing us to remove this include.
-
- Sep 04, 2018
-
-
Markus Wick authored
This helper is called very often. The memory ownership shall not be transfered, so just return the raw pointer.
-
- Sep 02, 2018
-
-
Lioncash authored
Eliminates the need to rebuild some source files if the file_util header ever changes. This also uncovered some indirect inclusions, which have also been fixed.
-
- Aug 31, 2018
-
-
Lioncash authored
The follow-up to e2457418, which replaces most of the includes in the core header with forward declarations. This makes it so that if any of the headers the core header was previously including change, then no one will need to rebuild the bulk of the core, due to core.h being quite a prevalent inclusion. This should make turnaround for changes much faster for developers.
-
Lioncash authored
core.h is kind of a massive header in terms what it includes within itself. It includes VFS utilities, kernel headers, file_sys header, ARM-related headers, etc. This means that changing anything in the headers included by core.h essentially requires you to rebuild almost all of core. Instead, we can modify the System class to use the PImpl idiom, which allows us to move all of those headers to the cpp file and forward declare the bulk of the types that would otherwise be included, reducing compile times. This change specifically only performs the PImpl portion.
-
- Aug 29, 2018
-
-
Lioncash authored
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.
-
- Aug 24, 2018
-
-
Lioncash authored
These conditions are always true, since the outer conditional already checks for these conditions.
-
- Aug 12, 2018
-
-
Zach Hilman authored
Prompts for title type on NCA files.
-
Zach Hilman authored
i.e. Load the concatenated 00+01 if 01 exists as well. Needed for split NAND NCAs.
-
Lioncash authored
Gets the class out of the global namespace.
-
- Aug 10, 2018
-
-
Zach Hilman authored
Full list of new errors and descriptions in core/loader/loader.h
-
- Aug 09, 2018
-
-
Zach Hilman authored
-