UefiCpuPkg/MtrrLib: GetVariableMtrrCountWorker uses definitions in Msr.h

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
This commit is contained in:
Ruiyu Ni 2016-09-02 10:35:45 +08:00
parent 3bb13d35d6
commit 386f5785ea
1 changed files with 4 additions and 4 deletions

View File

@ -124,11 +124,11 @@ GetVariableMtrrCountWorker (
VOID
)
{
UINT32 VariableMtrrCount;
MSR_IA32_MTRRCAP_REGISTER MtrrCap;
VariableMtrrCount = (UINT32)(AsmReadMsr64 (MTRR_LIB_IA32_MTRR_CAP) & MTRR_LIB_IA32_MTRR_CAP_VCNT_MASK);
ASSERT (VariableMtrrCount <= MTRR_NUMBER_OF_VARIABLE_MTRR);
return VariableMtrrCount;
MtrrCap.Uint64 = AsmReadMsr64 (MSR_IA32_MTRRCAP);
ASSERT (MtrrCap.Bits.VCNT <= MTRR_NUMBER_OF_VARIABLE_MTRR);
return MtrrCap.Bits.VCNT;
}
/**