public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm" <quic_llindhol@quicinc.com>
To: <devel@edk2.groups.io>, <ardb@kernel.org>
Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>,
	Abner Chang <abner.chang@amd.com>,
	Chuong Tran <chuong@os.amperecomputing.com>,
	Graeme Gregory <graeme@xora.org.uk>,
	Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>,
	Marcin Wojtas <marcin.s.wojtas@gmail.com>,
	Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>,
	Narinder Dhillon <ndhillon@marvell.com>,
	Nhi Pham <nhi@os.amperecomputing.com>,
	Paul Grimes <paul.grimes@amd.com>,
	Rebecca Cran <rebecca@os.amperecomputing.com>,
	Sami Mujawar <sami.mujawar@arm.com>,
	Thomas Abraham <thomas.abraham@arm.com>,
	Wenyi Xie <xiewenyi2@huawei.com>,
	Jeremy Linton <jeremy.linton@arm.com>,
	Ling Jia <jialing@phytium.com.cn>,
	Peng Xie <xiepeng@phytium.com.cn>,
	Yiqi Shu <shuyiqi@phytium.com.cn>
Subject: Re: [edk2-devel] [PATCH edk2-platforms 1/1] Platform/ ARM AARCH64: Remove\r ArmPlatformLib MPCore boilerplate
Date: Thu, 1 Aug 2024 16:20:30 +0100	[thread overview]
Message-ID: <ZqunvqP2DpVT9i3D@qc-i7.hemma.eciton.net> (raw)
In-Reply-To: <20240801110348.8660-1-ardb@kernel.org>

On Thu, Aug 01, 2024 at 13:03:48 +0200, Ard Biesheuvel wrote:
> Remove all the ArmPlatformLib routines that are no longer used now that
> the MPCore SEC drivers have been retired. The prototypes will be removed
> from the ArmPlatformLib library class in a subsequent EDK2 change.
> 
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Chuong Tran <chuong@os.amperecomputing.com>
> Cc: Graeme Gregory <graeme@xora.org.uk>
> Cc: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
> Cc: Marcin Wojtas <marcin.s.wojtas@gmail.com>
> Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
> Cc: Narinder Dhillon <ndhillon@marvell.com>
> Cc: Nhi Pham <nhi@os.amperecomputing.com>
> Cc: Paul Grimes <paul.grimes@amd.com>
> Cc: Rebecca Cran <rebecca@os.amperecomputing.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Cc: Thomas Abraham <thomas.abraham@arm.com>
> Cc: Wenyi Xie <xiewenyi2@huawei.com>
> Cc: Jeremy Linton <jeremy.linton@arm.com>
> Cc: Ling Jia <jialing@phytium.com.cn>
> Cc: Peng Xie <xiepeng@phytium.com.cn>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Cc: Thomas Abraham <thomas.abraham@arm.com>
> Cc: Wenyi Xie <xiewenyi2@huawei.com>
> Cc: Yiqi Shu <shuyiqi@phytium.com.cn>
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
Thanks!

/
    Leif

