UefiCpuPkg/MtrrLib: Remove unnecessary API MtrrSetFixedMtrr()

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2849

MtrrSetFixedMtrr() sets all the fixed MTRR settings.
But in fact MtrrSetAllMtrrs() is always used by callers to set all
MTRR settings including the fixed and variable ones.

The patch removes the unnecessary API MtrrSetFixedMtrr()
to simplify the MtrrLib API.

There is no code in edk2 and edk2-platforms repo that calls
MtrrSetFixedMtrr().

Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
This commit is contained in:
Ray Ni 2020-07-13 15:55:32 +08:00 committed by mergify[bot]
parent 3c92912885
commit 9c6f3545ae
2 changed files with 0 additions and 44 deletions

View File

@ -200,21 +200,6 @@ MtrrGetFixedMtrr (
);
/**
This function sets fixed MTRRs
@param[in] FixedSettings A buffer holding fixed MTRRs content.
@return The pointer of FixedSettings
**/
MTRR_FIXED_SETTINGS*
EFIAPI
MtrrSetFixedMtrr (
IN MTRR_FIXED_SETTINGS *FixedSettings
);
/**
This function gets the content in all MTRRs (variable and fixed)

View File

@ -2580,35 +2580,6 @@ MtrrSetFixedMtrrWorker (
}
/**
This function sets fixed MTRRs
@param[in] FixedSettings A buffer to hold fixed MTRRs content.
@retval The pointer of FixedSettings
**/
MTRR_FIXED_SETTINGS*
EFIAPI
MtrrSetFixedMtrr (
IN MTRR_FIXED_SETTINGS *FixedSettings
)
{
MTRR_CONTEXT MtrrContext;
if (!IsMtrrSupported ()) {
return FixedSettings;
}
MtrrLibPreMtrrChange (&MtrrContext);
MtrrSetFixedMtrrWorker (FixedSettings);
MtrrLibPostMtrrChange (&MtrrContext);
MtrrDebugPrintAllMtrrs ();
return FixedSettings;
}
/**
This function gets the content in all MTRRs (variable and fixed)