mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/MtrrUnitTest: Update the Unit Test for IsMtrrSupported().
The previous implementation returns FALSE if either fixed MTRR is unsupported or the number of variable MTRRs is 0. The correct behavior is to return FALSE only when both fixed MTRR is unsupported and the number of variable MTRRs is 0. Signed-off-by: Ray Ni <ray.ni@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
parent
bf03c4a52a
commit
ca3f8638fa
|
@ -399,7 +399,7 @@ UnitTestIsMtrrSupported (
|
|||
SystemParameter.VariableMtrrCount = 0;
|
||||
SystemParameter.FixedMtrrSupported = TRUE;
|
||||
InitializeMtrrRegs (&SystemParameter);
|
||||
UT_ASSERT_FALSE (IsMtrrSupported ());
|
||||
UT_ASSERT_TRUE (IsMtrrSupported ());
|
||||
|
||||
//
|
||||
// MTRR capability on in CPUID leaf, but no fixed MTRRs.
|
||||
|
@ -408,7 +408,7 @@ UnitTestIsMtrrSupported (
|
|||
SystemParameter.VariableMtrrCount = 7;
|
||||
SystemParameter.FixedMtrrSupported = FALSE;
|
||||
InitializeMtrrRegs (&SystemParameter);
|
||||
UT_ASSERT_FALSE (IsMtrrSupported ());
|
||||
UT_ASSERT_TRUE (IsMtrrSupported ());
|
||||
|
||||
//
|
||||
// MTRR capability on in CPUID leaf with both variable and fixed MTRRs.
|
||||
|
|
Loading…
Reference in New Issue