REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2849
MtrrGetVariableMtrr() returns all the variable MTRR settings.
But in fact MtrrGetAllMtrrs() and
MtrrGetMemoryAttributeInVariableMtrr() are used by callers to get the
MTRR settings. The former one returns both the fixed and variable
MTRR settings.
The patch removes the unnecessary API MtrrGetVariableMtrr() to
simplify the MtrrLib API.
There is no code in edk2 and edk2-platforms repo that calls
MtrrGetVariableMtrr().
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>
/** @file\r
MTRR setting library\r
\r
/** @file\r
MTRR setting library\r
\r
- Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2008 - 2020, Intel Corporation. All rights reserved.<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
-/**\r
- This function will get the raw value in variable MTRRs\r
-\r
- @param[out] VariableSettings A buffer to hold variable MTRRs content.\r
-\r
- @return The buffer point to MTRR_VARIABLE_SETTINGS in which holds the content of the variable MTRR\r
-\r
-**/\r
-MTRR_VARIABLE_SETTINGS*\r
-EFIAPI\r
-MtrrGetVariableMtrr (\r
- OUT MTRR_VARIABLE_SETTINGS *VariableSettings\r
- );\r
-\r
-\r
/**\r
This function sets variable MTRRs\r
\r
/**\r
This function sets variable MTRRs\r
\r
Most of services in this library instance are suggested to be invoked by BSP only,\r
except for MtrrSetAllMtrrs() which is used to sync BSP's MTRR setting to APs.\r
\r
Most of services in this library instance are suggested to be invoked by BSP only,\r
except for MtrrSetAllMtrrs() which is used to sync BSP's MTRR setting to APs.\r
\r
- Copyright (c) 2008 - 2019, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2008 - 2020, Intel Corporation. All rights reserved.<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
return VariableSettings;\r
}\r
\r
return VariableSettings;\r
}\r
\r
-/**\r
- This function will get the raw value in variable MTRRs\r
-\r
- @param[out] VariableSettings A buffer to hold variable MTRRs content.\r
-\r
- @return The VariableSettings input pointer\r
-\r
-**/\r
-MTRR_VARIABLE_SETTINGS*\r
-EFIAPI\r
-MtrrGetVariableMtrr (\r
- OUT MTRR_VARIABLE_SETTINGS *VariableSettings\r
- )\r
-{\r
- if (!IsMtrrSupported ()) {\r
- return VariableSettings;\r
- }\r
-\r
- return MtrrGetVariableMtrrWorker (\r
- NULL,\r
- GetVariableMtrrCountWorker (),\r
- VariableSettings\r
- );\r
-}\r
-\r
/**\r
Programs fixed MTRRs registers.\r
\r
/**\r
Programs fixed MTRRs registers.\r
\r