Soby Mathew | fec4eb7 | 2015-07-01 16:16:20 +0100 | [diff] [blame] | 1 | /* |
Roberto Vargas | 2b36b15 | 2018-02-12 12:36:17 +0000 | [diff] [blame] | 2 | * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. |
Soby Mathew | fec4eb7 | 2015-07-01 16:16:20 +0100 | [diff] [blame] | 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Soby Mathew | fec4eb7 | 2015-07-01 16:16:20 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <plat_arm.h> |
Roberto Vargas | 2b36b15 | 2018-02-12 12:36:17 +0000 | [diff] [blame] | 8 | #include <platform.h> |
Soby Mathew | fec4eb7 | 2015-07-01 16:16:20 +0100 | [diff] [blame] | 9 | |
Summer Qin | 93c812f | 2017-02-28 16:46:17 +0000 | [diff] [blame] | 10 | #if ARM_PLAT_MT |
| 11 | #pragma weak plat_arm_get_cpu_pe_count |
| 12 | #endif |
| 13 | |
Soby Mathew | fec4eb7 | 2015-07-01 16:16:20 +0100 | [diff] [blame] | 14 | /****************************************************************************** |
| 15 | * This function implements a part of the critical interface between the psci |
| 16 | * generic layer and the platform that allows the former to query the platform |
| 17 | * to convert an MPIDR to a unique linear index. An error code (-1) is |
| 18 | * returned in case the MPIDR is invalid. |
| 19 | *****************************************************************************/ |
| 20 | int plat_core_pos_by_mpidr(u_register_t mpidr) |
| 21 | { |
| 22 | if (arm_check_mpidr(mpidr) == 0) |
| 23 | return plat_arm_calc_core_pos(mpidr); |
| 24 | |
| 25 | return -1; |
| 26 | } |
Summer Qin | 93c812f | 2017-02-28 16:46:17 +0000 | [diff] [blame] | 27 | |
| 28 | #if ARM_PLAT_MT |
| 29 | /****************************************************************************** |
| 30 | * This function returns the PE count within the physical cpu corresponding to |
| 31 | * `mpidr`. Now one cpu only have one thread, so just return 1. |
| 32 | *****************************************************************************/ |
| 33 | unsigned int plat_arm_get_cpu_pe_count(u_register_t mpidr) |
| 34 | { |
| 35 | return 1; |
| 36 | } |
| 37 | #endif /* ARM_PLAT_MT */ |