mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
Kernel/svcBreak: Implement CacheInvalidation for Singlecore and correct svcBreak.
This commit is contained in:
parent
54e304fe2a
commit
c8bf47dcfb
2 changed files with 13 additions and 3 deletions
|
@ -545,7 +545,17 @@ const Core::ExclusiveMonitor& KernelCore::GetExclusiveMonitor() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void KernelCore::InvalidateAllInstructionCaches() {
|
void KernelCore::InvalidateAllInstructionCaches() {
|
||||||
//TODO: Reimplement, this
|
if (!IsMulticore()) {
|
||||||
|
auto& threads = GlobalScheduler().GetThreadList();
|
||||||
|
for (auto& thread : threads) {
|
||||||
|
if (!thread->IsHLEThread()) {
|
||||||
|
auto& arm_interface = thread->ArmInterface();
|
||||||
|
arm_interface.ClearInstructionCache();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
UNIMPLEMENTED_MSG("Cache Invalidation unimplemented for multicore");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void KernelCore::PrepareReschedule(std::size_t id) {
|
void KernelCore::PrepareReschedule(std::size_t id) {
|
||||||
|
|
|
@ -622,6 +622,7 @@ static void Break(Core::System& system, u32 reason, u64 info1, u64 info2) {
|
||||||
info2, has_dumped_buffer ? std::make_optional(debug_buffer) : std::nullopt);
|
info2, has_dumped_buffer ? std::make_optional(debug_buffer) : std::nullopt);
|
||||||
|
|
||||||
if (!break_reason.signal_debugger) {
|
if (!break_reason.signal_debugger) {
|
||||||
|
SchedulerLock lock(system.Kernel());
|
||||||
LOG_CRITICAL(
|
LOG_CRITICAL(
|
||||||
Debug_Emulated,
|
Debug_Emulated,
|
||||||
"Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",
|
"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) {
|
||||||
const auto thread_processor_id = current_thread->GetProcessorID();
|
const auto thread_processor_id = current_thread->GetProcessorID();
|
||||||
system.ArmInterface(static_cast<std::size_t>(thread_processor_id)).LogBacktrace();
|
system.ArmInterface(static_cast<std::size_t>(thread_processor_id)).LogBacktrace();
|
||||||
|
|
||||||
system.Kernel().CurrentProcess()->PrepareForTermination();
|
|
||||||
|
|
||||||
// Kill the current thread
|
// Kill the current thread
|
||||||
|
system.Kernel().ExceptionalExit();
|
||||||
current_thread->Stop();
|
current_thread->Stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue