summaryrefslogtreecommitdiff
path: root/UefiCpuPkg/CpuMpPei/X64
diff options
context:
space:
mode:
authorJeff Fan <jeff.fan@intel.com>2015-07-15 03:36:51 +0000
committervanjeff <vanjeff@Edk2>2015-07-15 03:36:51 +0000
commit46ba0f63e9adaa2147366fcbd68c1c6f672b647b (patch)
tree2db42260e7b46ef0ac4a2a93ce9d3e0dab865d7c /UefiCpuPkg/CpuMpPei/X64
parent34ff8715bf7724c52b878ddf55f494ccb0a35da6 (diff)
downloadedk2-platforms-46ba0f63e9adaa2147366fcbd68c1c6f672b647b.tar.xz
UefiCpuPkg/CpuMpPei: Initialize FPU per UEFI specification
Invoke InitializeFloatingPointUnits() to initialize FPU per UEFI specification before call C function in assembly code. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17993 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg/CpuMpPei/X64')
-rw-r--r--UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm6
-rw-r--r--UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm5
2 files changed, 11 insertions, 0 deletions
diff --git a/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm b/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm
index 5425547634..425bc202fd 100644
--- a/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm
+++ b/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm
@@ -19,6 +19,8 @@
;-------------------------------------------------------------------------------
include MpEqu.inc
+extern InitializeFloatingPointUnits:PROC
+
.code
;-------------------------------------------------------------------------------------
;RendezvousFunnelProc procedure follows. All APs execute their procedure. This
@@ -158,6 +160,10 @@ CProcedureInvoke:
push rbp
mov rbp, rsp
+ mov rax, InitializeFloatingPointUnits
+ sub rsp, 20h
+ call rax ; Call assembly function to initialize FPU per UEFI spec
+ add rsp, 20h
mov edx, ebx ; edx is NumApsExecuting
mov ecx, esi
diff --git a/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm b/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm
index 99669ce95e..3ddf26c29d 100644
--- a/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm
+++ b/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm
@@ -19,6 +19,7 @@
;-------------------------------------------------------------------------------
%include "MpEqu.inc"
+extern ASM_PFX(InitializeFloatingPointUnits)
DEFAULT REL
@@ -155,6 +156,10 @@ CProcedureInvoke:
push rbp
mov rbp, rsp
+ mov rax, ASM_PFX(InitializeFloatingPointUnits)
+ sub rsp, 20h
+ call rax ; Call assembly function to initialize FPU per UEFI spec
+ add rsp, 20h
mov edx, ebx ; edx is NumApsExecuting
mov ecx, esi