> ---
>  Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c                      |  4 --
>  Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c                                      |  6 --
>  Platform/ARM/JunoPkg/Library/ArmJunoLib/AArch64/ArmJunoHelper.S                 | 39 ------------
>  Platform/ARM/JunoPkg/Library/ArmJunoLib/Arm/ArmJunoHelper.S                     | 65 --------------------
>  Platform/ARM/Morello/Library/PlatformLib/AArch64/Helper.S                       | 56 -----------------
>  Platform/ARM/SgiPkg/Library/PlatformLib/AArch64/Helper.S                        | 34 ----------
>  Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/AArch64/RTSMHelper.S        | 41 ------------
>  Platform/BeagleBoard/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.S  | 22 -------
>  Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyHelper.S                         | 31 ----------
>  Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Helper.S                | 31 ----------
>  Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelper.S   | 33 ----------
>  Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelper.S  | 33 ----------
>  Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelper.S   | 33 ----------
>  Platform/RaspberryPi/Library/PlatformLib/AArch64/RaspberryPiHelper.S            | 27 --------
>  Silicon/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S                            | 42 -------------
>  Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/AArch64/Helper.S                  | 59 ------------------
>  Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformHelper.S        | 26 --------
>  Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/AArch64/Helper.S              | 31 ----------
>  Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/AArch64/ArmPlatformHelper.S    | 31 ----------
>  Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/ARM/ArmPlatformHelper.S        | 32 ----------
>  Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/AArch64/PhytiumPlatformHelper.S | 47 --------------
>  Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuHelper.S                      | 42 -------------
>  22 files changed, 765 deletions(-)
> 
> diff --git a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c
> index eed1a98324b5..24275254815a 100644
> --- a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c
> +++ b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c
> @@ -139,10 +139,6 @@ ArmPlatformInitialize (
>    IN  UINTN                     MpId
>    )
>  {
> -  if (!ArmPlatformIsPrimaryCore (MpId)) {
> -    return RETURN_SUCCESS;
> -  }
> -
>    // Disable memory remapping and return to normal mapping
>    MmioOr32 (SP810_CTRL_BASE, BIT8);
>  
> diff --git a/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c b/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c
> index 6627cecc826a..96bc8b3a2063 100644
> --- a/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c
> +++ b/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c
> @@ -68,12 +68,6 @@ ArmPlatformInitialize (
>    IN  UINTN                     MpId
>    )
>  {
> -  if (!ArmPlatformIsPrimaryCore (MpId)) {
> -    return RETURN_SUCCESS;
> -  }
> -
> -  // XXX Place holder XXX ...
> -
>    return RETURN_SUCCESS;
>  }
>  
> diff --git a/Platform/ARM/JunoPkg/Library/ArmJunoLib/AArch64/ArmJunoHelper.S b/Platform/ARM/JunoPkg/Library/ArmJunoLib/AArch64/ArmJunoHelper.S
> index e8f7d195b2bd..6a73fde3afe5 100644
> --- a/Platform/ARM/JunoPkg/Library/ArmJunoLib/AArch64/ArmJunoHelper.S
> +++ b/Platform/ARM/JunoPkg/Library/ArmJunoLib/AArch64/ArmJunoHelper.S
> @@ -9,44 +9,5 @@
>  #include <AsmMacroIoLibV8.h>
>  #include <Library/ArmLib.h>
>  
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 2) + CoreId
> -ASM_FUNC(ArmPlatformGetCorePosition)
> -  and   x1, x0, #ARM_CORE_MASK
> -  and   x0, x0, #ARM_CLUSTER_MASK
> -  add   x0, x1, x0, LSR #7
> -  ret
> -
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
> -  ldr   w0, PrimaryCoreMpid
> -  ret
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC(ArmPlatformIsPrimaryCore)
> -  MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))
> -  and   x0, x0, x1
> -
> -  ldr   w1, PrimaryCoreMpid
> -
> -  cmp   w0, w1
> -  cset  x0, eq
> -  ret
> -
>  ASM_FUNC(ArmPlatformPeiBootAction)
> -  // The trusted firmware passes the primary CPU MPID through x0 register.
> -  // Save it in a variable.
> -  adr  x1, PrimaryCoreMpid
> -  str  w0, [x1]
>    ret
> -
> -PrimaryCoreMpid:  .word    0x0
> diff --git a/Platform/ARM/JunoPkg/Library/ArmJunoLib/Arm/ArmJunoHelper.S b/Platform/ARM/JunoPkg/Library/ArmJunoLib/Arm/ArmJunoHelper.S
> index bdd94e3df628..0f5a7169ae6f 100644
> --- a/Platform/ARM/JunoPkg/Library/ArmJunoLib/Arm/ArmJunoHelper.S
> +++ b/Platform/ARM/JunoPkg/Library/ArmJunoLib/Arm/ArmJunoHelper.S
> @@ -9,65 +9,6 @@
>  #include <AsmMacroIoLib.h>
>  #include <Library/ArmLib.h>
>  
> -//
> -// Return the core position from the value of its MpId register
> -//
> -// This function returns the core position from the position 0 in the processor.
> -// This function might be called from assembler before any stack is set.
> -//
> -// @return   Return the core position
> -//
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 2) + CoreId
> -ASM_FUNC(ArmPlatformGetCorePosition)
> -  and   r1, r0, #ARM_CORE_MASK
> -  and   r0, r0, #ARM_CLUSTER_MASK
> -  add   r0, r1, r0, LSR #7
> -  bx    lr
> -
> -//
> -// Return the MpId of the primary core
> -//
> -// This function returns the MpId of the primary core.
> -// This function might be called from assembler before any stack is set.
> -//
> -// @return   Return the MpId of the primary core
> -//
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
> -  LDRL  (r0, PrimaryCoreMpid)
> -  bx    lr
> -
> -//
> -// Return a non-zero value if the callee is the primary core
> -//
> -// This function returns a non-zero value if the callee is the primary core.
> -// The primary core is the core responsible to initialize the hardware and run UEFI.
> -// This function might be called from assembler before any stack is set.
> -//
> -//  @return   Return a non-zero value if the callee is the primary core.
> -//
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC(ArmPlatformIsPrimaryCore)
> -  MOV32 (r1, FixedPcdGet32 (PcdArmPrimaryCoreMask))
> -  and   r0, r0, r1
> -
> -  LDRL  (r1, PrimaryCoreMpid)
> -
> -  cmp   r0, r1
> -  moveq r0, #1
> -  movne r0, #0
> -  bx    lr
> -
>  //
>  // First platform specific function to be called in the PEI phase
>  //
> @@ -76,10 +17,4 @@ ASM_FUNC(ArmPlatformIsPrimaryCore)
>  // the UEFI firmware through the CPU registers.
>  //
>  ASM_FUNC(ArmPlatformPeiBootAction)
> -  // The trusted firmware passes the primary CPU MPID through r0 register.
> -  // Save it in a variable.
> -  adr  r1, PrimaryCoreMpid
> -  str  r0, [r1]
>    bx   lr
> -
> -PrimaryCoreMpid:  .word    0x0
> diff --git a/Platform/ARM/Morello/Library/PlatformLib/AArch64/Helper.S b/Platform/ARM/Morello/Library/PlatformLib/AArch64/Helper.S
> index 0bc624dfd2b4..25490cfd1acd 100644
> --- a/Platform/ARM/Morello/Library/PlatformLib/AArch64/Helper.S
> +++ b/Platform/ARM/Morello/Library/PlatformLib/AArch64/Helper.S
> @@ -20,59 +20,3 @@
>  //
>  ASM_FUNC(ArmPlatformPeiBootAction)
>    ret
> -
> -//
> -// Return the core position from the value of its MpId register
> -//
> -// This function returns core position from the position 0 in the processor.
> -// This function might be called from assembler before any stack is set.
> -//
> -// @return   Return the core position
> -//
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 2) + CoreId
> -ASM_FUNC(ArmPlatformGetCorePosition)
> -  and   x1, x0, #ARM_CORE_MASK
> -  and   x0, x0, #ARM_CLUSTER_MASK
> -  add   x0, x1, x0, LSR #7
> -  ret
> -
> -//
> -// Return the MpId of the primary core
> -//
> -// This function returns the MpId of the primary core.
> -// This function might be called from assembler before any stack is set.
> -//
> -// @return   Return the MpId of the primary core
> -//
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
> -  MOV32 (w0, FixedPcdGet32 (PcdArmPrimaryCore))
> -  ret
> -
> -//
> -// Return a non-zero value if the callee is the primary core
> -//
> -// This function returns a non-zero value if the callee is the primary core.
> -// Primary core is the core responsible to initialize hardware and run UEFI.
> -// This function might be called from assembler before any stack is set.
> -//
> -//  @return   Return a non-zero value if the callee is the primary core.
> -//
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC(ArmPlatformIsPrimaryCore)
> -  MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))
> -  and   x0, x0, x1
> -  MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCore))
> -  cmp   w0, w1
> -  cset  x0, eq
> -  ret
> diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/AArch64/Helper.S b/Platform/ARM/SgiPkg/Library/PlatformLib/AArch64/Helper.S
> index e2572b51e960..704ac9bbb1cd 100644
> --- a/Platform/ARM/SgiPkg/Library/PlatformLib/AArch64/Helper.S
> +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/AArch64/Helper.S
> @@ -13,9 +13,6 @@
>  .align 3
>  
>  GCC_ASM_EXPORT(ArmPlatformPeiBootAction)
> -GCC_ASM_EXPORT(ArmPlatformGetCorePosition)
> -GCC_ASM_EXPORT(ArmPlatformGetPrimaryCoreMpId)
> -GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)
>  GCC_ASM_IMPORT(NtFwConfigDtBlob)
>  
>  //
> @@ -31,34 +28,3 @@ ASM_PFX(ArmPlatformPeiBootAction):
>    adr  x10, NtFwConfigDtBlob
>    str  x0, [x10]
>    ret
> -
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 2) + CoreId
> -ASM_PFX(ArmPlatformGetCorePosition):
> -  and   x1, x0, #ARM_CORE_MASK
> -  and   x0, x0, #ARM_CLUSTER_MASK
> -  add   x0, x1, x0, LSR #7
> -  ret
> -
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_PFX(ArmPlatformGetPrimaryCoreMpId):
> -  MOV32 (w0, FixedPcdGet32(PcdArmPrimaryCore))
> -  ret
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_PFX(ArmPlatformIsPrimaryCore):
> -  MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCoreMask))
> -  and   x0, x0, x1
> -  MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCore))
> -  cmp   w0, w1
> -  cset  x0, eq
> -  ret
> diff --git a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/AArch64/RTSMHelper.S b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/AArch64/RTSMHelper.S
> index 65ecf2d94aca..9920452206a0 100644
> --- a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/AArch64/RTSMHelper.S
> +++ b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/AArch64/RTSMHelper.S
> @@ -11,45 +11,4 @@
>  ASM_FUNC(ArmPlatformPeiBootAction)
>    ret
>  
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
> -  MOV32  (w0, FixedPcdGet32 (PcdArmPrimaryCore))
> -  ret
> -
> -# IN None
> -# OUT x0 = number of cores present in the system
> -ASM_FUNC(ArmGetCpuCountPerCluster)
> -  MOV32  (w0, FixedPcdGet32 (PcdCoreCount))
> -  ret
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC(ArmPlatformIsPrimaryCore)
> -  MOV32  (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))
> -  and   x0, x0, x1
> -  MOV32  (w1, FixedPcdGet32 (PcdArmPrimaryCore))
> -  cmp   w0, w1
> -  b.ne  1f
> -  mov   x0, #1
> -  ret
> -1:
> -  mov   x0, #0
> -  ret
> -
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 4) + CoreId
> -ASM_FUNC(ArmPlatformGetCorePosition)
> -  and   x1, x0, #ARM_CORE_MASK
> -  and   x0, x0, #ARM_CLUSTER_MASK
> -  add   x0, x1, x0, LSR #6
> -  ret
> -
>  ASM_FUNCTION_REMOVE_IF_UNREFERENCED
> diff --git a/Platform/BeagleBoard/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.S b/Platform/BeagleBoard/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.S
> index 313763a5ebdb..007126e86342 100644
> --- a/Platform/BeagleBoard/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.S
> +++ b/Platform/BeagleBoard/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.S
> @@ -11,31 +11,9 @@
>  .text
>  .align 2
>  
> -GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)
> -GCC_ASM_EXPORT(ArmPlatformGetPrimaryCoreMpId)
>  GCC_ASM_EXPORT(ArmPlatformPeiBootAction)
>  
> -GCC_ASM_IMPORT(ArmReadMpidr)
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_PFX(ArmPlatformIsPrimaryCore):
> -  // BeagleBoard has a single core. We must always return 1.
> -  mov   r0, #1
> -  bx    lr
> -
>  ASM_PFX(ArmPlatformPeiBootAction):
>    bx    lr
>  
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_PFX(ArmPlatformGetPrimaryCoreMpId):
> -  // The BeagleBoard is a uniprocessor platform. The MPIDR of primary core is
> -  // always the MPIDR of the calling CPU.
> -  b   ASM_PFX(ArmReadMpidr)
> -
>  ASM_FUNCTION_REMOVE_IF_UNREFERENCED
> diff --git a/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyHelper.S b/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyHelper.S
> index 253b7c6e70f4..4c03e7b7be24 100644
> --- a/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyHelper.S
> +++ b/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyHelper.S
> @@ -10,34 +10,3 @@
>  
>  ASM_FUNC(ArmPlatformPeiBootAction)
>    ret
> -
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 4) + CoreId
> -ASM_FUNC(ArmPlatformGetCorePosition)
> -  and   x1, x0, #ARM_CORE_MASK
> -  and   x0, x0, #ARM_CLUSTER_MASK
> -  add   x0, x1, x0, LSR #6
> -  ret
> -
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
> -  MOV32 (w0, FixedPcdGet32(PcdArmPrimaryCore))
> -  ret
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC(ArmPlatformIsPrimaryCore)
> -  MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCoreMask))
> -  and   x0, x0, x1
> -  MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCore))
> -  cmp   w0, w1
> -  cset  x0, eq
> -  ret
> diff --git a/Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Helper.S b/Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Helper.S
> index a3638cef4dc0..a7bae8805e4b 100644
> --- a/Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Helper.S
> +++ b/Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Helper.S
> @@ -13,34 +13,3 @@
>  
>  ASM_FUNC(ArmPlatformPeiBootAction)
>    ret
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC(ArmPlatformIsPrimaryCore)
> -  MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCoreMask))
> -  and   x0, x0, x1
> -  MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCore))
> -  cmp   w0, w1
> -  cset  x0, eq
> -  ret
> -
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
> -  MOV32 (w0, FixedPcdGet32(PcdArmPrimaryCore))
> -  ret
> -
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 4) + CoreId
> -ASM_FUNC(ArmPlatformGetCorePosition)
> -  and   x1, x0, #ARM_CORE_MASK
> -  and   x0, x0, #ARM_CLUSTER_MASK
> -  add   x0, x1, x0, LSR #6
> -  ret
> diff --git a/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelper.S b/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelper.S
> index b7c6dbdc2e61..1eeb7fed6f19 100644
> --- a/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelper.S
> +++ b/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelper.S
> @@ -10,36 +10,3 @@
>  
>  ASM_FUNC(ArmPlatformPeiBootAction)
>    ret
> -
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 4) + CoreId
> -ASM_FUNC(ArmPlatformGetCorePosition)
> -  and   x1, x0, #ARM_CORE_MASK
> -  and   x0, x0, #ARM_CLUSTER_MASK
> -  add   x0, x1, x0, LSR #6
> -  ret
> -
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
> -  MOV32  (w0, FixedPcdGet32 (PcdArmPrimaryCore))
> -  ret
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC(ArmPlatformIsPrimaryCore)
> -  MOV32  (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))
> -  and   x0, x0, x1
> -  MOV32  (w1, FixedPcdGet32 (PcdArmPrimaryCore))
> -  cmp   w0, w1
> -  mov   x0, #1
> -  mov   x1, #0
> -  csel  x0, x0, x1, eq
> -  ret
> diff --git a/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelper.S b/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelper.S
> index 4f56a1c366ab..1eeb7fed6f19 100644
> --- a/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelper.S
> +++ b/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelper.S
> @@ -10,36 +10,3 @@
>  
>  ASM_FUNC(ArmPlatformPeiBootAction)
>    ret
> -
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 4)  CoreId
> -ASM_FUNC(ArmPlatformGetCorePosition)
> -  and   x1, x0, #ARM_CORE_MASK
> -  and   x0, x0, #ARM_CLUSTER_MASK
> -  add   x0, x1, x0, LSR #6
> -  ret
> -
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
> -  MOV32  (w0, FixedPcdGet32 (PcdArmPrimaryCore))
> -  ret
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC(ArmPlatformIsPrimaryCore)
> -  MOV32  (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))
> -  and   x0, x0, x1
> -  MOV32  (w1, FixedPcdGet32 (PcdArmPrimaryCore))
> -  cmp   w0, w1
> -  mov   x0, #1
> -  mov   x1, #0
> -  csel  x0, x0, x1, eq
> -  ret
> diff --git a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelper.S b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelper.S
> index b7c6dbdc2e61..1eeb7fed6f19 100644
> --- a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelper.S
> +++ b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelper.S
> @@ -10,36 +10,3 @@
>  
>  ASM_FUNC(ArmPlatformPeiBootAction)
>    ret
> -
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 4) + CoreId
> -ASM_FUNC(ArmPlatformGetCorePosition)
> -  and   x1, x0, #ARM_CORE_MASK
> -  and   x0, x0, #ARM_CLUSTER_MASK
> -  add   x0, x1, x0, LSR #6
> -  ret
> -
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
> -  MOV32  (w0, FixedPcdGet32 (PcdArmPrimaryCore))
> -  ret
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC(ArmPlatformIsPrimaryCore)
> -  MOV32  (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))
> -  and   x0, x0, x1
> -  MOV32  (w1, FixedPcdGet32 (PcdArmPrimaryCore))
> -  cmp   w0, w1
> -  mov   x0, #1
> -  mov   x1, #0
> -  csel  x0, x0, x1, eq
> -  ret
> diff --git a/Platform/RaspberryPi/Library/PlatformLib/AArch64/RaspberryPiHelper.S b/Platform/RaspberryPi/Library/PlatformLib/AArch64/RaspberryPiHelper.S
> index 7008aaf8aa4c..3fb696b13fd3 100644
> --- a/Platform/RaspberryPi/Library/PlatformLib/AArch64/RaspberryPiHelper.S
> +++ b/Platform/RaspberryPi/Library/PlatformLib/AArch64/RaspberryPiHelper.S
> @@ -146,31 +146,4 @@ ASM_FUNC (ArmPlatformPeiBootAction)
>      .long   0                           // end tag
>      .set    .Lclkinfo_size, . - .Lclkinfo_buffer
>  
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_FUNC (ArmPlatformGetPrimaryCoreMpId)
> -    MOV32  (w0, FixedPcdGet32 (PcdArmPrimaryCore))
> -    ret
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC (ArmPlatformIsPrimaryCore)
> -    mov   x0, #1
> -    ret
> -
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 4) + CoreId
> -ASM_FUNC (ArmPlatformGetCorePosition)
> -    and   x1, x0, #ARM_CORE_MASK
> -    and   x0, x0, #ARM_CLUSTER_MASK
> -    add   x0, x1, x0, LSR #6
> -    ret
> -
>  ASM_FUNCTION_REMOVE_IF_UNREFERENCED
> diff --git a/Silicon/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S b/Silicon/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S
> index 48cd356f45b0..5c3617321347 100644
> --- a/Silicon/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S
> +++ b/Silicon/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S
> @@ -14,53 +14,11 @@
>  #include <AsmMacroIoLibV8.h>
>  #include <Library/ArmLib.h>
>  
> -PrimaryCoreMpid:  .word    0x0
> -PrimaryCoreBoot:  .word    0x0
> -
>  //VOID
>  //ArmPlatformPeiBootAction (
>  //  VOID
>  //  );
>  ASM_FUNC(ArmPlatformPeiBootAction)
> -  ldr  w0, PrimaryCoreBoot
> -  cbnz w0, 1f
> -
> -  // Save the primary CPU MPID
> -  mrs  x0, mpidr_el1
> -  adr  x2, PrimaryCoreMpid
> -  mov  w1, #1
> -  stp  w0, w1, [x2]
> -1:
> -  ret
> -
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
> -  ldr   w0, PrimaryCoreMpid
> -  ret
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC(ArmPlatformIsPrimaryCore)
> -  ldr   w1, PrimaryCoreMpid
> -
> -  cmp   w0, w1
> -  cset  x0, eq
> -  ret
> -
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 2) + CoreId
> -ASM_FUNC(ArmPlatformGetCorePosition)
> -  and   x1, x0, #ARM_CORE_MASK
> -  and   x0, x0, #ARM_CLUSTER_MASK
> -  add   x0, x1, x0, LSR #7
>    ret
>  
>  ASM_FUNCTION_REMOVE_IF_UNREFERENCED
> diff --git a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/AArch64/Helper.S b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/AArch64/Helper.S
> index 828c383d6892..6a5550da9133 100644
> --- a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/AArch64/Helper.S
> +++ b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/AArch64/Helper.S
> @@ -13,9 +13,6 @@
>  .align 3
>  
>  GCC_ASM_EXPORT(ArmPlatformPeiBootAction)
> -GCC_ASM_EXPORT(ArmPlatformGetCorePosition)
> -GCC_ASM_EXPORT(ArmPlatformGetPrimaryCoreMpId)
> -GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)
>  
>  //
>  // First platform specific function to be called in the PEI phase
> @@ -28,59 +25,3 @@ ASM_PFX(ArmPlatformPeiBootAction):
>    adr  x10, gArgNtFwConfigDtPtr
>    str  x0, [x10]
>    ret
> -
> -//
> -// Return the core position from the value of its MpId register
> -//
> -// This function returns core position from the position 0 in the processor.
> -// This function might be called from assembler before any stack is set.
> -//
> -// @return   Return the core position
> -//
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 2) + CoreId
> -ASM_PFX(ArmPlatformGetCorePosition):
> -  and   x1, x0, #ARM_CORE_MASK
> -  and   x0, x0, #ARM_CLUSTER_MASK
> -  add   x0, x1, x0, LSR #7
> -  ret
> -
> -//
> -// Return the MpId of the primary core
> -//
> -// This function returns the MpId of the primary core.
> -// This function might be called from assembler before any stack is set.
> -//
> -// @return   Return the MpId of the primary core
> -//
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_PFX(ArmPlatformGetPrimaryCoreMpId):
> -  MOV32 (w0, FixedPcdGet32(PcdArmPrimaryCore))
> -  ret
> -
> -//
> -// Return a non-zero value if the callee is the primary core
> -//
> -// This function returns a non-zero value if the callee is the primary core.
> -// Primary core is the core responsible to initialize hardware and run UEFI.
> -// This function might be called from assembler before any stack is set.
> -//
> -//  @return   Return a non-zero value if the callee is the primary core.
> -//
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_PFX(ArmPlatformIsPrimaryCore):
> -  MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCoreMask))
> -  and   x0, x0, x1
> -  MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCore))
> -  cmp   w0, w1
> -  cset  x0, eq
> -  ret
> diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformHelper.S b/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformHelper.S
> index 770aa9424eed..7f896a4c7ebc 100644
> --- a/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformHelper.S
> +++ b/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformHelper.S
> @@ -16,30 +16,4 @@
>  ASM_FUNC(ArmPlatformPeiBootAction)
>    ret
>  
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
> -  MOV32  (w0, FixedPcdGet32 (PcdArmPrimaryCore))
> -  ret
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC(ArmPlatformIsPrimaryCore)
> -  ldr   x0, =0x1
> -  ret
> -
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC(ArmPlatformGetCorePosition)
> -  and   x1, x0, #ARM_CORE_MASK
> -  and   x0, x0, #ARM_CLUSTER_MASK
> -  add   x0, x1, x0, LSR #7
> -  ret
> -
>  ASM_FUNCTION_REMOVE_IF_UNREFERENCED
> diff --git a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/AArch64/Helper.S b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/AArch64/Helper.S
> index 70315041a6b0..8c324b5509f0 100644
> --- a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/AArch64/Helper.S
> +++ b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/AArch64/Helper.S
> @@ -15,35 +15,4 @@
>  ASM_FUNC(ArmPlatformPeiBootAction)
>    ret
>  
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
> -  MOV32 (w0, FixedPcdGet32(PcdArmPrimaryCore))
> -  ret
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC(ArmPlatformIsPrimaryCore)
> -  MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCoreMask))
> -  and   x0, x0, x1
> -  MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCore))
> -  cmp   w0, w1
> -  cset  x0, eq
> -  ret
> -
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 4) + CoreId
> -ASM_FUNC(ArmPlatformGetCorePosition)
> -  and   x1, x0, #ARM_CORE_MASK
> -  and   x0, x0, #ARM_CLUSTER_MASK
> -  add   x0, x1, x0, LSR #6
> -  ret
> -
>  ASM_FUNCTION_REMOVE_IF_UNREFERENCED
> diff --git a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/AArch64/ArmPlatformHelper.S b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/AArch64/ArmPlatformHelper.S
> index 6ae908a7b486..81279b39906b 100644
> --- a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/AArch64/ArmPlatformHelper.S
> +++ b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/AArch64/ArmPlatformHelper.S
> @@ -15,34 +15,3 @@
>  ASM_FUNC(ArmPlatformPeiBootAction)
>    mov   x29, xzr
>    ret
> -
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 4) + CoreId
> -ASM_FUNC(ArmPlatformGetCorePosition)
> -  and   x1, x0, #ARM_CORE_MASK
> -  and   x0, x0, #ARM_CLUSTER_MASK
> -  add   x0, x1, x0, LSR #6
> -  ret
> -
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
> -  MOV32 (w0, FixedPcdGet32(PcdArmPrimaryCore))
> -  ret
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC(ArmPlatformIsPrimaryCore)
> -  MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCoreMask))
> -  and   x0, x0, x1
> -  MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCore))
> -  cmp   w0, w1
> -  cset  x0, eq
> -  ret
> diff --git a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/ARM/ArmPlatformHelper.S b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/ARM/ArmPlatformHelper.S
> index db43b0f3cc33..2eebc682c85a 100644
> --- a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/ARM/ArmPlatformHelper.S
> +++ b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/ARM/ArmPlatformHelper.S
> @@ -29,35 +29,3 @@ ASM_FUNC(ArmPlatformPeiBootAction)
>    .endif
>  
>    bx    lr
> -
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 2) + CoreId
> -ASM_FUNC(ArmPlatformGetCorePosition)
> -  and   r1, r0, #ARM_CORE_MASK
> -  and   r0, r0, #ARM_CLUSTER_MASK
> -  add   r0, r1, r0, LSR #7
> -  bx    lr
> -
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
> -  MOV32 (r0, FixedPcdGet32(PcdArmPrimaryCore))
> -  bx    lr
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC(ArmPlatformIsPrimaryCore)
> -  MOV32 (r1, FixedPcdGet32(PcdArmPrimaryCoreMask))
> -  and   r0, r0, r1
> -  MOV32 (r1, FixedPcdGet32(PcdArmPrimaryCore))
> -  cmp   r0, r1
> -  moveq r0, #1
> -  movne r0, #0
> -  bx    lr
> diff --git a/Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/AArch64/PhytiumPlatformHelper.S b/Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/AArch64/PhytiumPlatformHelper.S
> index cce23b786197..9be8cf7cab25 100644
> --- a/Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/AArch64/PhytiumPlatformHelper.S
> +++ b/Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/AArch64/PhytiumPlatformHelper.S
> @@ -21,56 +21,9 @@
>  .align 2
>  
>  GCC_ASM_EXPORT(ArmPlatformPeiBootAction)
> -GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)
> -GCC_ASM_EXPORT(ArmPlatformGetPrimaryCoreMpId)
> -GCC_ASM_EXPORT(ArmPlatformGetCorePosition)
> -
> -PrimaryCoreMpid:  .word    0x0
>  
>  
>  ASM_PFX(ArmPlatformPeiBootAction):
> -  // Save MPIDR_EL1[23:0] in a variable.
> -  mov   x20, x30
> -  bl    ASM_PFX(ArmReadMpidr)
> -  lsl   w0, w0, #8
> -  lsr   w0, w0, #8
> -  ldr   x1, =PrimaryCoreMpid
> -  str   w0, [x1]
> -  ret   x20
> -
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_PFX(ArmPlatformGetPrimaryCoreMpId):
> -  ldr   x0, =PrimaryCoreMpid
> -  ldr   w0, [x0]
> -  ret
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_PFX(ArmPlatformIsPrimaryCore):
> -  mov   x20, x30
> -  bl    ASM_PFX(ArmReadMpidr)
> -  lsl   w0, w0, #8
> -  lsr   w0, w0, #8
> -  ldr   x1, =PrimaryCoreMpid
> -  ldr   w1, [x1]
> -  cmp   w0, w1
> -  cset  x0, eq
> -  ret   x20
> -
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 4) + CoreId
> -ASM_PFX(ArmPlatformGetCorePosition):
> -  and   x1, x0, #ARM_CORE_MASK
> -  and   x0, x0, #ARM_CLUSTER_MASK
> -  add   x0, x1, x0, LSR #6
>    ret
>  
>  ASM_FUNCTION_REMOVE_IF_UNREFERENCED
> diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuHelper.S b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuHelper.S
> index d4ad1903cabe..ed51f6613a17 100644
> --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuHelper.S
> +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuHelper.S
> @@ -10,46 +10,4 @@
>  ASM_FUNC(ArmPlatformPeiBootAction)
>    ret
>  
> -//UINTN
> -//ArmPlatformGetCorePosition (
> -//  IN UINTN MpId
> -//  );
> -// With this function: CorePos = (ClusterId * 4) + CoreId
> -ASM_FUNC(ArmPlatformGetCorePosition)
> -  and   x1, x0, #ARM_CORE_MASK
> -  and   x0, x0, #ARM_CLUSTER_MASK
> -  add   x0, x1, x0, LSR #6
> -  ret
> -
> -//UINTN
> -//ArmPlatformGetPrimaryCoreMpId (
> -//  VOID
> -//  );
> -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
> -  MOV32  (w0, FixedPcdGet32 (PcdArmPrimaryCore))
> -  ret
> -
> -//UINTN
> -//ArmPlatformIsPrimaryCore (
> -//  IN UINTN MpId
> -//  );
> -ASM_FUNC(ArmPlatformIsPrimaryCore)
> -  MOV32  (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))
> -  and   x0, x0, x1
> -  MOV32  (w1, FixedPcdGet32 (PcdArmPrimaryCore))
> -  cmp   w0, w1
> -  mov   x0, #1
> -  mov   x1, #0
> -  csel  x0, x0, x1, eq
> -  ret
> -
> -//
> -// Bits 0..2 of the AA64MFR0_EL1 system register encode the size of the
> -// physical address space support on this CPU:
> -// 0 == 32 bits, 1 == 36 bits, etc etc
> -// 6 and 7 are reserved
> -//
> -.LPARanges:
> -  .byte 32, 36, 40, 42, 44, 48, -1, -1
> -
>  ASM_FUNCTION_REMOVE_IF_UNREFERENCED
> --
> 2.46.0.rc1.232.g9752f9e123-goog
> 
> 
> 
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120184): https://edk2.groups.io/g/devel/message/120184
Mute This Topic: https://groups.io/mt/107662920/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-08-01 15:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-01 11:03 [edk2-devel] [PATCH edk2-platforms 1/1] Platform/ ARM AARCH64: Remove ArmPlatformLib MPCore boilerplate Ard Biesheuvel
2024-08-01 15:20 ` Leif Lindholm [this message]
2024-08-01 15:42 ` Nhi Pham via groups.io
2024-08-27 14:37   ` Ard Biesheuvel via groups.io

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZqunvqP2DpVT9i3D@qc-i7.hemma.eciton.net \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox