HalpHvLpReadMcaStatusMsr
CHAR __fastcall HalpHvLpReadMcaStatusMsr(UINT64 a1, UINT64 a2, INT64 *a3, _QWORD *a4){
unsigned int v6;
unsigned int v7;
CHAR v8;
__int64 v9;
__int64 v10;
v6 = a2;
v7 = a1;
v8 = 0;
if( HalpGetCpuVendor() == 1 && HalpMcaScalableRasSupported )
{
if( v6 < 0xC0002000 )
return v8;
v9 = (v6 + 1073733632) >> 4;
}
else
{
if( v6 < 0x401 )
return v8;
v9 = (v6 - 1025) >> 2;
}
if( (unsigned int)v9 < (unsigned int)HalpHvMcaBankCount )
{
v10 = *a3;
if( *a3 )
{
LABEL_11:
v8 = 1;
*a4 = *(_QWORD *)(v10 + 8 * v9);
return v8;
}
v10 = HalpHvMcaStatusCache + 8i64 * v7 * (unsigned int)HalpHvMcaBankCount;
if( (int)HalpHvLpReadMultipleMsr(v7, (unsigned int)HalpHvMcaBankCount, HalpHvMcaStatusMsrIndices, v10) >= 0 )
{
*a3 = v10;
goto LABEL_11;
}
}
return v8;
}Referenced by:
HalpHvEpReadMsr