mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/MtrrUnitTest: Update UnitTestGetFirmwareVariableMtrrCount.
Update UnitTestGetFirmwareVariableMtrrCount for the case the when Fixed MTRRs are not supported. The original implementation returns FALSE when either fixed MTRR isn't supported or the number of variable MTRRs is 0. The correct behavior should return FALSE only when both fixed MTRR isn't supported 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
ca3f8638fa
commit
f784fc0e39
|
@ -550,7 +550,7 @@ UnitTestGetFirmwareVariableMtrrCount (
|
|||
InitializeMtrrRegs (&SystemParameter);
|
||||
PatchPcdSet32 (PcdCpuNumberOfReservedVariableMtrrs, 2);
|
||||
Result = GetFirmwareVariableMtrrCount ();
|
||||
UT_ASSERT_EQUAL (Result, 0);
|
||||
UT_ASSERT_EQUAL (Result, SystemParameter.VariableMtrrCount - 2);
|
||||
|
||||
//
|
||||
// Expect ASSERT() if variable MTRR count is > MTRR_NUMBER_OF_VARIABLE_MTRR
|
||||
|
|
Loading…
Reference in New Issue