aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.cpp
AgeCommit message (Collapse)Author
2020-06-27Core/Common: Address Feedback.Fernando Sahmkow
2020-06-27General: Cleanup legacy code.Fernando Sahmkow
2020-06-27Kernel/svcBreak: Implement CacheInvalidation for Singlecore and correct ↵Fernando Sahmkow
svcBreak.
2020-06-27Scheduler: Correct Reload/UnloadFernando Sahmkow
2020-06-27General: Move ARM_Interface into Threads.Fernando Sahmkow
2020-06-27Core: Refactor ARM Interface.Fernando Sahmkow
2020-06-27SingleCore: Move Host Timing from a sepparate thread to main cpu thread.Fernando Sahmkow
2020-06-27General: Fix microprofile on dynarmic/svc, fix wait tree showing which ↵Fernando Sahmkow
threads were running.
2020-06-27General: Fix Stop functionFernando Sahmkow
2020-06-27Kernel: Preempt Single core on redudant yields.Fernando Sahmkow
2020-06-27General: Initial Setup for Single Core.Fernando Sahmkow
2020-06-27Kernel: Fixes, corrections and asserts to scheduler and different svcs.Fernando Sahmkow
2020-06-27General: Recover Prometheus project from harddrive failure Fernando Sahmkow
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host Timing, Reworks the Kernel's Scheduler, Introduce Idle State and Suspended State, Recreates the bootmanager, Initializes Multicore system.
2020-04-17kernel: resource_limit: Reserve physical memory.bunnei
2020-04-17kernel: Initialize memory layout for new VMM.bunnei
2020-04-15CMakeLists: Make -Wreorder a compile-time errorLioncash
This can result in silent logic bugs within code, and given the amount of times these kind of warnings are caused, they should be flagged at compile-time so no new code is submitted with them.
2020-03-02core: Implement separate A32/A64 ARM interfaces.bunnei
2020-02-22Kernel: Address Feedback.Fernando Sahmkow
2020-02-22Kernel: Implement Time Manager.Fernando Sahmkow
2020-02-22Kernel: Rename ThreadCallbackHandleTable and Setup Thread Ids on Kernel.Fernando Sahmkow
2020-02-22Kernel: Make global scheduler depend on KernelCoreFernando Sahmkow
2020-02-11Kernel: Refactor synchronization to better match REFernando Sahmkow
2020-02-11Kernel: Change WaitObject to Synchronization object. In order to better ↵Fernando Sahmkow
reflect RE.
2020-01-30kernel/physical_core: Remove unused kernel reference member variableLioncash
This isn't used within the class, so it can be removed to simplify the overall interface. While we're in the same area, we can simplify a unique_ptr reset() call.
2020-01-27System: Address FeedbackFernando Sahmkow
2020-01-26ArmInterface: Delegate Exclusive monitor factory to exclusive monitor ↵Fernando Sahmkow
interfasce.
2020-01-25Core: Refactor CPU Management.Fernando Sahmkow
This commit moves ARM Interface and Scheduler handling into the kernel.
2019-12-11Kernel: Correct behavior of Address Arbiter threads. (#3165)Fernando Sahmkow
* Kernel: Correct behavior of Address Arbiter threads. This corrects arbitration threads to behave just like in Horizon OS. They are added into a container and released according to what priority they had when added. Horizon OS does not reorder them if their priority changes. * Kernel: Address Feedback.
2019-12-07kernel: Remove unnecessary includesLioncash
Over the course of the changes to the kernel code, a few includes are no longer necessary, particularly with the change over to std::shared_ptr from Boost's intrusive_ptr.
2019-11-26core/memory; Migrate over SetCurrentPageTable() to the Memory classLioncash
Now that literally every other API function is converted over to the Memory class, we can just move the file-local page table into the Memory implementation class, finally getting rid of global state within the memory code.
2019-11-26core_timing: Use better reference tracking for EventType. (#3159)bunnei
* core_timing: Use better reference tracking for EventType. - Moves ownership of the event to the caller, ensuring we don't fire events for destroyed objects. - Removes need for unique names - we won't be using this for save states anyways.
2019-11-24kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for ↵bunnei
kernel objects. (#3154) * kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. - See https://github.com/citra-emu/citra/pull/4710 for details.
2019-11-21Kernel: Optimize condition variable threads management.Fernando Sahmkow
2019-11-21Kernel: Correct behavior of Condition Variables to be more similar to real ↵Fernando Sahmkow
hardware. This commit ensures cond var threads act exactly as they do in the real console. The original implementation uses an RBTree and the behavior of cond var threads is that at the same priority level they act like a FIFO.
2019-10-15Kernel: Reverse global accessor removal.Fernando Sahmkow
2019-10-15Kernel Scheduler: Make sure the global scheduler shutdowns correctly.Fernando Sahmkow
2019-10-15Kernel: Correct Results in Condition Variables and MutexesFernando Sahmkow
2019-10-15Kernel: Remove global system accessor from WaitObjectFernando Sahmkow
2019-10-15Kernel: Initial implementation of thread preemption.Fernando Sahmkow
2019-10-15Kernel: Style and CorrectionsFernando Sahmkow
2019-10-15Add interfacing to the Global SchedulerFernando Sahmkow
2019-06-10kernel: Differentiate kernel and user processes when picking IDZach Hilman
This allows kernel internal type processes to be assigned IDs in the KIP range while userland processes are assigned in the user range.
2019-04-24Merge pull request #2416 from lioncash/waitbunnei
kernel/svc: Clean up wait synchronization related functionality
2019-04-17kernel/thread: Unify wait synchronization typesLioncash
This is a holdover from Citra, where the 3DS has both WaitSynchronization1 and WaitSynchronizationN. The switch only has one form of wait synchronizing (literally WaitSynchonization). This allows us to throw out code that doesn't apply at all to the Switch kernel. Because of this unnecessary dichotomy within the wait synchronization utilities, we were also neglecting to properly handle waiting on multiple objects. While we're at it, we can also scrub out any lingering references to WaitSynchronization1/WaitSynchronizationN in comments, and change them to WaitSynchronization (or remove them if the mention no longer applies).
2019-04-11core/cpu_core_manager: Create threads separately from initialization.Lioncash
Our initialization process is a little wonky than one would expect when it comes to code flow. We initialize the CPU last, as opposed to hardware, where the CPU obviously needs to be first, otherwise nothing else would work, and we have code that adds checks to get around this. For example, in the page table setting code, we check to see if the system is turned on before we even notify the CPU instances of a page table switch. This results in dead code (at the moment), because the only time a page table switch will occur is when the system is *not* running, preventing the emulated CPU instances from being notified of a page table switch in a convenient manner (technically the code path could be taken, but we don't emulate the process creation svc handlers yet). This moves the threads creation into its own member function of the core manager and restores a little order (and predictability) to our initialization process. Previously, in the multi-threaded cases, we'd kick off several threads before even the main kernel process was created and ready to execute (gross!). Now the initialization process is like so: Initialization: 1. Timers 2. CPU 3. Kernel 4. Filesystem stuff (kind of gross, but can be amended trivially) 5. Applet stuff (ditto in terms of being kind of gross) 6. Main process (will be moved into the loading step in a following change) 7. Telemetry (this should be initialized last in the future). 8. Services (4 and 5 should ideally be alongside this). 9. GDB (gross. Uses namespace scope state. Needs to be refactored into a class or booted altogether). 10. Renderer 11. GPU (will also have its threads created in a separate step in a following change). Which... isn't *ideal* per-se, however getting rid of the wonky intertwining of CPU state initialization out of this mix gets rid of most of the footguns when it comes to our initialization process.
2019-04-07kernel: Handle page table switching within MakeCurrentProcess()Lioncash
Centralizes the page table switching to one spot, rather than making calling code deal with it everywhere.
2019-04-02Merge pull request #2270 from lioncash/plistbunnei
kernel/svc: Implement svcGetProcessList and svcGetThreadList
2019-04-02kernel/svc: Implement svcGetProcessListLioncash
This service function simply copies out a specified number of kernel process IDs, while simultaneously reporting the total number of processes.
2019-04-01kernel/resource_limit: Remove the name member from resource limitsLioncash
This doesn't really provide any benefit to the resource limit interface. There's no way for callers to any of the service functions for resource limits to provide a custom name, so all created instances of resource limits other than the system resource limit would have a name of "Unknown". The system resource limit itself is already trivially identifiable from its limit values, so there's no real need to take up space in the object to identify one object meaningfully out of N total objects.
2019-04-01general: Use deducation guides for std::lock_guard and std::unique_lockLioncash
Since C++17, the introduction of deduction guides for locking facilities means that we no longer need to hardcode the mutex type into the locks themselves, making it easier to switch mutex types, should it ever be necessary in the future.