mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-08-15 00:47:02 +02:00
MISRA Violation: MISRA-C:2012 R.4.6 - Using basic numerical type int rather than a typedef that includes size and signedness information. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com> Change-Id: I9fb686e7aa2b85af6dfcb7bb5f87eddf469fb85c
22 lines
409 B
C
22 lines
409 B
C
/*
|
|
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <plat_private.h>
|
|
#include <plat/common/platform.h>
|
|
|
|
int32_t plat_core_pos_by_mpidr(u_register_t mpidr)
|
|
{
|
|
if (mpidr & MPIDR_CLUSTER_MASK) {
|
|
return -1;
|
|
}
|
|
|
|
if ((mpidr & MPIDR_CPU_MASK) >= PLATFORM_CORE_COUNT) {
|
|
return -1;
|
|
}
|
|
|
|
return zynqmp_calc_core_pos(mpidr);
|
|
}
|