diff options
author | Liam <byteslice@airmail.cc> | 2023-11-28 14:30:39 -0500 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-12-04 10:37:16 -0500 |
commit | 45c87c7e6e841c11def43e5ab25160006dab6d77 (patch) | |
tree | 04a3ea0bd8c07389e17741aa28615e3b32ace2f7 /src/core/hle/kernel/kernel.cpp | |
parent | 90e87c40e8628f2ed00a0e0272a9652b7fdb9a96 (diff) |
core: refactor emulated cpu core activation
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 4a1559291c..032c4e0938 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -99,13 +99,6 @@ struct KernelCore::Impl { RegisterHostThread(nullptr); } - void InitializeCores() { - for (u32 core_id = 0; core_id < Core::Hardware::NUM_CPU_CORES; core_id++) { - cores[core_id]->Initialize((*application_process).Is64Bit()); - system.ApplicationMemory().SetCurrentPageTable(*application_process, core_id); - } - } - void TerminateApplicationProcess() { application_process.load()->Terminate(); } @@ -205,7 +198,7 @@ struct KernelCore::Impl { const s32 core{static_cast<s32>(i)}; schedulers[i] = std::make_unique<Kernel::KScheduler>(system.Kernel()); - cores[i] = std::make_unique<Kernel::PhysicalCore>(i, system, *schedulers[i]); + cores[i] = std::make_unique<Kernel::PhysicalCore>(system.Kernel(), i); auto* main_thread{Kernel::KThread::Create(system.Kernel())}; main_thread->SetCurrentCore(core); @@ -880,10 +873,6 @@ void KernelCore::Initialize() { impl->Initialize(*this); } -void KernelCore::InitializeCores() { - impl->InitializeCores(); -} - void KernelCore::Shutdown() { impl->Shutdown(); } @@ -993,21 +982,6 @@ const KAutoObjectWithListContainer& KernelCore::ObjectListContainer() const { return *impl->global_object_list_container; } -void KernelCore::InvalidateAllInstructionCaches() { - for (auto& physical_core : impl->cores) { - physical_core->ArmInterface().ClearInstructionCache(); - } -} - -void KernelCore::InvalidateCpuInstructionCacheRange(KProcessAddress addr, std::size_t size) { - for (auto& physical_core : impl->cores) { - if (!physical_core->IsInitialized()) { - continue; - } - physical_core->ArmInterface().InvalidateCacheRange(GetInteger(addr), size); - } -} - void KernelCore::PrepareReschedule(std::size_t id) { // TODO: Reimplement, this } |