mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/MtrrLib: Remove unnecessary API MtrrGetVariableMtrr()
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>
This commit is contained in:
parent
d9a4084544
commit
abc16e2531
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
MTRR setting library
|
||||
|
||||
Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2008 - 2020, Intel Corporation. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
@ -185,21 +185,6 @@ MtrrGetMemoryAttribute (
|
|||
);
|
||||
|
||||
|
||||
/**
|
||||
This function will get the raw value in variable MTRRs
|
||||
|
||||
@param[out] VariableSettings A buffer to hold variable MTRRs content.
|
||||
|
||||
@return The buffer point to MTRR_VARIABLE_SETTINGS in which holds the content of the variable MTRR
|
||||
|
||||
**/
|
||||
MTRR_VARIABLE_SETTINGS*
|
||||
EFIAPI
|
||||
MtrrGetVariableMtrr (
|
||||
OUT MTRR_VARIABLE_SETTINGS *VariableSettings
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
This function sets variable MTRRs
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
Most of services in this library instance are suggested to be invoked by BSP only,
|
||||
except for MtrrSetAllMtrrs() which is used to sync BSP's MTRR setting to APs.
|
||||
|
||||
Copyright (c) 2008 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2008 - 2020, Intel Corporation. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
@ -456,31 +456,6 @@ MtrrGetVariableMtrrWorker (
|
|||
return VariableSettings;
|
||||
}
|
||||
|
||||
/**
|
||||
This function will get the raw value in variable MTRRs
|
||||
|
||||
@param[out] VariableSettings A buffer to hold variable MTRRs content.
|
||||
|
||||
@return The VariableSettings input pointer
|
||||
|
||||
**/
|
||||
MTRR_VARIABLE_SETTINGS*
|
||||
EFIAPI
|
||||
MtrrGetVariableMtrr (
|
||||
OUT MTRR_VARIABLE_SETTINGS *VariableSettings
|
||||
)
|
||||
{
|
||||
if (!IsMtrrSupported ()) {
|
||||
return VariableSettings;
|
||||
}
|
||||
|
||||
return MtrrGetVariableMtrrWorker (
|
||||
NULL,
|
||||
GetVariableMtrrCountWorker (),
|
||||
VariableSettings
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
Programs fixed MTRRs registers.
|
||||
|
||||
|
|
Loading…
Reference in New Issue