diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-10-19 10:43:08 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-10-20 12:52:08 +0800 |
commit | 86cabbcfa005ca9c9589402d4fb7c984e741cc19 (patch) | |
tree | d1d3dbdef98ed558fc43f95876ea53a103f7e963 /ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c | |
parent | 1e3f7a3782f1928a19bba81d9d0dba28d15fdae5 (diff) | |
download | edk2-86cabbcfa005ca9c9589402d4fb7c984e741cc19.tar.gz edk2-86cabbcfa005ca9c9589402d4fb7c984e741cc19.tar.bz2 edk2-86cabbcfa005ca9c9589402d4fb7c984e741cc19.zip |
UefiCpuPkg/MtrrLib: Fix bug that may incorrectly set <1MB attribute
MtrrLibSetBelow1MBMemoryAttribute() may be called multiple times.
It's possible that in a 2nd call, Modified[0] is set to TRUE in
1st call but ClearMasks[0] and OrMasks[0] is uninitialized in
2nd call. It causes FixedSettings->Mtrr[0] be set to random
data.
The patch fixes this issue by introducing a local Modified[]
array and only updates FixedSettings->Mtrr[] when LocalModified[i]
is TRUE.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c')
0 files changed, 0 insertions, 0 deletions