From: rsun3 Date: Fri, 25 Nov 2011 02:55:43 +0000 (+0000) Subject: UefiCpuPkg MTRR Library: Remove a buggy check logic in MtrrSetMemoryAttribute() that... X-Git-Tag: edk2-stable201903~13836 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=f5b315e525101eafc431c868ee925bfd222311f6 UefiCpuPkg MTRR Library: Remove a buggy check logic in MtrrSetMemoryAttribute() that may incorrectly RETURN_OUT_OF_RESOURCES in some cases. Signed-off-by: rsun3 Reviewed-by: vanjeff git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12780 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c index 5f1a22c5fd..bcf5e20459 100644 --- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c +++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c @@ -1026,16 +1026,6 @@ MtrrSetMemoryAttribute ( } } - // - // Program Variable MTRRs - // - // Avoid hardcode here and read data dynamically - // - if (UsedMtrr >= FirmwareVariableMtrrCount) { - Status = RETURN_OUT_OF_RESOURCES; - goto Done; - } - // // The memory type is the same with the type specified by // MTRR_LIB_IA32_MTRR_DEF_TYPE.