diff --git a/src/citra_qt/debugger/wait_tree.cpp b/src/citra_qt/debugger/wait_tree.cpp index 8c244b6b2..6c18af2e8 100644 --- a/src/citra_qt/debugger/wait_tree.cpp +++ b/src/citra_qt/debugger/wait_tree.cpp @@ -213,6 +213,9 @@ std::vector> WaitTreeThread::GetChildren() const { case ThreadProcessorId::THREADPROCESSORID_1: processor = tr("SysCore"); break; + case ThreadProcessorId::THREADPROCESSORID_2: + processor = tr("SysCore2"); + break; default: processor = tr("Unknown processor %1").arg(thread.processor_id); break; diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index 314fba81f..818899e13 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h @@ -27,6 +27,7 @@ enum ThreadProcessorId : s32 { THREADPROCESSORID_ALL = -1, ///< Run thread on either core THREADPROCESSORID_0 = 0, ///< Run thread on core 0 (AppCore) THREADPROCESSORID_1 = 1, ///< Run thread on core 1 (SysCore) + THREADPROCESSORID_2 = 2, ///< Run thread on core 2 (SysCore) THREADPROCESSORID_MAX = 2, ///< Processor ID must be less than this }; diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index e8ca419d5..90dd555ee 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -705,6 +705,7 @@ static ResultCode CreateThread(Kernel::Handle* out_handle, u32 priority, u32 ent case THREADPROCESSORID_DEFAULT: case THREADPROCESSORID_0: case THREADPROCESSORID_1: + case THREADPROCESSORID_2: break; default: // TODO(bunnei): Implement support for other processor IDs @@ -714,19 +715,40 @@ static ResultCode CreateThread(Kernel::Handle* out_handle, u32 priority, u32 ent if (processor_id == THREADPROCESSORID_ALL) { LOG_INFO(Kernel_SVC, - "Newly created thread is allowed to be run in any Core, unimplemented."); + "Newly created thread is allowed to be run in any Core, unimplemented."); + } + + if (processor_id == THREADPROCESSORID_DEFAULT && + Kernel::g_current_process->ideal_processor == THREADPROCESSORID_0) { + LOG_WARNING(Kernel_SVC, + "Newly created thread is allowed to be run in the AppCore, unimplemented."); + } + + if (processor_id == THREADPROCESSORID_0) { + LOG_ERROR(Kernel_SVC, + "Newly created thread must run in the AppCore, unimplemented."); } if (processor_id == THREADPROCESSORID_DEFAULT && Kernel::g_current_process->ideal_processor == THREADPROCESSORID_1) { - LOG_WARNING( - Kernel_SVC, - "Newly created thread is allowed to be run in the SysCore (Core1), unimplemented."); + LOG_WARNING(Kernel_SVC, + "Newly created thread is allowed to be run in the SysCore (Core1), unimplemented."); } if (processor_id == THREADPROCESSORID_1) { LOG_ERROR(Kernel_SVC, - "Newly created thread must run in the SysCore (Core1), unimplemented."); + "Newly created thread must run in the SysCore (Core1), unimplemented."); + } + + if (processor_id == THREADPROCESSORID_DEFAULT && + Kernel::g_current_process->ideal_processor == THREADPROCESSORID_2) { + LOG_WARNING(Kernel_SVC, + "Newly created thread is allowed to be run in the SysCore (Core2), unimplemented."); + } + + if (processor_id == THREADPROCESSORID_2) { + LOG_ERROR(Kernel_SVC, + "Newly created thread must run in the SysCore (Core2), unimplemented."); } CASCADE_RESULT(SharedPtr thread,