summaryrefslogtreecommitdiff
path: root/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.asm
diff options
context:
space:
mode:
authorYao, Jiewen <jiewen.yao@intel.com>2015-11-26 07:01:08 +0000
committerjyao1 <jyao1@Edk2>2015-11-26 07:01:08 +0000
commit8e496a7abcb78c36b0af47ed473096ef7f171606 (patch)
tree780d46ef05f34a2c82220006b79cfdc8e7f70fee /UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.asm
parent989edf1633ab9a9fc9904c90b1a49ae84c5bbbe2 (diff)
downloadedk2-platforms-8e496a7abcb78c36b0af47ed473096ef7f171606.tar.xz
Always set WP in CR0.
Always set RW+P bit for page table by default. So that we can use write-protection for code later. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Kinney, Michael D" <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18960 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.asm')
-rw-r--r--UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.asm2
1 files changed, 1 insertions, 1 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.asm b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.asm
index 8a12927300..ac1a9b48dd 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.asm
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.asm
@@ -129,7 +129,7 @@ gSmiCr3 DD ?
@@: ; as cr4.PGE is not set here, refresh cr3
mov cr4, eax ; in PreModifyMtrrs() to flush TLB.
mov ebx, cr0
- or ebx, 080000000h ; enable paging
+ or ebx, 080010000h ; enable paging + WP
mov cr0, ebx
lea ebx, [edi + DSC_OFFSET]
mov ax, [ebx + DSC_DS]