mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-12 09:54:36 +01:00
use safe division for uint64
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
parent
ae995a5c76
commit
6fcdc801e2
@ -399,8 +399,8 @@ VOID GetCPUProperties (VOID)
|
||||
if (Num && Denom) {
|
||||
gCPUStructure.ARTFrequency = DivU64x32(MultU64x32(gCPUStructure.TSCCalibr, Denom), Num);
|
||||
DBG(" Calibrated ARTFrequency: %lld\n", gCPUStructure.ARTFrequency);
|
||||
UINT64 Stokg = (gCPUStructure.ARTFrequency + 99999) / 100000;
|
||||
gCPUStructure.ARTFrequency = Stokg * 100000;
|
||||
UINT64 Stokg = DivU64x32(gCPUStructure.ARTFrequency + 99999, 100000);
|
||||
gCPUStructure.ARTFrequency = MultU64x32(Stokg, 100000);
|
||||
DBG(" Rounded ARTFrequency: %lld\n", gCPUStructure.ARTFrequency);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user