[PATCH v3 2/5] MpInitLib: remove unneeded global ASM_PFX


Ni, Ray
 

global in NASM file is used for symbols that are
referenced in C files.
Remove unneeded global keyword in NASM file.

Signed-off-by: Ray Ni <ray.ni@...>
---
UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm | 8 +-------
UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 10 ++--------
2 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm b/UefiCpuPkg/Li=
brary/MpInitLib/Ia32/MpFuncs.nasm
index 7bd2415670..8981c32722 100644
--- a/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm
+++ b/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm
@@ -1,5 +1,5 @@
;-------------------------------------------------------------------------=
----- ;=0D
-; Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.<BR>=0D
+; Copyright (c) 2015 - 2022, Intel Corporation. All rights reserved.<BR>=0D
; SPDX-License-Identifier: BSD-2-Clause-Patent=0D
;=0D
; Module Name:=0D
@@ -24,8 +24,6 @@ SECTION .text
;ALSO THIS PROCEDURE IS EXECUTED BY APs ONLY ON 16 BIT MODE. HENCE THIS PR=
OC=0D
;IS IN MACHINE CODE.=0D
;-------------------------------------------------------------------------=
------------=0D
-global ASM_PFX(RendezvousFunnelProc)=0D
-ASM_PFX(RendezvousFunnelProc):=0D
RendezvousFunnelProcStart:=0D
; At this point CS =3D 0x(vv00) and ip=3D 0x0.=0D
BITS 16=0D
@@ -207,8 +205,6 @@ RendezvousFunnelProcEnd:
;SwitchToRealProc procedure follows.=0D
;NOT USED IN 32 BIT MODE.=0D
;-------------------------------------------------------------------------=
------------=0D
-global ASM_PFX(SwitchToRealProc)=0D
-ASM_PFX(SwitchToRealProc):=0D
SwitchToRealProcStart:=0D
jmp $ ; Never reach here=0D
SwitchToRealProcEnd:=0D
@@ -219,8 +215,6 @@ SwitchToRealProcEnd:
; The last three parameters (Pm16CodeSegment, SevEsAPJumpTable and Wakeup=
Buffer) are=0D
; specific to SEV-ES support and are not applicable on IA32.=0D
;-------------------------------------------------------------------------=
------------=0D
-global ASM_PFX(AsmRelocateApLoop)=0D
-ASM_PFX(AsmRelocateApLoop):=0D
AsmRelocateApLoopStart:=0D
mov eax, esp=0D
mov esp, [eax + 16] ; TopOfApStack=0D
diff --git a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm b/UefiCpuPkg/Lib=
rary/MpInitLib/X64/MpFuncs.nasm
index f1422fd30a..d7e0e1fabd 100644
--- a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
+++ b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
@@ -35,8 +35,6 @@ SECTION .text
;ALSO THIS PROCEDURE IS EXECUTED BY APs ONLY ON 16 BIT MODE. HENCE THIS PR=
OC=0D
;IS IN MACHINE CODE.=0D
;-------------------------------------------------------------------------=
------------=0D
-global ASM_PFX(RendezvousFunnelProc)=0D
-ASM_PFX(RendezvousFunnelProc):=0D
RendezvousFunnelProcStart:=0D
; At this point CS =3D 0x(vv00) and ip=3D 0x0.=0D
; Save BIST information to ebp firstly=0D
@@ -279,8 +277,6 @@ RendezvousFunnelProcEnd:
; r8 - Code32 Selector Offset=0D
; r9 - Stack Start=0D
;-------------------------------------------------------------------------=
------------=0D
-global ASM_PFX(SwitchToRealProc)=0D
-ASM_PFX(SwitchToRealProc):=0D
SwitchToRealProcStart:=0D
BITS 64=0D
cli=0D
@@ -421,8 +417,6 @@ SwitchToRealProcEnd:
;-------------------------------------------------------------------------=
------------=0D
; AsmRelocateApLoop (MwaitSupport, ApTargetCState, PmCodeSegment, TopOfAp=
Stack, CountTofinish, Pm16CodeSegment, SevEsAPJumpTable, WakeupBuffer);=0D
;-------------------------------------------------------------------------=
------------=0D
-global ASM_PFX(AsmRelocateApLoop)=0D
-ASM_PFX(AsmRelocateApLoop):=0D
AsmRelocateApLoopStart:=0D
BITS 64=0D
cmp qword [rsp + 56], 0 ; SevEsAPJumpTable=0D
@@ -594,11 +588,11 @@ AsmRelocateApLoopEnd:
;-------------------------------------------------------------------------=
------------=0D
global ASM_PFX(AsmGetAddressMap)=0D
ASM_PFX(AsmGetAddressMap):=0D
- lea rax, [ASM_PFX(RendezvousFunnelProc)]=0D
+ lea rax, [RendezvousFunnelProcStart]=0D
mov qword [rcx + MP_ASSEMBLY_ADDRESS_MAP.RendezvousFunnelAddres=
s], rax=0D
mov qword [rcx + MP_ASSEMBLY_ADDRESS_MAP.ModeEntryOffset], Long=
ModeStart - RendezvousFunnelProcStart=0D
mov qword [rcx + MP_ASSEMBLY_ADDRESS_MAP.RendezvousFunnelSize],=
RendezvousFunnelProcEnd - RendezvousFunnelProcStart=0D
- lea rax, [ASM_PFX(AsmRelocateApLoop)]=0D
+ lea rax, [AsmRelocateApLoopStart]=0D
mov qword [rcx + MP_ASSEMBLY_ADDRESS_MAP.RelocateApLoopFuncAddr=
ess], rax=0D
mov qword [rcx + MP_ASSEMBLY_ADDRESS_MAP.RelocateApLoopFuncSize=
], AsmRelocateApLoopEnd - AsmRelocateApLoopStart=0D
mov qword [rcx + MP_ASSEMBLY_ADDRESS_MAP.ModeTransitionOffset],=
Flat32Start - RendezvousFunnelProcStart=0D
--=20
2.35.1.windows.2