From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 3817AD807AB for ; Thu, 1 Aug 2024 11:04:18 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=a5N953tSnSa+ZeYIEHdezvXRk3m9rQw6HpYZUF5O9Q8=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1722510258; v=1; b=AHkH/WkJtgXFSoXJ3cWTRb9k83s4+lvl7tWbO63hSDglshozLCY/a7lZ54zHIeVFdAOk29DD 97yKhsNjUNKAIz6QVI4ER2H3cHW4luFjimoeNAyqEJlCiVlVdaxcxr54lfKdlewidAi0nBxWk+p vMqtvzDZJZ4JbJwaSklgMTPU/Ms/b8ddUgkT87XIwpedlCEpus1aJnQxMAUp1Np2cmtefaM82DJ 2dz/sPmIYrgLfVRLOOMIiM10XJfn79u1DUlV3KhmVL6+zhw/2YrsoEhvvwdGdctp6Z9md7V0h+c 1VxQ7CIlUJRoYJsnOIL0207Ixt9UhUpnhb0ZQQbRlK6VA== X-Received: by 127.0.0.2 with SMTP id JRZoYY7687511xziQGsSpyKu; Thu, 01 Aug 2024 04:04:16 -0700 X-Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web11.65544.1722510251005239990 for ; Thu, 01 Aug 2024 04:04:11 -0700 X-Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 3371862428; Thu, 1 Aug 2024 11:04:10 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB872C32786; Thu, 1 Aug 2024 11:04:01 +0000 (UTC) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Abdul Lateef Attar , Abner Chang , Chuong Tran , Graeme Gregory , Marcin Juszkiewicz , Marcin Wojtas , Meenakshi Aggarwal , Narinder Dhillon , Nhi Pham , Paul Grimes , Rebecca Cran , Sami Mujawar , Thomas Abraham , Wenyi Xie , Jeremy Linton , Ling Jia , Peng Xie , Yiqi Shu Subject: [edk2-devel] [PATCH edk2-platforms 1/1] Platform/ ARM AARCH64: Remove ArmPlatformLib MPCore boilerplate Date: Thu, 1 Aug 2024 13:03:48 +0200 Message-Id: <20240801110348.8660-1-ardb@kernel.org> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Thu, 01 Aug 2024 04:04:11 -0700 Resent-From: ardb@kernel.org Reply-To: devel@edk2.groups.io,ardb@kernel.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: fYyD62h7w5BP9OmZjOHnk7JPx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b="AHkH/WkJ"; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) Remove all the ArmPlatformLib routines that are no longer used now that=0D the MPCore SEC drivers have been retired. The prototypes will be removed=0D from the ArmPlatformLib library class in a subsequent EDK2 change.=0D =0D Cc: Leif Lindholm =0D Cc: Abdul Lateef Attar =0D Cc: Abner Chang =0D Cc: Chuong Tran =0D Cc: Graeme Gregory =0D Cc: Marcin Juszkiewicz =0D Cc: Marcin Wojtas =0D Cc: Meenakshi Aggarwal =0D Cc: Narinder Dhillon =0D Cc: Nhi Pham =0D Cc: Paul Grimes =0D Cc: Rebecca Cran =0D Cc: Sami Mujawar =0D Cc: Thomas Abraham =0D Cc: Wenyi Xie =0D Cc: Jeremy Linton =0D Cc: Ling Jia =0D Cc: Peng Xie =0D Cc: Sami Mujawar =0D Cc: Thomas Abraham =0D Cc: Wenyi Xie =0D Cc: Yiqi Shu =0D Signed-off-by: Ard Biesheuvel =0D ---=0D Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c = | 4 --=0D Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c = | 6 --=0D Platform/ARM/JunoPkg/Library/ArmJunoLib/AArch64/ArmJunoHelper.S = | 39 ------------=0D Platform/ARM/JunoPkg/Library/ArmJunoLib/Arm/ArmJunoHelper.S = | 65 --------------------=0D Platform/ARM/Morello/Library/PlatformLib/AArch64/Helper.S = | 56 -----------------=0D Platform/ARM/SgiPkg/Library/PlatformLib/AArch64/Helper.S = | 34 ----------=0D Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/AArch64/RTSMHelper.S = | 41 ------------=0D Platform/BeagleBoard/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelp= er.S | 22 -------=0D Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyHelper.S = | 31 ----------=0D Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Helper.S = | 31 ----------=0D Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelpe= r.S | 33 ----------=0D Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelp= er.S | 33 ----------=0D Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelpe= r.S | 33 ----------=0D Platform/RaspberryPi/Library/PlatformLib/AArch64/RaspberryPiHelper.S = | 27 --------=0D Silicon/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S = | 42 -------------=0D Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/AArch64/Helper.S = | 59 ------------------=0D Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformHelper.S = | 26 --------=0D Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/AArch64/Helper.S = | 31 ----------=0D Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/AArch64/ArmPlatformHelper= .S | 31 ----------=0D Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/ARM/ArmPlatformHelper.S = | 32 ----------=0D Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/AArch64/PhytiumPlatformHel= per.S | 47 --------------=0D Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuHelper.S = | 42 -------------=0D 22 files changed, 765 deletions(-)=0D =0D diff --git a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c b/P= latform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c=0D index eed1a98324b5..24275254815a 100644=0D --- a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c=0D +++ b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c=0D @@ -139,10 +139,6 @@ ArmPlatformInitialize (=0D IN UINTN MpId=0D=0D )=0D=0D {=0D=0D - if (!ArmPlatformIsPrimaryCore (MpId)) {=0D=0D - return RETURN_SUCCESS;=0D=0D - }=0D=0D -=0D=0D // Disable memory remapping and return to normal mapping=0D=0D MmioOr32 (SP810_CTRL_BASE, BIT8);=0D=0D =0D=0D diff --git a/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c b/Silicon/AMD/Styx/= Library/AmdStyxLib/Styx.c=0D index 6627cecc826a..96bc8b3a2063 100644=0D --- a/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c=0D +++ b/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c=0D @@ -68,12 +68,6 @@ ArmPlatformInitialize (=0D IN UINTN MpId=0D=0D )=0D=0D {=0D=0D - if (!ArmPlatformIsPrimaryCore (MpId)) {=0D=0D - return RETURN_SUCCESS;=0D=0D - }=0D=0D -=0D=0D - // XXX Place holder XXX ...=0D=0D -=0D=0D return RETURN_SUCCESS;=0D=0D }=0D=0D =0D=0D diff --git a/Platform/ARM/JunoPkg/Library/ArmJunoLib/AArch64/ArmJunoHelper.= S b/Platform/ARM/JunoPkg/Library/ArmJunoLib/AArch64/ArmJunoHelper.S=0D index e8f7d195b2bd..6a73fde3afe5 100644=0D --- a/Platform/ARM/JunoPkg/Library/ArmJunoLib/AArch64/ArmJunoHelper.S=0D +++ b/Platform/ARM/JunoPkg/Library/ArmJunoLib/AArch64/ArmJunoHelper.S=0D @@ -9,44 +9,5 @@=0D #include =0D=0D #include =0D=0D =0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 2) + CoreId=0D=0D -ASM_FUNC(ArmPlatformGetCorePosition)=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #7=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)=0D=0D - ldr w0, PrimaryCoreMpid=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformIsPrimaryCore)=0D=0D - MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))=0D=0D - and x0, x0, x1=0D=0D -=0D=0D - ldr w1, PrimaryCoreMpid=0D=0D -=0D=0D - cmp w0, w1=0D=0D - cset x0, eq=0D=0D - ret=0D=0D -=0D=0D ASM_FUNC(ArmPlatformPeiBootAction)=0D=0D - // The trusted firmware passes the primary CPU MPID through x0 register.= =0D=0D - // Save it in a variable.=0D=0D - adr x1, PrimaryCoreMpid=0D=0D - str w0, [x1]=0D=0D ret=0D=0D -=0D=0D -PrimaryCoreMpid: .word 0x0=0D=0D diff --git a/Platform/ARM/JunoPkg/Library/ArmJunoLib/Arm/ArmJunoHelper.S b/= Platform/ARM/JunoPkg/Library/ArmJunoLib/Arm/ArmJunoHelper.S=0D index bdd94e3df628..0f5a7169ae6f 100644=0D --- a/Platform/ARM/JunoPkg/Library/ArmJunoLib/Arm/ArmJunoHelper.S=0D +++ b/Platform/ARM/JunoPkg/Library/ArmJunoLib/Arm/ArmJunoHelper.S=0D @@ -9,65 +9,6 @@=0D #include =0D=0D #include =0D=0D =0D=0D -//=0D=0D -// Return the core position from the value of its MpId register=0D=0D -//=0D=0D -// This function returns the core position from the position 0 in the proc= essor.=0D=0D -// This function might be called from assembler before any stack is set.= =0D=0D -//=0D=0D -// @return Return the core position=0D=0D -//=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 2) + CoreId=0D=0D -ASM_FUNC(ArmPlatformGetCorePosition)=0D=0D - and r1, r0, #ARM_CORE_MASK=0D=0D - and r0, r0, #ARM_CLUSTER_MASK=0D=0D - add r0, r1, r0, LSR #7=0D=0D - bx lr=0D=0D -=0D=0D -//=0D=0D -// Return the MpId of the primary core=0D=0D -//=0D=0D -// This function returns the MpId of the primary core.=0D=0D -// This function might be called from assembler before any stack is set.= =0D=0D -//=0D=0D -// @return Return the MpId of the primary core=0D=0D -//=0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)=0D=0D - LDRL (r0, PrimaryCoreMpid)=0D=0D - bx lr=0D=0D -=0D=0D -//=0D=0D -// Return a non-zero value if the callee is the primary core=0D=0D -//=0D=0D -// This function returns a non-zero value if the callee is the primary cor= e.=0D=0D -// The primary core is the core responsible to initialize the hardware and= run UEFI.=0D=0D -// This function might be called from assembler before any stack is set.= =0D=0D -//=0D=0D -// @return Return a non-zero value if the callee is the primary core.= =0D=0D -//=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformIsPrimaryCore)=0D=0D - MOV32 (r1, FixedPcdGet32 (PcdArmPrimaryCoreMask))=0D=0D - and r0, r0, r1=0D=0D -=0D=0D - LDRL (r1, PrimaryCoreMpid)=0D=0D -=0D=0D - cmp r0, r1=0D=0D - moveq r0, #1=0D=0D - movne r0, #0=0D=0D - bx lr=0D=0D -=0D=0D //=0D=0D // First platform specific function to be called in the PEI phase=0D=0D //=0D=0D @@ -76,10 +17,4 @@ ASM_FUNC(ArmPlatformIsPrimaryCore)=0D // the UEFI firmware through the CPU registers.=0D=0D //=0D=0D ASM_FUNC(ArmPlatformPeiBootAction)=0D=0D - // The trusted firmware passes the primary CPU MPID through r0 register.= =0D=0D - // Save it in a variable.=0D=0D - adr r1, PrimaryCoreMpid=0D=0D - str r0, [r1]=0D=0D bx lr=0D=0D -=0D=0D -PrimaryCoreMpid: .word 0x0=0D=0D diff --git a/Platform/ARM/Morello/Library/PlatformLib/AArch64/Helper.S b/Pl= atform/ARM/Morello/Library/PlatformLib/AArch64/Helper.S=0D index 0bc624dfd2b4..25490cfd1acd 100644=0D --- a/Platform/ARM/Morello/Library/PlatformLib/AArch64/Helper.S=0D +++ b/Platform/ARM/Morello/Library/PlatformLib/AArch64/Helper.S=0D @@ -20,59 +20,3 @@=0D //=0D=0D ASM_FUNC(ArmPlatformPeiBootAction)=0D=0D ret=0D=0D -=0D=0D -//=0D=0D -// Return the core position from the value of its MpId register=0D=0D -//=0D=0D -// This function returns core position from the position 0 in the processo= r.=0D=0D -// This function might be called from assembler before any stack is set.= =0D=0D -//=0D=0D -// @return Return the core position=0D=0D -//=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 2) + CoreId=0D=0D -ASM_FUNC(ArmPlatformGetCorePosition)=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #7=0D=0D - ret=0D=0D -=0D=0D -//=0D=0D -// Return the MpId of the primary core=0D=0D -//=0D=0D -// This function returns the MpId of the primary core.=0D=0D -// This function might be called from assembler before any stack is set.= =0D=0D -//=0D=0D -// @return Return the MpId of the primary core=0D=0D -//=0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)=0D=0D - MOV32 (w0, FixedPcdGet32 (PcdArmPrimaryCore))=0D=0D - ret=0D=0D -=0D=0D -//=0D=0D -// Return a non-zero value if the callee is the primary core=0D=0D -//=0D=0D -// This function returns a non-zero value if the callee is the primary cor= e.=0D=0D -// Primary core is the core responsible to initialize hardware and run UEF= I.=0D=0D -// This function might be called from assembler before any stack is set.= =0D=0D -//=0D=0D -// @return Return a non-zero value if the callee is the primary core.= =0D=0D -//=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformIsPrimaryCore)=0D=0D - MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))=0D=0D - and x0, x0, x1=0D=0D - MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCore))=0D=0D - cmp w0, w1=0D=0D - cset x0, eq=0D=0D - ret=0D=0D diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/AArch64/Helper.S b/Pla= tform/ARM/SgiPkg/Library/PlatformLib/AArch64/Helper.S=0D index e2572b51e960..704ac9bbb1cd 100644=0D --- a/Platform/ARM/SgiPkg/Library/PlatformLib/AArch64/Helper.S=0D +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/AArch64/Helper.S=0D @@ -13,9 +13,6 @@=0D .align 3=0D=0D =0D=0D GCC_ASM_EXPORT(ArmPlatformPeiBootAction)=0D=0D -GCC_ASM_EXPORT(ArmPlatformGetCorePosition)=0D=0D -GCC_ASM_EXPORT(ArmPlatformGetPrimaryCoreMpId)=0D=0D -GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)=0D=0D GCC_ASM_IMPORT(NtFwConfigDtBlob)=0D=0D =0D=0D //=0D=0D @@ -31,34 +28,3 @@ ASM_PFX(ArmPlatformPeiBootAction):=0D adr x10, NtFwConfigDtBlob=0D=0D str x0, [x10]=0D=0D ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 2) + CoreId=0D=0D -ASM_PFX(ArmPlatformGetCorePosition):=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #7=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_PFX(ArmPlatformGetPrimaryCoreMpId):=0D=0D - MOV32 (w0, FixedPcdGet32(PcdArmPrimaryCore))=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_PFX(ArmPlatformIsPrimaryCore):=0D=0D - MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCoreMask))=0D=0D - and x0, x0, x1=0D=0D - MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCore))=0D=0D - cmp w0, w1=0D=0D - cset x0, eq=0D=0D - ret=0D=0D diff --git a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/AArch64/RT= SMHelper.S b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/AArch64/RT= SMHelper.S=0D index 65ecf2d94aca..9920452206a0 100644=0D --- a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/AArch64/RTSMHelpe= r.S=0D +++ b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/AArch64/RTSMHelpe= r.S=0D @@ -11,45 +11,4 @@=0D ASM_FUNC(ArmPlatformPeiBootAction)=0D=0D ret=0D=0D =0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)=0D=0D - MOV32 (w0, FixedPcdGet32 (PcdArmPrimaryCore))=0D=0D - ret=0D=0D -=0D=0D -# IN None=0D=0D -# OUT x0 =3D number of cores present in the system=0D=0D -ASM_FUNC(ArmGetCpuCountPerCluster)=0D=0D - MOV32 (w0, FixedPcdGet32 (PcdCoreCount))=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformIsPrimaryCore)=0D=0D - MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))=0D=0D - and x0, x0, x1=0D=0D - MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCore))=0D=0D - cmp w0, w1=0D=0D - b.ne 1f=0D=0D - mov x0, #1=0D=0D - ret=0D=0D -1:=0D=0D - mov x0, #0=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 4) + CoreId=0D=0D -ASM_FUNC(ArmPlatformGetCorePosition)=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #6=0D=0D - ret=0D=0D -=0D=0D ASM_FUNCTION_REMOVE_IF_UNREFERENCED=0D=0D diff --git a/Platform/BeagleBoard/BeagleBoardPkg/Library/BeagleBoardLib/Bea= gleBoardHelper.S b/Platform/BeagleBoard/BeagleBoardPkg/Library/BeagleBoardL= ib/BeagleBoardHelper.S=0D index 313763a5ebdb..007126e86342 100644=0D --- a/Platform/BeagleBoard/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoar= dHelper.S=0D +++ b/Platform/BeagleBoard/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoar= dHelper.S=0D @@ -11,31 +11,9 @@=0D .text=0D=0D .align 2=0D=0D =0D=0D -GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)=0D=0D -GCC_ASM_EXPORT(ArmPlatformGetPrimaryCoreMpId)=0D=0D GCC_ASM_EXPORT(ArmPlatformPeiBootAction)=0D=0D =0D=0D -GCC_ASM_IMPORT(ArmReadMpidr)=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_PFX(ArmPlatformIsPrimaryCore):=0D=0D - // BeagleBoard has a single core. We must always return 1.=0D=0D - mov r0, #1=0D=0D - bx lr=0D=0D -=0D=0D ASM_PFX(ArmPlatformPeiBootAction):=0D=0D bx lr=0D=0D =0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_PFX(ArmPlatformGetPrimaryCoreMpId):=0D=0D - // The BeagleBoard is a uniprocessor platform. The MPIDR of primary core= is=0D=0D - // always the MPIDR of the calling CPU.=0D=0D - b ASM_PFX(ArmReadMpidr)=0D=0D -=0D=0D ASM_FUNCTION_REMOVE_IF_UNREFERENCED=0D=0D diff --git a/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyHelper.S b/Plat= form/Hisilicon/HiKey/Library/HiKeyLib/HiKeyHelper.S=0D index 253b7c6e70f4..4c03e7b7be24 100644=0D --- a/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyHelper.S=0D +++ b/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyHelper.S=0D @@ -10,34 +10,3 @@=0D =0D=0D ASM_FUNC(ArmPlatformPeiBootAction)=0D=0D ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 4) + CoreId=0D=0D -ASM_FUNC(ArmPlatformGetCorePosition)=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #6=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)=0D=0D - MOV32 (w0, FixedPcdGet32(PcdArmPrimaryCore))=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformIsPrimaryCore)=0D=0D - MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCoreMask))=0D=0D - and x0, x0, x1=0D=0D - MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCore))=0D=0D - cmp w0, w1=0D=0D - cset x0, eq=0D=0D - ret=0D=0D diff --git a/Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Helper= .S b/Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Helper.S=0D index a3638cef4dc0..a7bae8805e4b 100644=0D --- a/Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Helper.S=0D +++ b/Platform/Hisilicon/HiKey960/Library/HiKey960Lib/HiKey960Helper.S=0D @@ -13,34 +13,3 @@=0D =0D=0D ASM_FUNC(ArmPlatformPeiBootAction)=0D=0D ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformIsPrimaryCore)=0D=0D - MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCoreMask))=0D=0D - and x0, x0, x1=0D=0D - MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCore))=0D=0D - cmp w0, w1=0D=0D - cset x0, eq=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)=0D=0D - MOV32 (w0, FixedPcdGet32(PcdArmPrimaryCore))=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 4) + CoreId=0D=0D -ASM_FUNC(ArmPlatformGetCorePosition)=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #6=0D=0D - ret=0D=0D diff --git a/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/AArch64/ArmP= latformHelper.S b/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/AArch64= /ArmPlatformHelper.S=0D index b7c6dbdc2e61..1eeb7fed6f19 100644=0D --- a/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatform= Helper.S=0D +++ b/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatform= Helper.S=0D @@ -10,36 +10,3 @@=0D =0D=0D ASM_FUNC(ArmPlatformPeiBootAction)=0D=0D ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 4) + CoreId=0D=0D -ASM_FUNC(ArmPlatformGetCorePosition)=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #6=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)=0D=0D - MOV32 (w0, FixedPcdGet32 (PcdArmPrimaryCore))=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformIsPrimaryCore)=0D=0D - MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))=0D=0D - and x0, x0, x1=0D=0D - MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCore))=0D=0D - cmp w0, w1=0D=0D - mov x0, #1=0D=0D - mov x1, #0=0D=0D - csel x0, x0, x1, eq=0D=0D - ret=0D=0D diff --git a/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/AArch64/Arm= PlatformHelper.S b/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/AArch= 64/ArmPlatformHelper.S=0D index 4f56a1c366ab..1eeb7fed6f19 100644=0D --- a/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/AArch64/ArmPlatfor= mHelper.S=0D +++ b/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/AArch64/ArmPlatfor= mHelper.S=0D @@ -10,36 +10,3 @@=0D =0D=0D ASM_FUNC(ArmPlatformPeiBootAction)=0D=0D ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 4) CoreId=0D=0D -ASM_FUNC(ArmPlatformGetCorePosition)=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #6=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)=0D=0D - MOV32 (w0, FixedPcdGet32 (PcdArmPrimaryCore))=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformIsPrimaryCore)=0D=0D - MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))=0D=0D - and x0, x0, x1=0D=0D - MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCore))=0D=0D - cmp w0, w1=0D=0D - mov x0, #1=0D=0D - mov x1, #0=0D=0D - csel x0, x0, x1, eq=0D=0D - ret=0D=0D diff --git a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/AArch64/ArmP= latformHelper.S b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/AArch64= /ArmPlatformHelper.S=0D index b7c6dbdc2e61..1eeb7fed6f19 100644=0D --- a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatform= Helper.S=0D +++ b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatform= Helper.S=0D @@ -10,36 +10,3 @@=0D =0D=0D ASM_FUNC(ArmPlatformPeiBootAction)=0D=0D ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 4) + CoreId=0D=0D -ASM_FUNC(ArmPlatformGetCorePosition)=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #6=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)=0D=0D - MOV32 (w0, FixedPcdGet32 (PcdArmPrimaryCore))=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformIsPrimaryCore)=0D=0D - MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))=0D=0D - and x0, x0, x1=0D=0D - MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCore))=0D=0D - cmp w0, w1=0D=0D - mov x0, #1=0D=0D - mov x1, #0=0D=0D - csel x0, x0, x1, eq=0D=0D - ret=0D=0D diff --git a/Platform/RaspberryPi/Library/PlatformLib/AArch64/RaspberryPiHe= lper.S b/Platform/RaspberryPi/Library/PlatformLib/AArch64/RaspberryPiHelper= .S=0D index 7008aaf8aa4c..3fb696b13fd3 100644=0D --- a/Platform/RaspberryPi/Library/PlatformLib/AArch64/RaspberryPiHelper.S= =0D +++ b/Platform/RaspberryPi/Library/PlatformLib/AArch64/RaspberryPiHelper.S= =0D @@ -146,31 +146,4 @@ ASM_FUNC (ArmPlatformPeiBootAction)=0D .long 0 // end tag=0D=0D .set .Lclkinfo_size, . - .Lclkinfo_buffer=0D=0D =0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_FUNC (ArmPlatformGetPrimaryCoreMpId)=0D=0D - MOV32 (w0, FixedPcdGet32 (PcdArmPrimaryCore))=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC (ArmPlatformIsPrimaryCore)=0D=0D - mov x0, #1=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 4) + CoreId=0D=0D -ASM_FUNC (ArmPlatformGetCorePosition)=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #6=0D=0D - ret=0D=0D -=0D=0D ASM_FUNCTION_REMOVE_IF_UNREFERENCED=0D=0D diff --git a/Silicon/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S b/Silicon= /AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S=0D index 48cd356f45b0..5c3617321347 100644=0D --- a/Silicon/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S=0D +++ b/Silicon/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S=0D @@ -14,53 +14,11 @@=0D #include =0D=0D #include =0D=0D =0D=0D -PrimaryCoreMpid: .word 0x0=0D=0D -PrimaryCoreBoot: .word 0x0=0D=0D -=0D=0D //VOID=0D=0D //ArmPlatformPeiBootAction (=0D=0D // VOID=0D=0D // );=0D=0D ASM_FUNC(ArmPlatformPeiBootAction)=0D=0D - ldr w0, PrimaryCoreBoot=0D=0D - cbnz w0, 1f=0D=0D -=0D=0D - // Save the primary CPU MPID=0D=0D - mrs x0, mpidr_el1=0D=0D - adr x2, PrimaryCoreMpid=0D=0D - mov w1, #1=0D=0D - stp w0, w1, [x2]=0D=0D -1:=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)=0D=0D - ldr w0, PrimaryCoreMpid=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformIsPrimaryCore)=0D=0D - ldr w1, PrimaryCoreMpid=0D=0D -=0D=0D - cmp w0, w1=0D=0D - cset x0, eq=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 2) + CoreId=0D=0D -ASM_FUNC(ArmPlatformGetCorePosition)=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #7=0D=0D ret=0D=0D =0D=0D ASM_FUNCTION_REMOVE_IF_UNREFERENCED=0D=0D diff --git a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/AArch64/Helper.S= b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/AArch64/Helper.S=0D index 828c383d6892..6a5550da9133 100644=0D --- a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/AArch64/Helper.S=0D +++ b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/AArch64/Helper.S=0D @@ -13,9 +13,6 @@=0D .align 3=0D=0D =0D=0D GCC_ASM_EXPORT(ArmPlatformPeiBootAction)=0D=0D -GCC_ASM_EXPORT(ArmPlatformGetCorePosition)=0D=0D -GCC_ASM_EXPORT(ArmPlatformGetPrimaryCoreMpId)=0D=0D -GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)=0D=0D =0D=0D //=0D=0D // First platform specific function to be called in the PEI phase=0D=0D @@ -28,59 +25,3 @@ ASM_PFX(ArmPlatformPeiBootAction):=0D adr x10, gArgNtFwConfigDtPtr=0D=0D str x0, [x10]=0D=0D ret=0D=0D -=0D=0D -//=0D=0D -// Return the core position from the value of its MpId register=0D=0D -//=0D=0D -// This function returns core position from the position 0 in the processo= r.=0D=0D -// This function might be called from assembler before any stack is set.= =0D=0D -//=0D=0D -// @return Return the core position=0D=0D -//=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 2) + CoreId=0D=0D -ASM_PFX(ArmPlatformGetCorePosition):=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #7=0D=0D - ret=0D=0D -=0D=0D -//=0D=0D -// Return the MpId of the primary core=0D=0D -//=0D=0D -// This function returns the MpId of the primary core.=0D=0D -// This function might be called from assembler before any stack is set.= =0D=0D -//=0D=0D -// @return Return the MpId of the primary core=0D=0D -//=0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_PFX(ArmPlatformGetPrimaryCoreMpId):=0D=0D - MOV32 (w0, FixedPcdGet32(PcdArmPrimaryCore))=0D=0D - ret=0D=0D -=0D=0D -//=0D=0D -// Return a non-zero value if the callee is the primary core=0D=0D -//=0D=0D -// This function returns a non-zero value if the callee is the primary cor= e.=0D=0D -// Primary core is the core responsible to initialize hardware and run UEF= I.=0D=0D -// This function might be called from assembler before any stack is set.= =0D=0D -//=0D=0D -// @return Return a non-zero value if the callee is the primary core.= =0D=0D -//=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_PFX(ArmPlatformIsPrimaryCore):=0D=0D - MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCoreMask))=0D=0D - and x0, x0, x1=0D=0D - MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCore))=0D=0D - cmp w0, w1=0D=0D - cset x0, eq=0D=0D - ret=0D=0D diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatfo= rmHelper.S b/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatfo= rmHelper.S=0D index 770aa9424eed..7f896a4c7ebc 100644=0D --- a/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformHelpe= r.S=0D +++ b/Silicon/Ampere/AmpereAltraPkg/Library/ArmPlatformLib/ArmPlatformHelpe= r.S=0D @@ -16,30 +16,4 @@=0D ASM_FUNC(ArmPlatformPeiBootAction)=0D=0D ret=0D=0D =0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)=0D=0D - MOV32 (w0, FixedPcdGet32 (PcdArmPrimaryCore))=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformIsPrimaryCore)=0D=0D - ldr x0, =3D0x1=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformGetCorePosition)=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #7=0D=0D - ret=0D=0D -=0D=0D ASM_FUNCTION_REMOVE_IF_UNREFERENCED=0D=0D diff --git a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/AArch64/Help= er.S b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/AArch64/Helper.S=0D index 70315041a6b0..8c324b5509f0 100644=0D --- a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/AArch64/Helper.S=0D +++ b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/AArch64/Helper.S=0D @@ -15,35 +15,4 @@=0D ASM_FUNC(ArmPlatformPeiBootAction)=0D=0D ret=0D=0D =0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)=0D=0D - MOV32 (w0, FixedPcdGet32(PcdArmPrimaryCore))=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformIsPrimaryCore)=0D=0D - MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCoreMask))=0D=0D - and x0, x0, x1=0D=0D - MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCore))=0D=0D - cmp w0, w1=0D=0D - cset x0, eq=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 4) + CoreId=0D=0D -ASM_FUNC(ArmPlatformGetCorePosition)=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #6=0D=0D - ret=0D=0D -=0D=0D ASM_FUNCTION_REMOVE_IF_UNREFERENCED=0D=0D diff --git a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/AArch64/ArmPl= atformHelper.S b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/AArch64/A= rmPlatformHelper.S=0D index 6ae908a7b486..81279b39906b 100644=0D --- a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/AArch64/ArmPlatformH= elper.S=0D +++ b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/AArch64/ArmPlatformH= elper.S=0D @@ -15,34 +15,3 @@=0D ASM_FUNC(ArmPlatformPeiBootAction)=0D=0D mov x29, xzr=0D=0D ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 4) + CoreId=0D=0D -ASM_FUNC(ArmPlatformGetCorePosition)=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #6=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)=0D=0D - MOV32 (w0, FixedPcdGet32(PcdArmPrimaryCore))=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformIsPrimaryCore)=0D=0D - MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCoreMask))=0D=0D - and x0, x0, x1=0D=0D - MOV32 (w1, FixedPcdGet32(PcdArmPrimaryCore))=0D=0D - cmp w0, w1=0D=0D - cset x0, eq=0D=0D - ret=0D=0D diff --git a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/ARM/ArmPlatfo= rmHelper.S b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/ARM/ArmPlatfo= rmHelper.S=0D index db43b0f3cc33..2eebc682c85a 100644=0D --- a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/ARM/ArmPlatformHelpe= r.S=0D +++ b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/ARM/ArmPlatformHelpe= r.S=0D @@ -29,35 +29,3 @@ ASM_FUNC(ArmPlatformPeiBootAction)=0D .endif=0D=0D =0D=0D bx lr=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 2) + CoreId=0D=0D -ASM_FUNC(ArmPlatformGetCorePosition)=0D=0D - and r1, r0, #ARM_CORE_MASK=0D=0D - and r0, r0, #ARM_CLUSTER_MASK=0D=0D - add r0, r1, r0, LSR #7=0D=0D - bx lr=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)=0D=0D - MOV32 (r0, FixedPcdGet32(PcdArmPrimaryCore))=0D=0D - bx lr=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformIsPrimaryCore)=0D=0D - MOV32 (r1, FixedPcdGet32(PcdArmPrimaryCoreMask))=0D=0D - and r0, r0, r1=0D=0D - MOV32 (r1, FixedPcdGet32(PcdArmPrimaryCore))=0D=0D - cmp r0, r1=0D=0D - moveq r0, #1=0D=0D - movne r0, #0=0D=0D - bx lr=0D=0D diff --git a/Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/AArch64/Phytiu= mPlatformHelper.S b/Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/AArch64= /PhytiumPlatformHelper.S=0D index cce23b786197..9be8cf7cab25 100644=0D --- a/Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/AArch64/PhytiumPlatfo= rmHelper.S=0D +++ b/Silicon/Phytium/FT2000-4Pkg/Library/PlatformLib/AArch64/PhytiumPlatfo= rmHelper.S=0D @@ -21,56 +21,9 @@=0D .align 2=0D=0D =0D=0D GCC_ASM_EXPORT(ArmPlatformPeiBootAction)=0D=0D -GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)=0D=0D -GCC_ASM_EXPORT(ArmPlatformGetPrimaryCoreMpId)=0D=0D -GCC_ASM_EXPORT(ArmPlatformGetCorePosition)=0D=0D -=0D=0D -PrimaryCoreMpid: .word 0x0=0D=0D =0D=0D =0D=0D ASM_PFX(ArmPlatformPeiBootAction):=0D=0D - // Save MPIDR_EL1[23:0] in a variable.=0D=0D - mov x20, x30=0D=0D - bl ASM_PFX(ArmReadMpidr)=0D=0D - lsl w0, w0, #8=0D=0D - lsr w0, w0, #8=0D=0D - ldr x1, =3DPrimaryCoreMpid=0D=0D - str w0, [x1]=0D=0D - ret x20=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_PFX(ArmPlatformGetPrimaryCoreMpId):=0D=0D - ldr x0, =3DPrimaryCoreMpid=0D=0D - ldr w0, [x0]=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_PFX(ArmPlatformIsPrimaryCore):=0D=0D - mov x20, x30=0D=0D - bl ASM_PFX(ArmReadMpidr)=0D=0D - lsl w0, w0, #8=0D=0D - lsr w0, w0, #8=0D=0D - ldr x1, =3DPrimaryCoreMpid=0D=0D - ldr w1, [x1]=0D=0D - cmp w0, w1=0D=0D - cset x0, eq=0D=0D - ret x20=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 4) + CoreId=0D=0D -ASM_PFX(ArmPlatformGetCorePosition):=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #6=0D=0D ret=0D=0D =0D=0D ASM_FUNCTION_REMOVE_IF_UNREFERENCED=0D=0D diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuHelper.S b/S= ilicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuHelper.S=0D index d4ad1903cabe..ed51f6613a17 100644=0D --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuHelper.S=0D +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuHelper.S=0D @@ -10,46 +10,4 @@=0D ASM_FUNC(ArmPlatformPeiBootAction)=0D=0D ret=0D=0D =0D=0D -//UINTN=0D=0D -//ArmPlatformGetCorePosition (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -// With this function: CorePos =3D (ClusterId * 4) + CoreId=0D=0D -ASM_FUNC(ArmPlatformGetCorePosition)=0D=0D - and x1, x0, #ARM_CORE_MASK=0D=0D - and x0, x0, #ARM_CLUSTER_MASK=0D=0D - add x0, x1, x0, LSR #6=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformGetPrimaryCoreMpId (=0D=0D -// VOID=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)=0D=0D - MOV32 (w0, FixedPcdGet32 (PcdArmPrimaryCore))=0D=0D - ret=0D=0D -=0D=0D -//UINTN=0D=0D -//ArmPlatformIsPrimaryCore (=0D=0D -// IN UINTN MpId=0D=0D -// );=0D=0D -ASM_FUNC(ArmPlatformIsPrimaryCore)=0D=0D - MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))=0D=0D - and x0, x0, x1=0D=0D - MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCore))=0D=0D - cmp w0, w1=0D=0D - mov x0, #1=0D=0D - mov x1, #0=0D=0D - csel x0, x0, x1, eq=0D=0D - ret=0D=0D -=0D=0D -//=0D=0D -// Bits 0..2 of the AA64MFR0_EL1 system register encode the size of the=0D= =0D -// physical address space support on this CPU:=0D=0D -// 0 =3D=3D 32 bits, 1 =3D=3D 36 bits, etc etc=0D=0D -// 6 and 7 are reserved=0D=0D -//=0D=0D -.LPARanges:=0D=0D - .byte 32, 36, 40, 42, 44, 48, -1, -1=0D=0D -=0D=0D ASM_FUNCTION_REMOVE_IF_UNREFERENCED=0D=0D --=0D 2.46.0.rc1.232.g9752f9e123-goog=0D =0D -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120170): https://edk2.groups.io/g/devel/message/120170 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] -=-=-=-=-=-=-=-=-=-=-=-