Re: [edk2-devel] [PATCH v3 05/13] UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable

2024-04-18 Thread Wu, Jiaxin
Sure, I will you split the removal of CpuIndex parameter in a new patch.

Thanks,
Jiaxin

From: Ni, Ray 
Sent: Thursday, April 18, 2024 3:48 PM
To: Wu, Jiaxin ; devel@edk2.groups.io
Cc: Zeng, Star ; Gerd Hoffmann ; Kumar, 
Rahul R 
Subject: Re: [PATCH v3 05/13] UefiCpuPkg/SmmRelocationLib: Remove unnecessary 
global variable

 UINT64
 EFIAPI
 HookReturnFromSmm (
-  IN UINTN CpuIndex,
   IN OUT SMRAM_SAVE_STATE_MAP  *CpuState,
   IN UINT64NewInstructionPointer32,
   IN UINT64NewInstructionPointer
   )
 {
diff --git a/UefiCpuPkg/Library/SmmRelocationLib/X64/Semaphore.c 
b/UefiCpuPkg/Library/SmmRelocationLib/X64/Semaphore.c
index 53f3084363..cd6778e3fc 100644
--- a/UefiCpuPkg/Library/SmmRelocationLib/X64/Semaphore.c
+++ b/UefiCpuPkg/Library/SmmRelocationLib/X64/Semaphore.c
@@ -26,18 +26,16 @@ SmmRelocationSemaphoreComplete32 (
 /**
   Hook return address of SMM Save State so that semaphore code
   can be executed immediately after AP exits SMM to indicate to
   the BSP that an AP has exited SMM after SMBASE relocation.

-  @param[in] CpuIndex The processor index.
   @param[in] RebasedFlag  A pointer to a flag that is set to TRUE
   immediately after AP exits SMM.

 **/
 VOID
 SemaphoreHook (
-  IN UINTN CpuIndex,
   IN volatile BOOLEAN  *RebasedFlag
   )
 {
   SMRAM_SAVE_STATE_MAP  *CpuState;
   UINTN TempValue;
@@ -49,11 +47,10 @@ SemaphoreHook (
 4
 );

   CpuState  = (SMRAM_SAVE_STATE_MAP 
*)(UINTN)(SMM_DEFAULT_SMBASE + SMRAM_SAVE_STATE_MAP_OFFSET);
   mSmmRelocationOriginalAddress = HookReturnFromSmm (
-CpuIndex,
 CpuState,
 
(UINT64)(UINTN),
 
(UINT64)(UINTN)
 );


[Ray] Can you split the removal of CpuIndex parameter in a new patch? Others 
look good to me.

--
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117963): https://edk2.groups.io/g/devel/message/117963
Mute This Topic: https://groups.io/mt/105593573/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v3 05/13] UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable

2024-04-18 Thread Ni, Ray
 UINT64
 EFIAPI
 HookReturnFromSmm (
-  IN UINTN CpuIndex,
   IN OUT SMRAM_SAVE_STATE_MAP  *CpuState,
   IN UINT64NewInstructionPointer32,
   IN UINT64NewInstructionPointer
   )
 {
diff --git a/UefiCpuPkg/Library/SmmRelocationLib/X64/Semaphore.c 
b/UefiCpuPkg/Library/SmmRelocationLib/X64/Semaphore.c
index 53f3084363..cd6778e3fc 100644
--- a/UefiCpuPkg/Library/SmmRelocationLib/X64/Semaphore.c
+++ b/UefiCpuPkg/Library/SmmRelocationLib/X64/Semaphore.c
@@ -26,18 +26,16 @@ SmmRelocationSemaphoreComplete32 (
 /**
   Hook return address of SMM Save State so that semaphore code
   can be executed immediately after AP exits SMM to indicate to
   the BSP that an AP has exited SMM after SMBASE relocation.

-  @param[in] CpuIndex The processor index.
   @param[in] RebasedFlag  A pointer to a flag that is set to TRUE
   immediately after AP exits SMM.

 **/
 VOID
 SemaphoreHook (
-  IN UINTN CpuIndex,
   IN volatile BOOLEAN  *RebasedFlag
   )
 {
   SMRAM_SAVE_STATE_MAP  *CpuState;
   UINTN TempValue;
@@ -49,11 +47,10 @@ SemaphoreHook (
 4
 );

   CpuState  = (SMRAM_SAVE_STATE_MAP 
*)(UINTN)(SMM_DEFAULT_SMBASE + SMRAM_SAVE_STATE_MAP_OFFSET);
   mSmmRelocationOriginalAddress = HookReturnFromSmm (
-CpuIndex,
 CpuState,
 
(UINT64)(UINTN),
 
(UINT64)(UINTN)
 );


[Ray] Can you split the removal of CpuIndex parameter in a new patch? Others 
look good to me.

--
2.16.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117962): https://edk2.groups.io/g/devel/message/117962
Mute This Topic: https://groups.io/mt/105593573/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-