summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp17
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 {
}
AddGlueRegistrationForProcess(*app_loader, *main_process);
kernel.MakeCurrentProcess(main_process.get());
+ kernel.InitializeCores();
// Initialize cheat engine
if (cheat_engine) {
@@ -456,6 +457,10 @@ void System::InvalidateCpuInstructionCaches() {
impl->kernel.InvalidateAllInstructionCaches();
}
+void System::InvalidateCpuInstructionCacheRange(VAddr addr, std::size_t size) {
+ impl->kernel.InvalidateCpuInstructionCacheRange(addr, size);
+}
+
void System::Shutdown() {
impl->Shutdown();
}
@@ -490,11 +495,11 @@ const TelemetrySession& System::TelemetrySession() const {
}
ARM_Interface& System::CurrentArmInterface() {
- return impl->kernel.CurrentScheduler().GetCurrentThread()->ArmInterface();
+ return impl->kernel.CurrentPhysicalCore().ArmInterface();
}
const ARM_Interface& System::CurrentArmInterface() const {
- return impl->kernel.CurrentScheduler().GetCurrentThread()->ArmInterface();
+ return impl->kernel.CurrentPhysicalCore().ArmInterface();
}
std::size_t System::CurrentCoreIndex() const {
@@ -554,15 +559,11 @@ const Kernel::Process* System::CurrentProcess() const {
}
ARM_Interface& System::ArmInterface(std::size_t core_index) {
- auto* thread = impl->kernel.Scheduler(core_index).GetCurrentThread();
- ASSERT(thread && !thread->IsHLEThread());
- return thread->ArmInterface();
+ return impl->kernel.PhysicalCore(core_index).ArmInterface();
}
const ARM_Interface& System::ArmInterface(std::size_t core_index) const {
- auto* thread = impl->kernel.Scheduler(core_index).GetCurrentThread();
- ASSERT(thread && !thread->IsHLEThread());
- return thread->ArmInterface();
+ return impl->kernel.PhysicalCore(core_index).ArmInterface();
}
ExclusiveMonitor& System::Monitor() {