plat_versal.c 405 Bytes
Newer Older
1
/*
2
 * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
3
4
5
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */
6

7
#include <plat_private.h>
8
9
#include <plat/common/platform.h>

10
11
int plat_core_pos_by_mpidr(u_register_t mpidr)
{
12
	if (mpidr & MPIDR_CLUSTER_MASK) {
13
		return -1;
14
	}
15

16
	if ((mpidr & MPIDR_CPU_MASK) >= PLATFORM_CORE_COUNT) {
17
		return -1;
18
	}
19
20
21

	return versal_calc_core_pos(mpidr);
}