blob: 9b114e2cd6e12280df21cd9f2ca969156a6eac5b [file] [log] [blame]
Soby Mathewfec4eb72015-07-01 16:16:20 +01001/*
Summer Qin93c812f2017-02-28 16:46:17 +00002 * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
Soby Mathewfec4eb72015-07-01 16:16:20 +01003 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
Soby Mathewfec4eb72015-07-01 16:16:20 +01005 */
6
7#include <plat_arm.h>
8
Summer Qin93c812f2017-02-28 16:46:17 +00009#if ARM_PLAT_MT
10#pragma weak plat_arm_get_cpu_pe_count
11#endif
12
Soby Mathewfec4eb72015-07-01 16:16:20 +010013/******************************************************************************
14 * This function implements a part of the critical interface between the psci
15 * generic layer and the platform that allows the former to query the platform
16 * to convert an MPIDR to a unique linear index. An error code (-1) is
17 * returned in case the MPIDR is invalid.
18 *****************************************************************************/
19int plat_core_pos_by_mpidr(u_register_t mpidr)
20{
21 if (arm_check_mpidr(mpidr) == 0)
22 return plat_arm_calc_core_pos(mpidr);
23
24 return -1;
25}
Summer Qin93c812f2017-02-28 16:46:17 +000026
27#if ARM_PLAT_MT
28/******************************************************************************
29 * This function returns the PE count within the physical cpu corresponding to
30 * `mpidr`. Now one cpu only have one thread, so just return 1.
31 *****************************************************************************/
32unsigned int plat_arm_get_cpu_pe_count(u_register_t mpidr)
33{
34 return 1;
35}
36#endif /* ARM_PLAT_MT */