mirror of https://github.com/acidanthera/audk.git
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:
parent
3bb13d35d6
commit
386f5785ea
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue