KiConfigureProcessorBlock
VOID __stdcall KiConfigureProcessorBlock(_KPRCB *Prcb, UINT8 DynamicProcessor){
_KNODE *ParentNode;
unsigned int v3;
__int64 v4;
unsigned __int64 v5;
unsigned int v6;
unsigned __int64 v7;
unsigned __int16 v8;
__int64 v9;
__int64 *v10;
__int64 v11;
__int64 v12;
ParentNode = Prcb->ParentNode;
v3 = KiProcessorIndexToNumberMappingTable[Prcb->Number];
v4 = ParentNode->Affinity.Mask | (1i64 << (v3 & 0x3F));
_BitScanForward64(&v5, v4);
v6 = v3 >> 6 << 6;
ParentNode->Affinity.Mask = v4;
_BitScanReverse64(&v7, v4);
ParentNode->Lowest = KiProcessorNumberToIndexMappingTable[v6 + (unsigned int)v5];
v8 = ParentNode->Affinity.Reserved[0];
ParentNode->Highest = KiProcessorNumberToIndexMappingTable[v6 + (unsigned int)v7];
LOWORD(v5) = ParentNode->Lowest;
ParentNode->ThreadSeed = v5;
ParentNode->ProcessSeed = v5;
if( ((v4 - 1) & v4) == 0 )
{
v9 = 0i64;
if( KeNumberNodes )
{
v10 = KeNodeBlock;
v11 = (unsigned __int16)KeNumberNodes;
do
{
if( *(unsigned __int16 *)(*v10 + 144) == v3 >> 6 )
{
v12 = *v10;
if( v9 )
v12 = v9;
v9 = v12;
*(_DWORD *)(*v10 + 128) = *(_DWORD *)(v12 + 128) | (1 << v8);
}
++v10;
--v11;
}
while( v11 );
}
}
}Referenced by:
KeStartAllProcessors
KiInitializeDynamicProcessorDpc
KiInitializeKernel