kern: implement 64-virtual-core interface

This commit is contained in:
Michael Scire 2020-12-01 15:54:31 -08:00 committed by SciresM
parent 3fd59b61bc
commit 28f9b534b6
8 changed files with 224 additions and 96 deletions

View file

@ -363,7 +363,11 @@ namespace ams::kern::svc {
case ams::svc::DebugThreadParam_IdealCore:
{
/* Get the ideal core. */
*out_32 = thread->GetIdealCore();
s32 core_id;
u64 affinity_mask;
thread->GetPhysicalCoreMask(std::addressof(core_id), std::addressof(affinity_mask));
*out_32 = core_id;
}
break;
case ams::svc::DebugThreadParam_CurrentCore:
@ -375,7 +379,11 @@ namespace ams::kern::svc {
case ams::svc::DebugThreadParam_AffinityMask:
{
/* Get the affinity mask. */
*out_32 = thread->GetAffinityMask().GetAffinityMask();
s32 core_id;
u64 affinity_mask;
thread->GetPhysicalCoreMask(std::addressof(core_id), std::addressof(affinity_mask));
*out_32 = affinity_mask;
}
break;
default: