diff options
author | Jian J Wang <jian.j.wang@intel.com> | 2017-09-16 21:26:28 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2017-09-21 09:38:15 +0800 |
commit | c1cab54ce57c2608b8b3ea051c7041f036f21153 (patch) | |
tree | 1bb3dffa43daf499e62ca5c9535dcb52bfaa477b /UefiCpuPkg/CpuDxe/CpuDxe.h | |
parent | 947f3737abf65fda63f3ffd97fddfa6986986868 (diff) | |
download | edk2-c1cab54ce57c2608b8b3ea051c7041f036f21153.zip edk2-c1cab54ce57c2608b8b3ea051c7041f036f21153.tar.gz edk2-c1cab54ce57c2608b8b3ea051c7041f036f21153.tar.bz2 |
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>
Diffstat (limited to 'UefiCpuPkg/CpuDxe/CpuDxe.h')
-rw-r--r-- | UefiCpuPkg/CpuDxe/CpuDxe.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.h b/UefiCpuPkg/CpuDxe/CpuDxe.h index 4861abe..a25b35c 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.h +++ b/UefiCpuPkg/CpuDxe/CpuDxe.h @@ -52,6 +52,10 @@ EFI_MEMORY_UCE \
)
+#define EFI_MEMORY_PAGETYPE_MASK (EFI_MEMORY_RP | \
+ EFI_MEMORY_XP | \
+ EFI_MEMORY_RO \
+ )
/**
Flush CPU data cache. If the instruction cache is fully coherent
@@ -261,5 +265,10 @@ SetDataSelectors ( UINT16 Selector
);
+VOID
+RefreshGcdMemoryAttributesFromPaging (
+ VOID
+ );
+
#endif
|