aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llcommon/llprocessor.cpp')
-rw-r--r--linden/indra/llcommon/llprocessor.cpp239
1 files changed, 97 insertions, 142 deletions
diff --git a/linden/indra/llcommon/llprocessor.cpp b/linden/indra/llcommon/llprocessor.cpp
index 3408cb1..d269e35 100644
--- a/linden/indra/llcommon/llprocessor.cpp
+++ b/linden/indra/llcommon/llprocessor.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2002-2007, Linden Research, Inc. 5 * Copyright (c) 2002-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -103,6 +104,7 @@ static void _Delay(unsigned int ms)
103CProcessor::CProcessor() 104CProcessor::CProcessor()
104{ 105{
105 uqwFrequency = 0; 106 uqwFrequency = 0;
107 strCPUName[0] = 0;
106 memset(&CPUInfo, 0, sizeof(CPUInfo)); 108 memset(&CPUInfo, 0, sizeof(CPUInfo));
107} 109}
108 110
@@ -245,77 +247,44 @@ bool CProcessor::AnalyzeIntelProcessor()
245 CPUInfo.uiType = (eaxreg >> 12) & 0x3; 247 CPUInfo.uiType = (eaxreg >> 12) & 0x3;
246 CPUInfo.uiBrandID = ebxreg & 0xF; 248 CPUInfo.uiBrandID = ebxreg & 0xF;
247 249
248 // Now we can translate the type number to a more understandable string format 250 static const char* INTEL_BRAND[] =
249 switch (CPUInfo.uiType)
250 { 251 {
251 case 0: // Type = 0: Original OEM processor 252 /* 0x00 */ "",
252 strcpy(CPUInfo.strType, "Original OEM"); /* Flawfinder: ignore */ 253 /* 0x01 */ "0.18 micron Intel Celeron",
253 strcpy(strCPUName, CPUInfo.strType); /* Flawfinder: ignore */ 254 /* 0x02 */ "0.18 micron Intel Pentium III",
254 strcat(strCPUName, " "); /* Flawfinder: ignore */ 255 /* 0x03 */ "0.13 micron Intel Celeron",
255 break; 256 /* 0x04 */ "0.13 micron Intel Pentium III",
256 case 1: // Type = 1: Overdrive processor 257 /* 0x05 */ "",
257 strcpy(CPUInfo.strType, "Overdrive"); /* Flawfinder: ignore */ 258 /* 0x06 */ "0.13 micron Intel Pentium III mobile",
258 strcpy(strCPUName, CPUInfo.strType); /* Flawfinder: ignore */ 259 /* 0x07 */ "0.13 micron Intel Celeron mobile",
259 strcat(strCPUName, " "); /* Flawfinder: ignore */ 260 /* 0x08 */ "0.18 micron Intel Pentium 4",
260 break; 261 /* 0x09 */ "0.13 micron Intel Pentium 4",
261 case 2: // Type = 2: Dual-capable processor 262 /* 0x0A */ "0.13 micron Intel Pentium 4",
262 strcpy(CPUInfo.strType, "Dual-capable"); /* Flawfinder: ignore */ 263 /* 0x0B */ "0.13 micron Intel Pentium 4 Xeon",
263 strcpy(strCPUName, CPUInfo.strType); /* Flawfinder: ignore */ 264 /* 0x0C */ "",
264 strcat(strCPUName, " "); /* Flawfinder: ignore */ 265 /* 0x0D */ "",
265 break; 266 /* 0x0E */ "0.18 micron Intel Pentium 4 Xeon",
266 case 3: // Type = 3: Reserved for future use 267 /* 0x0F */ "",
267 strcpy(CPUInfo.strType, "Reserved"); /* Flawfinder: ignore */ 268 /* 0x10 */ "",
268 break; 269 /* 0x11 */ "",
269 default: // This should be never called, cause we just mask 2 bits --> [0..3] 270 /* 0x12 */ "Intel Celeron M",
270 strcpy(CPUInfo.strType, "Unknown"); /* Flawfinder: ignore */ 271 /* 0x13 */ "mobile Intel Celeron",
271 break; 272 /* 0x14 */ "Intel Celeron",
272 } 273 /* 0x15 */ "mobile Intel",
273 274 /* 0x16 */ "Intel Pentium M",
274 // Then we translate the brand id: 275 /* 0x17 */ "mobile Intel Celeron",
275 switch (CPUInfo.uiBrandID) 276 };
277
278 // Only override the brand if we have it in the lookup table. We should
279 // already have a string here from GetCPUInfo(). JC
280 if (CPUInfo.uiBrandID < sizeof(INTEL_BRAND))
276 { 281 {
277 case 0: // Brand id = 0: Brand id not supported on this processor 282 strcpy(CPUInfo.strBrandID, INTEL_BRAND[CPUInfo.uiBrandID]);
278 strcpy(CPUInfo.strBrandID, "Not supported"); /* Flawfinder: ignore */ 283
279 break; 284 if (CPUInfo.uiBrandID == 3 && CPUInfo.uiModel == 6)
280 case 1: // Brand id = 1: Intel Celeron (0.18 micron) processor 285 {
281 strcpy(CPUInfo.strBrandID, "0.18 micron Intel Celeron"); /* Flawfinder: ignore */ 286 strcpy(CPUInfo.strBrandID, "0.18 micron Intel Pentium III Xeon");
282 break; 287 }
283 case 2: // Brand id = 2: Intel Pentium III (0.18 micron) processor
284 strcpy(CPUInfo.strBrandID, "0.18 micron Intel Pentium III"); /* Flawfinder: ignore */
285 break;
286 case 3: // Brand id = 3: Model dependent
287 if (CPUInfo.uiModel == 6) // If the cpu model is Celeron (well, I'm NOT SURE!!!)
288 strcpy(CPUInfo.strBrandID, "0.13 micron Intel Celeron"); /* Flawfinder: ignore */
289 else
290 strcpy(CPUInfo.strBrandID, "0.18 micron Intel Pentium III Xeon"); /* Flawfinder: ignore */
291 break;
292 case 4: // Brand id = 4: Intel Pentium III Tualatin (0.13 micron) processor
293 strcpy(CPUInfo.strBrandID, "0.13 micron Intel Pentium III"); /* Flawfinder: ignore */
294 break;
295 case 6: // Brand id = 6: Intel Pentium III mobile (0.13 micron) processor
296 strcpy(CPUInfo.strBrandID, "0.13 micron Intel Pentium III mobile"); /* Flawfinder: ignore */
297 break;
298 case 7: // Brand id = 7: Intel Celeron mobile (0.13 micron) processor
299 strcpy(CPUInfo.strBrandID, "0.13 micron Intel Celeron mobile"); /* Flawfinder: ignore */
300 break;
301 case 8: // Brand id = 8: Intel Pentium 4 Willamette (0.18 micron) processor
302 strcpy(CPUInfo.strBrandID, "0.18 micron Intel Pentium 4"); /* Flawfinder: ignore */
303 break;
304 case 9: // Brand id = 9: Intel Pentium 4 Northwood (0.13 micron) processor
305 strcpy(CPUInfo.strBrandID, "0.13 micron Intel Pentium 4"); /* Flawfinder: ignore */
306 break;
307 case 0xA: // Brand id = 0xA: Intel Pentium 4 Northwood (0.13 micron processor)
308 strcpy(CPUInfo.strBrandID, "0.13 micron Intel Pentium 4"); /* Flawfinder: ignore */
309 break; // No idea, where the difference to id=9 is
310 case 0xB: // Brand id = 0xB: Intel Pentium 4 Northwood Xeon (0.13 micron processor)
311 strcpy(CPUInfo.strBrandID, "0.13 micron Intel Pentium 4 Xeon"); /* Flawfinder: ignore */
312 break;
313 case 0xE: // Brand id = 0xE: Intel Pentium 4 Willamette Xeon (0.18 micron processor)
314 strcpy(CPUInfo.strBrandID, "0.18 micron Intel Pentium 4 Xeon"); /* Flawfinder: ignore */
315 break;
316 default: // Should be never called, but sure is sure
317 strcpy(CPUInfo.strBrandID, "Unknown"); /* Flawfinder: ignore */
318 break;
319 } 288 }
320 289
321 // Then we translate the cpu family 290 // Then we translate the cpu family
@@ -617,7 +586,7 @@ bool CProcessor::AnalyzeIntelProcessor()
617 else 586 else
618 { 587 {
619 // If there's no serial number support we just put "No serial number" 588 // If there's no serial number support we just put "No serial number"
620 snprintf( /* Flawfinder: ignore */ 589 snprintf( /* Flawfinder: ignore */
621 CPUInfo.strProcessorSerial, 590 CPUInfo.strProcessorSerial,
622 sizeof(CPUInfo.strProcessorSerial), 591 sizeof(CPUInfo.strProcessorSerial),
623 "No Processor Serial Number"); 592 "No Processor Serial Number");
@@ -667,33 +636,6 @@ bool CProcessor::AnalyzeAMDProcessor()
667 CPUInfo.uiFamily = (eaxreg >> 8) & 0xF; 636 CPUInfo.uiFamily = (eaxreg >> 8) & 0xF;
668 CPUInfo.uiType = (eaxreg >> 12) & 0x3; 637 CPUInfo.uiType = (eaxreg >> 12) & 0x3;
669 638
670 // After that, we translate the processor type (see CProcessor::AnalyzeIntelProcessor()
671 // for further comments on this)
672 switch (CPUInfo.uiType)
673 {
674 case 0:
675 strcpy(CPUInfo.strType, "Original OEM"); /* Flawfinder: ignore */
676 strcpy(strCPUName, CPUInfo.strType); /* Flawfinder: ignore */
677 strcat(strCPUName, " "); /*Flawfinder: ignore*/
678 break;
679 case 1:
680 strcpy(CPUInfo.strType, "Overdrive"); /* Flawfinder: ignore */
681 strcpy(strCPUName, CPUInfo.strType); /* Flawfinder: ignore */
682 strcat(strCPUName, " "); /*Flawfinder: ignore*/
683 break;
684 case 2:
685 strcpy(CPUInfo.strType, "Dual-capable"); /* Flawfinder: ignore */
686 strcpy(strCPUName, CPUInfo.strType); /* Flawfinder: ignore */
687 strcat(strCPUName, " "); /*Flawfinder: ignore*/
688 break;
689 case 3:
690 strcpy(CPUInfo.strType, "Reserved"); /* Flawfinder: ignore */
691 break;
692 default:
693 strcpy(CPUInfo.strType, "Unknown"); /* Flawfinder: ignore */
694 break;
695 }
696
697 // Now we check if the processor supports the brand id string extended CPUID level 639 // Now we check if the processor supports the brand id string extended CPUID level
698 if (CPUInfo.MaxSupportedExtendedLevel >= 0x80000004) 640 if (CPUInfo.MaxSupportedExtendedLevel >= 0x80000004)
699 { 641 {
@@ -728,7 +670,7 @@ bool CProcessor::AnalyzeAMDProcessor()
728 else 670 else
729 { 671 {
730 // Or just tell there is no brand id string support 672 // Or just tell there is no brand id string support
731 strcpy(CPUInfo.strBrandID, "Not supported"); /* Flawfinder: ignore */ 673 strcpy(CPUInfo.strBrandID, ""); /* Flawfinder: ignore */
732 } 674 }
733 675
734 // After that we translate the processor family 676 // After that we translate the processor family
@@ -993,7 +935,7 @@ bool CProcessor::AnalyzeAMDProcessor()
993 if ((ecxreg >> 24) > 0) 935 if ((ecxreg >> 24) > 0)
994 { 936 {
995 CPUInfo._L1.Data.bPresent = true; 937 CPUInfo._L1.Data.bPresent = true;
996 snprintf(CPUInfo._L1.Data.strSize, sizeof(CPUInfo._L1.Data.strSize), "%d KB", ecxreg >> 24); /*Flawfinder: ignore*/ 938 snprintf(CPUInfo._L1.Data.strSize, sizeof(CPUInfo._L1.Data.strSize), "%d KB", ecxreg >> 24); /* Flawfinder: ignore */
997 CPUInfo._L1.Data.uiAssociativeWays = (ecxreg >> 15) & 0xFF; 939 CPUInfo._L1.Data.uiAssociativeWays = (ecxreg >> 15) & 0xFF;
998 CPUInfo._L1.Data.uiLineSize = ecxreg & 0xFF; 940 CPUInfo._L1.Data.uiLineSize = ecxreg & 0xFF;
999 } 941 }
@@ -1001,7 +943,7 @@ bool CProcessor::AnalyzeAMDProcessor()
1001 if ((edxreg >> 24) > 0) 943 if ((edxreg >> 24) > 0)
1002 { 944 {
1003 CPUInfo._L1.Instruction.bPresent = true; 945 CPUInfo._L1.Instruction.bPresent = true;
1004 snprintf(CPUInfo._L1.Instruction.strSize, sizeof(CPUInfo._L1.Instruction.strSize), "%d KB", edxreg >> 24); /*Flawfinder: ignore*/ 946 snprintf(CPUInfo._L1.Instruction.strSize, sizeof(CPUInfo._L1.Instruction.strSize), "%d KB", edxreg >> 24); /* Flawfinder: ignore */
1005 CPUInfo._L1.Instruction.uiAssociativeWays = (edxreg >> 15) & 0xFF; 947 CPUInfo._L1.Instruction.uiAssociativeWays = (edxreg >> 15) & 0xFF;
1006 CPUInfo._L1.Instruction.uiLineSize = edxreg & 0xFF; 948 CPUInfo._L1.Instruction.uiLineSize = edxreg & 0xFF;
1007 } 949 }
@@ -1025,7 +967,7 @@ bool CProcessor::AnalyzeAMDProcessor()
1025 if (((ecxreg >> 12) & 0xF) > 0) 967 if (((ecxreg >> 12) & 0xF) > 0)
1026 { 968 {
1027 CPUInfo._L2.bPresent = true; 969 CPUInfo._L2.bPresent = true;
1028 snprintf(CPUInfo._L2.strSize, sizeof(CPUInfo._L2.strSize), "%d KB", ecxreg >> 16); /*Flawfinder: ignore*/ 970 snprintf(CPUInfo._L2.strSize, sizeof(CPUInfo._L2.strSize), "%d KB", ecxreg >> 16); /* Flawfinder: ignore */
1029 switch ((ecxreg >> 12) & 0xF) 971 switch ((ecxreg >> 12) & 0xF)
1030 { 972 {
1031 case 1: 973 case 1:
@@ -1118,29 +1060,9 @@ bool CProcessor::AnalyzeUnknownProcessor()
1118 strcpy(CPUInfo.strProcessorSerial, "Unknown / Not supported"); /*Flawfinder: ignore*/ 1060 strcpy(CPUInfo.strProcessorSerial, "Unknown / Not supported"); /*Flawfinder: ignore*/
1119 1061
1120 // For the family, model and brand id we can only print the numeric value 1062 // For the family, model and brand id we can only print the numeric value
1121 snprintf(CPUInfo.strBrandID, sizeof(CPUInfo.strBrandID), "Brand-ID number %d", CPUInfo.uiBrandID); /*Flawfinder: ignore*/ 1063 snprintf(CPUInfo.strBrandID, sizeof(CPUInfo.strBrandID), "Brand-ID number %d", CPUInfo.uiBrandID); /* Flawfinder: ignore */
1122 snprintf(CPUInfo.strFamily, sizeof(CPUInfo.strFamily), "Family number %d", CPUInfo.uiFamily); /*Flawfinder: ignore*/ 1064 snprintf(CPUInfo.strFamily, sizeof(CPUInfo.strFamily), "Family number %d", CPUInfo.uiFamily); /* Flawfinder: ignore */
1123 snprintf(CPUInfo.strModel, sizeof(CPUInfo.strModel), "Model number %d", CPUInfo.uiModel); /*Flawfinder: ignore*/ 1065 snprintf(CPUInfo.strModel, sizeof(CPUInfo.strModel), "Model number %d", CPUInfo.uiModel); /* Flawfinder: ignore */
1124
1125 // Nevertheless we can determine the processor type
1126 switch (CPUInfo.uiType)
1127 {
1128 case 0:
1129 strcpy(CPUInfo.strType, "Original OEM"); /*Flawfinder: ignore*/
1130 break;
1131 case 1:
1132 strcpy(CPUInfo.strType, "Overdrive"); /*Flawfinder: ignore*/
1133 break;
1134 case 2:
1135 strcpy(CPUInfo.strType, "Dual-capable"); /*Flawfinder: ignore*/
1136 break;
1137 case 3:
1138 strcpy(CPUInfo.strType, "Reserved"); /*Flawfinder: ignore*/
1139 break;
1140 default:
1141 strcpy(CPUInfo.strType, "Unknown"); /*Flawfinder: ignore*/
1142 break;
1143 }
1144 1066
1145 // And thats it 1067 // And thats it
1146 return true; 1068 return true;
@@ -1653,6 +1575,8 @@ const ProcessorInfo *CProcessor::GetCPUInfo()
1653 *((unsigned long *) CPUInfo.strVendor) = ebxreg; 1575 *((unsigned long *) CPUInfo.strVendor) = ebxreg;
1654 *((unsigned long *) (CPUInfo.strVendor+4)) = edxreg; 1576 *((unsigned long *) (CPUInfo.strVendor+4)) = edxreg;
1655 *((unsigned long *) (CPUInfo.strVendor+8)) = ecxreg; 1577 *((unsigned long *) (CPUInfo.strVendor+8)) = ecxreg;
1578 // Null terminate for string comparisons below.
1579 CPUInfo.strVendor[12] = 0;
1656 1580
1657 // We can also read the max. supported standard CPUID level 1581 // We can also read the max. supported standard CPUID level
1658 CPUInfo.MaxSupportedLevel = eaxreg & 0xFFFF; 1582 CPUInfo.MaxSupportedLevel = eaxreg & 0xFFFF;
@@ -1668,22 +1592,52 @@ const ProcessorInfo *CProcessor::GetCPUInfo()
1668 CPUInfo.MaxSupportedExtendedLevel = eaxreg; 1592 CPUInfo.MaxSupportedExtendedLevel = eaxreg;
1669 1593
1670 // Then we switch to the specific processor vendors 1594 // Then we switch to the specific processor vendors
1671 switch (ebxreg) 1595 // See http://www.sandpile.org/ia32/cpuid.htm
1596 if (!strcmp(CPUInfo.strVendor, "GenuineIntel"))
1672 { 1597 {
1673 case 0x756E6547: // GenuineIntel 1598 AnalyzeIntelProcessor();
1674 AnalyzeIntelProcessor(); 1599 }
1675 break; 1600 else if (!strcmp(CPUInfo.strVendor, "AuthenticAMD"))
1676 case 0x68747541: // AuthenticAMD 1601 {
1677 AnalyzeAMDProcessor(); 1602 AnalyzeAMDProcessor();
1678 break; 1603 }
1679 case 0x69727943: // CyrixInstead 1604 else if (!strcmp(CPUInfo.strVendor, "UMC UMC UMC"))
1680 // I really do not know anyone owning such a piece of crab 1605 {
1681 // So we analyze it as an unknown processor *ggggg* 1606 AnalyzeUnknownProcessor();
1682 default: 1607 }
1683 AnalyzeUnknownProcessor(); 1608 else if (!strcmp(CPUInfo.strVendor, "CyrixInstead"))
1684 break; 1609 {
1610 AnalyzeUnknownProcessor();
1611 }
1612 else if (!strcmp(CPUInfo.strVendor, "NexGenDriven"))
1613 {
1614 AnalyzeUnknownProcessor();
1615 }
1616 else if (!strcmp(CPUInfo.strVendor, "CentaurHauls"))
1617 {
1618 AnalyzeUnknownProcessor();
1619 }
1620 else if (!strcmp(CPUInfo.strVendor, "RiseRiseRise"))
1621 {
1622 AnalyzeUnknownProcessor();
1623 }
1624 else if (!strcmp(CPUInfo.strVendor, "SiS SiS SiS"))
1625 {
1626 AnalyzeUnknownProcessor();
1627 }
1628 else if (!strcmp(CPUInfo.strVendor, "GenuineTMx86"))
1629 {
1630 // Transmeta
1631 AnalyzeUnknownProcessor();
1632 }
1633 else if (!strcmp(CPUInfo.strVendor, "Geode by NSC"))
1634 {
1635 AnalyzeUnknownProcessor();
1636 }
1637 else
1638 {
1639 AnalyzeUnknownProcessor();
1685 } 1640 }
1686
1687#endif 1641#endif
1688 // After all we return the class CPUInfo member var 1642 // After all we return the class CPUInfo member var
1689 return (&CPUInfo); 1643 return (&CPUInfo);
@@ -1767,6 +1721,7 @@ void CProcessor::TranslateProcessorConfiguration()
1767CProcessor::CProcessor() 1721CProcessor::CProcessor()
1768{ 1722{
1769 uqwFrequency = 0; 1723 uqwFrequency = 0;
1724 strCPUName[0] = 0;
1770 memset(&CPUInfo, 0, sizeof(CPUInfo)); 1725 memset(&CPUInfo, 0, sizeof(CPUInfo));
1771} 1726}
1772 1727
@@ -1970,7 +1925,7 @@ const ProcessorInfo *CProcessor::GetCPUInfo()
1970 if(l1dcachesize != 0) 1925 if(l1dcachesize != 0)
1971 { 1926 {
1972 CPUInfo._L1.Data.bPresent = true; 1927 CPUInfo._L1.Data.bPresent = true;
1973 snprintf(CPUInfo._L1.Data.strSize, sizeof(CPUInfo._L1.Data.strSize), "%d KB", l1dcachesize / 1024); /* Flawfinder: ignore */ 1928 snprintf(CPUInfo._L1.Data.strSize, sizeof(CPUInfo._L1.Data.strSize), "%d KB", l1dcachesize / 1024); /* Flawfinder: ignore */
1974// CPUInfo._L1.Data.uiAssociativeWays = ???; 1929// CPUInfo._L1.Data.uiAssociativeWays = ???;
1975 CPUInfo._L1.Data.uiLineSize = cachelinesize; 1930 CPUInfo._L1.Data.uiLineSize = cachelinesize;
1976 } 1931 }
@@ -1978,7 +1933,7 @@ const ProcessorInfo *CProcessor::GetCPUInfo()
1978 if(l1icachesize != 0) 1933 if(l1icachesize != 0)
1979 { 1934 {
1980 CPUInfo._L1.Instruction.bPresent = true; 1935 CPUInfo._L1.Instruction.bPresent = true;
1981 snprintf(CPUInfo._L1.Instruction.strSize, sizeof(CPUInfo._L1.Instruction.strSize), "%d KB", l1icachesize / 1024); /* Flawfinder: ignore */ 1936 snprintf(CPUInfo._L1.Instruction.strSize, sizeof(CPUInfo._L1.Instruction.strSize), "%d KB", l1icachesize / 1024); /* Flawfinder: ignore */
1982// CPUInfo._L1.Instruction.uiAssociativeWays = ???; 1937// CPUInfo._L1.Instruction.uiAssociativeWays = ???;
1983 CPUInfo._L1.Instruction.uiLineSize = cachelinesize; 1938 CPUInfo._L1.Instruction.uiLineSize = cachelinesize;
1984 } 1939 }
@@ -1986,7 +1941,7 @@ const ProcessorInfo *CProcessor::GetCPUInfo()
1986 if(l2cachesize != 0) 1941 if(l2cachesize != 0)
1987 { 1942 {
1988 CPUInfo._L2.bPresent = true; 1943 CPUInfo._L2.bPresent = true;
1989 snprintf(CPUInfo._L2.strSize, sizeof(CPUInfo._L2.strSize), "%d KB", l2cachesize / 1024); /* Flawfinder: ignore */ 1944 snprintf(CPUInfo._L2.strSize, sizeof(CPUInfo._L2.strSize), "%d KB", l2cachesize / 1024); /* Flawfinder: ignore */
1990// CPUInfo._L2.uiAssociativeWays = ???; 1945// CPUInfo._L2.uiAssociativeWays = ???;
1991 CPUInfo._L2.uiLineSize = cachelinesize; 1946 CPUInfo._L2.uiLineSize = cachelinesize;
1992 } 1947 }
@@ -1994,7 +1949,7 @@ const ProcessorInfo *CProcessor::GetCPUInfo()
1994 if(l3cachesize != 0) 1949 if(l3cachesize != 0)
1995 { 1950 {
1996 CPUInfo._L2.bPresent = true; 1951 CPUInfo._L2.bPresent = true;
1997 snprintf(CPUInfo._L2.strSize, sizeof(CPUInfo._L2.strSize), "%d KB", l3cachesize / 1024); /* Flawfinder: ignore */ 1952 snprintf(CPUInfo._L2.strSize, sizeof(CPUInfo._L2.strSize), "%d KB", l3cachesize / 1024); /* Flawfinder: ignore */
1998// CPUInfo._L2.uiAssociativeWays = ???; 1953// CPUInfo._L2.uiAssociativeWays = ???;
1999 CPUInfo._L2.uiLineSize = cachelinesize; 1954 CPUInfo._L2.uiLineSize = cachelinesize;
2000 } 1955 }