diff options
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 76a38ea2a..01e4faac8 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -245,6 +245,7 @@ struct System::Impl { | |||
| 245 | } | 245 | } |
| 246 | AddGlueRegistrationForProcess(*app_loader, *main_process); | 246 | AddGlueRegistrationForProcess(*app_loader, *main_process); |
| 247 | kernel.MakeCurrentProcess(main_process.get()); | 247 | kernel.MakeCurrentProcess(main_process.get()); |
| 248 | kernel.InitializeCores(); | ||
| 248 | 249 | ||
| 249 | // Initialize cheat engine | 250 | // Initialize cheat engine |
| 250 | if (cheat_engine) { | 251 | if (cheat_engine) { |
| @@ -456,6 +457,10 @@ void System::InvalidateCpuInstructionCaches() { | |||
| 456 | impl->kernel.InvalidateAllInstructionCaches(); | 457 | impl->kernel.InvalidateAllInstructionCaches(); |
| 457 | } | 458 | } |
| 458 | 459 | ||
| 460 | void System::InvalidateCpuInstructionCacheRange(VAddr addr, std::size_t size) { | ||
| 461 | impl->kernel.InvalidateCpuInstructionCacheRange(addr, size); | ||
| 462 | } | ||
| 463 | |||
| 459 | void System::Shutdown() { | 464 | void System::Shutdown() { |
| 460 | impl->Shutdown(); | 465 | impl->Shutdown(); |
| 461 | } | 466 | } |
| @@ -490,11 +495,11 @@ const TelemetrySession& System::TelemetrySession() const { | |||
| 490 | } | 495 | } |
| 491 | 496 | ||
| 492 | ARM_Interface& System::CurrentArmInterface() { | 497 | ARM_Interface& System::CurrentArmInterface() { |
| 493 | return impl->kernel.CurrentScheduler().GetCurrentThread()->ArmInterface(); | 498 | return impl->kernel.CurrentPhysicalCore().ArmInterface(); |
| 494 | } | 499 | } |
| 495 | 500 | ||
| 496 | const ARM_Interface& System::CurrentArmInterface() const { | 501 | const ARM_Interface& System::CurrentArmInterface() const { |
| 497 | return impl->kernel.CurrentScheduler().GetCurrentThread()->ArmInterface(); | 502 | return impl->kernel.CurrentPhysicalCore().ArmInterface(); |
| 498 | } | 503 | } |
| 499 | 504 | ||
| 500 | std::size_t System::CurrentCoreIndex() const { | 505 | std::size_t System::CurrentCoreIndex() const { |
| @@ -554,15 +559,11 @@ const Kernel::Process* System::CurrentProcess() const { | |||
| 554 | } | 559 | } |
| 555 | 560 | ||
| 556 | ARM_Interface& System::ArmInterface(std::size_t core_index) { | 561 | ARM_Interface& System::ArmInterface(std::size_t core_index) { |
| 557 | auto* thread = impl->kernel.Scheduler(core_index).GetCurrentThread(); | 562 | return impl->kernel.PhysicalCore(core_index).ArmInterface(); |
| 558 | ASSERT(thread && !thread->IsHLEThread()); | ||
| 559 | return thread->ArmInterface(); | ||
| 560 | } | 563 | } |
| 561 | 564 | ||
| 562 | const ARM_Interface& System::ArmInterface(std::size_t core_index) const { | 565 | const ARM_Interface& System::ArmInterface(std::size_t core_index) const { |
| 563 | auto* thread = impl->kernel.Scheduler(core_index).GetCurrentThread(); | 566 | return impl->kernel.PhysicalCore(core_index).ArmInterface(); |
| 564 | ASSERT(thread && !thread->IsHLEThread()); | ||
| 565 | return thread->ArmInterface(); | ||
| 566 | } | 567 | } |
| 567 | 568 | ||
| 568 | ExclusiveMonitor& System::Monitor() { | 569 | ExclusiveMonitor& System::Monitor() { |