PpmIdleWaitForDependentTransitions
NTSTATUS __stdcall PpmIdleWaitForDependentTransitions(_KAFFINITY_EX *SecondaryProcessorMask){
unsigned __int64 v1;
NTSTATUS v2;
int v3;
_KPRCB *Prcb;
_KPRCB *v5;
_PPM_IDLE_STATES *IdleStates;
_KAFFINITY_ENUMERATION_CONTEXT Context;
_QWORD v9[2];
__int128 v10;
UINT64 ProcIndex;
v1 = SecondaryProcessorMask->Bitmap[0];
v2 = 0;
*(_DWORD *)(&Context.CurrentIndex + 1) = 0;
*(&Context.CurrentIndex + 3) = 0;
LODWORD(ProcIndex) = 0;
Context.CurrentIndex = 0;
Context.CurrentMask = v1;
Context.Affinity = SecondaryProcessorMask;
while( 1 )
{
KeEnumerateNextProcessor(&ProcIndex, &Context);
if( v3 )
break;
Prcb = KeGetPrcb((unsigned int)ProcIndex);
v10 = 0i64;
BYTE12(v10) = 1;
v5 = Prcb;
IdleStates = Prcb->PowerState.IdleStates;
v9[0] = 0i64;
*(_QWORD *)&v10 = Prcb;
v9[1] = PopIdleTransitionTimeout;
while( !IdleStates->IdleIsHalted(IdleStates->PrepareInfo.Context) )
{
if( (v5->PowerState.Synchronization.AsLong & 0xFF000000) != 83886080 )
return -1073741782;
PpmIdleTransitionStall((__int64)v9);
}
}
return v2;
}Referenced by:
PpmIdleCheckCoordinatedStateEligibility