UefiCpuPkg/MpInitLib: Add EnableExecuteDisable in MP_CPU_EXCHANGE_INFO
EnableExecuteDisable in MP_CPU_EXCHANGE_INFO is used to tell AP reset vector if enable execute disable feature on APs. This feature should be enabled before CR3 is written. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>
This commit is contained in:
@@ -69,6 +69,19 @@ o32 lgdt [cs:si]
|
||||
mov si, IdtrLocation
|
||||
o32 lidt [cs:si]
|
||||
|
||||
mov si, EnableExecuteDisableLocation
|
||||
cmp byte [si], 0
|
||||
jz SkipEnableExecuteDisableBit
|
||||
|
||||
;
|
||||
; Enable execute disable bit
|
||||
;
|
||||
mov ecx, 0c0000080h ; EFER MSR number
|
||||
rdmsr ; Read EFER
|
||||
bts eax, 11 ; Enable Execute Disable Bit
|
||||
wrmsr ; Write EFER
|
||||
|
||||
SkipEnableExecuteDisableBit:
|
||||
|
||||
mov di, DataSegmentLocation
|
||||
mov edi, [di] ; Save long mode DS in edi
|
||||
|
Reference in New Issue
Block a user