diff options
author | bunnei <bunneidev@gmail.com> | 2020-11-13 20:11:12 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2020-11-29 10:31:51 +0100 |
commit | 7b642c77811dc3887756f5abac5a9710564b098e (patch) | |
tree | 09c9d764734db56896f77d986afa6ccd5d2c745d /src/core/hle/kernel/kernel.cpp | |
parent | Merge pull request #4998 from Morph1984/bioshock-patch (diff) | |
download | yuzu-7b642c77811dc3887756f5abac5a9710564b098e.tar yuzu-7b642c77811dc3887756f5abac5a9710564b098e.tar.gz yuzu-7b642c77811dc3887756f5abac5a9710564b098e.tar.bz2 yuzu-7b642c77811dc3887756f5abac5a9710564b098e.tar.lz yuzu-7b642c77811dc3887756f5abac5a9710564b098e.tar.xz yuzu-7b642c77811dc3887756f5abac5a9710564b098e.tar.zst yuzu-7b642c77811dc3887756f5abac5a9710564b098e.zip |
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index bb3e312a7..4cf9cee42 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -68,6 +68,12 @@ struct KernelCore::Impl { InitializeSuspendThreads(); } + void InitializeCores() { + for (auto& core : cores) { + core.Initialize(current_process->Is64BitProcess()); + } + } + void Shutdown() { next_object_id = 0; next_kernel_process_id = Process::InitialKIPIDMin; @@ -116,7 +122,7 @@ struct KernelCore::Impl { Core::MakeExclusiveMonitor(system.Memory(), Core::Hardware::NUM_CPU_CORES); for (std::size_t i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) { schedulers[i] = std::make_unique<Kernel::Scheduler>(system, i); - cores.emplace_back(system, i, *schedulers[i], interrupts[i]); + cores.emplace_back(i, system, *schedulers[i], interrupts); } } @@ -181,6 +187,7 @@ struct KernelCore::Impl { if (process == nullptr) { return; } + const u32 core_id = GetCurrentHostThreadID(); if (core_id < Core::Hardware::NUM_CPU_CORES) { system.Memory().SetCurrentPageTable(*process, core_id); @@ -372,6 +379,10 @@ void KernelCore::Initialize() { impl->Initialize(*this); } +void KernelCore::InitializeCores() { + impl->InitializeCores(); +} + void KernelCore::Shutdown() { impl->Shutdown(); } @@ -486,12 +497,12 @@ const Core::ExclusiveMonitor& KernelCore::GetExclusiveMonitor() const { } void KernelCore::InvalidateAllInstructionCaches() { - auto& threads = GlobalScheduler().GetThreadList(); - for (auto& thread : threads) { - if (!thread->IsHLEThread()) { - auto& arm_interface = thread->ArmInterface(); - arm_interface.ClearInstructionCache(); + if (!IsMulticore()) { + for (auto& physical_core : impl->cores) { + physical_core.ArmInterface().ClearInstructionCache(); } + } else { + ASSERT_MSG(false, "UNIMPLEMENTED!!!!!!!!!!!"); } } |