UefiCpuPkg/CpuDxe: Fix out-of-sync issue in page attributes

From CpuDxe driver perspective, it doesn't update GCD memory attributes from
current page table setup during its initialization. So the memory attributes in
GCD might not reflect all memory attributes in real world.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Suggested-by: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
Jian J Wang
2017-09-16 21:26:28 +08:00
committed by Star Zeng
parent 947f3737ab
commit c1cab54ce5
3 changed files with 113 additions and 0 deletions

View File

@@ -863,6 +863,11 @@ RefreshGcdMemoryAttributes (
FreePool (MemorySpaceMap);
}
//
// Update page attributes
//
RefreshGcdMemoryAttributesFromPaging();
mIsFlushingGCD = FALSE;
}