blob: 152cb3626de554b2bd76551099fc20ac9f79bcff [file] [log] [blame]
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +05301/*
2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6#include <platform.h>
7#include "versal_private.h"
8
9int plat_core_pos_by_mpidr(u_register_t mpidr)
10{
11 if (mpidr & MPIDR_CLUSTER_MASK)
12 return -1;
13
14 if ((mpidr & MPIDR_CPU_MASK) >= PLATFORM_CORE_COUNT)
15 return -1;
16
17 return versal_calc_core_pos(mpidr);
18}