diff options
-rw-r--r-- | Core/UefiCpuPkg/Library/MpInitLib/MpLib.c | 2 | ||||
-rw-r--r-- | Core/UefiCpuPkg/Library/MpInitLib/MpLib.h | 1 | ||||
-rw-r--r-- | Core/UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc | 3 | ||||
-rw-r--r-- | Core/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 8 |
4 files changed, 9 insertions, 5 deletions
diff --git a/Core/UefiCpuPkg/Library/MpInitLib/MpLib.c b/Core/UefiCpuPkg/Library/MpInitLib/MpLib.c index 407c44c95e..735e099b32 100644 --- a/Core/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/Core/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -751,6 +751,8 @@ FillExchangeInfoData ( ExchangeInfo->EnableExecuteDisable = IsBspExecuteDisableEnabled ();
+ ExchangeInfo->InitializeFloatingPointUnitsAddress = (UINTN)InitializeFloatingPointUnits;
+
//
// Get the BSP's data of GDT and IDT
//
diff --git a/Core/UefiCpuPkg/Library/MpInitLib/MpLib.h b/Core/UefiCpuPkg/Library/MpInitLib/MpLib.h index 989b3f8090..ea56412cbc 100644 --- a/Core/UefiCpuPkg/Library/MpInitLib/MpLib.h +++ b/Core/UefiCpuPkg/Library/MpInitLib/MpLib.h @@ -177,6 +177,7 @@ typedef struct { UINTN InitFlag;
CPU_INFO_IN_HOB *CpuInfo;
CPU_MP_DATA *CpuMpData;
+ UINTN InitializeFloatingPointUnitsAddress;
} MP_CPU_EXCHANGE_INFO;
#pragma pack()
diff --git a/Core/UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc b/Core/UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc index a63cd23a40..5b2529b5cb 100644 --- a/Core/UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc +++ b/Core/UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc @@ -1,5 +1,5 @@ ;------------------------------------------------------------------------------ ;
-; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
; This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
@@ -40,4 +40,5 @@ EnableExecuteDisableLocation equ LockLocation + 5Ch Cr3Location equ LockLocation + 64h
InitFlagLocation equ LockLocation + 6Ch
CpuInfoLocation equ LockLocation + 74h
+InitializeFloatingPointUnitsAddress equ LockLocation + 84h
diff --git a/Core/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm b/Core/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm index fa54d01542..0b14a53466 100644 --- a/Core/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm +++ b/Core/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm @@ -1,5 +1,5 @@ ;------------------------------------------------------------------------------ ;
-; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
; This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
@@ -201,7 +201,7 @@ CProcedureInvoke: push rbp
mov rbp, rsp
- mov rax, ASM_PFX(InitializeFloatingPointUnits)
+ mov rax, qword [esi + InitializeFloatingPointUnitsAddress]
sub rsp, 20h
call rax ; Call assembly function to initialize FPU per UEFI spec
add rsp, 20h
@@ -282,11 +282,11 @@ AsmRelocateApLoopEnd: ;-------------------------------------------------------------------------------------
global ASM_PFX(AsmGetAddressMap)
ASM_PFX(AsmGetAddressMap):
- mov rax, ASM_PFX(RendezvousFunnelProc)
+ lea rax, [ASM_PFX(RendezvousFunnelProc)]
mov qword [rcx], rax
mov qword [rcx + 8h], LongModeStart - RendezvousFunnelProcStart
mov qword [rcx + 10h], RendezvousFunnelProcEnd - RendezvousFunnelProcStart
- mov rax, ASM_PFX(AsmRelocateApLoop)
+ lea rax, [ASM_PFX(AsmRelocateApLoop)]
mov qword [rcx + 18h], rax
mov qword [rcx + 20h], AsmRelocateApLoopEnd - AsmRelocateApLoopStart
ret
|