mirror of https://github.com/acidanthera/audk.git
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:
parent
3c92912885
commit
9c6f3545ae
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue