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
This commit is contained in:
Jeff Fan 2015-07-15 03:36:51 +00:00 committed by vanjeff
parent 34ff8715bf
commit 46ba0f63e9
6 changed files with 19 additions and 0 deletions

View File

@ -21,6 +21,7 @@
#include <Library/BaseLib.h>
#include <Library/HobLib.h>
#include <Library/PeimEntryPoint.h>
#include <Library/UefiCpuLib.h>
#pragma pack(1)

View File

@ -51,6 +51,7 @@
BaseLib
HobLib
PeimEntryPoint
UefiCpuLib

View File

@ -22,6 +22,7 @@
.model flat
include MpEqu.inc
InitializeFloatingPointUnits PROTO C
.code
@ -124,6 +125,8 @@ CProcedureInvoke:
push ebp
mov ebp, esp
mov eax, InitializeFloatingPointUnits
call eax ; Call assembly function to initialize FPU per UEFI spec
push ebx ; Push NumApsExecuting
mov eax, esi

View File

@ -19,6 +19,7 @@
;-------------------------------------------------------------------------------
%include "MpEqu.inc"
extern ASM_PFX(InitializeFloatingPointUnits)
SECTION .text
@ -114,6 +115,8 @@ CProcedureInvoke:
push ebp
mov ebp, esp
mov eax, ASM_PFX(InitializeFloatingPointUnits)
call eax ; Call assembly function to initialize FPU per UEFI spec
push ebx ; Push NumApsExecuting
mov eax, esi

View File

@ -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

View File

@ -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