2 * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
4 * SPDX-License-Identifier: BSD-3-Clause
9 #include <plat/common/platform.h>
14 #pragma weak plat_arm_get_cpu_pe_count
17 /******************************************************************************
18 * This function implements a part of the critical interface between the psci
19 * generic layer and the platform that allows the former to query the platform
20 * to convert an MPIDR to a unique linear index. An error code (-1) is
21 * returned in case the MPIDR is invalid.
22 *****************************************************************************/
23 int plat_core_pos_by_mpidr(u_register_t mpidr
)
25 if (arm_check_mpidr(mpidr
) == 0) {
27 assert((read_mpidr_el1() & MPIDR_MT_MASK
) != 0);
30 * The DTB files don't provide the MT bit in the mpidr argument
31 * so set it manually before calculating core position
33 mpidr
|= MPIDR_MT_MASK
;
35 return plat_arm_calc_core_pos(mpidr
);
41 /******************************************************************************
42 * This function returns the PE count within the physical cpu corresponding to
43 * `mpidr`. Now one cpu only have one thread, so just return 1.
44 *****************************************************************************/
45 unsigned int plat_arm_get_cpu_pe_count(u_register_t mpidr
)
49 #endif /* ARM_PLAT_MT */