[*] Improved cache reporting under NT under various conditions
new hw: return upper bound of range at level index. old sw: missing impl.
This commit is contained in:
parent
49287f2a73
commit
c42ebc9853
@ -135,17 +135,15 @@ namespace Aurora::HWInfo
|
||||
{
|
||||
switch (sysinfo[i].Cache.Level)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
gCpuInfo.dwCacheLine = sysinfo[i].Cache.LineSize;
|
||||
gCpuInfo.dwCacheL1 = sysinfo[i].Cache.Size;
|
||||
gCpuInfo.dwCacheLine = AuMax<AuUInt32>(gCpuInfo.dwCacheLine, sysinfo[i].Cache.LineSize);
|
||||
gCpuInfo.dwCacheL1 = AuMax<AuUInt32>(gCpuInfo.dwCacheL1, sysinfo[i].Cache.Size);
|
||||
break;
|
||||
case 2:
|
||||
gCpuInfo.dwCacheL2 = sysinfo[i].Cache.Size;
|
||||
gCpuInfo.dwCacheL2 = AuMax<AuUInt32>(gCpuInfo.dwCacheL2, sysinfo[i].Cache.Size);
|
||||
break;
|
||||
case 3:
|
||||
gCpuInfo.dwCacheL3 = sysinfo[i].Cache.Size;
|
||||
gCpuInfo.dwCacheL3 = AuMax<AuUInt32>(gCpuInfo.dwCacheL3, sysinfo[i].Cache.Size);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -248,6 +246,22 @@ namespace Aurora::HWInfo
|
||||
{
|
||||
gCpuInfo.uSocket++;
|
||||
}
|
||||
else if (sysinfo[i].Relationship == RelationCache)
|
||||
{
|
||||
switch (sysinfo[i].Cache.Level)
|
||||
{
|
||||
case 1:
|
||||
gCpuInfo.dwCacheLine = AuMax<AuUInt32>(gCpuInfo.dwCacheLine, sysinfo[i].Cache.LineSize);
|
||||
gCpuInfo.dwCacheL1 = AuMax<AuUInt32>(gCpuInfo.dwCacheL1, sysinfo[i].Cache.Size);
|
||||
break;
|
||||
case 2:
|
||||
gCpuInfo.dwCacheL2 = AuMax<AuUInt32>(gCpuInfo.dwCacheL2, sysinfo[i].Cache.Size);
|
||||
break;
|
||||
case 3:
|
||||
gCpuInfo.dwCacheL3 = AuMax<AuUInt32>(gCpuInfo.dwCacheL3, sysinfo[i].Cache.Size);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gCpuInfo.bMaskMTContig = !sparse;
|
||||
|
Loading…
Reference in New Issue
Block a user