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.h | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) (limited to 'src/core/core.h') diff --git a/src/core/core.h b/src/core/core.h index acc53d6a1..7f170fc54 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -90,7 +90,7 @@ class InterruptManager; namespace Core { class ARM_Interface; -class CoreManager; +class CpuManager; class DeviceMemory; class ExclusiveMonitor; class FrameLimiter; @@ -136,16 +136,18 @@ public: }; /** - * Run the core CPU loop - * This function runs the core for the specified number of CPU instructions before trying to - * update hardware. This is much faster than SingleStep (and should be equivalent), as the CPU - * is not required to do a full dispatch with each instruction. NOTE: the number of instructions - * requested is not guaranteed to run, as this will be interrupted preemptively if a hardware - * update is requested (e.g. on a thread switch). - * @param tight_loop If false, the CPU single-steps. - * @return Result status, indicating whether or not the operation succeeded. + * Run the OS and Application + * This function will start emulation and run the competent devices + */ + ResultStatus Run(); + + /** + * Pause the OS and Application + * This function will pause emulation and stop the competent devices */ - ResultStatus RunLoop(bool tight_loop = true); + ResultStatus Pause(); + + /** * Step the CPU one instruction @@ -215,11 +217,9 @@ public: /// Gets a const reference to an ARM interface from the CPU core with the specified index const ARM_Interface& ArmInterface(std::size_t core_index) const; - /// Gets a CPU interface to the CPU core with the specified index - CoreManager& GetCoreManager(std::size_t core_index); + CpuManager& GetCpuManager(); - /// Gets a CPU interface to the CPU core with the specified index - const CoreManager& GetCoreManager(std::size_t core_index) const; + const CpuManager& GetCpuManager() const; /// Gets a reference to the exclusive monitor ExclusiveMonitor& Monitor(); @@ -373,12 +373,6 @@ public: private: System(); - /// Returns the currently running CPU core - CoreManager& CurrentCoreManager(); - - /// Returns the currently running CPU core - const CoreManager& CurrentCoreManager() const; - /** * Initialize the emulated system. * @param emu_window Reference to the host-system window used for video output and keyboard -- cgit v1.2.3 From 589f9cf108d306e8265ff4856b522cd32fbc121f Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 25 Feb 2020 13:22:11 -0400 Subject: SVC: Correct GetThreadPriority, SetThreadPriority, GetThreadCoreMask, SetThreadCoreMask, GetCurrentProcessorNumber --- src/core/core.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/core/core.h') diff --git a/src/core/core.h b/src/core/core.h index 7f170fc54..9a0dd1075 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -27,6 +27,7 @@ class VfsFilesystem; namespace Kernel { class GlobalScheduler; class KernelCore; +class PhysicalCore; class Process; class Scheduler; } // namespace Kernel @@ -211,6 +212,12 @@ public: /// Gets the scheduler for the CPU core that is currently running const Kernel::Scheduler& CurrentScheduler() const; + /// Gets the physical core for the CPU core that is currently running + Kernel::PhysicalCore& CurrentPhysicalCore(); + + /// Gets the physical core for the CPU core that is currently running + const Kernel::PhysicalCore& CurrentPhysicalCore() const; + /// Gets a reference to an ARM interface for the CPU core with the specified index ARM_Interface& ArmInterface(std::size_t core_index); -- cgit v1.2.3 From 7020d498c5aef7c1180bfc57031cdd7fbfecdf0f Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Thu, 12 Mar 2020 16:48:43 -0400 Subject: General: Fix microprofile on dynarmic/svc, fix wait tree showing which threads were running. --- src/core/core.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core/core.h') diff --git a/src/core/core.h b/src/core/core.h index 9a0dd1075..87df79d57 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -377,6 +377,12 @@ public: /// Register a host thread as an auxiliary thread. void RegisterHostThread(); + /// Enter Dynarmic Microprofile + void EnterDynarmicProfile(); + + /// Exit Dynarmic Microprofile + void ExitDynarmicProfile(); + private: System(); -- cgit v1.2.3 From 467d43570e10b98fa33067352d35fe62ceb3cb9e Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Fri, 8 May 2020 18:53:13 -0400 Subject: Clang Format. --- src/core/core.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/core/core.h') diff --git a/src/core/core.h b/src/core/core.h index 87df79d57..d2d1fcc5b 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -148,8 +148,6 @@ public: */ ResultStatus Pause(); - - /** * Step the CPU one instruction * @return Result status, indicating whether or not the operation succeeded. -- cgit v1.2.3 From 272a87127a68bbb9d7c7984e619ee12702d7b8e0 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Fri, 29 May 2020 15:00:17 -0400 Subject: Services/NvFlinger: Do vSync in a sepparate thread on Multicore. --- src/core/core.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/core.h') diff --git a/src/core/core.h b/src/core/core.h index d2d1fcc5b..133ecb8e1 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -381,6 +381,9 @@ public: /// Exit Dynarmic Microprofile void ExitDynarmicProfile(); + /// Tells if system is running on multicore. + bool IsMulticore() const; + private: System(); -- cgit v1.2.3 From 2f8947583f2f0af4058600243d6c1d244e3c4890 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sat, 27 Jun 2020 18:20:06 -0400 Subject: Core/Common: Address Feedback. --- src/core/core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/core.h') diff --git a/src/core/core.h b/src/core/core.h index 133ecb8e1..5c6cfbffe 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -138,13 +138,13 @@ public: /** * Run the OS and Application - * This function will start emulation and run the competent devices + * This function will start emulation and run the relevant devices */ ResultStatus Run(); /** * Pause the OS and Application - * This function will pause emulation and stop the competent devices + * This function will pause emulation and stop the relevant devices */ ResultStatus Pause(); -- cgit v1.2.3