PopPepGetMinimumDevicePowerState
UINT8 __stdcall PopPepGetMinimumDevicePowerState(
PEPHANDLE *DpmContext,
UINT64 PlatformIdleStateIndex,
_DEVICE_POWER_STATE *State){
_DWORD *v3;
UINT8 v5;
int v6;
_DWORD *v7;
char v8;
unsigned __int8 CurrentIrql;
unsigned int v10;
PEPHANDLE *v11;
unsigned int v12;
PEPHANDLE *v13;
_DWORD *v15;
v5 = 0;
v6 = 1 << PlatformIdleStateIndex;
v7 = v3;
v8 = (char)State;
CurrentIrql = KeGetCurrentIrql();
if( (_BYTE)State )
CurrentIrql = ExAcquireSpinLockShared((INT64 *)DpmContext + 8);
if( DpmContext[43] == 2 )
{
v10 = 0;
v11 = DpmContext + 36;
do
{
if( (v6 & *v11) == 0 )
break;
++v10;
++v11;
}
while( v10 < 3 );
*v7 = v10 + 1;
if( v15 )
{
v12 = 0;
v13 = DpmContext + 39;
do
{
if( (v6 & *v13) == 0 )
break;
++v12;
++v13;
}
while( v12 < 3 );
*v15 = v12 + 1;
}
v5 = 1;
}
if( v8 )
{
ExReleaseSpinLockSharedFromDpcLevel(DpmContext + 16);
__writecr8(CurrentIrql);
}
return v5;
}Referenced by:
PoFxSetTargetDripsDevicePowerState
PopFxSetDeviceAccountingCsPlatformState
PopPepUpdateDripsDeviceVetoMask