Revision: 17993
http://sourceforge.net/p/edk2/code/17993
Author: vanjeff
Date: 2015-07-15 03:36:51 +0000 (Wed, 15 Jul 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Feng Tian <[email protected]>
Reviewed-by: Jiewen Yao <[email protected]>
Modified Paths:
--------------
trunk/edk2/UefiCpuPkg/CpuMpPei/CpuMpPei.h
trunk/edk2/UefiCpuPkg/CpuMpPei/CpuMpPei.inf
trunk/edk2/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm
trunk/edk2/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.nasm
trunk/edk2/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm
trunk/edk2/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm
Modified: trunk/edk2/UefiCpuPkg/CpuMpPei/CpuMpPei.h
===================================================================
--- trunk/edk2/UefiCpuPkg/CpuMpPei/CpuMpPei.h 2015-07-15 03:36:19 UTC (rev
17992)
+++ trunk/edk2/UefiCpuPkg/CpuMpPei/CpuMpPei.h 2015-07-15 03:36:51 UTC (rev
17993)
@@ -21,6 +21,7 @@
#include <Library/BaseLib.h>
#include <Library/HobLib.h>
#include <Library/PeimEntryPoint.h>
+#include <Library/UefiCpuLib.h>
#pragma pack(1)
Modified: trunk/edk2/UefiCpuPkg/CpuMpPei/CpuMpPei.inf
===================================================================
--- trunk/edk2/UefiCpuPkg/CpuMpPei/CpuMpPei.inf 2015-07-15 03:36:19 UTC (rev
17992)
+++ trunk/edk2/UefiCpuPkg/CpuMpPei/CpuMpPei.inf 2015-07-15 03:36:51 UTC (rev
17993)
@@ -51,6 +51,7 @@
BaseLib
HobLib
PeimEntryPoint
+ UefiCpuLib
Modified: trunk/edk2/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm
===================================================================
--- trunk/edk2/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm 2015-07-15 03:36:19 UTC
(rev 17992)
+++ trunk/edk2/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm 2015-07-15 03:36:51 UTC
(rev 17993)
@@ -22,6 +22,7 @@
.model flat
include MpEqu.inc
+InitializeFloatingPointUnits PROTO C
.code
@@ -124,6 +125,8 @@
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
Modified: trunk/edk2/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.nasm
===================================================================
--- trunk/edk2/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.nasm 2015-07-15 03:36:19 UTC
(rev 17992)
+++ trunk/edk2/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.nasm 2015-07-15 03:36:51 UTC
(rev 17993)
@@ -19,6 +19,7 @@
;-------------------------------------------------------------------------------
%include "MpEqu.inc"
+extern ASM_PFX(InitializeFloatingPointUnits)
SECTION .text
@@ -114,6 +115,8 @@
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
Modified: trunk/edk2/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm
===================================================================
--- trunk/edk2/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm 2015-07-15 03:36:19 UTC
(rev 17992)
+++ trunk/edk2/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm 2015-07-15 03:36:51 UTC
(rev 17993)
@@ -19,6 +19,8 @@
;-------------------------------------------------------------------------------
include MpEqu.inc
+extern InitializeFloatingPointUnits:PROC
+
.code
;-------------------------------------------------------------------------------------
;RendezvousFunnelProc procedure follows. All APs execute their procedure. This
@@ -158,6 +160,10 @@
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
Modified: trunk/edk2/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm
===================================================================
--- trunk/edk2/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm 2015-07-15 03:36:19 UTC
(rev 17992)
+++ trunk/edk2/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm 2015-07-15 03:36:51 UTC
(rev 17993)
@@ -19,6 +19,7 @@
;-------------------------------------------------------------------------------
%include "MpEqu.inc"
+extern ASM_PFX(InitializeFloatingPointUnits)
DEFAULT REL
@@ -155,6 +156,10 @@
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
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits