Changeset 49966 in vbox
- Timestamp:
- Dec 17, 2013 8:43:23 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/cpum.h
r49933 r49966 240 240 ((a_enmMicroarch) >= kCpumMicroarch_Intel_Core7_First && (a_enmMicroarch) <= kCpumMicroarch_Intel_Core7_End) 241 241 242 /** Predicate macro for catching AMD Family 8HCPUs (aka K8). */243 #define CPUMMICROARCH_IS_AMD_FAM_ 8H(a_enmMicroarch) \242 /** Predicate macro for catching AMD Family OFh CPUs (aka K8). */ 243 #define CPUMMICROARCH_IS_AMD_FAM_0FH(a_enmMicroarch) \ 244 244 ((a_enmMicroarch) >= kCpumMicroarch_AMD_K8_First && (a_enmMicroarch) <= kCpumMicroarch_AMD_K8_End) 245 245 -
trunk/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp
r49927 r49966 221 221 222 222 223 /** @callback_method_impl{FNCPUMRDMSR} */ 224 static DECLCALLBACK(int) cpumMsrRd_Ia32BiosSignId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 225 { 226 /** @todo fake microcode update. */ 227 *puValue = pRange->uInitOrReadValue; 228 return VINF_SUCCESS; 229 } 230 231 232 /** @callback_method_impl{FNCPUMWRMSR} */ 233 static DECLCALLBACK(int) cpumMsrWr_Ia32BiosSignId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue) 234 { 235 return VERR_CPUM_RAISE_GP_0; 236 } 237 238 223 239 /** @callback_method_impl{FNCPUMWRMSR} */ 224 240 static DECLCALLBACK(int) cpumMsrWr_Ia32BiosUpdateTrigger(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue) … … 695 711 /** @todo implement IA32_PERFSTATUS. */ 696 712 *puValue = pRange->uInitOrReadValue; 713 return VINF_SUCCESS; 714 } 715 716 717 /** @callback_method_impl{FNCPUMWRMSR} */ 718 static DECLCALLBACK(int) cpumMsrWr_Ia32PerfStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue) 719 { 720 /* Pentium4 allows writing, but all bits are ignored. */ 697 721 return VINF_SUCCESS; 698 722 } … … 1465 1489 1466 1490 /** @callback_method_impl{FNCPUMRDMSR} */ 1491 static DECLCALLBACK(int) cpumMsrRd_IntelP4EbcHardPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 1492 { 1493 /** @todo P4 hard power on config */ 1494 *puValue = pRange->uInitOrReadValue; 1495 return VINF_SUCCESS; 1496 } 1497 1498 1499 /** @callback_method_impl{FNCPUMWRMSR} */ 1500 static DECLCALLBACK(int) cpumMsrWr_IntelP4EbcHardPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue) 1501 { 1502 /** @todo P4 hard power on config */ 1503 return VINF_SUCCESS; 1504 } 1505 1506 1507 /** @callback_method_impl{FNCPUMRDMSR} */ 1508 static DECLCALLBACK(int) cpumMsrRd_IntelP4EbcSoftPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 1509 { 1510 /** @todo P4 soft power on config */ 1511 *puValue = pRange->uInitOrReadValue; 1512 return VINF_SUCCESS; 1513 } 1514 1515 1516 /** @callback_method_impl{FNCPUMWRMSR} */ 1517 static DECLCALLBACK(int) cpumMsrWr_IntelP4EbcSoftPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue) 1518 { 1519 /** @todo P4 soft power on config */ 1520 return VINF_SUCCESS; 1521 } 1522 1523 1524 /** @callback_method_impl{FNCPUMRDMSR} */ 1525 static DECLCALLBACK(int) cpumMsrRd_IntelP4EbcFrequencyId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 1526 { 1527 /** @todo P4 bus frequency config */ 1528 *puValue = pRange->uInitOrReadValue; 1529 return VINF_SUCCESS; 1530 } 1531 1532 1533 /** @callback_method_impl{FNCPUMWRMSR} */ 1534 static DECLCALLBACK(int) cpumMsrWr_IntelP4EbcFrequencyId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue) 1535 { 1536 /** @todo P4 bus frequency config */ 1537 return VINF_SUCCESS; 1538 } 1539 1540 1541 /** @callback_method_impl{FNCPUMRDMSR} */ 1467 1542 static DECLCALLBACK(int) cpumMsrRd_IntelPlatformInfo100MHz(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 1468 1543 { … … 2813 2888 2814 2889 /** @callback_method_impl{FNCPUMRDMSR} */ 2890 static DECLCALLBACK(int) cpumMsrRd_AmdK8FidVidControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 2891 { 2892 /** @todo AMD FIDVID_CTL. */ 2893 *puValue = pRange->uInitOrReadValue; 2894 return VINF_SUCCESS; 2895 } 2896 2897 2898 /** @callback_method_impl{FNCPUMWRMSR} */ 2899 static DECLCALLBACK(int) cpumMsrWr_AmdK8FidVidControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue) 2900 { 2901 /** @todo AMD FIDVID_CTL. */ 2902 return VINF_SUCCESS; 2903 } 2904 2905 2906 /** @callback_method_impl{FNCPUMRDMSR} */ 2907 static DECLCALLBACK(int) cpumMsrRd_AmdK8FidVidStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 2908 { 2909 /** @todo AMD FIDVID_STATUS. */ 2910 *puValue = pRange->uInitOrReadValue; 2911 return VINF_SUCCESS; 2912 } 2913 2914 2915 /** @callback_method_impl{FNCPUMRDMSR} */ 2815 2916 static DECLCALLBACK(int) cpumMsrRd_AmdK8McCtlMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 2816 2917 { … … 3453 3554 { 3454 3555 /** @todo Changing CPUID leaf 0x80000001. */ 3556 return VINF_SUCCESS; 3557 } 3558 3559 3560 /** @callback_method_impl{FNCPUMRDMSR} */ 3561 static DECLCALLBACK(int) cpumMsrRd_AmdK8PatchLevel(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 3562 { 3563 /** @todo Fake AMD microcode patching. */ 3564 *puValue = pRange->uInitOrReadValue; 3565 return VINF_SUCCESS; 3566 } 3567 3568 3569 /** @callback_method_impl{FNCPUMWRMSR} */ 3570 static DECLCALLBACK(int) cpumMsrWr_AmdK8PatchLoader(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue) 3571 { 3572 /** @todo Fake AMD microcode patching. */ 3455 3573 return VINF_SUCCESS; 3456 3574 } … … 4144 4262 cpumMsrRd_Ia32ApicBase, 4145 4263 cpumMsrRd_Ia32FeatureControl, 4264 cpumMsrRd_Ia32BiosSignId, 4146 4265 cpumMsrRd_Ia32SmmMonitorCtl, 4147 4266 cpumMsrRd_Ia32PmcN, … … 4217 4336 4218 4337 cpumMsrRd_IntelEblCrPowerOn, 4338 cpumMsrRd_IntelP4EbcHardPowerOn, 4339 cpumMsrRd_IntelP4EbcSoftPowerOn, 4340 cpumMsrRd_IntelP4EbcFrequencyId, 4219 4341 cpumMsrRd_IntelPlatformInfo100MHz, 4220 4342 cpumMsrRd_IntelPlatformInfo133MHz, … … 4304 4426 cpumMsrRd_AmdK8HwThermalCtrl, 4305 4427 cpumMsrRd_AmdK8SwThermalCtrl, 4428 cpumMsrRd_AmdK8FidVidControl, 4429 cpumMsrRd_AmdK8FidVidStatus, 4306 4430 cpumMsrRd_AmdK8McCtlMaskN, 4307 4431 cpumMsrRd_AmdK8SmiOnIoTrapN, … … 4341 4465 cpumMsrRd_AmdK8CpuIdCtlStd01hEdcx, 4342 4466 cpumMsrRd_AmdK8CpuIdCtlExt01hEdcx, 4467 cpumMsrRd_AmdK8PatchLevel, 4343 4468 cpumMsrRd_AmdK7DebugStatusMaybe, 4344 4469 cpumMsrRd_AmdK7BHTraceBaseMaybe, … … 4393 4518 cpumMsrWr_Ia32ApicBase, 4394 4519 cpumMsrWr_Ia32FeatureControl, 4520 cpumMsrWr_Ia32BiosSignId, 4395 4521 cpumMsrWr_Ia32BiosUpdateTrigger, 4396 4522 cpumMsrWr_Ia32SmmMonitorCtl, … … 4415 4541 cpumMsrWr_Ia32Dca0Cap, 4416 4542 cpumMsrWr_Ia32PerfEvtSelN, 4543 cpumMsrWr_Ia32PerfStatus, 4417 4544 cpumMsrWr_Ia32PerfCtl, 4418 4545 cpumMsrWr_Ia32FixedCtrN, … … 4446 4573 4447 4574 cpumMsrWr_IntelEblCrPowerOn, 4575 cpumMsrWr_IntelP4EbcHardPowerOn, 4576 cpumMsrWr_IntelP4EbcSoftPowerOn, 4577 cpumMsrWr_IntelP4EbcFrequencyId, 4448 4578 cpumMsrWr_IntelPkgCStConfigControl, 4449 4579 cpumMsrWr_IntelPmgIoCaptureBase, … … 4511 4641 cpumMsrWr_AmdK8HwThermalCtrl, 4512 4642 cpumMsrWr_AmdK8SwThermalCtrl, 4643 cpumMsrWr_AmdK8FidVidControl, 4513 4644 cpumMsrWr_AmdK8McCtlMaskN, 4514 4645 cpumMsrWr_AmdK8SmiOnIoTrapN, … … 4547 4678 cpumMsrWr_AmdK8CpuIdCtlStd01hEdcx, 4548 4679 cpumMsrWr_AmdK8CpuIdCtlExt01hEdcx, 4680 cpumMsrWr_AmdK8PatchLoader, 4549 4681 cpumMsrWr_AmdK7DebugStatusMaybe, 4550 4682 cpumMsrWr_AmdK7BHTraceBaseMaybe, … … 4785 4917 CPUM_ASSERT_RD_MSR_FN(Ia32ApicBase); 4786 4918 CPUM_ASSERT_RD_MSR_FN(Ia32FeatureControl); 4919 CPUM_ASSERT_RD_MSR_FN(Ia32BiosSignId); 4787 4920 CPUM_ASSERT_RD_MSR_FN(Ia32SmmMonitorCtl); 4788 4921 CPUM_ASSERT_RD_MSR_FN(Ia32PmcN); … … 4857 4990 4858 4991 CPUM_ASSERT_RD_MSR_FN(IntelEblCrPowerOn); 4992 CPUM_ASSERT_RD_MSR_FN(IntelP4EbcHardPowerOn); 4993 CPUM_ASSERT_RD_MSR_FN(IntelP4EbcSoftPowerOn); 4994 CPUM_ASSERT_RD_MSR_FN(IntelP4EbcFrequencyId); 4859 4995 CPUM_ASSERT_RD_MSR_FN(IntelPlatformInfo100MHz); 4860 4996 CPUM_ASSERT_RD_MSR_FN(IntelPlatformInfo133MHz); … … 4944 5080 CPUM_ASSERT_RD_MSR_FN(AmdK8HwThermalCtrl); 4945 5081 CPUM_ASSERT_RD_MSR_FN(AmdK8SwThermalCtrl); 5082 CPUM_ASSERT_RD_MSR_FN(AmdK8FidVidControl); 5083 CPUM_ASSERT_RD_MSR_FN(AmdK8FidVidStatus); 4946 5084 CPUM_ASSERT_RD_MSR_FN(AmdK8McCtlMaskN); 4947 5085 CPUM_ASSERT_RD_MSR_FN(AmdK8SmiOnIoTrapN); … … 4981 5119 CPUM_ASSERT_RD_MSR_FN(AmdK8CpuIdCtlStd01hEdcx); 4982 5120 CPUM_ASSERT_RD_MSR_FN(AmdK8CpuIdCtlExt01hEdcx); 5121 CPUM_ASSERT_RD_MSR_FN(AmdK8PatchLevel); 4983 5122 CPUM_ASSERT_RD_MSR_FN(AmdK7DebugStatusMaybe); 4984 5123 CPUM_ASSERT_RD_MSR_FN(AmdK7BHTraceBaseMaybe); … … 5023 5162 CPUM_ASSERT_WR_MSR_FN(Ia32ApicBase); 5024 5163 CPUM_ASSERT_WR_MSR_FN(Ia32FeatureControl); 5164 CPUM_ASSERT_WR_MSR_FN(Ia32BiosSignId); 5025 5165 CPUM_ASSERT_WR_MSR_FN(Ia32BiosUpdateTrigger); 5026 5166 CPUM_ASSERT_WR_MSR_FN(Ia32SmmMonitorCtl); … … 5045 5185 CPUM_ASSERT_WR_MSR_FN(Ia32Dca0Cap); 5046 5186 CPUM_ASSERT_WR_MSR_FN(Ia32PerfEvtSelN); 5187 CPUM_ASSERT_WR_MSR_FN(Ia32PerfStatus); 5047 5188 CPUM_ASSERT_WR_MSR_FN(Ia32PerfCtl); 5048 5189 CPUM_ASSERT_WR_MSR_FN(Ia32FixedCtrN); … … 5075 5216 5076 5217 CPUM_ASSERT_WR_MSR_FN(IntelEblCrPowerOn); 5218 CPUM_ASSERT_WR_MSR_FN(IntelP4EbcHardPowerOn); 5219 CPUM_ASSERT_WR_MSR_FN(IntelP4EbcSoftPowerOn); 5220 CPUM_ASSERT_WR_MSR_FN(IntelP4EbcFrequencyId); 5077 5221 CPUM_ASSERT_WR_MSR_FN(IntelPkgCStConfigControl); 5078 5222 CPUM_ASSERT_WR_MSR_FN(IntelPmgIoCaptureBase); … … 5140 5284 CPUM_ASSERT_WR_MSR_FN(AmdK8HwThermalCtrl); 5141 5285 CPUM_ASSERT_WR_MSR_FN(AmdK8SwThermalCtrl); 5286 CPUM_ASSERT_WR_MSR_FN(AmdK8FidVidControl); 5142 5287 CPUM_ASSERT_WR_MSR_FN(AmdK8McCtlMaskN); 5143 5288 CPUM_ASSERT_WR_MSR_FN(AmdK8SmiOnIoTrapN); … … 5176 5321 CPUM_ASSERT_WR_MSR_FN(AmdK8CpuIdCtlStd01hEdcx); 5177 5322 CPUM_ASSERT_WR_MSR_FN(AmdK8CpuIdCtlExt01hEdcx); 5323 CPUM_ASSERT_WR_MSR_FN(AmdK8PatchLoader); 5178 5324 CPUM_ASSERT_WR_MSR_FN(AmdK7DebugStatusMaybe); 5179 5325 CPUM_ASSERT_WR_MSR_FN(AmdK7BHTraceBaseMaybe); -
trunk/src/VBox/VMM/VMMR3/CPUMR3Db.cpp
r49952 r49966 173 173 174 174 175 #include "cpus/Intel_Pentium_M_processor_2_00GHz.h"176 175 #include "cpus/Intel_Core_i7_3960X.h" 177 176 #include "cpus/Intel_Core_i5_3570.h" 178 177 #include "cpus/Intel_Xeon_X5482_3_20GHz.h" 178 #include "cpus/Intel_Pentium_M_processor_2_00GHz.h" 179 #include "cpus/Intel_Pentium_4_3_00GHz.h" 179 180 180 181 #include "cpus/AMD_FX_8150_Eight_Core.h" 181 182 #include "cpus/AMD_Phenom_II_X6_1100T.h" 182 183 #include "cpus/Quad_Core_AMD_Opteron_2384.h" 184 #include "cpus/AMD_Athlon_64_3200.h" 183 185 184 186 … … 204 206 &g_Entry_Intel_Xeon_X5482_3_20GHz, 205 207 #endif 208 #ifdef VBOX_CPUDB_Intel_Pentium_4_3_00GHz 209 &g_Entry_Intel_Pentium_4_3_00GHz, 210 #endif 211 206 212 #ifdef VBOX_CPUDB_AMD_FX_8150_Eight_Core 207 213 &g_Entry_AMD_FX_8150_Eight_Core, … … 212 218 #ifdef VBOX_CPUDB_Quad_Core_AMD_Opteron_2384 213 219 &g_Entry_Quad_Core_AMD_Opteron_2384, 220 #endif 221 #ifdef VBOX_CPUDB_AMD_Athlon_64_3200 222 &g_Entry_AMD_Athlon_64_3200, 214 223 #endif 215 224 }; -
trunk/src/VBox/VMM/include/CPUMInternal.h
r49927 r49966 132 132 kCpumMsrRdFn_Ia32ApicBase, 133 133 kCpumMsrRdFn_Ia32FeatureControl, 134 kCpumMsrRdFn_Ia32BiosSignId, /**< Range value returned. */ 134 135 kCpumMsrRdFn_Ia32SmmMonitorCtl, 135 136 kCpumMsrRdFn_Ia32PmcN, … … 205 206 206 207 kCpumMsrRdFn_IntelEblCrPowerOn, 208 kCpumMsrRdFn_IntelP4EbcHardPowerOn, 209 kCpumMsrRdFn_IntelP4EbcSoftPowerOn, 210 kCpumMsrRdFn_IntelP4EbcFrequencyId, 207 211 kCpumMsrRdFn_IntelPlatformInfo100MHz, 208 212 kCpumMsrRdFn_IntelPlatformInfo133MHz, … … 292 296 kCpumMsrRdFn_AmdK8HwThermalCtrl, /**< Range value returned. */ 293 297 kCpumMsrRdFn_AmdK8SwThermalCtrl, 298 kCpumMsrRdFn_AmdK8FidVidControl, /**< Range value returned. */ 299 kCpumMsrRdFn_AmdK8FidVidStatus, /**< Range value returned. */ 294 300 kCpumMsrRdFn_AmdK8McCtlMaskN, 295 301 kCpumMsrRdFn_AmdK8SmiOnIoTrapN, … … 329 335 kCpumMsrRdFn_AmdK8CpuIdCtlStd01hEdcx, 330 336 kCpumMsrRdFn_AmdK8CpuIdCtlExt01hEdcx, 337 kCpumMsrRdFn_AmdK8PatchLevel, /**< Returns range value. */ 331 338 kCpumMsrRdFn_AmdK7DebugStatusMaybe, 332 339 kCpumMsrRdFn_AmdK7BHTraceBaseMaybe, … … 390 397 kCpumMsrWrFn_Ia32ApicBase, 391 398 kCpumMsrWrFn_Ia32FeatureControl, 399 kCpumMsrWrFn_Ia32BiosSignId, 392 400 kCpumMsrWrFn_Ia32BiosUpdateTrigger, 393 401 kCpumMsrWrFn_Ia32SmmMonitorCtl, … … 412 420 kCpumMsrWrFn_Ia32Dca0Cap, 413 421 kCpumMsrWrFn_Ia32PerfEvtSelN, /**< Range value indicates the register number. */ 422 kCpumMsrWrFn_Ia32PerfStatus, 414 423 kCpumMsrWrFn_Ia32PerfCtl, 415 424 kCpumMsrWrFn_Ia32FixedCtrN, /**< Takes register number of start of range. */ … … 442 451 kCpumMsrWrFn_Amd64TscAux, 443 452 kCpumMsrWrFn_IntelEblCrPowerOn, 453 kCpumMsrWrFn_IntelP4EbcHardPowerOn, 454 kCpumMsrWrFn_IntelP4EbcSoftPowerOn, 455 kCpumMsrWrFn_IntelP4EbcFrequencyId, 444 456 kCpumMsrWrFn_IntelPkgCStConfigControl, 445 457 kCpumMsrWrFn_IntelPmgIoCaptureBase, … … 507 519 kCpumMsrWrFn_AmdK8HwThermalCtrl, 508 520 kCpumMsrWrFn_AmdK8SwThermalCtrl, 521 kCpumMsrWrFn_AmdK8FidVidControl, 509 522 kCpumMsrWrFn_AmdK8McCtlMaskN, 510 523 kCpumMsrWrFn_AmdK8SmiOnIoTrapN, … … 543 556 kCpumMsrWrFn_AmdK8CpuIdCtlStd01hEdcx, 544 557 kCpumMsrWrFn_AmdK8CpuIdCtlExt01hEdcx, 558 kCpumMsrWrFn_AmdK8PatchLoader, 545 559 kCpumMsrWrFn_AmdK7DebugStatusMaybe, 546 560 kCpumMsrWrFn_AmdK7BHTraceBaseMaybe, -
trunk/src/VBox/VMM/tools/VBoxCpuReport.cpp
r49952 r49966 67 67 /** Set if g_enmMicroarch indicates an Intel NetBurst CPU. */ 68 68 static bool g_fIntelNetBurst = false; 69 /** The report stream. */69 /** The alternative report stream. */ 70 70 static PRTSTREAM g_pReportOut; 71 /** The debug stream. */71 /** The alternative debug stream. */ 72 72 static PRTSTREAM g_pDebugOut; 73 73 … … 75 75 static void vbCpuRepDebug(const char *pszMsg, ...) 76 76 { 77 va_list va; 78 79 /* Always print a copy of the report to standard error. */ 80 va_start(va, pszMsg); 81 RTStrmPrintfV(g_pStdErr, pszMsg, va); 82 va_end(va); 83 RTStrmFlush(g_pStdErr); 84 85 /* Alternatively, also print to a log file. */ 77 86 if (g_pDebugOut) 78 87 { 79 va_list va;80 88 va_start(va, pszMsg); 81 89 RTStrmPrintfV(g_pDebugOut, pszMsg, va); 82 90 va_end(va); 83 91 RTStrmFlush(g_pDebugOut); 84 RTThreadSleep(1); 85 } 92 } 93 94 /* Give the output device a chance to write / display it. */ 95 RTThreadSleep(1); 86 96 } 87 97 … … 537 547 * Tweaks. On Intel CPUs we've got trouble detecting 538 548 * IA32_BIOS_UPDT_TRIG (0x00000079), so we have to add it manually here. 549 * Ditto on AMD with PATCH_LOADER (0xc0010020). 539 550 */ 540 551 if ( uMsr == 0x00000079 … … 542 553 && g_enmMicroarch >= kCpumMicroarch_Intel_P6_Core_Atom_First 543 554 && g_enmMicroarch <= kCpumMicroarch_Intel_End) 555 fGp = false; 556 if ( uMsr == 0xc0010020 557 && fGp 558 && g_enmMicroarch >= kCpumMicroarch_AMD_K8_First 559 && g_enmMicroarch <= kCpumMicroarch_AMD_End) 544 560 fGp = false; 545 561 } … … 588 604 case 0x0000001b: return "IA32_APIC_BASE"; 589 605 case 0x00000021: return "C2_UNK_0000_0021"; /* Core2_Penryn */ 590 case 0x0000002a: return "EBL_CR_POWERON"; 606 case 0x0000002a: return g_fIntelNetBurst ? "P4_EBC_HARD_POWERON" : "EBL_CR_POWERON"; 607 case 0x0000002b: return g_fIntelNetBurst ? "P4_EBC_SOFT_POWERON" : NULL; 608 case 0x0000002c: return g_fIntelNetBurst ? "P4_EBC_FREQUENCY_ID" : NULL; 591 609 case 0x0000002e: return "I7_UNK_0000_002e"; /* SandyBridge, IvyBridge. */ 592 610 case 0x0000002f: return "P6_UNK_0000_002f"; /* P6_M_Dothan. */ … … 635 653 case 0x0000006f: return "P6_UNK_0000_006f"; /* P6_M_Dothan. */ 636 654 case 0x00000079: return "IA32_BIOS_UPDT_TRIG"; 655 case 0x00000080: return "P4_UNK_0000_0080"; 637 656 case 0x00000088: return "BBL_CR_D0"; 638 657 case 0x00000089: return "BBL_CR_D1"; 639 658 case 0x0000008a: return "BBL_CR_D2"; 640 case 0x0000008b: return "BBL_CR_D3|BIOS_SIGN"; 659 case 0x0000008b: return g_enmVendor == CPUMCPUVENDOR_AMD ? "AMD_K8_PATCH_LEVEL" 660 : g_fIntelNetBurst ? "IA32_BIOS_SIGN_ID" : "BBL_CR_D3|BIOS_SIGN"; 641 661 case 0x0000008c: return "P6_UNK_0000_008c"; /* P6_M_Dothan. */ 642 662 case 0x0000008d: return "P6_UNK_0000_008d"; /* P6_M_Dothan. */ … … 748 768 case 0x0000019f: return "P6_UNK_0000_019f"; /* P6_M_Dothan. */ 749 769 case 0x000001a0: return "IA32_MISC_ENABLE"; 750 case 0x000001a1: return "P6_UNK_0000_01a1"; /* P6_M_Dothan. */751 case 0x000001a2: return "I7_MSR_TEMPERATURE_TARGET"; /* SandyBridge, IvyBridge. */770 case 0x000001a1: return g_fIntelNetBurst ? "MSR_PLATFORM_BRV" : "P6_UNK_0000_01a1" /* P6_M_Dothan. */; 771 case 0x000001a2: return g_fIntelNetBurst ? "P4_UNK_0000_01a2" : "I7_MSR_TEMPERATURE_TARGET" /* SandyBridge, IvyBridge. */; 752 772 case 0x000001a4: return "I7_UNK_0000_01a4"; /* SandyBridge, IvyBridge. */ 753 773 case 0x000001a6: return "I7_MSR_OFFCORE_RSP_0"; … … 768 788 ? "MSR_LASTBRANCH_TOS" : NULL /* Pentium M Dothan seems to have something else here. */; 769 789 case 0x000001d3: return "P6_UNK_0000_01d3"; /* P6_M_Dothan. */ 790 case 0x000001d7: return g_fIntelNetBurst ? "MSR_LER_FROM_LIP" : NULL; 791 case 0x000001d8: return g_fIntelNetBurst ? "MSR_LER_TO_LIP" : NULL; 770 792 case 0x000001d9: return "IA32_DEBUGCTL"; 771 case 0x000001db: return "P6_LAST_BRANCH_FROM_IP"; /* Not exclusive to P6, also AMD. */ 772 case 0x000001dc: return "P6_LAST_BRANCH_TO_IP"; 773 case 0x000001dd: return "P6_LAST_INT_FROM_IP"; 774 case 0x000001de: return "P6_LAST_INT_TO_IP"; 793 case 0x000001da: return g_fIntelNetBurst ? "MSR_LASTBRANCH_TOS" : NULL; 794 case 0x000001db: return g_fIntelNetBurst ? "P6_LASTBRANCH_0" : "P6_LAST_BRANCH_FROM_IP"; /* Not exclusive to P6, also AMD. */ 795 case 0x000001dc: return g_fIntelNetBurst ? "P6_LASTBRANCH_1" : "P6_LAST_BRANCH_TO_IP"; 796 case 0x000001dd: return g_fIntelNetBurst ? "P6_LASTBRANCH_2" : "P6_LAST_INT_FROM_IP"; 797 case 0x000001de: return g_fIntelNetBurst ? "P6_LASTBRANCH_3" : "P6_LAST_INT_TO_IP"; 775 798 case 0x000001e0: return "MSR_ROB_CR_BKUPTMPDR6"; 776 799 case 0x000001e1: return "I7_SB_UNK_0000_01e1"; … … 866 889 case 0x000002e7: return "I7_IB_UNK_0000_02e7"; /* IvyBridge */ 867 890 case 0x000002ff: return "IA32_MTRR_DEF_TYPE"; 868 case 0x00000300: return CPUMMICROARCH_IS_INTEL_NETBURST(g_enmMicroarch) ? "P4_MSR_BPU_COUNTER0" : "I7_SB_UNK_0000_0300" /* SandyBridge */; 869 case 0x00000305: return CPUMMICROARCH_IS_INTEL_NETBURST(g_enmMicroarch) ? "P4_MSR_MS_COUNTER1" : "I7_SB_UNK_0000_0305" /* SandyBridge, IvyBridge */; 870 case 0x00000309: return CPUMMICROARCH_IS_INTEL_NETBURST(g_enmMicroarch) ? "P4_MSR_FLAME_COUNTER1" : "IA32_FIXED_CTR0"; 871 case 0x0000030a: return CPUMMICROARCH_IS_INTEL_NETBURST(g_enmMicroarch) ? "P4_MSR_FLAME_COUNTER2" : "IA32_FIXED_CTR1"; 872 case 0x0000030b: return CPUMMICROARCH_IS_INTEL_NETBURST(g_enmMicroarch) ? "P4_MSR_FLAME_COUNTER3" : "IA32_FIXED_CTR2"; 891 case 0x00000300: return g_fIntelNetBurst ? "P4_MSR_BPU_COUNTER0" : "I7_SB_UNK_0000_0300" /* SandyBridge */; 892 case 0x00000301: return g_fIntelNetBurst ? "P4_MSR_BPU_COUNTER1" : NULL; 893 case 0x00000302: return g_fIntelNetBurst ? "P4_MSR_BPU_COUNTER2" : NULL; 894 case 0x00000303: return g_fIntelNetBurst ? "P4_MSR_BPU_COUNTER3" : NULL; 895 case 0x00000304: return g_fIntelNetBurst ? "P4_MSR_MS_COUNTER0" : NULL; 896 case 0x00000305: return g_fIntelNetBurst ? "P4_MSR_MS_COUNTER1" : "I7_SB_UNK_0000_0305" /* SandyBridge, IvyBridge */; 897 case 0x00000306: return g_fIntelNetBurst ? "P4_MSR_MS_COUNTER2" : NULL; 898 case 0x00000307: return g_fIntelNetBurst ? "P4_MSR_MS_COUNTER3" : NULL; 899 case 0x00000308: return g_fIntelNetBurst ? "P4_MSR_FLAME_COUNTER0" : NULL; 900 case 0x00000309: return g_fIntelNetBurst ? "P4_MSR_FLAME_COUNTER1" : "IA32_FIXED_CTR0"; 901 case 0x0000030a: return g_fIntelNetBurst ? "P4_MSR_FLAME_COUNTER2" : "IA32_FIXED_CTR1"; 902 case 0x0000030b: return g_fIntelNetBurst ? "P4_MSR_FLAME_COUNTER3" : "IA32_FIXED_CTR2"; 903 case 0x0000030c: return g_fIntelNetBurst ? "P4_MSR_IQ_COUNTER0" : NULL; 904 case 0x0000030d: return g_fIntelNetBurst ? "P4_MSR_IQ_COUNTER1" : NULL; 905 case 0x0000030e: return g_fIntelNetBurst ? "P4_MSR_IQ_COUNTER2" : NULL; 906 case 0x0000030f: return g_fIntelNetBurst ? "P4_MSR_IQ_COUNTER3" : NULL; 907 case 0x00000310: return g_fIntelNetBurst ? "P4_MSR_IQ_COUNTER4" : NULL; 908 case 0x00000311: return g_fIntelNetBurst ? "P4_MSR_IQ_COUNTER5" : NULL; 873 909 case 0x00000345: return "IA32_PERF_CAPABILITIES"; 910 case 0x00000360: return g_fIntelNetBurst ? "P4_MSR_BPU_CCCR0" : NULL; 911 case 0x00000361: return g_fIntelNetBurst ? "P4_MSR_BPU_CCCR1" : NULL; 912 case 0x00000362: return g_fIntelNetBurst ? "P4_MSR_BPU_CCCR2" : NULL; 913 case 0x00000363: return g_fIntelNetBurst ? "P4_MSR_BPU_CCCR3" : NULL; 914 case 0x00000364: return g_fIntelNetBurst ? "P4_MSR_MS_CCCR0" : NULL; 915 case 0x00000365: return g_fIntelNetBurst ? "P4_MSR_MS_CCCR1" : NULL; 916 case 0x00000366: return g_fIntelNetBurst ? "P4_MSR_MS_CCCR2" : NULL; 917 case 0x00000367: return g_fIntelNetBurst ? "P4_MSR_MS_CCCR3" : NULL; 918 case 0x00000368: return g_fIntelNetBurst ? "P4_MSR_FLAME_CCCR0" : NULL; 919 case 0x00000369: return g_fIntelNetBurst ? "P4_MSR_FLAME_CCCR1" : NULL; 920 case 0x0000036a: return g_fIntelNetBurst ? "P4_MSR_FLAME_CCCR2" : NULL; 921 case 0x0000036b: return g_fIntelNetBurst ? "P4_MSR_FLAME_CCCR3" : NULL; 922 case 0x0000036c: return g_fIntelNetBurst ? "P4_MSR_IQ_CCCR0" : NULL; 923 case 0x0000036d: return g_fIntelNetBurst ? "P4_MSR_IQ_CCCR1" : NULL; 924 case 0x0000036e: return g_fIntelNetBurst ? "P4_MSR_IQ_CCCR2" : NULL; 925 case 0x0000036f: return g_fIntelNetBurst ? "P4_MSR_IQ_CCCR3" : NULL; 926 case 0x00000370: return g_fIntelNetBurst ? "P4_MSR_IQ_CCCR4" : NULL; 927 case 0x00000371: return g_fIntelNetBurst ? "P4_MSR_IQ_CCCR5" : NULL; 874 928 case 0x0000038d: return "IA32_FIXED_CTR_CTRL"; 875 929 case 0x0000038e: return "IA32_PERF_GLOBAL_STATUS"; … … 884 938 case 0x00000397: return g_enmMicroarch < kCpumMicroarch_Intel_Core7_IvyBridge ? NULL : "I7_IB_UNK_0000_0397"; 885 939 case 0x0000039c: return "I7_SB_MSR_PEBS_NUM_ALT"; 886 case 0x000003b0: return g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "I7_UNC_PMC0" /* X */ : "I7_UNC_ARB_PERF_CTR0"; /* >= S,H */ 887 case 0x000003b1: return g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "I7_UNC_PMC1" /* X */ : "I7_UNC_ARB_PERF_CTR1"; /* >= S,H */ 888 case 0x000003b2: return g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "I7_UNC_PMC2" /* X */ : "I7_UNC_ARB_PERF_EVT_SEL0"; /* >= S,H */ 889 case 0x000003b3: return g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "I7_UNC_PMC3" /* X */ : "I7_UNC_ARB_PERF_EVT_SEL1"; /* >= S,H */ 890 case 0x000003b4: return "I7_UNC_PMC4"; 891 case 0x000003b5: return "I7_UNC_PMC5"; 892 case 0x000003b6: return "I7_UNC_PMC6"; 893 case 0x000003b7: return "I7_UNC_PMC7"; 894 case 0x000003c0: return "I7_UNC_PERF_EVT_SEL0"; 895 case 0x000003c1: return "I7_UNC_PERF_EVT_SEL1"; 896 case 0x000003c2: return "I7_UNC_PERF_EVT_SEL2"; 897 case 0x000003c3: return "I7_UNC_PERF_EVT_SEL3"; 898 case 0x000003c4: return "I7_UNC_PERF_EVT_SEL4"; 899 case 0x000003c5: return "I7_UNC_PERF_EVT_SEL5"; 900 case 0x000003c6: return "I7_UNC_PERF_EVT_SEL6"; 901 case 0x000003c7: return "I7_UNC_PERF_EVT_SEL7"; 940 case 0x000003a0: return g_fIntelNetBurst ? "P4_MSR_BSU_ESCR0" : NULL; 941 case 0x000003a1: return g_fIntelNetBurst ? "P4_MSR_BSU_ESCR1" : NULL; 942 case 0x000003a2: return g_fIntelNetBurst ? "P4_MSR_FSB_ESCR0" : NULL; 943 case 0x000003a3: return g_fIntelNetBurst ? "P4_MSR_FSB_ESCR1" : NULL; 944 case 0x000003a4: return g_fIntelNetBurst ? "P4_MSR_FIRM_ESCR0" : NULL; 945 case 0x000003a5: return g_fIntelNetBurst ? "P4_MSR_FIRM_ESCR1" : NULL; 946 case 0x000003a6: return g_fIntelNetBurst ? "P4_MSR_FLAME_ESCR0" : NULL; 947 case 0x000003a7: return g_fIntelNetBurst ? "P4_MSR_FLAME_ESCR1" : NULL; 948 case 0x000003a8: return g_fIntelNetBurst ? "P4_MSR_DAC_ESCR0" : NULL; 949 case 0x000003a9: return g_fIntelNetBurst ? "P4_MSR_DAC_ESCR1" : NULL; 950 case 0x000003aa: return g_fIntelNetBurst ? "P4_MSR_MOB_ESCR0" : NULL; 951 case 0x000003ab: return g_fIntelNetBurst ? "P4_MSR_MOB_ESCR1" : NULL; 952 case 0x000003ac: return g_fIntelNetBurst ? "P4_MSR_PMH_ESCR0" : NULL; 953 case 0x000003ad: return g_fIntelNetBurst ? "P4_MSR_PMH_ESCR1" : NULL; 954 case 0x000003ae: return g_fIntelNetBurst ? "P4_MSR_SAAT_ESCR0" : NULL; 955 case 0x000003af: return g_fIntelNetBurst ? "P4_MSR_SAAT_ESCR1" : NULL; 956 case 0x000003b0: return g_fIntelNetBurst ? "P4_MSR_U2L_ESCR0" : g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "I7_UNC_PMC0" /* X */ : "I7_UNC_ARB_PERF_CTR0"; /* >= S,H */ 957 case 0x000003b1: return g_fIntelNetBurst ? "P4_MSR_U2L_ESCR1" : g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "I7_UNC_PMC1" /* X */ : "I7_UNC_ARB_PERF_CTR1"; /* >= S,H */ 958 case 0x000003b2: return g_fIntelNetBurst ? "P4_MSR_BPU_ESCR0" : g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "I7_UNC_PMC2" /* X */ : "I7_UNC_ARB_PERF_EVT_SEL0"; /* >= S,H */ 959 case 0x000003b3: return g_fIntelNetBurst ? "P4_MSR_BPU_ESCR1" : g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "I7_UNC_PMC3" /* X */ : "I7_UNC_ARB_PERF_EVT_SEL1"; /* >= S,H */ 960 case 0x000003b4: return g_fIntelNetBurst ? "P4_MSR_IS_ESCR0" : "I7_UNC_PMC4"; 961 case 0x000003b5: return g_fIntelNetBurst ? "P4_MSR_IS_ESCR1" : "I7_UNC_PMC5"; 962 case 0x000003b6: return g_fIntelNetBurst ? "P4_MSR_ITLB_ESCR0" : "I7_UNC_PMC6"; 963 case 0x000003b7: return g_fIntelNetBurst ? "P4_MSR_ITLB_ESCR1" : "I7_UNC_PMC7"; 964 case 0x000003b8: return g_fIntelNetBurst ? "P4_MSR_CRU_ESCR0" : NULL; 965 case 0x000003b9: return g_fIntelNetBurst ? "P4_MSR_CRU_ESCR1" : NULL; 966 case 0x000003ba: return g_fIntelNetBurst ? "P4_MSR_IQ_ESCR0" : NULL; 967 case 0x000003bb: return g_fIntelNetBurst ? "P4_MSR_IQ_ESCR1" : NULL; 968 case 0x000003bc: return g_fIntelNetBurst ? "P4_MSR_RAT_ESCR0" : NULL; 969 case 0x000003bd: return g_fIntelNetBurst ? "P4_MSR_RAT_ESCR1" : NULL; 970 case 0x000003be: return g_fIntelNetBurst ? "P4_MSR_SSU_ESCR0" : NULL; 971 case 0x000003c0: return g_fIntelNetBurst ? "P4_MSR_MS_ESCR0" : "I7_UNC_PERF_EVT_SEL0"; 972 case 0x000003c1: return g_fIntelNetBurst ? "P4_MSR_MS_ESCR1" : "I7_UNC_PERF_EVT_SEL1"; 973 case 0x000003c2: return g_fIntelNetBurst ? "P4_MSR_TBPU_ESCR0" : "I7_UNC_PERF_EVT_SEL2"; 974 case 0x000003c3: return g_fIntelNetBurst ? "P4_MSR_TBPU_ESCR1" : "I7_UNC_PERF_EVT_SEL3"; 975 case 0x000003c4: return g_fIntelNetBurst ? "P4_MSR_TC_ESCR0" : "I7_UNC_PERF_EVT_SEL4"; 976 case 0x000003c5: return g_fIntelNetBurst ? "P4_MSR_TC_ESCR1" : "I7_UNC_PERF_EVT_SEL5"; 977 case 0x000003c6: return g_fIntelNetBurst ? NULL : "I7_UNC_PERF_EVT_SEL6"; 978 case 0x000003c7: return g_fIntelNetBurst ? NULL : "I7_UNC_PERF_EVT_SEL7"; 979 case 0x000003c8: return g_fIntelNetBurst ? "P4_MSR_IX_ESCR0" : NULL; 980 case 0x000003c9: return g_fIntelNetBurst ? "P4_MSR_IX_ESCR0" : NULL; 981 case 0x000003ca: return g_fIntelNetBurst ? "P4_MSR_ALF_ESCR0" : NULL; 982 case 0x000003cb: return g_fIntelNetBurst ? "P4_MSR_ALF_ESCR1" : NULL; 983 case 0x000003cc: return g_fIntelNetBurst ? "P4_MSR_CRU_ESCR2" : NULL; 984 case 0x000003cd: return g_fIntelNetBurst ? "P4_MSR_CRU_ESCR3" : NULL; 985 case 0x000003e0: return g_fIntelNetBurst ? "P4_MSR_CRU_ESCR4" : NULL; 986 case 0x000003e1: return g_fIntelNetBurst ? "P4_MSR_CRU_ESCR5" : NULL; 987 case 0x000003f0: return g_fIntelNetBurst ? "P4_MSR_TC_PRECISE_EVENT" : NULL; 902 988 case 0x000003f1: return "IA32_PEBS_ENABLE"; 903 case 0x000003f6: return "I7_MSR_PEBS_LD_LAT"; 904 case 0x000003f8: return "I7_MSR_PKG_C3_RESIDENCY"; 989 case 0x000003f2: return g_fIntelNetBurst ? "P4_MSR_PEBS_MATRIX_VERT" : "IA32_PEBS_ENABLE"; 990 case 0x000003f3: return g_fIntelNetBurst ? "P4_UNK_0000_03f3" : NULL; 991 case 0x000003f4: return g_fIntelNetBurst ? "P4_UNK_0000_03f4" : NULL; 992 case 0x000003f5: return g_fIntelNetBurst ? "P4_UNK_0000_03f5" : NULL; 993 case 0x000003f6: return g_fIntelNetBurst ? "P4_UNK_0000_03f6" : "I7_MSR_PEBS_LD_LAT"; 994 case 0x000003f7: return g_fIntelNetBurst ? "P4_UNK_0000_03f7" : "I7_MSR_PEBS_LD_LAT"; 995 case 0x000003f8: return g_fIntelNetBurst ? "P4_UNK_0000_03f8" : "I7_MSR_PKG_C3_RESIDENCY"; 905 996 case 0x000003f9: return "I7_MSR_PKG_C6_RESIDENCY"; 906 997 case 0x000003fa: return "I7_MSR_PKG_C7_RESIDENCY"; … … 1074 1165 case 0xc001001e: return "AMD_K8_MANID"; 1075 1166 case 0xc001001f: return "AMD_K8_NB_CFG1"; 1076 case 0xc0010021: return "AMD_10H_UNK_c001_0021"; 1167 case 0xc0010020: return "AMD_K8_PATCH_LOADER"; 1168 case 0xc0010021: return "AMD_K8_UNK_c001_0021"; 1077 1169 case 0xc0010022: return "AMD_K8_MC_XCPT_REDIR"; 1078 1170 case 0xc0010028: return "AMD_K8_UNK_c001_0028"; … … 1090 1182 case 0xc001003e: return "AMD_K8_HTC"; 1091 1183 case 0xc001003f: return "AMD_K8_STC"; 1184 case 0xc0010041: return "AMD_K8_FIDVID_CTL"; 1185 case 0xc0010042: return "AMD_K8_FIDVID_STATUS"; 1092 1186 case 0xc0010043: return "AMD_K8_THERMTRIP_STATUS"; /* BDKG says it was removed in K8 revision C.*/ 1093 1187 case 0xc0010044: return "AMD_K8_MC_CTL_MASK_0"; … … 1138 1232 case 0xc0010112: return "AMD_K8_SMM_ADDR"; 1139 1233 case 0xc0010113: return "AMD_K8_SMM_MASK"; 1140 case 0xc0010114: return "AMD_K8_VM_CR"; 1141 case 0xc0010115: return "AMD_K8_IGNNE"; 1142 case 0xc0010116: return "AMD_K8_SMM_CTL"; 1143 case 0xc0010117: return "AMD_K8_VM_HSAVE_PA"; 1144 case 0xc0010118: return "AMD_10H_VM_LOCK_KEY"; 1145 case 0xc0010119: return "AMD_10H_SSM_LOCK_KEY"; 1146 case 0xc001011a: return "AMD_10H_LOCAL_SMI_STS"; 1234 case 0xc0010114: return g_enmMicroarch >= kCpumMicroarch_AMD_K8_90nm_AMDV ? "AMD_K8_VM_CR" : "AMD_K8_UNK_c001_0114"; 1235 case 0xc0010115: return g_enmMicroarch >= kCpumMicroarch_AMD_K8_90nm ? "AMD_K8_IGNNE" : "AMD_K8_UNK_c001_0115"; 1236 case 0xc0010116: return g_enmMicroarch >= kCpumMicroarch_AMD_K8_90nm ? "AMD_K8_SMM_CTL" : "AMD_K8_UNK_c001_0116"; 1237 case 0xc0010117: return g_enmMicroarch >= kCpumMicroarch_AMD_K8_90nm_AMDV ? "AMD_K8_VM_HSAVE_PA" : "AMD_K8_UNK_c001_0117"; 1238 case 0xc0010118: return g_enmMicroarch >= kCpumMicroarch_AMD_K8_90nm_AMDV ? "AMD_10H_VM_LOCK_KEY" : "AMD_K8_UNK_c001_0118"; 1239 case 0xc0010119: return g_enmMicroarch >= kCpumMicroarch_AMD_K8_90nm ? "AMD_10H_SSM_LOCK_KEY" : "AMD_K8_UNK_c001_0119"; 1240 case 0xc001011a: return g_enmMicroarch >= kCpumMicroarch_AMD_K8_90nm ? "AMD_10H_LOCAL_SMI_STS" : "AMD_K8_UNK_c001_011a"; 1241 case 0xc001011b: return "AMD_K8_UNK_c001_011b"; 1242 case 0xc001011c: return "AMD_K8_UNK_c001_011c"; 1147 1243 case 0xc0010140: return "AMD_10H_OSVW_ID_LEN"; 1148 1244 case 0xc0010141: return "AMD_10H_OSVW_STS"; … … 1538 1634 case 0x00000010: return "Ia32TimestampCounter"; 1539 1635 case 0x0000001b: return "Ia32ApicBase"; 1540 case 0x0000002a: *pfTakesValue = true; return "IntelEblCrPowerOn"; 1636 case 0x0000002a: *pfTakesValue = true; return g_fIntelNetBurst ? "IntelP4EbcHardPowerOn" : "IntelEblCrPowerOn"; 1637 case 0x0000002b: *pfTakesValue = true; return g_fIntelNetBurst ? "IntelP4EbcSoftPowerOn" : NULL; 1638 case 0x0000002c: *pfTakesValue = true; return g_fIntelNetBurst ? "IntelP4EbcFrequencyId" : NULL; 1541 1639 //case 0x00000033: return "IntelTestCtl"; 1542 1640 case 0x0000003a: return "Ia32FeatureControl"; … … 1552 1650 return "IntelLastBranchFromToN"; 1553 1651 1652 case 0x0000008b: return g_enmVendor == CPUMCPUVENDOR_AMD ? "AmdK8PatchLevel" : "Ia32BiosSignId"; 1554 1653 case 0x0000009b: return "Ia32SmmMonitorCtl"; 1555 1654 … … 1609 1708 case 0x00000186: return "Ia32PerfEvtSelN"; 1610 1709 case 0x00000187: return "Ia32PerfEvtSelN"; 1611 case 0x00000193: return /* CPUMMICROARCH_IS_INTEL_NETBURST(g_enmMicroarch)? NULL :*/ NULL /* Core2_Penryn. */;1710 case 0x00000193: return /*g_fIntelNetBurst ? NULL :*/ NULL /* Core2_Penryn. */; 1612 1711 case 0x00000198: *pfTakesValue = true; return "Ia32PerfStatus"; 1613 1712 case 0x00000199: *pfTakesValue = true; return "Ia32PerfCtl"; … … 1626 1725 && g_enmMicroarch <= kCpumMicroarch_Intel_P6_Core_Atom_End 1627 1726 ? "IntelLastBranchTos" : NULL /* Pentium M Dothan seems to have something else here. */; 1727 case 0x000001d7: return g_fIntelNetBurst ? "P6LastIntFromIp" : NULL; 1728 case 0x000001d8: return g_fIntelNetBurst ? "P6LastIntToIp" : NULL; 1628 1729 case 0x000001d9: return "Ia32DebugCtl"; 1629 case 0x000001db: return "P6LastBranchFromIp"; 1630 case 0x000001dc: return "P6LastBranchToIp"; 1631 case 0x000001dd: return "P6LastIntFromIp"; 1632 case 0x000001de: return "P6LastIntToIp"; 1730 case 0x000001da: return g_fIntelNetBurst ? "IntelLastBranchTos" : NULL; 1731 case 0x000001db: return g_fIntelNetBurst ? "IntelLastBranchFromToN" : "P6LastBranchFromIp"; 1732 case 0x000001dc: return g_fIntelNetBurst ? "IntelLastBranchFromToN" : "P6LastBranchToIp"; 1733 case 0x000001dd: return g_fIntelNetBurst ? "IntelLastBranchFromToN" : "P6LastIntFromIp"; 1734 case 0x000001de: return g_fIntelNetBurst ? "IntelLastBranchFromToN" : "P6LastIntToIp"; 1633 1735 case 0x000001f0: return "IntelI7VirtualLegacyWireCap"; /* SandyBridge. */ 1634 1736 case 0x000001f2: return "Ia32SmrrPhysBase"; … … 1667 1769 1668 1770 case 0x000002ff: return "Ia32MtrrDefType"; 1669 //case 0x00000305: return CPUMMICROARCH_IS_INTEL_NETBURST(g_enmMicroarch)? TODO : NULL;1670 case 0x00000309: return CPUMMICROARCH_IS_INTEL_NETBURST(g_enmMicroarch)? NULL /** @todo P4 */ : "Ia32FixedCtrN";1671 case 0x0000030a: return CPUMMICROARCH_IS_INTEL_NETBURST(g_enmMicroarch)? NULL /** @todo P4 */ : "Ia32FixedCtrN";1672 case 0x0000030b: return CPUMMICROARCH_IS_INTEL_NETBURST(g_enmMicroarch)? NULL /** @todo P4 */ : "Ia32FixedCtrN";1771 //case 0x00000305: return g_fIntelNetBurst ? TODO : NULL; 1772 case 0x00000309: return g_fIntelNetBurst ? NULL /** @todo P4 */ : "Ia32FixedCtrN"; 1773 case 0x0000030a: return g_fIntelNetBurst ? NULL /** @todo P4 */ : "Ia32FixedCtrN"; 1774 case 0x0000030b: return g_fIntelNetBurst ? NULL /** @todo P4 */ : "Ia32FixedCtrN"; 1673 1775 case 0x00000345: *pfTakesValue = true; return "Ia32PerfCapabilities"; 1776 /* Note! Lots of P4 MSR 0x00000360..0x00000371. */ 1674 1777 case 0x0000038d: return "Ia32FixedCtrCtrl"; 1675 1778 case 0x0000038e: *pfTakesValue = true; return "Ia32PerfGlobalStatus"; … … 1683 1786 case 0x00000396: return g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "IntelI7UncAddrOpcodeMatch" /* X */ : "IntelI7UncCBoxConfig"; /* >= S,H */ 1684 1787 case 0x0000039c: return "IntelI7SandyPebsNumAlt"; 1685 case 0x000003b0: return g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "IntelI7UncPmcN" /* X */ : "IntelI7UncArbPerfCtrN"; /* >= S,H */ 1686 case 0x000003b1: return g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "IntelI7UncPmcN" /* X */ : "IntelI7UncArbPerfCtrN"; /* >= S,H */ 1687 case 0x000003b2: return g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "IntelI7UncPmcN" /* X */ : "IntelI7UncArbPerfEvtSelN"; /* >= S,H */ 1688 case 0x000003b3: return g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "IntelI7UncPmcN" /* X */ : "IntelI7UncArbPerfEvtSelN"; /* >= S,H */ 1788 /* Note! Lots of P4 MSR 0x000003a0..0x000003e1. */ 1789 case 0x000003b0: return g_fIntelNetBurst ? NULL : g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "IntelI7UncPmcN" /* X */ : "IntelI7UncArbPerfCtrN"; /* >= S,H */ 1790 case 0x000003b1: return g_fIntelNetBurst ? NULL : g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "IntelI7UncPmcN" /* X */ : "IntelI7UncArbPerfCtrN"; /* >= S,H */ 1791 case 0x000003b2: return g_fIntelNetBurst ? NULL : g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "IntelI7UncPmcN" /* X */ : "IntelI7UncArbPerfEvtSelN"; /* >= S,H */ 1792 case 0x000003b3: return g_fIntelNetBurst ? NULL : g_enmMicroarch < kCpumMicroarch_Intel_Core7_SandyBridge ? "IntelI7UncPmcN" /* X */ : "IntelI7UncArbPerfEvtSelN"; /* >= S,H */ 1689 1793 case 0x000003b4: case 0x000003b5: case 0x000003b6: case 0x000003b7: 1690 return "IntelI7UncPmcN";1794 return g_fIntelNetBurst ? NULL : "IntelI7UncPmcN"; 1691 1795 case 0x000003c0: case 0x000003c1: case 0x000003c2: case 0x000003c3: 1692 1796 case 0x000003c4: case 0x000003c5: case 0x000003c6: case 0x000003c7: 1693 return "IntelI7UncPerfEvtSelN";1797 return g_fIntelNetBurst ? NULL : "IntelI7UncPerfEvtSelN"; 1694 1798 case 0x000003f1: return "Ia32PebsEnable"; 1695 case 0x000003f6: return "IntelI7PebsLdLat";1696 case 0x000003f8: return "IntelI7PkgCnResidencyN";1799 case 0x000003f6: return g_fIntelNetBurst ? NULL /*??*/ : "IntelI7PebsLdLat"; 1800 case 0x000003f8: return g_fIntelNetBurst ? NULL : "IntelI7PkgCnResidencyN"; 1697 1801 case 0x000003f9: return "IntelI7PkgCnResidencyN"; 1698 1802 case 0x000003fa: return "IntelI7PkgCnResidencyN"; … … 1818 1922 case 0xc001001a: case 0xc001001d: return "AmdK8TopOfMemN"; 1819 1923 case 0xc001001f: return "AmdK8NbCfg1"; 1924 case 0xc0010020: return "AmdK8PatchLoader"; 1820 1925 case 0xc0010022: return "AmdK8McXcptRedir"; 1821 1926 case 0xc0010030: case 0xc0010031: case 0xc0010032: … … 1824 1929 case 0xc001003e: *pfTakesValue = true; return "AmdK8HwThermalCtrl"; 1825 1930 case 0xc001003f: return "AmdK8SwThermalCtrl"; 1931 case 0xc0010041: *pfTakesValue = true; return "AmdK8FidVidControl"; 1932 case 0xc0010042: *pfTakesValue = true; return "AmdK8FidVidStatus"; 1826 1933 case 0xc0010044: case 0xc0010045: case 0xc0010046: case 0xc0010047: 1827 1934 case 0xc0010048: case 0xc0010049: case 0xc001004a: //case 0xc001004b: … … 1853 1960 case 0xc0010112: return "AmdK8SmmAddr"; /** @todo probably misdetected ign/gp due to locking */ 1854 1961 case 0xc0010113: return "AmdK8SmmMask"; /** @todo probably misdetected ign/gp due to locking */ 1855 case 0xc0010114: return "AmdK8VmCr"; /** @todo probably misdetected due to locking */1856 case 0xc0010115: return "AmdK8IgnNe";1857 case 0xc0010116: return "AmdK8SmmCtl";1858 case 0xc0010117: return "AmdK8VmHSavePa"; /** @todo probably misdetected due to locking */1859 case 0xc0010118: return "AmdFam10hVmLockKey";1860 case 0xc0010119: return "AmdFam10hSmmLockKey"; /* Not documented by BKDG, found in netbsd patch. */1861 case 0xc001011a: return "AmdFam10hLocalSmiStatus";1962 case 0xc0010114: return g_enmMicroarch >= kCpumMicroarch_AMD_K8_90nm_AMDV ? "AmdK8VmCr" : NULL; /** @todo probably misdetected due to locking */ 1963 case 0xc0010115: return g_enmMicroarch >= kCpumMicroarch_AMD_K8_90nm ? "AmdK8IgnNe" : NULL; 1964 case 0xc0010116: return g_enmMicroarch >= kCpumMicroarch_AMD_K8_90nm ? "AmdK8SmmCtl" : NULL; 1965 case 0xc0010117: return g_enmMicroarch >= kCpumMicroarch_AMD_K8_90nm_AMDV ? "AmdK8VmHSavePa" : NULL; /** @todo probably misdetected due to locking */ 1966 case 0xc0010118: return g_enmMicroarch >= kCpumMicroarch_AMD_K8_90nm_AMDV ? "AmdFam10hVmLockKey" : NULL; 1967 case 0xc0010119: return g_enmMicroarch >= kCpumMicroarch_AMD_K8_90nm ? "AmdFam10hSmmLockKey" : NULL; /* Not documented by BKDG, found in netbsd patch. */ 1968 case 0xc001011a: return g_enmMicroarch >= kCpumMicroarch_AMD_K8_90nm ? "AmdFam10hLocalSmiStatus" : NULL; 1862 1969 case 0xc0010140: *pfTakesValue = true; return "AmdFam10hOsVisWrkIdLength"; 1863 1970 case 0xc0010141: *pfTakesValue = true; return "AmdFam10hOsVisWrkStatus"; … … 2035 2142 case 0x00000040: case 0x00000041: case 0x00000042: case 0x00000043: 2036 2143 case 0x00000044: case 0x00000045: case 0x00000046: case 0x00000047: 2144 case 0x00000600: 2037 2145 if (g_enmMicroarch >= kCpumMicroarch_Intel_Core2_First) 2038 2146 return UINT64_C(0xffff800000000000); 2039 2147 break; 2148 2149 2150 /* Write only bits. */ 2151 case 0xc0010041: return RT_BIT_64(16); /* FIDVID_CTL.InitFidVid */ 2040 2152 2041 2153 /* Time counters - fudge them to avoid incorrect ignore masks. */ … … 2106 2218 return VBCPUREPBADNESS_BOND_VILLAIN; 2107 2219 2220 case 0xc0011012: 2221 if (CPUMMICROARCH_IS_AMD_FAM_0FH(g_enmMicroarch)) 2222 return VBCPUREPBADNESS_MIGHT_BITE; 2223 break; 2224 2108 2225 case 0x000001a0: /* IA32_MISC_ENABLE */ 2109 2226 case 0x00000199: /* IA32_PERF_CTL */ … … 2721 2838 uint64_t fSkipMask = 0; 2722 2839 2723 /** @todo test & adjust on P4. */ 2724 if ( ( g_enmMicroarch >= kCpumMicroarch_Intel_NB_First 2725 && g_enmMicroarch <= kCpumMicroarch_Intel_NB_End) 2726 || ( g_enmMicroarch >= kCpumMicroarch_Intel_Core7_Broadwell 2840 if ( ( g_enmMicroarch >= kCpumMicroarch_Intel_Core7_Broadwell 2727 2841 && g_enmMicroarch <= kCpumMicroarch_Intel_Core7_End) 2728 2842 || ( g_enmMicroarch >= kCpumMicroarch_Intel_Atom_Airmount … … 3015 3129 || vbCpuRepSupportsNX()) 3016 3130 fSkipMask |= MSR_K6_EFER_NXE; 3131 3132 /* NetBurst prescott 2MB (model 4) hung or triple faulted here. The extra 3133 sleep or something seemed to help for some screwed up reason. */ 3134 if (g_fIntelNetBurst) 3135 { 3136 // This doesn't matter: 3137 //fSkipMask |= MSR_K6_EFER_SCE; 3138 //if (vbCpuRepSupportsLongMode()) 3139 // fSkipMask |= MSR_K6_EFER_LMA; 3140 //vbCpuRepDebug("EFER - netburst workaround - ignore SCE & LMA (fSkipMask=%#llx)\n", fSkipMask); 3141 3142 vbCpuRepDebug("EFER - netburst sleep fudge - fSkipMask=%#llx\n", fSkipMask); 3143 RTThreadSleep(1000); 3144 } 3145 3017 3146 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, NULL); 3018 3147 } … … 3179 3308 if (g_enmMicroarch >= kCpumMicroarch_AMD_K8_First && g_enmMicroarch < kCpumMicroarch_AMD_15h_First) 3180 3309 fSkipMask |= RT_BIT(9); /* SetDirtyEnS */ 3181 if ( CPUMMICROARCH_IS_AMD_FAM_ 8H(g_enmMicroarch)3310 if ( CPUMMICROARCH_IS_AMD_FAM_0FH(g_enmMicroarch) 3182 3311 || CPUMMICROARCH_IS_AMD_FAM_10H(g_enmMicroarch)) 3183 3312 fSkipMask |= RT_BIT(8); /* SetDirtyEnE */ 3184 if ( CPUMMICROARCH_IS_AMD_FAM_ 8H(g_enmMicroarch)3313 if ( CPUMMICROARCH_IS_AMD_FAM_0FH(g_enmMicroarch) 3185 3314 || CPUMMICROARCH_IS_AMD_FAM_11H(g_enmMicroarch) ) 3186 3315 fSkipMask |= RT_BIT(7) /* SysVicLimit */ … … 3213 3342 | RT_BIT(9); /* MonMwaitDis */ 3214 3343 fSkipMask |= RT_BIT(8); /* #IGNNE port emulation */ 3215 if ( CPUMMICROARCH_IS_AMD_FAM_ 8H(g_enmMicroarch)3344 if ( CPUMMICROARCH_IS_AMD_FAM_0FH(g_enmMicroarch) 3216 3345 || CPUMMICROARCH_IS_AMD_FAM_11H(g_enmMicroarch) ) 3217 3346 fSkipMask |= RT_BIT(7) /* DisLock */ … … 3219 3348 fSkipMask |= RT_BIT(4); /* INVD to WBINVD */ 3220 3349 fSkipMask |= RT_BIT(3); /* TLBCACHEDIS */ 3221 if ( CPUMMICROARCH_IS_AMD_FAM_ 8H(g_enmMicroarch)3350 if ( CPUMMICROARCH_IS_AMD_FAM_0FH(g_enmMicroarch) 3222 3351 || CPUMMICROARCH_IS_AMD_FAM_10H(g_enmMicroarch) 3223 3352 || CPUMMICROARCH_IS_AMD_FAM_11H(g_enmMicroarch) ) … … 3480 3609 uint64_t uValue = paMsrs[i].uValue; 3481 3610 int rc; 3482 #if 03483 if (uMsr >= 0x 10011007)3611 #if 1 3612 if (uMsr >= 0xc0000000 && g_fIntelNetBurst) 3484 3613 { 3485 3614 vbCpuRepDebug("produceMsrReport: uMsr=%#x (%s)...\n", uMsr, getMsrNameHandled(uMsr)); … … 3524 3653 else if (uMsr >= 0x000001a6 && uMsr <= 0x000001a7) 3525 3654 rc = reportMsr_GenRangeFunction(&paMsrs[i], cMsrs - i, 2 /*cMax*/, "IntelI7MsrOffCoreResponseN", &i); 3655 else if (uMsr == 0x000001db && g_fIntelNetBurst) 3656 rc = reportMsr_GenRangeFunction(&paMsrs[i], cMsrs - i, 4 /*cMax*/, "IntelLastBranchFromToN", &i); 3526 3657 else if (uMsr == 0x00000200) 3527 3658 rc = reportMsr_Ia32MtrrPhysBaseMaskN(&paMsrs[i], cMsrs - i, &i); … … 3532 3663 else if (uMsr == 0x000002ff) 3533 3664 rc = reportMsr_Ia32MtrrDefType(uMsr); 3534 else if (uMsr >= 0x00000309 && uMsr <= 0x0000030b )3665 else if (uMsr >= 0x00000309 && uMsr <= 0x0000030b && !g_fIntelNetBurst) 3535 3666 rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 3 /*cMax*/, NULL, 0x00000309, true /*fEarlyEndOk*/, false, 0, &i); 3536 else if ( uMsr == 0x000003f8 || uMsr == 0x000003fc || uMsr == 0x0000060a)3667 else if ((uMsr == 0x000003f8 || uMsr == 0x000003fc || uMsr == 0x0000060a) && !g_fIntelNetBurst) 3537 3668 rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 4, NULL, uMsr - 3, true, false, 0, &i); 3538 else if ( uMsr == 0x000003f9 || uMsr == 0x000003fd || uMsr == 0x0000060b)3669 else if ((uMsr == 0x000003f9 || uMsr == 0x000003fd || uMsr == 0x0000060b) && !g_fIntelNetBurst) 3539 3670 rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 8, NULL, uMsr - 6, true, false, 0, &i); 3540 else if ( uMsr == 0x000003fa || uMsr == 0x000003fe || uMsr == 0x0000060c)3671 else if ((uMsr == 0x000003fa || uMsr == 0x000003fe || uMsr == 0x0000060c) && !g_fIntelNetBurst) 3541 3672 rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 8, NULL, uMsr - 7, true, false, 0, &i); 3542 3673 else if (uMsr >= 0x00000400 && uMsr <= 0x00000477) … … 3545 3676 rc = reportMsr_GenRangeFunction(&paMsrs[i], cMsrs - i, 8, NULL, &i); 3546 3677 else if (uMsr == 0x00000680 || uMsr == 0x000006c0) 3547 rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 16, NULL, uMsr, false, false, UINT64_C(0xffff800000000000), &i); 3678 rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 16, NULL, uMsr, false, false, 3679 g_fIntelNetBurst 3680 ? UINT64_C(0xffffffffffffff00) /* kludge */ 3681 : UINT64_C(0xffff800000000000), &i); 3548 3682 else if (uMsr >= 0x00000800 && uMsr <= 0x000008ff) 3549 3683 rc = reportMsr_GenX2Apic(&paMsrs[i], cMsrs - i, &i); … … 3594 3728 else if (uMsr == 0xc0010070) 3595 3729 rc = reportMsr_AmdFam10hCofVidControl(uMsr, uValue); 3596 else if ( uMsr == 0xc0010118 || uMsr == 0xc0010119)3730 else if ((uMsr == 0xc0010118 || uMsr == 0xc0010119) && getMsrFnName(uMsr, NULL)) 3597 3731 rc = printMsrFunction(uMsr, NULL, NULL, annotateValue(uValue)); /* RAZ, write key. */ 3598 3732 else if (uMsr == 0xc0010200) … … 3655 3789 #else 3656 3790 3657 uint32_t uMsr = 0xc00 10015;3791 uint32_t uMsr = 0xc0000080; 3658 3792 uint64_t uValue = 0; 3659 3793 msrProberRead(uMsr, &uValue); 3660 reportMsr_Amd K8HwCr(uMsr, uValue);3794 reportMsr_Amd64Efer(uMsr, uValue); 3661 3795 #endif 3662 3796 return VINF_SUCCESS; … … 3928 4062 if (!RT_C_IS_ALNUM(*psz) && *psz != '_') 3929 4063 *psz = '_'; 4064 for (size_t off = strlen(szNameC); off > 1 && szNameC[off - 1] == '_'; off--) 4065 szNameC[off - 1] = '\0'; 3930 4066 vbCpuRepDebug("NameC: %s\n", szNameC); 3931 4067 } … … 4070 4206 { "--msrs-dev", 'd', RTGETOPT_REQ_NOTHING }, 4071 4207 { "--output", 'o', RTGETOPT_REQ_STRING }, 4208 { "--log", 'l', RTGETOPT_REQ_STRING }, 4072 4209 }; 4073 4210 RTGETOPTSTATE State; … … 4082 4219 g_pReportOut = NULL; 4083 4220 g_pDebugOut = g_pStdErr; 4084 const char *pszOutput = NULL; 4221 const char *pszOutput = NULL; 4222 const char *pszDebugOut = NULL; 4085 4223 4086 4224 int iOpt; … … 4102 4240 break; 4103 4241 4242 case 'l': 4243 pszDebugOut = ValueUnion.psz; 4244 break; 4245 4104 4246 case 'h': 4105 RTPrintf("Usage: VBoxCpuReport [-m|--msrs-only] [-d|--msrs-dev] [-h|--help] [-V|--version] \n");4247 RTPrintf("Usage: VBoxCpuReport [-m|--msrs-only] [-d|--msrs-dev] [-h|--help] [-V|--version] [-o filename.h] [-l debug.log]\n"); 4106 4248 RTPrintf("Internal tool for gathering information to the VMM CPU database.\n"); 4107 4249 return RTEXITCODE_SUCCESS; … … 4111 4253 default: 4112 4254 return RTGetOptPrintError(iOpt, &ValueUnion); 4255 } 4256 } 4257 4258 /* 4259 * Open the alternative debug log stream. 4260 */ 4261 if (pszDebugOut) 4262 { 4263 if (RTFileExists(pszDebugOut) && !RTSymlinkExists(pszDebugOut)) 4264 { 4265 char szOld[RTPATH_MAX]; 4266 rc = RTStrCopy(szOld, sizeof(szOld), pszDebugOut); 4267 if (RT_SUCCESS(rc)) 4268 rc = RTStrCat(szOld, sizeof(szOld), ".old"); 4269 if (RT_SUCCESS(rc)) 4270 RTFileRename(pszDebugOut, szOld, RTFILEMOVE_FLAGS_REPLACE); 4271 } 4272 rc = RTStrmOpen(pszDebugOut, "w", &g_pDebugOut); 4273 if (RT_FAILURE(rc)) 4274 { 4275 RTMsgError("Error opening '%s': %Rrc", pszDebugOut, rc); 4276 g_pDebugOut = NULL; 4113 4277 } 4114 4278 } … … 4147 4311 break; 4148 4312 } 4313 4314 /* 4315 * Close the output files. 4316 */ 4317 if (g_pReportOut) 4318 { 4319 RTStrmClose(g_pReportOut); 4320 g_pReportOut = NULL; 4321 } 4322 4323 if (g_pDebugOut) 4324 { 4325 RTStrmClose(g_pDebugOut); 4326 g_pDebugOut = NULL; 4327 } 4328 4149 4329 return RT_SUCCESS(rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; 4150 4330 } 4151 4331 4152
Note:
See TracChangeset
for help on using the changeset viewer.