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:
@@ -85,6 +85,36 @@ Flat32Start: ; protected mode entry point
|
||||
mov ss, dx
|
||||
|
||||
mov esi, ebx
|
||||
|
||||
mov edi, esi
|
||||
add edi, EnableExecuteDisableLocation
|
||||
cmp byte [edi], 0
|
||||
jz SkipEnableExecuteDisable
|
||||
|
||||
;
|
||||
; Enable IA32 PAE execute disable
|
||||
;
|
||||
|
||||
mov ecx, 0xc0000080
|
||||
rdmsr
|
||||
bts eax, 11
|
||||
wrmsr
|
||||
|
||||
mov edi, esi
|
||||
add edi, Cr3Location
|
||||
mov eax, dword [edi]
|
||||
mov cr3, eax
|
||||
|
||||
mov eax, cr4
|
||||
bts eax, 5
|
||||
mov cr4, eax
|
||||
|
||||
mov eax, cr0
|
||||
bts eax, 31
|
||||
mov cr0, eax
|
||||
|
||||
SkipEnableExecuteDisable:
|
||||
|
||||
mov edi, esi
|
||||
add edi, LockLocation
|
||||
mov eax, NotVacantFlag
|
||||
|
Reference in New Issue
Block a user