summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg
diff options
context:
space:
mode:
authorRay Ni <ray.ni@intel.com>2020-07-13 15:55:32 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-07-14 03:24:24 +0000
commit9c6f3545aee0808b78a0ad4480b6eb9d24989dc1 (patch)
tree80d9dcb83130bf9afb561476c722fffb8ae5160f /UefiCpuPkg
parent3c9291288540f48a6812857fd59cf635aa294aa1 (diff)
downloadedk2-9c6f3545aee0808b78a0ad4480b6eb9d24989dc1.tar.gz
edk2-9c6f3545aee0808b78a0ad4480b6eb9d24989dc1.tar.bz2
edk2-9c6f3545aee0808b78a0ad4480b6eb9d24989dc1.zip
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>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r--UefiCpuPkg/Include/Library/MtrrLib.h15
-rw-r--r--UefiCpuPkg/Library/MtrrLib/MtrrLib.c29
2 files changed, 0 insertions, 44 deletions
diff --git a/UefiCpuPkg/Include/Library/MtrrLib.h b/UefiCpuPkg/Include/Library/MtrrLib.h
index 0bc69e235c..9110787067 100644
--- a/UefiCpuPkg/Include/Library/MtrrLib.h
+++ b/UefiCpuPkg/Include/Library/MtrrLib.h
@@ -201,21 +201,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)
@param[out] MtrrSetting A buffer to hold all MTRRs content.
diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
index 8b54f2c03b..ceab7a065f 100644
--- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
+++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
@@ -2581,35 +2581,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)
@param[out] MtrrSetting A buffer to hold all MTRRs content.