ArmPlatformPkg/ArmPlatformLib: Drop unused MPCore routines

Some of the boilerplate in ArmPlatformLib is only relevant when entering
UEFI on multiple cores, and this is no longer supported. So retire the
associated helper routines.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Ard Biesheuvel 2024-08-01 12:22:44 +02:00 committed by mergify[bot]
parent 5c566abb12
commit 0a6d41ba0a
4 changed files with 0 additions and 111 deletions

View File

@ -21,49 +21,6 @@
#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
);
/**
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
);
/**
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
);
/**
Return the current Boot Mode

View File

@ -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

View File

@ -10,34 +10,3 @@
ASM_FUNC(ArmPlatformPeiBootAction)
bx lr
//UINTN
//ArmPlatformGetCorePosition (
// IN UINTN MpId
// );
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

View File

@ -90,10 +90,6 @@ ArmPlatformInitialize (
IN UINTN MpId
)
{
if (!ArmPlatformIsPrimaryCore (MpId)) {
return RETURN_SUCCESS;
}
// TODO: Implement me
return RETURN_SUCCESS;