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
This commit is contained in:
@@ -144,7 +144,7 @@ Base:
|
||||
orb $1,%ah
|
||||
wrmsr
|
||||
movq %cr0, %rbx
|
||||
btsl $31, %ebx
|
||||
orl $0x080010000, %ebx # enable paging + WP
|
||||
movq %rbx, %cr0
|
||||
retf
|
||||
LongMode: # long mode (64-bit code) starts here
|
||||
|
Reference in New Issue
Block a user