audk/UefiCpuPkg
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
..
Application/Cpuid UefiCpuPkg/Cpuid.h: Update CPUID definitions with SDM (Sep.2016) 2016-12-16 11:48:21 +08:00
CpuDxe UefiCpuPkg: Move ProgramVirtualWireMode() to MpInitLib 2017-04-26 08:55:45 +08:00
CpuFeatures UefiCpuPkg/CpuFeatures: Change files format to DOS 2017-04-05 16:33:16 +08:00
CpuIo2Dxe UefiCpuPkg: Refine casting expression result to bigger size 2017-03-06 14:33:26 +08:00
CpuIo2Smm UefiCpuPkg: Refine casting expression result to bigger size 2017-03-06 14:33:26 +08:00
CpuIoPei UefiCpuPkg: Modify CpuIoPei to support new IoLib library 2017-01-17 10:10:32 +08:00
CpuMpPei UefiCpuPkg/CpuMpPei: Build GUIDed-HOB to store all CPU BIST Data 2016-09-14 08:54:36 +08:00
CpuS3DataDxe UefiCpuPkg/CpuS3DataDxe: Consume the existing PcdCpuS3DataAddress 2017-03-22 10:11:25 +08:00
Feature/Capsule UefiCpuPkg/MicrocodeUpdate: Add MP support. 2016-12-28 15:09:02 +08:00
Include UefiCpuPkg/CpuFeatures: Change CPU features name to follow IA32 SDM 2017-04-07 12:55:21 +08:00
Library UefiCpuPkg/MtrrLib: Don't report OutOfResource when MTRR is enough 2017-05-08 13:35:25 +08:00
PiSmmCommunication UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00
PiSmmCpuDxeSmm PeCoffGetEntryPointLib: Fix spelling issue 2017-04-26 08:58:18 +08:00
ResetVector UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00
SecCore UefiCpuPkg: Make the comments align with the functions 2016-12-14 21:34:42 +08:00
Universal/Acpi/S3Resume2Pei UefiCpuPkg: Error Level is not used correctly 2017-04-12 08:57:06 +08:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt Update copyright format 2012-04-24 06:49:39 +00:00
UefiCpuPkg.dec UefiCpuPkg: Update package version to 0.80 2017-05-08 13:23:14 +08:00
UefiCpuPkg.dsc UefiCpuPkg: Update package version to 0.80 2017-05-08 13:31:00 +08:00
UefiCpuPkg.uni UefiCpuPkg: Add new PCDs PROMPT/HELP string in UNI file 2017-03-28 09:00:15 +08:00
UefiCpuPkgExtra.uni UefiCpuPkg: Convert all .uni files to utf-8 2015-12-15 04:59:14 +00:00