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 A9459D800EA for ; Thu, 1 Aug 2024 15:20:47 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=osaDShvo2cll/GaIkZo1cGUNmHmRIAtQ3R00084PrkM=; c=relaxed/simple; d=groups.io; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20240206; t=1722525647; v=1; b=Hk7ZSqGlLEcT+2gEJ5Cf2tZq9RvBjqqmaeFTiE6tGVQWsz+y/JOoZp7114E7jjz3jD0deYBI wwKjURa7GfBTHPZHSda+Qqg9S5mRwtxxTUEXdev4pZyccICMZRFaNP6lkBEJ1GmEB3gHjSnYzkX TXDFjHeMwVphwjgRV91cdj2k80zulqpi06W3yUEVgIK1Pr1zDB4srUrHTHLIk4Mr9S15Uw3oYsm dzjHTOTB+5yi+H/HLRqEjdeN6RbkO5BWG0ZUswPu/zvLbSqe6xveWk4Q4SmG963we2a+nTKdYo/ xavMdDcpRmualXYW4zwBP/UBk5rOhs8KvbWRisfguXQuQ== X-Received: by 127.0.0.2 with SMTP id 1VovYY7687511xIJWcPRYJpS; Thu, 01 Aug 2024 08:20:46 -0700 X-Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.web10.71178.1722525645583281336 for ; Thu, 01 Aug 2024 08:20:45 -0700 X-Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 471DbHE2005493; Thu, 1 Aug 2024 15:20:40 GMT X-Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 40pw458vbg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Aug 2024 15:20:40 +0000 (GMT) X-Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA05.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 471FKdJW001815 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 1 Aug 2024 15:20:39 GMT X-Received: from qc-i7.hemma.eciton.net (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Thu, 1 Aug 2024 08:20:34 -0700 Date: Thu, 1 Aug 2024 16:20:30 +0100 From: "Leif Lindholm" To: , CC: 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: Re: [edk2-devel] [PATCH edk2-platforms 1/1] Platform/ ARM AARCH64: Remove ArmPlatformLib MPCore boilerplate Message-ID: References: <20240801110348.8660-1-ardb@kernel.org> MIME-Version: 1.0 In-Reply-To: <20240801110348.8660-1-ardb@kernel.org> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-GUID: OKQ8LAs7eCV_pHw87UQ4fKxteR5C_uRR X-Proofpoint-ORIG-GUID: OKQ8LAs7eCV_pHw87UQ4fKxteR5C_uRR 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 08:20:45 -0700 Resent-From: quic_llindhol@quicinc.com Reply-To: devel@edk2.groups.io,quic_llindhol@quicinc.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 137k2ofX4FP23Ni6ntdffmL0x7686176AA= Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=Hk7ZSqGl; 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=quicinc.com (policy=none) 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 > Cc: Abdul Lateef Attar > Cc: Abner Chang > Cc: Chuong Tran > Cc: Graeme Gregory > Cc: Marcin Juszkiewicz > Cc: Marcin Wojtas > Cc: Meenakshi Aggarwal > Cc: Narinder Dhillon > Cc: Nhi Pham > Cc: Paul Grimes > Cc: Rebecca Cran > Cc: Sami Mujawar > Cc: Thomas Abraham > Cc: Wenyi Xie > Cc: Jeremy Linton > Cc: Ling Jia > Cc: Peng Xie > Cc: Sami Mujawar > Cc: Thomas Abraham > Cc: Wenyi Xie > Cc: Yiqi Shu > Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm 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 > #include > > -//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 > #include > > -// > -// 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 > #include > > -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] -=-=-=-=-=-=-=-=-=-=-=-