From e31425df3877636c098ec7426ebd2067920715cb Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Mon, 24 Feb 2020 22:04:12 -0400 Subject: General: Recover Prometheus project from harddrive failure 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. --- src/core/core_manager.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/core/core_manager.cpp') diff --git a/src/core/core_manager.cpp b/src/core/core_manager.cpp index b6b797c80..45f0bb547 100644 --- a/src/core/core_manager.cpp +++ b/src/core/core_manager.cpp @@ -34,7 +34,6 @@ void CoreManager::RunLoop(bool tight_loop) { // instead advance to the next event and try to yield to the next thread if (Kernel::GetCurrentThread() == nullptr) { LOG_TRACE(Core, "Core-{} idling", core_index); - core_timing.Idle(); } else { if (tight_loop) { physical_core.Run(); @@ -42,7 +41,6 @@ void CoreManager::RunLoop(bool tight_loop) { physical_core.Step(); } } - core_timing.Advance(); Reschedule(); } @@ -59,7 +57,7 @@ void CoreManager::Reschedule() { // Lock the global kernel mutex when we manipulate the HLE state std::lock_guard lock(HLE::g_hle_lock); - global_scheduler.SelectThread(core_index); + // global_scheduler.SelectThread(core_index); physical_core.Scheduler().TryDoContextSwitch(); } -- cgit v1.2.3 From 1567824d2da8e9b49b433f3d1d753d8ad84e65f9 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sun, 1 Mar 2020 12:14:17 -0400 Subject: General: Move ARM_Interface into Threads. --- src/core/core_manager.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'src/core/core_manager.cpp') diff --git a/src/core/core_manager.cpp b/src/core/core_manager.cpp index 45f0bb547..82d7acb40 100644 --- a/src/core/core_manager.cpp +++ b/src/core/core_manager.cpp @@ -28,21 +28,7 @@ CoreManager::CoreManager(System& system, std::size_t core_index) CoreManager::~CoreManager() = default; void CoreManager::RunLoop(bool tight_loop) { - Reschedule(); - - // If we don't have a currently active thread then don't execute instructions, - // instead advance to the next event and try to yield to the next thread - if (Kernel::GetCurrentThread() == nullptr) { - LOG_TRACE(Core, "Core-{} idling", core_index); - } else { - if (tight_loop) { - physical_core.Run(); - } else { - physical_core.Step(); - } - } - - Reschedule(); + /// Deprecated } void CoreManager::SingleStep() { @@ -50,7 +36,7 @@ void CoreManager::SingleStep() { } void CoreManager::PrepareReschedule() { - physical_core.Stop(); + //physical_core.Stop(); } void CoreManager::Reschedule() { -- cgit v1.2.3 From 48fa3b7a0f2054a836b0a8061e6b082c246b5ae0 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Wed, 1 Apr 2020 17:28:49 -0400 Subject: General: Cleanup legacy code. --- src/core/core_manager.cpp | 51 ----------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 src/core/core_manager.cpp (limited to 'src/core/core_manager.cpp') diff --git a/src/core/core_manager.cpp b/src/core/core_manager.cpp deleted file mode 100644 index 82d7acb40..000000000 --- a/src/core/core_manager.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2018 yuzu emulator team -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#include -#include - -#include "common/logging/log.h" -#include "core/arm/exclusive_monitor.h" -#include "core/arm/unicorn/arm_unicorn.h" -#include "core/core.h" -#include "core/core_manager.h" -#include "core/core_timing.h" -#include "core/hle/kernel/kernel.h" -#include "core/hle/kernel/physical_core.h" -#include "core/hle/kernel/scheduler.h" -#include "core/hle/kernel/thread.h" -#include "core/hle/lock.h" -#include "core/settings.h" - -namespace Core { - -CoreManager::CoreManager(System& system, std::size_t core_index) - : global_scheduler{system.GlobalScheduler()}, physical_core{system.Kernel().PhysicalCore( - core_index)}, - core_timing{system.CoreTiming()}, core_index{core_index} {} - -CoreManager::~CoreManager() = default; - -void CoreManager::RunLoop(bool tight_loop) { - /// Deprecated -} - -void CoreManager::SingleStep() { - return RunLoop(false); -} - -void CoreManager::PrepareReschedule() { - //physical_core.Stop(); -} - -void CoreManager::Reschedule() { - // Lock the global kernel mutex when we manipulate the HLE state - std::lock_guard lock(HLE::g_hle_lock); - - // global_scheduler.SelectThread(core_index); - - physical_core.Scheduler().TryDoContextSwitch(); -} - -} // namespace Core -- cgit v1.2.3