]> git.proxmox.com Git - mirror_edk2.git/commit
UefiCpuPkg/PiSmmCpu: Always set WP in CR0
authorYao, Jiewen <jiewen.yao@intel.com>
Mon, 30 Nov 2015 19:57:45 +0000 (19:57 +0000)
committerlersek <lersek@Edk2>
Mon, 30 Nov 2015 19:57:45 +0000 (19:57 +0000)
commit53ba3fb8aaf91df4a65244480deb6fa60968c146
tree88fcdb7992f9d50dd1d46189e6c93491549e4a5d
parent881520ea6778953c57d975ca2a9cf3f2114f99c4
UefiCpuPkg/PiSmmCpu: Always set WP in CR0

So that we can use write-protection for code later.

It is REPOST.
It includes suggestion from Michael Kinney <michael.d.kinney@intel.com>:
- "For IA32 assembly, can we combine into a single OR instruction that
  sets both page enable and WP?"
- "For X64, does it make sense to use single OR instruction instead of 2
  BTS instructions as well?"

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Suggested-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Cc: "Fan, Jeff" <jeff.fan@intel.com>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "Laszlo Ersek" <lersek@redhat.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19068 6f19259b-4bc3-4df7-8a09-765794883524
UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.S
UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.asm
UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.S
UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.asm