1# 2# Copyright (c) 2011-2013, ARM Limited. All rights reserved. 3# 4# This program and the accompanying materials 5# are licensed and made available under the terms and conditions of the BSD License 6# which accompanies this distribution. The full text of the license may be found at 7# http://opensource.org/licenses/bsd-license.php 8# 9# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 10# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 11# 12# 13 14#include <AsmMacroIoLib.h> 15#include <Library/ArmLib.h> 16 17//UINTN 18//ArmPlatformGetPrimaryCoreMpId ( 19// VOID 20// ); 21ASM_FUNC(ArmPlatformGetPrimaryCoreMpId) 22 MOV32 (r0, FixedPcdGet32 (PcdArmPrimaryCore)) 23 bx lr 24 25//UINTN 26//ArmPlatformIsPrimaryCore ( 27// IN UINTN MpId 28// ); 29ASM_FUNC(ArmPlatformIsPrimaryCore) 30 MOV32 (r1, FixedPcdGet32 (PcdArmPrimaryCoreMask)) 31 and r0, r0, r1 32 MOV32 (r1, FixedPcdGet32 (PcdArmPrimaryCore)) 33 cmp r0, r1 34 moveq r0, #1 35 movne r0, #0 36 bx lr 37 38//UINTN 39//ArmPlatformGetCorePosition ( 40// IN UINTN MpId 41// ); 42ASM_FUNC(ArmPlatformGetCorePosition) 43 and r0, r0, #ARM_CORE_MASK 44 bx lr 45 46ASM_FUNC(ArmPlatformPeiBootAction) 47 bx lr 48 49ASM_FUNCTION_REMOVE_IF_UNREFERENCED 50