UefiCpuPkg/MtrrLib: Fix bug that may calculate wrong MTRR result
authorRuiyu Ni <ruiyu.ni@intel.com>
Mon, 8 Jan 2018 10:11:39 +0000 (18:11 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Wed, 10 Jan 2018 02:28:28 +0000 (10:28 +0800)
commitffb4c72d7b637d4ac377fc7da7575069f15c288e
tree6a3142cc513c2e0ac82466323ae4cd1977adf10e
parent5a6c5af64af9e6f5ea26a4c4682aed57c37c221c
UefiCpuPkg/MtrrLib: Fix bug that may calculate wrong MTRR result

Code forgot to initialize the optional weight between adjacent
vertices. It caused wrong MTRR result was calculated for some
memory settings.

The logic was incorrectly removed when converting from POC
code. The patch adds back the initialization.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
UefiCpuPkg/Library/MtrrLib/MtrrLib.c