OcCpuLib: Fix usages of not yet assigned value

This commit is contained in:
Download-Fritz 2019-06-06 09:08:06 +02:00
parent d7ba88b866
commit 145ed11178

View File

@ -763,12 +763,6 @@ ScanAmdProcessor (
AsmCpuid (0x80000008, NULL, NULL, &CpuidEcx, NULL);
Cpu->ThreadCount = (UINT16) (BitFieldRead32 (CpuidEcx, 0, 7) + 1);
}
//
// CPUPM is not supported on AMD, meaning the current
// and minimum bus ratio are equal to the maximum bus ratio
//
Cpu->CurBusRatio = Cpu->MaxBusRatio;
Cpu->MinBusRatio = Cpu->MaxBusRatio;
if (Cpu->Family == 0x0F) {
switch (Cpu->ExtFamily) {
@ -807,9 +801,16 @@ ScanAmdProcessor (
}
default:
{
break;
return;
}
}
//
// CPUPM is not supported on AMD, meaning the current
// and minimum bus ratio are equal to the maximum bus ratio
//
Cpu->CurBusRatio = Cpu->MaxBusRatio;
Cpu->MinBusRatio = Cpu->MaxBusRatio;
Cpu->FSBFrequency = DivU64x32 (Cpu->TSCFrequency, Cpu->MaxBusRatio);
}
}