diff options
author | YuanhaoXie <yuanhao.xie@intel.com> | 2023-07-04 11:23:52 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-10-09 08:22:02 +0000 |
commit | 0103d09ebe6dede5b3cbea09c9e3f64662d8cabf (patch) | |
tree | eb039d9fff2b4d1ff8ff65b71343dc7c642aa93e | |
parent | a519014472a309174b1a89f3fcb14fc8a33f6ce5 (diff) | |
download | edk2-0103d09ebe6dede5b3cbea09c9e3f64662d8cabf.tar.gz |
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>
-rw-r--r-- | UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c index c9440f01ef..255a8ebf81 100644 --- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c +++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c @@ -468,7 +468,11 @@ MtrrGetFixedMtrr ( OUT MTRR_FIXED_SETTINGS *FixedSettings
)
{
- if (!IsMtrrSupported ()) {
+ BOOLEAN FixedMtrrSupported;
+
+ MtrrLibIsMtrrSupported (&FixedMtrrSupported, NULL);
+
+ if (!FixedMtrrSupported) {
return FixedSettings;
}
|