summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-03-31 15:12:41 -0400
committerGravatar Fernando Sahmkow2020-06-27 11:36:04 -0400
commitc8bf47dcfbd43f3e7835d2e45b4704e056d8e9ee (patch)
treedfd5bbcb4a0d025b7d77537dec23e70c57052717 /src
parentBootmanager/CPU_Manager: Correct shader caches and sync GPU on OpenGL. (diff)
downloadyuzu-c8bf47dcfbd43f3e7835d2e45b4704e056d8e9ee.tar.gz
yuzu-c8bf47dcfbd43f3e7835d2e45b4704e056d8e9ee.tar.xz
yuzu-c8bf47dcfbd43f3e7835d2e45b4704e056d8e9ee.zip
Kernel/svcBreak: Implement CacheInvalidation for Singlecore and correct svcBreak.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/kernel.cpp12
-rw-r--r--src/core/hle/kernel/svc.cpp4
2 files changed, 13 insertions, 3 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 739205eca..1f230fc4a 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -545,7 +545,17 @@ const Core::ExclusiveMonitor& KernelCore::GetExclusiveMonitor() const {
545} 545}
546 546
547void KernelCore::InvalidateAllInstructionCaches() { 547void KernelCore::InvalidateAllInstructionCaches() {
548 //TODO: Reimplement, this 548 if (!IsMulticore()) {
549 auto& threads = GlobalScheduler().GetThreadList();
550 for (auto& thread : threads) {
551 if (!thread->IsHLEThread()) {
552 auto& arm_interface = thread->ArmInterface();
553 arm_interface.ClearInstructionCache();
554 }
555 }
556 } else {
557 UNIMPLEMENTED_MSG("Cache Invalidation unimplemented for multicore");
558 }
549} 559}
550 560
551void KernelCore::PrepareReschedule(std::size_t id) { 561void KernelCore::PrepareReschedule(std::size_t id) {
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 37e893c84..dbd35580e 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -622,6 +622,7 @@ static void Break(Core::System& system, u32 reason, u64 info1, u64 info2) {
622 info2, has_dumped_buffer ? std::make_optional(debug_buffer) : std::nullopt); 622 info2, has_dumped_buffer ? std::make_optional(debug_buffer) : std::nullopt);
623 623
624 if (!break_reason.signal_debugger) { 624 if (!break_reason.signal_debugger) {
625 SchedulerLock lock(system.Kernel());
625 LOG_CRITICAL( 626 LOG_CRITICAL(
626 Debug_Emulated, 627 Debug_Emulated,
627 "Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}", 628 "Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",
@@ -633,9 +634,8 @@ static void Break(Core::System& system, u32 reason, u64 info1, u64 info2) {
633 const auto thread_processor_id = current_thread->GetProcessorID(); 634 const auto thread_processor_id = current_thread->GetProcessorID();
634 system.ArmInterface(static_cast<std::size_t>(thread_processor_id)).LogBacktrace(); 635 system.ArmInterface(static_cast<std::size_t>(thread_processor_id)).LogBacktrace();
635 636
636 system.Kernel().CurrentProcess()->PrepareForTermination();
637
638 // Kill the current thread 637 // Kill the current thread
638 system.Kernel().ExceptionalExit();
639 current_thread->Stop(); 639 current_thread->Stop();
640 } 640 }
641} 641}