Lines Matching defs:uValue
56 uint64_t uValue;
125 uint32_t uMsr, uint64_t uValue, uint32_t fFlags)
150 pEntry->uValue = uValue;
212 static bool msrProberWrite(uint32_t uMsr, uint64_t uValue)
215 int rc = SUPR3MsrProberWrite(uMsr, NIL_RTCPUID, uValue, &fGp);
439 uint64_t uValue;
440 if (!msrProberRead(s_aMsrs[i] | fMsrOrMask, &uValue))
441 uValue = UINT64_MAX;
442 if (uValue != auBaseValues[i])
446 iBit, s_aMsrs[i] | (uint32_t)fMsrOrMask, s_aMsrs[i], uValue, auBaseValues[i], fMsrMask);
515 uint64_t uValue = 0;
517 int rc = SUPR3MsrProberRead(uMsr, NIL_RTCPUID, &uValue, &fGp);
531 uValue = 0;
555 uValue = 0;
578 rc = vbCpuRepMsrsAddOne(ppaMsrs, pcMsrs, uMsr, uValue, fFlags);
582 || uValue
584 vbCpuRepDebug("%#010x: uValue=%#llx fFlags=%#x\n", uMsr, uValue, fFlags);
2504 * @param uValue The value.
2507 static bool isMsrViaDummy(uint32_t uMsr, uint64_t uValue, uint32_t fFlags)
2512 if (uValue)
2604 * @param uValue The value.
2606 static void printMsrValueU64(uint64_t uValue)
2608 if (uValue == 0)
2610 else if (uValue == UINT16_MAX)
2612 else if (uValue == UINT32_MAX)
2614 else if (uValue == UINT64_MAX)
2616 else if (uValue == UINT64_C(0xffffffff00000000))
2618 else if (uValue <= (UINT32_MAX >> 1))
2619 vbCpuRepPrintf(", %#llx", uValue);
2620 else if (uValue <= UINT32_MAX)
2621 vbCpuRepPrintf(", UINT32_C(%#llx)", uValue);
2623 vbCpuRepPrintf(", UINT64_C(%#llx)", uValue);
2655 static int printMsrValueReadOnly(uint32_t uMsr, uint64_t uValue, const char *pszAnnotation)
2658 printMsrValueU64(uValue);
2668 static int printMsrValueIgnoreWritesNamed(uint32_t uMsr, uint64_t uValue, const char *pszName, const char *pszAnnotation)
2671 printMsrValueU64(uValue);
2680 static int printMsrValueIgnoreWrites(uint32_t uMsr, uint64_t uValue, const char *pszAnnotation)
2682 return printMsrValueIgnoreWritesNamed(uMsr, uValue, getMsrName(uMsr), pszAnnotation);
2686 static int printMsrValueExtended(uint32_t uMsr, uint64_t uValue, uint64_t fIgnMask, uint64_t fGpMask,
2690 printMsrValueU64(uValue);
2701 static int printMsrRangeValueReadOnly(uint32_t uMsr, uint32_t uLast, uint64_t uValue, const char *pszAnnotation)
2704 printMsrValueU64(uValue);
2713 static int printMsrRangeValueIgnoreWritesNamed(uint32_t uMsr, uint32_t uLast, uint64_t uValue, const char *pszName, const char *pszAnnotation)
2716 printMsrValueU64(uValue);
2725 static int printMsrRangeValueIgnoreWrites(uint32_t uMsr, uint32_t uLast, uint64_t uValue, const char *pszAnnotation)
2727 return printMsrRangeValueIgnoreWritesNamed(uMsr, uLast, uValue, getMsrRangeName(uMsr), pszAnnotation);
2786 static int printMsrFunctionExtended(uint32_t uMsr, const char *pszRdFnName, const char *pszWrFnName, uint64_t uValue,
2794 printMsrValueU64(uValue);
2805 static int printMsrFunctionExtendedIdxVal(uint32_t uMsr, const char *pszRdFnName, const char *pszWrFnName, uint64_t uValue,
2812 vbCpuRepPrintf(" MFX(%#010x, \"%s\", %s, %s, %#x", uMsr, getMsrName(uMsr), pszRdFnName, pszWrFnName, uValue);
2881 uint64_t uValue, uint64_t fIgnMask, uint64_t fGpMask, const char *pszAnnotation)
2888 printMsrValueU64(uValue);
2900 uint64_t uValue, uint64_t fIgnMask, uint64_t fGpMask, const char *pszAnnotation)
2907 uMsr, uLast, getMsrRangeName(uMsr), pszRdFnName, pszWrFnName, uValue);
2929 static const char *annotateValue(uint64_t uValue)
2932 if (uValue <= UINT32_MAX)
2933 RTStrPrintf(s_szBuf, sizeof(s_szBuf), "value=%#llx", uValue);
2935 RTStrPrintf(s_szBuf, sizeof(s_szBuf), "value=%#x`%08x", RT_HI_U32(uValue), RT_LO_U32(uValue));
2940 static const char *annotateValueExtra(const char *pszExtra, uint64_t uValue)
2943 if (uValue <= UINT32_MAX)
2944 RTStrPrintf(s_szBuf, sizeof(s_szBuf), "%s value=%#llx", pszExtra, uValue);
2946 RTStrPrintf(s_szBuf, sizeof(s_szBuf), "%s value=%#x`%08x", pszExtra, RT_HI_U32(uValue), RT_LO_U32(uValue));
2951 static const char *annotateIfMissingBits(uint64_t uValue, uint64_t fBits)
2954 if ((uValue & fBits) == fBits)
2955 return annotateValue(uValue);
2956 RTStrPrintf(s_szBuf, sizeof(s_szBuf), "XXX: Unexpected value %#llx - wanted bits %#llx to be set.", uValue, fBits);
2961 static int reportMsr_Generic(uint32_t uMsr, uint32_t fFlags, uint64_t uValue)
2994 rc = printMsrFunctionIgnoreWrites(uMsr, pszFnName, annotateValue(uValue));
2995 else if (fGpMask == 0 && fIgnMask == 0 && (!fTakesValue || uValue == 0))
2996 rc = printMsrFunction(uMsr, pszFnName, pszFnName, annotateValue(uValue));
2998 rc = printMsrFunctionExtended(uMsr, pszFnName, pszFnName, fTakesValue ? uValue : 0,
2999 fIgnMask, fGpMask, annotateValue(uValue));
3002 rc = printMsrValueIgnoreWrites(uMsr, fReadAsZero ? 0 : uValue, fReadAsZero ? annotateValue(uValue) : NULL);
3004 rc = printMsrValueExtended(uMsr, fReadAsZero ? 0 : uValue, fIgnMask, fGpMask,
3005 fReadAsZero ? annotateValue(uValue) : NULL);
3009 rc = printMsrFunctionReadOnly(uMsr, pszFnName, annotateValue(uValue));
3011 rc = printMsrFunctionExtended(uMsr, pszFnName, "ReadOnly", uValue, 0, 0, annotateValue(uValue));
3013 rc = printMsrValueReadOnly(uMsr, 0, annotateValue(uValue));
3015 rc = printMsrValueReadOnly(uMsr, uValue, NULL);
3025 rc = printMsrFunction(uMsr, pszFnName, pszFnName, annotateValueExtra("Might bite.", uValue));
3027 rc = printMsrFunctionExtended(uMsr, pszFnName, pszFnName, uValue, 0, 0,
3028 annotateValueExtra("Might bite.", uValue));
3030 rc = printMsrValueIgnoreWrites(uMsr, 0, annotateValueExtra("Might bite.", uValue));
3032 rc = printMsrValueIgnoreWrites(uMsr, uValue, "Might bite.");
3035 rc = printMsrFunctionReadOnly(uMsr, pszFnName, annotateValueExtra("Might bite.", uValue));
3037 rc = printMsrFunctionExtended(uMsr, pszFnName, "ReadOnly", uValue, 0, UINT64_MAX,
3038 annotateValueExtra("Might bite.", uValue));
3040 rc = printMsrValueReadOnly(uMsr, 0, annotateValueExtra("Might bite.", uValue));
3042 rc = printMsrValueReadOnly(uMsr, uValue, "Might bite.");
3050 rc = printMsrFunction(uMsr, pszFnName, pszFnName, annotateValueExtra("Villain?", uValue));
3052 rc = printMsrFunctionExtended(uMsr, pszFnName, pszFnName, uValue, 0, 0,
3053 annotateValueExtra("Villain?", uValue));
3055 rc = printMsrValueIgnoreWrites(uMsr, 0, annotateValueExtra("Villain?", uValue));
3057 rc = printMsrValueIgnoreWrites(uMsr, uValue, "Villain?");
3110 if (!fEarlyEndOk && !isMsrViaDummy(uMsr, paMsrs[i].uValue, paMsrs[i].fFlags))
3135 pszAnnotation ? pszAnnotation : annotateValue(paMsrs[0].uValue));
3141 iRange /*uValue*/, fIgnMask0, fGpMask0, pszAnnotation);
3159 * @param uValue The MSR range value.
3165 static int reportMsr_GenFunctionEx(uint32_t uMsr, const char *pszRdWrFnName, uint32_t uValue,
3184 if (fGpMask == UINT64_MAX && uValue == 0 && !msrProberModifyZero(uMsr))
3186 else if (fIgnMask == UINT64_MAX && fGpMask == 0 && uValue == 0)
3188 else if (fIgnMask != 0 && fGpMask == 0 && uValue == 0)
3190 else if (fIgnMask == 0 && fGpMask == 0 && uValue == 0)
3193 rc = printMsrFunctionExtended(uMsr, pszRdWrFnName, NULL, uValue, fIgnMask, fGpMask, pszAnnotate);
3215 && isMsrViaDummy(paMsrs[cRegs].uMsr, paMsrs[cRegs].uValue, paMsrs[cRegs].fFlags))
3246 * @param uValue The value.
3248 static int reportMsr_Ia32ApicBase(uint32_t uMsr, uint64_t uValue)
3255 return reportMsr_GenFunctionEx(uMsr, "Ia32ApicBase", uValue, fSkipMask, 0, NULL);
3265 * @param uValue The value.
3267 static int reportMsr_Ia32MiscEnable(uint32_t uMsr, uint64_t uValue)
3282 if ( !(uValue & MSR_IA32_MISC_ENABLE_XD_DISABLE)
3292 rc = printMsrFunctionExtended(uMsr, "Ia32MiscEnable", "Ia32MiscEnable", uValue,
3293 fIgnMask, fGpMask, annotateValue(uValue));
3343 && !isMsrViaDummy(paMsrs[cRegs].uMsr, paMsrs[cRegs].uValue, paMsrs[cRegs].fFlags) )
3353 if (!(paMsrs[iGuineaPig + 1].uValue & RT_BIT_32(11)))
3383 if (!(paMsrs[i + 1].uValue & RT_BIT_32(11)))
3390 if (!(paMsrs[i + 1].uValue & RT_BIT_32(11)))
3428 annotateValue(paMsrs[i].uValue));
3430 annotateValue(paMsrs[i + 1].uValue));
3566 * @param uValue The current value.
3568 static int reportMsr_Amd64Efer(uint32_t uMsr, uint64_t uValue)
3573 if ( (uValue & MSR_K6_EFER_NXE)
3591 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, MSR_K6_EFER_LMA, NULL);
3648 if ((fIgnMask != UINT64_MAX && fGpMask != UINT64_MAX) || paMsrs[cUsed + cReserved].uValue)
3650 "Unexpected reserved AmdFam16hMc4MiscN: fIgn=%#llx fGp=%#llx uMsr=%#x uValue=%#llx\n",
3651 fIgnMask, fGpMask, paMsrs[cUsed + cReserved].uMsr, paMsrs[cUsed + cReserved].uValue);
3723 * @param uValue The current value.
3725 static int reportMsr_AmdK8SysCfg(uint32_t uMsr, uint64_t uValue)
3769 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue));
3778 * @param uValue The current value.
3780 static int reportMsr_AmdK8HwCr(uint32_t uMsr, uint64_t uValue)
3801 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue));
3810 * @param uValue The current value.
3812 static int reportMsr_AmdK8IorrBaseN(uint32_t uMsr, uint64_t uValue)
3817 return reportMsr_GenFunctionEx(uMsr, NULL, (uMsr - 0xc0010016) / 2, fSkipMask, 0, annotateValue(uValue));
3826 * @param uValue The current value.
3828 static int reportMsr_AmdK8IorrMaskN(uint32_t uMsr, uint64_t uValue)
3833 return reportMsr_GenFunctionEx(uMsr, NULL, (uMsr - 0xc0010017) / 2, fSkipMask, 0, annotateValue(uValue));
3842 * @param uValue The current value.
3844 static int reportMsr_AmdK8TopMemN(uint32_t uMsr, uint64_t uValue)
3848 return reportMsr_GenFunctionEx(uMsr, NULL, uMsr == 0xc001001d, fSkipMask, 0, annotateValue(uValue));
3898 printMsrFunctionExtended(uMsr + i, "AmdFam10hPStateN", NULL, paMsrs[i].uValue, fIgnMask, fGpMask,
3899 annotateValue(paMsrs[i].uValue));
3913 * @param uValue The current value.
3915 static int reportMsr_AmdFam10hCofVidControl(uint32_t uMsr, uint64_t uValue)
3933 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue));
3972 printMsrFunctionExtendedIdxVal(uMsr + i, NULL, NULL, i / 2, fIgnMask, fGpMask, annotateValue(paMsrs[i].uValue));
3986 * @param uValue The current value.
3988 static int reportMsr_AmdK7InstrCacheCfg(uint32_t uMsr, uint64_t uValue)
4003 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue));
4012 * @param uValue The current value.
4014 static int reportMsr_AmdFam15hCombUnitCfg(uint32_t uMsr, uint64_t uValue)
4024 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue));
4033 * @param uValue The current value.
4035 static int reportMsr_AmdFam15hExecUnitCfg(uint32_t uMsr, uint64_t uValue)
4040 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue));
4054 uint64_t uValue = paMsrs[i].uValue;
4073 rc = reportMsr_Generic(uMsr, fFlags, uValue);
4079 else if (isMsrViaDummy(uMsr, uValue, fFlags))
4089 rc = reportMsr_Ia32ApicBase(uMsr, uValue);
4105 rc = reportMsr_Ia32MiscEnable(uMsr, uValue);
4139 annotateIfMissingBits(uValue, X86_CR0_PE | X86_CR0_PE | X86_CR0_ET));
4141 rc = reportMsr_GenFunctionEx(uMsr, "IntelP6CrN", 2, 0, 0, annotateValue(uValue));
4147 rc = reportMsr_GenFunctionEx(uMsr, "IntelP6CrN", 3, fCr3Mask, 0, annotateValue(uValue));
4152 annotateValue(uValue));
4154 rc = reportMsr_Amd64Efer(uMsr, uValue);
4162 rc = reportMsr_AmdK8SysCfg(uMsr, uValue);
4164 rc = reportMsr_AmdK8HwCr(uMsr, uValue);
4166 rc = reportMsr_AmdK8IorrBaseN(uMsr, uValue);
4168 rc = reportMsr_AmdK8IorrMaskN(uMsr, uValue);
4170 rc = reportMsr_AmdK8TopMemN(uMsr, uValue);
4180 rc = reportMsr_AmdFam10hCofVidControl(uMsr, uValue);
4182 rc = printMsrFunction(uMsr, NULL, NULL, annotateValue(uValue)); /* RAZ, write key. */
4193 rc = reportMsr_AmdK7InstrCacheCfg(uMsr, uValue);
4195 rc = reportMsr_AmdFam15hCombUnitCfg(uMsr, uValue);
4200 rc = reportMsr_AmdFam15hExecUnitCfg(uMsr, uValue);
4203 rc = reportMsr_Generic(uMsr, fFlags, uValue);
4212 g_uMsrIntelP6FsbFrequency = uValue;
4249 uint64_t uValue = 0;
4250 msrProberRead(uMsr, &uValue);
4251 reportMsr_AmdK8SysCfg(uMsr, uValue);
4283 uint64_t uValue;
4285 rc = SUPR3MsrProberRead(MSR_IA32_TSC, NIL_RTCPUID, &uValue, &fGp);
4291 vbCpuRepDebug("MSR_IA32_TSC: %#llx fGp=%RTbool\n", uValue, fGp);
4292 rc = SUPR3MsrProberRead(0xdeadface, NIL_RTCPUID, &uValue, &fGp);
4293 vbCpuRepDebug("0xdeadface: %#llx fGp=%RTbool rc=%Rrc\n", uValue, fGp, rc);