audk/UefiCpuPkg/Library
Ruiyu Ni 3654c4623c UefiCpuPkg/MtrrLib: Don't report OutOfResource when MTRR is enough
The MTRR calculation algorithm contains a bug that when left
subtraction cannot produce better MTRR solution, it forgets
to restore the BaseAddress/Length so that MtrrLibGetMtrrNumber()
returns bigger value of actual required MTRR numbers.
As a result, the MtrrLib reports OutOfResource but actually the
MTRR is enough.

MEMORY_RANGE mC[] = {
  0, 0x100000, CacheUncacheable,
  0x100000, 0x89F00000, CacheWriteBack,
  0x8A000000, 0x75000000, CacheUncacheable,
  0xFF000000, 0x01000000, CacheWriteProtected,
  0x100000000, 0x7F00000000, CacheUncacheable,
  0xFC240000, 0x2000, CacheWriteCombining // <-- trigger the error
};

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2017-05-08 13:35:25 +08:00
..
BaseUefiCpuLib UefiCpuPkg BaseUefiCpuLib: Add nasm source file in BaseUefiCpuLib.inf 2016-06-28 09:52:08 +08:00
BaseXApicLib UefiCpuPkg/LocalApicLib: fix feature test for Extended Topology CPUID leaf 2016-11-23 21:41:05 +01:00
BaseXApicX2ApicLib UefiCpuPkg/LocalApicLib: fix feature test for Extended Topology CPUID leaf 2016-11-23 21:41:05 +01:00
CpuCommonFeaturesLib UefiCpuPkg/CpuFeatures: Change files format to DOS 2017-04-05 16:33:16 +08:00
CpuExceptionHandlerLib PeCoffGetEntryPointLib: Fix spelling issue 2017-04-26 08:58:18 +08:00
MpInitLib UefiCpuPkg/MpLib.c: Set AP state after X2APIC mode enabled 2017-04-26 08:55:46 +08:00
MtrrLib UefiCpuPkg/MtrrLib: Don't report OutOfResource when MTRR is enough 2017-05-08 13:35:25 +08:00
PlatformSecLibNull UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00
RegisterCpuFeaturesLib UefiCpuPkg/CpuFeatures: Change files format to DOS 2017-04-05 16:33:16 +08:00
SecPeiDxeTimerLibUefiCpu UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00
SmmCpuFeaturesLib UefiCpuPkg: Refine casting expression result to bigger size 2017-03-06 14:33:26 +08:00
SmmCpuPlatformHookLibNull UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00