Changeset 49952 in vbox
- Timestamp:
- Dec 17, 2013 1:43:56 PM (11 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 1 added
- 2 edited
-
VMMR3/CPUMR3Db.cpp (modified) (1 diff)
-
VMMR3/cpus/AMD_Phenom_II_X6_1100T.h (added)
-
tools/VBoxCpuReport.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUMR3Db.cpp
r49927 r49952 179 179 180 180 #include "cpus/AMD_FX_8150_Eight_Core.h" 181 #include "cpus/AMD_Phenom_II_X6_1100T.h" 181 182 #include "cpus/Quad_Core_AMD_Opteron_2384.h" 182 183 -
trunk/src/VBox/VMM/tools/VBoxCpuReport.cpp
r49945 r49952 488 488 } 489 489 #if 0 490 else if (uMsr >= 0xc001100 8&& uMsr <= 0xc0011100)490 else if (uMsr >= 0xc0011000 && uMsr <= 0xc0011100) 491 491 { 492 492 vbCpuRepDebug("testing %#x...\n", uMsr); 493 RTThreadSleep(2 2);493 RTThreadSleep(250); 494 494 } 495 495 #endif 496 497 /* Read probing normally does it. */ 498 uint64_t uValue = 0; 499 bool fGp = true; 500 int rc = SUPR3MsrProberRead(uMsr, NIL_RTCPUID, &uValue, &fGp); 501 if (RT_FAILURE(rc)) 502 { 503 RTMemFree(*ppaMsrs); 504 *ppaMsrs = NULL; 505 return RTMsgErrorRc(rc, "SUPR3MsrProberRead failed on %#x: %Rrc\n", uMsr, rc); 506 } 507 508 uint32_t fFlags; 509 if (!fGp) 510 fFlags = 0; 496 /* Skip 0xc0011012..13 as it seems to be bad for our health (Phenom II X6 1100T). */ 497 if ((uMsr >= 0xc0011012 && uMsr <= 0xc0011013) && g_enmVendor == CPUMCPUVENDOR_AMD) 498 vbCpuRepDebug("Skipping %#x\n", uMsr); 511 499 else 512 500 { 513 /* Is it a write only register? */ 514 fGp = true; 515 rc = SUPR3MsrProberWrite(uMsr, NIL_RTCPUID, 0, &fGp); 501 /* Read probing normally does it. */ 502 uint64_t uValue = 0; 503 bool fGp = true; 504 int rc = SUPR3MsrProberRead(uMsr, NIL_RTCPUID, &uValue, &fGp); 516 505 if (RT_FAILURE(rc)) 517 506 { 518 507 RTMemFree(*ppaMsrs); 519 508 *ppaMsrs = NULL; 520 return RTMsgErrorRc(rc, "SUPR3MsrProber Writefailed on %#x: %Rrc\n", uMsr, rc);509 return RTMsgErrorRc(rc, "SUPR3MsrProberRead failed on %#x: %Rrc\n", uMsr, rc); 521 510 } 522 uValue = 0; 523 fFlags = VBCPUREPMSR_F_WRITE_ONLY; 524 525 /* 526 * Tweaks. On Intel CPUs we've got trouble detecting 527 * IA32_BIOS_UPDT_TRIG (0x00000079), so we have to add it manually here. 528 */ 529 if ( uMsr == 0x00000079 530 && fGp 531 && g_enmMicroarch >= kCpumMicroarch_Intel_P6_Core_Atom_First 532 && g_enmMicroarch <= kCpumMicroarch_Intel_End) 533 fGp = false; 534 } 535 536 if (!fGp) 537 { 538 /* Add it. */ 539 rc = vbCpuRepMsrsAddOne(ppaMsrs, pcMsrs, uMsr, uValue, fFlags); 540 if (RT_FAILURE(rc)) 541 return RTMsgErrorRc(rc, "Out of memory (uMsr=%#x).\n", uMsr); 542 vbCpuRepDebug("%#010x: uValue=%#llx fFlags=%#x\n", uMsr, uValue, fFlags); 511 512 uint32_t fFlags; 513 if (!fGp) 514 fFlags = 0; 515 else 516 { 517 /* Is it a write only register? */ 518 #if 0 519 if (uMsr >= 0xc0011000 && uMsr <= 0xc0011100) 520 { 521 vbCpuRepDebug("test writing %#x...\n", uMsr); 522 RTThreadSleep(250); 523 } 524 #endif 525 fGp = true; 526 rc = SUPR3MsrProberWrite(uMsr, NIL_RTCPUID, 0, &fGp); 527 if (RT_FAILURE(rc)) 528 { 529 RTMemFree(*ppaMsrs); 530 *ppaMsrs = NULL; 531 return RTMsgErrorRc(rc, "SUPR3MsrProberWrite failed on %#x: %Rrc\n", uMsr, rc); 532 } 533 uValue = 0; 534 fFlags = VBCPUREPMSR_F_WRITE_ONLY; 535 536 /* 537 * Tweaks. On Intel CPUs we've got trouble detecting 538 * IA32_BIOS_UPDT_TRIG (0x00000079), so we have to add it manually here. 539 */ 540 if ( uMsr == 0x00000079 541 && fGp 542 && g_enmMicroarch >= kCpumMicroarch_Intel_P6_Core_Atom_First 543 && g_enmMicroarch <= kCpumMicroarch_Intel_End) 544 fGp = false; 545 } 546 547 if (!fGp) 548 { 549 /* Add it. */ 550 rc = vbCpuRepMsrsAddOne(ppaMsrs, pcMsrs, uMsr, uValue, fFlags); 551 if (RT_FAILURE(rc)) 552 return RTMsgErrorRc(rc, "Out of memory (uMsr=%#x).\n", uMsr); 553 vbCpuRepDebug("%#010x: uValue=%#llx fFlags=%#x\n", uMsr, uValue, fFlags); 554 } 543 555 } 544 556 … … 1062 1074 case 0xc001001e: return "AMD_K8_MANID"; 1063 1075 case 0xc001001f: return "AMD_K8_NB_CFG1"; 1076 case 0xc0010021: return "AMD_10H_UNK_c001_0021"; 1064 1077 case 0xc0010022: return "AMD_K8_MC_XCPT_REDIR"; 1065 1078 case 0xc0010028: return "AMD_K8_UNK_c001_0028"; … … 3467 3480 uint64_t uValue = paMsrs[i].uValue; 3468 3481 int rc; 3469 #if 1 3470 if ( 0 //(uMsr >= 0x00000268 && uMsr <= 0x0000026f) 3471 || uMsr == 0x00000277 3472 || uMsr == 0x000002ff 3473 ) 3482 #if 0 3483 if (uMsr >= 0x10011007) 3474 3484 { 3475 3485 vbCpuRepDebug("produceMsrReport: uMsr=%#x (%s)...\n", uMsr, getMsrNameHandled(uMsr)); 3476 RTThreadSleep( 2000);3486 RTThreadSleep(1000); 3477 3487 } 3478 3488 #endif
Note:
See TracChangeset
for help on using the changeset viewer.

