UefiCpuPkg/MtrrLib: Update MtrrGetFixedMtrr().

IsMtrrSupported() return true when either fixed mtrr supported or
variable mtrr suppored. In this case, rather than checking whether
MTRR is supported or not, we should specifically check for fixed MTRR
support.

Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Ray Ni <ray.ni@intel.com>

Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
YuanhaoXie 2023-07-04 11:23:52 +08:00 committed by mergify[bot]
parent a519014472
commit 0103d09ebe
1 changed files with 5 additions and 1 deletions

View File

@ -468,7 +468,11 @@ MtrrGetFixedMtrr (
OUT MTRR_FIXED_SETTINGS *FixedSettings
)
{
if (!IsMtrrSupported ()) {
BOOLEAN FixedMtrrSupported;
MtrrLibIsMtrrSupported (&FixedMtrrSupported, NULL);
if (!FixedMtrrSupported) {
return FixedSettings;
}